Author Topic: blockchain_market_price_history returns bizarre number of decimal places  (Read 1019 times)

0 Members and 1 Guest are viewing this topic.

Offline modprobe

This is not a bug. Prices are defined to have pretty much arbitrarily high precision, as they represent the ratio between two assets, meaning the price needs greater precision than either asset. This command is not intended to be used by humans anyways (except for debugging) so whatever client code is calling it can do any rounding it needs to do.

Offline monsterer

Im getting:

Code: [Select]
{"timestamp":"20141004T000000","highest_bid":0.032679738562091512,"lowest_ask":0.030519999755840001,"opening_price":0.032880567913168998,"closing_price":0.032880567913168998,"volume":99851850031,"recent_average_price":null}
When calling

Code: [Select]
blockchain_market_price_hostory ["USD","BTSX","20141003T000000",86400,"each_day"]
That's 18 decimal places for a price quoted in USD, when USD precision is 10000, which corresponds to 4 decimal places?

Cheers, Paul.
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads