All monetary values must be formatted as an integer in the smallest denomination for the given currency. The smallest denomination for stable coin assets is typically not the same as the smallest unit used for payment in the fiat equivalent currency.
Examples:
- Two-decimal fiat currency (for example US Dollars): $13.14 USD, amount will be
1314
. - Zero-decimal fiat currency (for example Japanese Yen): ¥1314 JPY, amount will be
1314
. - Six-decimal crypto assets (for example USDC): $13.14 USDC, amount will be
13140000
.
Currency Codes
Fiat currencies are specified with an ISO 4217 code.
Converting USDC to USD
USDC is pegged 1:1 for USD, the smallest possible unit of USDC represents one 10,000th of 1 USD cent. For example: 5,000,000 USDC minor units = 500 USD minor units (cents).
Fiat Amount | Fiat Minor Units | Token Minor Units |
---|---|---|
$5.00 USD | 500 USD cents | 5000000 USDC |