RPC wallet_account_balance gives number without a decimal point

Started by maverica, April 18, 2015, 10:41:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


monsterer

Call get_asset on the asset that you have a balance for and inside the returned data is a precision variable which you can then divide your ulong by to get the actual real number.
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

maverica

Hello,

I'm making a small app and using jsonRPCClient PHP library to post balance request about my open wallet in bitshares client. The balance I get is something of ten digits 1234567890, whether this balance is 12.34567890 or 12345.67890 I cant distinguish from the result that the API is returning. The command I am using is wallet_account_balance. Currently im modifying the string but that is not such a good idea if the decimal point changes position. Any idea on how to get a real number?

Thanks