> For the complete documentation index, see [llms.txt](https://docs-swap.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-swap.crypto-chief.com/getting-started/networks-and-tokens.md).

# Networks and Tokens

## Networks and Tokens

### Network codes

Every call takes a `network` code. Codes are case-insensitive. [`POST /v1/networks`](/api-reference/networks.md) returns this list with live readiness (`ready`, `reason`). A network that did not start answers `503 NETWORK_UNAVAILABLE`; one whose state lags answers `503 STATE_STALE`.

**Mainnets**

| Code               | Family     | Chain ID       | Native coin |
| ------------------ | ---------- | -------------- | ----------- |
| `ETH_MAINNET`      | EVM        | 1              | ETH         |
| `BSC_MAINNET`      | EVM        | 56             | BNB         |
| `POLYGON_MAINNET`  | EVM        | 137            | POL         |
| `ARBITRUM_ONE`     | EVM        | 42161          | ETH         |
| `OPTIMISM_MAINNET` | EVM        | 10             | ETH         |
| `AVAX_MAINNET`     | EVM        | 43114          | AVAX        |
| `TRON_MAINNET`     | TRON       | —              | TRX         |
| `SOLANA_MAINNET`   | Solana     | —              | SOL         |
| `TON_MAINNET`      | TON        | —              | TON         |
| `XRP_MAINNET`      | XRP Ledger | 0 (network id) | XRP         |

**Testnets**

| Code               | Family     | Chain ID       | Native coin |
| ------------------ | ---------- | -------------- | ----------- |
| `ETH_SEPOLIA`      | EVM        | 11155111       | ETH         |
| `BSC_TESTNET`      | EVM        | 97             | BNB         |
| `ARBITRUM_SEPOLIA` | EVM        | 421614         | ETH         |
| `OPTIMISM_SEPOLIA` | EVM        | 11155420       | ETH         |
| `AVAX_TESTNET`     | EVM        | 43113          | AVAX        |
| `TRON_NILE`        | TRON       | —              | TRX         |
| `XRP_TESTNET`      | XRP Ledger | 1 (network id) | XRP         |

Testnets are the place to develop: the same requests, the same shapes, valueless coins. There is no Solana or TON testnet.

### Naming a token

`token_in` and `token_out` accept these forms per family:

| Family     | Accepted values                                                                                                             |
| ---------- | --------------------------------------------------------------------------------------------------------------------------- |
| EVM        | Contract address (`0x…`), a symbol from the network's token list, `NATIVE`, or `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` |
| TRON       | Address in base58 (`T…`), a symbol, `NATIVE`                                                                                |
| Solana     | Mint address, a symbol, `NATIVE` / `SOL` (the wSOL mint also means SOL)                                                     |
| TON        | Jetton master address, a symbol, `NATIVE` / `TON`                                                                           |
| XRP Ledger | `XRP` / `NATIVE`, a symbol, or `CUR.rIssuer` / `CUR:rIssuer` (a 3-character code or 40 hex characters)                      |

The list of a network's tokens with their symbols, addresses and decimals is [`POST /v1/tokens`](/api-reference/tokens.md). A token outside the list is still accepted **by address**; it gets the flag `unverified`, its symbol is read from the contract, and routes through it carry the `token_flags` risk factor. `POST /v1/tokens` with `include_unverified: true` lists the tokens learned this way.

A token that cannot be found at all is a `400 TOKEN_NOT_FOUND`.

{% hint style="warning" %}
**Symbols are per network.** `USDC` on `ETH_MAINNET` and `USDC` on `BSC_MAINNET` are different contracts with different decimals (6 on Ethereum, 18 on BNB Smart Chain). Always check `decimals` in the token object of the response before computing amounts yourself.
{% endhint %}

### Amounts

Amounts are decimal **strings** in base units — wei on EVM, sun on TRON, lamports on Solana, nanoTON on TON, drops on XRP Ledger; for a token, the unit is 10^−decimals of it. Every `*_human` field carries the same amount with decimals applied, for reading.

```
1000 USDC (6 decimals)  →  "1000000000"
1 ETH (18 decimals)     →  "1000000000000000000"
```

Strings, never JSON numbers: a number that passes through a float parser has been rounded.

`amount_in` and `amount_in_human` address the same value two ways — base units, or with a decimal point (`"1.5"`). **Exactly one of them.** Both or neither is `400 AMOUNT_INVALID`, as is a zero amount or one that does not fit the network's amount type.

{% hint style="info" %}
Inside an XRP Ledger step, the transaction itself uses the ledger's own formats: drops for XRP, decimal strings for issued currencies. The top-level `amount_*` fields of the response always follow the base-units convention above.
{% endhint %}

### Token flags

Tokens in responses carry `flags` when any apply. The common flags:

| Flag                     | Meaning                                                                                                                         |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `fee_on_transfer`        | The token takes a tax on transfers                                                                                              |
| `rebasing`               | Balances change on their own                                                                                                    |
| `pausable`               | The contract can be paused by its owner                                                                                         |
| `blacklist`              | The contract can block addresses                                                                                                |
| `approve_reset_required` | The allowance must be set to zero before a new value; builds insert an `approve_reset` step (USDT on Ethereum behaves this way) |
| `unverified`             | Not in the network's configured list; accepted by address                                                                       |

Solana and XRP Ledger tokens can also carry:

| Family     | Flags                                                                                                                                                                                                                                                 |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Solana     | `token_2022`, `transfer_fee`, `transfer_hook`, `permanent_delegate`, `default_frozen`, `non_transferable`, `paused`, `interest_bearing`, `scaled_ui_amount`, `confidential_transfer`, `freeze_authority` (Token-2022 extensions and mint authorities) |
| XRP Ledger | `transfer_fee`, `clawback`, `require_auth`, `no_freeze` (issuer settings), `amm_lp_token`                                                                                                                                                             |

Treat a flag you do not know as informational: new values can appear. Flags feed the risk assessment: a flagged token adds the `token_flags` risk factor to the quote.

### Approvals exist only on EVM and TRON

The `/v1/approve/*` endpoints answer `400 INVALID_REQUEST` on Solana, TON and XRP Ledger — those networks have no allowances. Their setup happens inside the build instead: Solana creates the output **token account** (the account that holds one token for one wallet) inside the swap transaction, and XRP Ledger adds a `trust_set` step before the swap. See [How a Swap Works](/getting-started/how-a-swap-works.md#setup-steps).
