Gyvar docs

The Balance object

The shape of a balance wherever the API returns one.

Every endpoint that returns a balance returns this shape, wrapped in a data envelope.

Attributes

currency

string · always present

The asset code - BTC, USDT, USDC.

decimals

integer · always present

Always published. It is what makes amount_minor interpretable, and zero-decimal currencies are a real trap elsewhere in this API.

amount

string · always present

The main field. A decimal string with exactly decimals places, never trimmed - so it fails loudly if something parses it as an integer, which amount_minor would not.

amount_minor

string · always present

The same figure in minor units. Use this for arithmetic.

The Balance object
{
  "currency": "USDT",
  "decimals": 6,
  "amount": "120.500000",
  "amount_minor": "120500000"
}

On this page