`balance` and `cleared_balance` are not doubles and have a trailing 0

I'm currently making a request for my accounts

https://api.youneedabudget.com/v1/budgets/{budget_id/accounts

and I'm very confused by the amounts coming back in `balance` and `cleared_balance`. It seems that there is a trailing 0. For example:

            {
                "id": "something",
                "name": "💵 Cash",
                "type": "savings",
                "on_budget": true,
                "closed": false,
                "note": null,
                "balance": 22000,
                "cleared_balance": 29000,
                "uncleared_balance": -7000,
                "deleted": false
            },

This cash account has $29 in it. and the uncleared balance is $7, which means that an arbitrary 0 is getting applied to the end. There are some places that have 3 decimal points of precision on dollar values (like gas), but ynab never shows any of this. Why would the API have this precision? 

I also noticed the balances are displayed as a whole number. Dollar values should be represented with a double, or something similar:

"cleared_balance": 29.00,  

 

Is there a reason that this was done? 

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 1 yr agoLast active
  • 2Replies
  • 318Views
  • 3 Following