Networks and assets
An install runs Bitcoin, EVM, TRON, Solana and XRPL networks, as its operator enables them. Amounts are decimal strings in the asset's own units, such as "12.5", in the API and in events.
Chain families
| Family | Native asset | Tokens for payments | Tokens for payouts |
|---|---|---|---|
| Bitcoin | BTC | None | None |
| EVM: Ethereum, BSC and networks the operator adds | ETH, BNB and others | evm_erc20 | evm_erc20 |
| TRON | TRX | tron_trc20 | tron_trc20 |
| Solana | SOL | None | solana_spl |
| XRPL | XRP | None | xrpl_issued |
A network's family names its row in this table. listAssets lists only the assets the operator has enabled, and each one's capabilities has the final word: deposit for payments and payout for payouts.
Codes and IDs
A request that takes a network takes its code or its id. The codes are tron, ethereum, bsc, bitcoin, solana, xrpl, and evm-<chain id> for an EVM network the operator added. An install runs one network of each code, so a code is the same on a testnet install and a mainnet one, while the ids differ; testnet is true on a network whose coins have no value. A code the install does not run answers 400 with error.field.
An asset's code is its coin's code, the same on every network that carries it: usdt is USDT on TRON, Ethereum and BSC. Codes compare without regard to case. listAssets with network=tron&code=usdt finds USDT on TRON. One network can list two assets of one code, such as a token and its bridged copy: the asset's id is its identity, and a request that takes one asset, such as listTransactions with asset, refuses a code that names more than one and lists their ids. createPayout takes the asset_id and no network, because the asset names its network.
Amounts
| Where | Form |
|---|---|
| Requests | A positive decimal string. JSON numbers, signs and exponents are refused. |
| Responses | A decimal string with no exponent and no trailing zeros |
amounts in payments and transaction.* events | Signed: negative is money leaving the install |
amount in payout.* events | The payout's positive amount, as getPayout shows it |
"0.5" of ETH is half an ether, not a count of wei. An amount finer than the asset allows gets 422 with invalid_amount_precision. An asset's decimals is the finest it allows; it is null only for an XRPL issued currency, whose amounts are decimals of their own.
Parse amounts with a decimal type, never a float, and compare them as numbers, not strings.