You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to round the prices I use the pricePrecision which is provided by the market() function.
is there a similar precision for the amounts. e.g. ETH should be 2 decimals I think, while XRP seems to be 0 decimals I think.
The text was updated successfully, but these errors were encountered:
For amounts, there isn't a precision, but rather an amount of decimals. These can be acquired from the 'assets' call.
Make sure you understand precision and decimals are NOT the same. Take the number 3543.3526246, formatted with 5 decimals this becomes 3543.35262. Formatted with precision 5, it becomes 3543.4.
to round the prices I use the
pricePrecision
which is provided by themarket()
function.is there a similar precision for the amounts. e.g. ETH should be 2 decimals I think, while XRP seems to be 0 decimals I think.
The text was updated successfully, but these errors were encountered: