> For the complete documentation index, see [llms.txt](https://docs.anchored.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anchored.finance/trading-api/reference/environments-and-chains.md).

# Environments & Chains

Use this page to choose the correct base URL, chain ID, product type, and spender assumptions. These docs focus the Anchored RWA API.

## Base URL

Production Trading API:

```
https://rwa-api.anchored.finance/rwa/trading
```

All endpoint paths start with `/api/v1`.

HMAC authentication uses the path only:

```
/api/v1/symbols
```

Do not sign the domain or `/rwa/trading` prefix.

## Product Context

Every request must include both:

| Header           | Meaning                                               |
| ---------------- | ----------------------------------------------------- |
| `x-api-chain-id` | Chain context for the request                         |
| `x-api-p`        | Product context. Use `Anchored` for the Anchored API. |

The API key must have a matching `chainId + productType + access` permission.

## Supported Chain IDs

| Chain ID   | Chain            |
| ---------- | ---------------- |
| `8453`     | Base Mainnet     |
| `1`        | Ethereum Mainnet |
| `143`      | Monad Mainnet    |
| `11155111` | Ethereum Sepolia |
| `10143`    | Monad Testnet    |
| `84532`    | Base Sepolia     |

## Mainnet Contract Addresses

Anchored production uses the same deterministic proxy addresses on Base, Monad, and Ethereum:

| Contract         | Address                                      |
| ---------------- | -------------------------------------------- |
| `StockRouter`    | `0x4f090d817fd83753988a7b0c1d76f170f8461be8` |
| `Cashier`        | `0x8c1b182bb0fe4e8407404ffe37c974d6dacef3a9` |
| `Stock`          | `0x6d202d2f78aa26a7db51491416abf7f7a5003aac` |
| `OneClickRouter` | `0x102c30ac544aed8cbf838fdc1b1677ff16df0e65` |

## Mainnet Cash Tokens and Approval Spenders

| Chain ID | Chain            | Cash token                                   | Approval spender (`StockRouter`)             |
| -------- | ---------------- | -------------------------------------------- | -------------------------------------------- |
| `8453`   | Base Mainnet     | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | `0x4f090d817fd83753988a7b0c1d76f170f8461be8` |
| `143`    | Monad Mainnet    | `0x754704Bc059F8C67012fEd69BC8A327a5aafb603` | `0x4f090d817fd83753988a7b0c1d76f170f8461be8` |
| `1`      | Ethereum Mainnet | `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48` | `0x4f090d817fd83753988a7b0c1d76f170f8461be8` |

Production cash config from `anchored-contracts` `config/production`:

| Config                     | Value                    |
| -------------------------- | ------------------------ |
| Deposit rate               | `1`                      |
| Withdrawal rate            | `0.9979`                 |
| Minimum amount             | `90` cash-token units    |
| `creditBufferCapacity`     | `20000` `mUSD`           |
| `withdrawalBufferCapacity` | `10000` cash-token units |
| `instantThresholdDivisor`  | `5`                      |

## Request Context Checklist

Before sending state-changing requests, confirm:

| Item             | Expected                                       |
| ---------------- | ---------------------------------------------- |
| Base URL         | `https://rwa-api.anchored.finance/rwa/trading` |
| HMAC URI         | `/api/v1/...` only                             |
| `x-api-chain-id` | Matches wallet network                         |
| `x-api-p`        | Exact product value                            |
| API key scope    | Allows requested chain/product/access          |
| Deposit spender  | Matches chain/product                          |
| Wallet allowance | Sufficient before deposit                      |

## Common Mismatches

| Mismatch                    | Symptom                         | Fix                                        |
| --------------------------- | ------------------------------- | ------------------------------------------ |
| Wallet on wrong chain       | Tx fails or hits wrong contract | Switch wallet to `x-api-chain-id`          |
| API key lacks product scope | `Unauthorized`                  | Grant correct `chainId + x-api-p + access` |
| Wrong `x-api-p` casing      | `Unsupported product`           | Use exact `Anchored`                       |
| Wrong spender               | Deposit tx reverts              | Use spender for chain/product              |
| Wrong HMAC URI              | `Unauthorized`                  | Authenticate `/api/v1/...` only            |
