> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ansio.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors library

> Exchange codes, what they mean, and what to check before retrying an order.

## Start with the message

| Error | Meaning | Next check |
| - | - | - |
| `InvalidOrder` | The order violates a venue rule or has an unsupported parameter. This is a category, not an exchange code. | Price tick, quantity step, minimum notional, contract size, order type and position mode. |
| `InsufficientFunds` | Available funds or margin cannot cover the request. | Free balance, reserved orders and fees. Total wallet balance can exceed usable funds. |
| `BadSymbol` | The requested market cannot be resolved. | Exact venue, Spot/Futures market, settlement currency and listing status. |
| `OrderNotFound` | The lookup did not find the requested order. | Original order ID, client ID, symbol, open orders and recent executions. It does not prove cancellation. |
| `AuthenticationError` / `PermissionDenied` | The venue rejected credentials or access. | Key status, permissions, passphrase, IP restrictions and server clock. |
| `RateLimitExceeded` / `DDoSProtection` | The venue is throttling or blocking requests. | Wait for the stated retry interval. Repeated manual refreshes can extend the problem. |
| `RequestTimeout` / `ExchangeNotAvailable` | The response did not arrive or the service is unavailable. | Reconcile the original order before submitting a replacement. |

The message **Existing orders are held unless an explicit stop or liquidation policy requires cancellation** describes ANSIO's response to a block. It is not the underlying exchange error and does not mean every order was cancelled. Read the reason immediately above it.

## Futures quantity and InvalidOrder

Contracts, base tokens and quote value are different units. For a linear contract, approximate order value is contracts × contract size × price. Rounding a small quote budget down can leave zero contracts. Check the current contract specification before changing the budget. Increasing order size is a trading decision; ANSIO should explain the minimum rather than silently increase exposure.

## Exchange errors

### Binance

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Spot | `-1003` | Request limit exceeded. | Wait for the retry window. |
| Spot | `-1007` | Response timed out; execution is uncertain. | Look up the original order before resending. |
| Spot | `-1013` | Order filter rejected the request. | Read the named filter. |
| Spot | `-1015` | Order submission limit reached. | Reduce submission frequency. |
| Spot | `-1021` | Timestamp outside allowed window. | Check server clock. |
| Spot | `-1022` | Signature rejected. | Check signing configuration. |
| Spot | `-1121` | Unknown symbol. | Check listing and exact market. |
| Spot | `-2010` | New order rejected. | Read the accompanying reason. |
| Spot | `-2011` | Cancellation rejected. | Reconcile order status. |
| Spot | `-2013` | Order lookup found no match. | Check IDs and fills. |
| Spot | `PRICE_FILTER` | Price violates allowed tick/range. | Use instrument price rules. |
| Spot | `LOT_SIZE` | Quantity violates step/min/max. | Use instrument amount rules. |
| Spot | `MIN_NOTIONAL` | Order value below minimum. | Review the size before changing it. |

