blockchain_market_price_history returns bizarre number of decimal places

Started by monsterer, October 08, 2014, 09:51:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

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.

monsterer

Im getting:

{"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

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.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads