bitbns-official / bitbnspy

MIT License
9 stars 6 forks source link

BTC/INR pair giving wrong Qty via api #57

Closed sukhwant280 closed 3 years ago

sukhwant280 commented 3 years ago

Describe your environment

Describe the problem:

running this Api: pd.json_normalize(bitbnsObj.getBuyOrderBook(BTC), "data", meta=["status", "error","code"])

Observed Results:

please opine

sanket-buyhatke commented 3 years ago

hi @sukhwant280, the quantity here needs to refactored to 10^-8 decimals (currently it is displayed in sats).

e.g

data = {'rate': 2663113.45, 'btc': 87190000}
vol = data['btc'] * (10 ** -8)
print(vol)

output:

0.8719
sukhwant280 commented 3 years ago

should not this be already factored in the api.. as there are so many other coins and will be challenging to resolve for these specific coins?

Enhancement request can we take and if taking, please provide eta.

thanks sukhwant

sanket-buyhatke commented 3 years ago

AFAIK, only btc

noted. (as changing it on the backend could disrupt the flow for those who have implemented the refactoring, it will take a while to roll out the change)

would suggest implementing client side change for now.

sukhwant280 commented 3 years ago

noted. just to confirm, BTC is only coin to be refactored?

please close the ticket after response

sanket-buyhatke commented 3 years ago

yes