# Error Code Index

Every non-zero `code` in the response envelope is listed here. Codes are grouped by domain.

> **How to read a failure:** the HTTP status (`400` / `422` / `429` / …) gives the **category** — see [HTTP Status Codes](file:///1548985/conventions/http-status-codes.md). The envelope `code` gives the **specific reason** (look it up below). `msg` is human-readable; `trace_code` is for support diagnostics.

## Chain Layer · `10000` – `19999`

|   Code  | Meaning                                                                    |
| :-----: | -------------------------------------------------------------------------- |
| `10001` | Signature verification failed                                              |
| `10002` | Nonce already used or outside the sliding window                           |
| `10003` | Agent Key not authorized or insufficient permission                        |
| `10004` | Transaction expired (nonce outside time window)                            |
| `10005` | Endpoint not supported                                                     |
| `10006` | Malformed parameter                                                        |
| `10007` | Agent Key limit reached (already 4 on this authorized account)             |
| `10008` | Agent Key expired (`valid_days` exhausted)                                 |
| `10009` | Agent address already approved (cannot re-approve under a different label) |
| `10010` | `authorized_address` is not the signer's own / sub-account                 |
| `10011` | `agent_address` already has a TradeVM account                              |
| `10012` | Agent does not exist or is not approved (during revoke)                    |
| `10013` | `valid_days` out of range \[1, 180]                                        |

## Account · `20000` – `29999`

|   Code  | Meaning                                                      |
| :-----: | ------------------------------------------------------------ |
| `20001` | Account does not exist                                       |
| `20002` | Account frozen                                               |
| `20003` | Insufficient balance                                         |
| `20004` | Position-mode switch failed (open orders or positions exist) |
| `20005` | Withdrawal below minimum                                     |
| `20006` | Withdrawal above maximum withdrawable                        |
| `20007` | Auto-borrow disabled but operation would produce debt        |
| `20014` | Signer cannot create a sub-account (is itself a sub-account) |
| `20015` | Sub-account label already exists                             |
| `20017` | Sub-account count exceeds limit                              |

## Order · `30000` – `39999`

Full Trading-layer error codes are documented inline on each Trading endpoint reference page. The most common ones:

|   Code  | Meaning                                       |
| :-----: | --------------------------------------------- |
| `30001` | Order quantity below minimum                  |
| `30002` | Price out of allowed band                     |
| `30003` | Order rejected by STP (self-trade prevention) |
| `30004` | `client_order_id` already in use              |
| `30005` | Order not found                               |

## Position · `40000` – `49999`

|   Code  | Meaning                                                             |
| :-----: | ------------------------------------------------------------------- |
| `40001` | Position not found                                                  |
| `40002` | Leverage exceeds bracket limit                                      |
| `40003` | Isolated position with existing exposure can only be deleveraged-up |
| `40004` | Isolated margin reduction would drop below maintenance              |
| `40005` | Not an isolated position (margin add/remove is isolated-only)       |
| `40006` | Open-interest cap exceeded                                          |

## Risk · `50000` – `59999`

|   Code  | Meaning               |
| :-----: | --------------------- |
| `50001` | Liquidation triggered |
| `50002` | ADL triggered         |

## Fund · `60000` – `69999`

|   Code  | Meaning                                                                    |
| :-----: | -------------------------------------------------------------------------- |
| `60001` | Deposit not yet credited                                                   |
| `60002` | Withdrawal chain not supported                                             |
| `60003` | Invalid withdrawal address                                                 |
| `60004` | Target address not initialized in TradeVM (internal transfer)              |
| `60005` | No permission to transfer from `from_address` (signer has no relationship) |
| `60006` | Target address is not a valid EVM address                                  |
| `60007` | Transfer amount below minimum                                              |

## Indexer · `210000` – `219999`

|   Code   | Meaning                   |
| :------: | ------------------------- |
| `210001` | Invalid query parameter   |
| `210002` | Invalid pagination cursor |
| `211001` | Order not found           |
| `213001` | Position not found        |

## Quote / WebSocket · `220000` – `229999`

|   Code   | Meaning                                                |
| :------: | ------------------------------------------------------ |
| `220001` | Symbol does not exist                                  |
| `220002` | Channel does not exist                                 |
| `220003` | Invalid interval parameter                             |
| `220004` | Channel-subscription limit exceeded                    |
| `222001` | Invalid `depth`                                        |
| `222002` | Invalid `merge` (not in `price_step_merge_multiplier`) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lynxtrade.world/reference/error-code-index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
