BTCMarkets / API

API
120 stars 30 forks source link

Get account balance api call - display decimals #98

Closed sachinmw closed 6 years ago

sachinmw commented 6 years ago

Get account balance api call made using python does not display decimals in the account balance

balance': 200185479594

full output below

[{u'currency': u'BCH', u'pendingFunds': 0, u'balance': 0}, {u'currency': u'AUD', u'pendingFunds': 0, u'balance': 119}, {u'currency': u'BTC', u'pendingFunds': 0, u'balance': 0}, {u'currency': u'LTC', u'pendingFunds': 0, u'balance': 151385554}, {u'currency': u'ETH', u'pendingFunds': 0, u'balance': 125512646}, {u'currency': u'XRP', u'pendingFunds': 0, u'balance': 102185479594}, {u'currency': u'ETC', u'pendingFunds': 0, u'balance': 0}, {u'currency': u'USD', u'pendingFunds': 0, u'balance': 0}]
justin-ngin commented 6 years ago

Hi @sachinmw,

Please note, as mentioned on the Trading API wiki page https://github.com/BTCMarkets/API/wiki/Trading-API, numbers are multiplied by 1x10^8, or 100000000, and should not have decimals. Numbers need to be formatted this way in requests, and aside from the market data API, numbers are also returned in responses in this format. I'll see if we can have this information added to the Account API wiki page as well to avoid confusion in the future.

Thanks & regards, Justin

justin-ngin commented 6 years ago

Unless there is anything else to add to this issue, I am closing it for now.