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

Normalise precision in market structure #22176

Open
WillPCowan opened this issue Apr 16, 2024 · 1 comment
Open

Normalise precision in market structure #22176

WillPCowan opened this issue Apr 16, 2024 · 1 comment
Assignees

Comments

@WillPCowan
Copy link

WillPCowan commented Apr 16, 2024

Operating System

No response

Programming Languages

Python 3.11

CCXT Version

4.2.99

Description

Currently precision values (for quantity/price) in market structures are not normalised. For example for the precision of 1e-4, this could be represented with the form '4' or '0.0001' depending on the exchange.

E.g. Bybit ETH/USDT (using decimal form)
'precision': {'amount': 1e-05, 'price': 0.01, 'cost': None, 'base': None, 'quote': None}

E.g. Binance ETH/USDT (using integer form)
'precision': {'amount': 4, 'price': 2, 'cost': None, 'base': 8, 'quote': 8}

It'd be better to use the form '0.0001' so that when e.g. min quantity is something like 1000KRW (e.g. Upbit ETH/KRW) then there is no issue.

Code

  

@sc0Vu sc0Vu self-assigned this Apr 17, 2024
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

3 participants
@sc0Vu @WillPCowan and others