[Spot codes](https://developers.binance.com/en/docs/products/spot/errors) · [USD-M Futures codes](https://developers.binance.com/docs/derivatives/usds-margined-futures/error-code)

### MEXC

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Spot | `-2011` | Order unavailable for this operation. | Check original ID and fills. |
| Spot | `26` | Operation not allowed. | Check endpoint and account restrictions. |
| Spot | `400` | API key missing. | Check credential configuration. |
| Spot | `401` | Request not authorised. | Check key permissions and signature. |
| Spot | `403` | Access denied. | Check restrictions and request rate. |
| Spot | `429` | Requests are throttled. | Wait; do not repeatedly refresh. |
| Spot | `500` | Exchange processing failure. | Reconcile before retrying. |
| Spot | `503` | Service unavailable. | Back off and reconcile. |
| Spot | `504` | Response timeout. | Check whether the request succeeded. |
| Spot | `602` | Signature verification failed. | Check signing configuration. |
| Spot | `10007` | Symbol not recognised. | Check the exact pair. |
| Spot | `10072` | Access key invalid. | Check key status. |
| Spot | `10073` | Request time invalid. | Synchronise server time. |
| Futures | `1001` | Contract not found. | Check contract symbol. |
| Futures | `1004` | Amount invalid. | Check contract quantity rules. |
| Futures | `2005` | Available balance insufficient. | Check usable margin. |

[Spot codes](https://www.mexc.com/api-docs/spot-v3/error-code) · [Futures codes](https://www.mexc.com/api-docs/futures/error-code)

### Bybit

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| V5 | `10000` | Server response timeout. | Reconcile the original request. |
| V5 | `10001` | Invalid request parameter. | Read the detailed parameter message. |
| V5 | `10002` | Request timestamp expired. | Check clock and receive window. |
| V5 | `10003` | Key/domain mismatch or invalid key. | Check production versus test environment. |
| V5 | `10004` | Signature rejected. | Check signing configuration. |
| V5 | `10005` | Permission denied. | Check key permissions. |
| V5 | `10006` | API limit exceeded. | Back off. |
| V5 | `10010` | IP does not match key allowlist. | Check backend IP. |
| V5 | `10029` | Symbol invalid. | Check category and symbol. |
| V5 | `110001` | Order not found. | Check history and original ID. |
| V5 | `110003` | Price outside permitted range. | Check instrument price bands. |
| V5 | `110007` | Available balance insufficient. | Check reserved funds and margin. |
| V5 | `110008` | Order already final. | Refresh order status. |
| V5 | `110020` | Active order limit reached. | Review existing orders. |
| V5 | `110094` | Order value below minimum. | Review minimum notional. |

[V5 codes](https://bybit-exchange.github.io/docs/v5/error)

### OKX

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| V5 | `51000` | A request parameter is invalid. | Read the parameter named in the message. |
| V5 | `51008` | Available funds or margin insufficient. | Check trading balance and reservations. |

[V5 reference](https://www.okx.com/docs-v5/en/)

### BingX

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Swap | `101400` | Order validation failed. | Read the message for size, price or TP/SL constraints. |
| Swap | `100004` | Trading permission missing. | Check API permissions. |

[Official swap reference](https://github.com/BingX-API/api-ai-skills/blob/main/skills/swap-trade/api-reference.md) · [Spot and swap documentation](https://bingx-api.github.io/docs/)

### Gate.io

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| API v4 | `BALANCE_NOT_ENOUGH` | Not enough available funds. | Check trading balance and reservations. |
| API v4 | `AMOUNT_TOO_LITTLE` | Order amount below minimum. | Check amount and contract multiplier. |

[API v4 codes](https://www.gate.com/en-us/docs/developers/apiv4/)

### KuCoin

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Futures | `100001` | Invalid request parameters. | Read the field-specific message. |
| Futures | `100003` | Contract parameters invalid. | Check contract specification. |
| Futures | `300001` | Active order count limit reached. | Review existing orders. |
| Futures | `300003` | Insufficient balance. | Check available Futures margin. |

[Futures codes](https://www.kucoin.com/docs-new/error-code/futures) · [Spot codes](https://www.kucoin.com/docs-new/error-code/spot)

### Bitget

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Classic | `429` | Too many requests. | Wait before retrying. |
| Classic | `00171` | Parameter validation failed. | Read the specific field message. |
| Classic | `00172` | Parameter validation failed. | Check endpoint requirements. |
| Classic | `22001` | No order available to cancel. | Check history and fills. |
| Classic | `22002` | No position to close. | Refresh the position. |
| Classic | `22004` | Symbol unavailable for API trading. | Check supported instruments. |
| Classic | `22034` | Amount below minimum. | Review contract minimum size. |
| Classic | `22038` | Quantity must be a required multiple. | Round to the instrument lot step. |

[Classic codes](https://www.bitget.com/docs/classic/error-code/restapi) · [UTA codes](https://www.bitget.com/docs/uta/error-code/restapi)

### LBank

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Spot | `10008` | Pair unsupported. | Check the market catalogue. |
| Spot | `10013` | Quantity below minimum. | Review current minimum size. |
| Spot | `10014` | Funds insufficient. | Check available balance. |
| Spot | `10016` | Funds insufficient. | Check available balance and fees. |

[Official error guide](https://www.lbank.com/support/articles/21534616606105)

### XT

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Spot | `ORDER_002` | Available funds insufficient. | Check reservations and fees. |
| Spot | `ORDER_008` | Price or quantity precision invalid. | Use the instrument tick/step. |
| Spot | `ORDER_F0201` | Quantity below minimum. | Review amount rules. |
| Spot | `ORDER_F0301` | Quote value below minimum. | Review minimum notional. |
| Spot | `SYMBOL_005` | API trading unavailable for symbol. | Check listing/API eligibility. |

[Spot response codes](https://doc.xt.com/docs/spot/Access%20Description/ResponseCode)

### WhiteBIT

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| HTTP | `429` | Request throttled. | Wait for the retry window. |
| Private API | `errors (field map)` | One or more fields failed validation. | Read each field message; the top-level code alone is insufficient. |

[Rate limits and error format](https://docs.whitebit.com/api-reference/rate-limits)

### Coinbase

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Exchange REST | `400` | Invalid request. | Read the message and product increments. |
| Exchange REST | `401` | Authentication rejected. | Check credentials and signing. |
| Exchange REST | `403` | Access denied. | Check account and key permissions. |

[Exchange requests and errors](https://docs.cdp.coinbase.com/exchange/rest-api/requests)

### Upbit

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Spot | `insufficient_funds_bid` | Not enough funds to buy. | Check available quote currency and fees. |
| Spot | `insufficient_funds_ask` | Not enough tokens to sell. | Check available base currency. |
| Spot | `under_min_total_bid` | Buy value below minimum. | Review minimum quote value. |
| Spot | `under_min_total_ask` | Sell value below minimum. | Review minimum quote value. |

[REST errors](https://docs.upbit.com/kr/reference/rest-api-guide)

### Kraken

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Spot | `EOrder:Insufficient funds` | Usable balance too small. | Check open-order reservations. |
| Spot | `EOrder:Order minimum not met` | Quantity below minimum. | Check the pair minimum. |
| Futures | `sendStatus.status` | Order outcome returned inside response. | Check the status and ID; HTTP success alone is insufficient. |

[Spot errors](https://support.kraken.com/articles/360001491786-api-error-messages) · [Futures order response](https://docs.kraken.com/api-reference/order-management/send-order)

### Crypto.com

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Exchange | `306` | Available balance insufficient. | Check usable collateral. |
| Exchange | `40001` | Invalid request. | Check instrument and order parameters. |

[Exchange REST reference](https://exchange-developer.crypto.com/exchange/v1/docs/api/rest-single-page/)

### Bitfinex

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| REST | `ERR_RATE_LIMIT` | Request throttled. | Wait before retrying. |
| WebSocket | `10001` | Unknown trading pair. | Check symbol format. |
| WebSocket | `10305` | Too many subscribed channels. | Reduce duplicate subscriptions. |

[REST limits](https://docs.bitfinex.com/docs/requirements-and-limitations) · [WebSocket errors](https://docs.bitfinex.com/docs/ws-general)

### Hyperliquid

| Market / API | Error | Explanation | What to check |
| - | - | - | - |
| Exchange | `Tick` | Price increment invalid. | Use the instrument tick. |
| Perpetuals | `MinTradeNtl` | Order value below minimum. | Review minimum notional. |
| Spot | `MinTradeSpotNtl` | Spot order value below minimum. | Review minimum notional. |
| Perpetuals | `PerpMargin` | Insufficient available margin. | Check reservations and collateral. |
| Exchange | `ReduceOnly` | Order would increase exposure. | Check side, position and reduce-only quantity. |
| Exchange | `MissingOrder` | Order unavailable, possibly already final. | Reconcile order history before retrying. |

[Error responses](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/error-responses)

## Before retrying

Keep the original order ID and the timestamp. Check open orders, recent fills and the current position. For a minimum-size error, correct the parameter first. For a timeout, reconcile first. Never resend a full order solely because its acknowledgement is missing.

For support, include the venue, Spot/Futures, pair, timestamp and complete error text. Do not include API secrets, passwords or authentication codes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.