Author Topic: RPC wallet_account_balance gives number without a decimal point  (Read 1580 times)

0 Members and 1 Guest are viewing this topic.

Offline maverica

  • Jr. Member
  • **
  • Posts: 22
    • View Profile

Offline 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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline maverica

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
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