Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming and Number representation in Orders #187

Open
Devel484 opened this issue Aug 16, 2022 · 1 comment
Open

Naming and Number representation in Orders #187

Devel484 opened this issue Aug 16, 2022 · 1 comment

Comments

@Devel484
Copy link

Devel484 commented Aug 16, 2022

The RPC query to Orders return a different number and naming(camelCase and snake_case) representation.

Response from from txRawLog
image

Websocket orders channel
image

RPC query of orders
image

Effected fields:

  • price
  • stopPrice
  • avgFilledPrice
@Devel484 Devel484 changed the title Number representation in Orders Naming and Number representation in Orders Aug 16, 2022
@stevenkhong
Copy link
Contributor

This is an artefact from the grpc implementation using protobuff encoding. The generated codecs shifts cosmos-sdk Dec types with an additional 18 decimal points (on top of raw cryptocurrency uint128 units).

We're looking at adding a formatting layer in this SDK to overcome this issue.

Side note: this affects any field with cosmos sdk.Dec type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants