Error Codes
The full BINANCE_* error taxonomy and what triggers each one
BinanceErrorMapper classifies every failed Binance API call into one of these codes.
The primary signal is the HTTP status code; a handful of well-known, long-stable Binance numeric error
codes refine ambiguous 400s further.
| Error Code | Triggered by | Meaning |
|---|---|---|
BINANCE_TIMESTAMP_OUT_OF_RECV_WINDOW | Binance code -1021 | Request timestamp fell outside recvWindow — usually clock skew. |
BINANCE_INVALID_SIGNATURE | Binance code -1022 | HMAC signature didn't validate — check the API secret used to sign. |
BINANCE_INVALID_API_KEY | Binance codes -2014 / -2015, or HTTP 401 | API key missing, malformed, or lacks permission for this endpoint. |
BINANCE_ORDER_NOT_FOUND | Binance code -2013, or HTTP 404 | No order matches the given orderId/origClientOrderId + symbol. |
BINANCE_INSUFFICIENT_BALANCE | Binance code -2010 | Account balance too low to place the order. |
BINANCE_ORDER_FILTER_FAILURE | Binance code -1013 | Order violates one of the symbol's trading filters (min notional, lot size, price precision, etc.). |
BINANCE_ILLEGAL_CHARS | Binance code -1100 | A parameter contains characters Binance rejects. |
BINANCE_INVALID_SYMBOL | Binance code -1121 | The trading pair doesn't exist or isn't tradable. |
BINANCE_CANCEL_REJECTED | Binance code -2011 | Cancel request rejected — e.g. order already filled/cancelled. |
BINANCE_CANCEL_REPLACE_REJECTED | Binance code -2012 | Cancel-replace request rejected. |
BINANCE_RATE_LIMIT_EXCEEDED | HTTP 429 | Request-weight or order-count limit exceeded. See Rate Limiting. |
BINANCE_IP_BANNED | HTTP 418 | IP temporarily banned after repeated violations. Message includes the Retry-After duration in seconds. |
BINANCE_UPSTREAM_ERROR | HTTP 500 / 502, or any other unmapped status | Binance-side failure, or a status this mapper doesn't otherwise classify. |
BINANCE_UPSTREAM_TIMEOUT | HTTP 504 | Binance didn't respond in time. |
BINANCE_REQUEST_REJECTED | HTTP 400 not matched to any numeric code above | Genuinely unclassified 400 — a bad parameter, a precision error, or an unmapped filter failure. Not assumed to be an invalid symbol; Binance's own msg text (surfaced as-is) is the accurate detail here even though the taxonomy code is approximate. |
This is not a complete numeric-code table. Only a handful of long-stable Binance
numeric error codes are used to refine ambiguous 400s; Binance's full
errors.md table is
far larger. Treat the HTTP-status-level classification as reliable and the numeric-code refinements
above as "confirmed so far," extended as new cases are hit during testing.