# Chains, coins & rates

> The list is managed by the platform admin and changes without code. All outputs below were
> captured from a running server (test mode, 2026-10-02); long lists are shortened with `…`.

## List chains and coins
`GET /v1/chains` — networks the platform supports right now, whether **you** have a wallet on each
(in the key's mode), and which coins your checkout will show.

```bash
curl https://razcryptogateway.com/v1/chains \
  -H "Authorization: Bearer sk_test_…"
```
```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "chain",
      "key": "bsc",
      "name": "BNB Smart Chain",
      "family": "evm",
      "chain_id": 56,
      "finality": "finalized",
      "confirmations": null,
      "wallet": { "address": "0x52908400098527886E0F7030069857D2E4169EE7", "status": "active" },
      "coins": [
        { "symbol": "USDT", "name": "Tether USD", "contract": "0x55d398326f99059ff775485246999027b3197955",
          "decimals": 18, "min_amount": "1", "display_decimals": 4, "enabled": true, "logo_url": null },
        { "symbol": "USDC", "name": "USD Coin", "contract": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
          "decimals": 18, "min_amount": "1", "display_decimals": 4, "enabled": true, "logo_url": null },
        { "symbol": "BNB", "name": "BNB", "contract": null,
          "decimals": 18, "min_amount": "0.001", "display_decimals": 6, "enabled": true, "logo_url": null }
      ]
    },
    { "key": "eth", "…": "…" },
    { "key": "sol", "…": "…" },
    { "key": "vdc", "…": "…" }
  ]
}
```
| Field | Notes |
|---|---|
| `finality` | `finalized` — we wait for the chain's finalized block (BSC, VDChain, Solana); `depth` — we wait `confirmations` blocks (Ethereum: 12) |
| `wallet` | Your receiving address on this chain in this mode, or `null`. `status`: `inactive`, `cooldown`, `activating`, `active`, `error` |
| `coins[].enabled` | `false` if you switched the coin off for your checkout |
| `decimals` | Per chain — e.g. USDT has **18** decimals on BSC but 6 on Ethereum/Solana |

Launch chains: `bsc` (BNB Smart Chain), `eth` (Ethereum), `sol` (Solana), `vdc` (VDChain, chain id
882026). Polygon exists but is switched off. Test mode (`sk_test_`) uses simulated payments — no
testnet coins needed.

## Rates
`GET /v1/rates?coins=USDT,BNB,ETH&currency=INR` (`currency`: any fiat in the platform list — USD, INR, EUR, GBP, AED, …)
```json
{"object":"rates","currency":"INR","data":{"USDT":"96.05260633325874","BNB":"74628.94580822931","ETH":"264309.7671569565"},"source":"coingecko","fetched_at":"2026-10-02T09:22:08.985Z"}
```
Sources, in order: CoinGecko (primary, any fiat), Binance (USD; other fiats derived), the last stored
price (up to 10 minutes old), admin-set fixed prices, and for stablecoins the 1 USD peg when every
live source is down — so payments never depend on a single price API. Cached about 60 s. These prices are indicative — the binding rate is the one locked in
a payment `quote`.

## Convert (estimate)
`GET /v1/rates/convert?amount=25.00&from=USD&to=USDT`
```json
{"object":"conversion","amount":"25.00","from":"USD","to":"USDT","result":"25.00527254","rate":"0.999789142679","source":"coingecko"}
```
`rate` is the price of 1 unit of the coin in the fiat currency. Errors: `currency_unsupported`,
`rates_unavailable` (503 — retry shortly).
