Portal Community

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 CodeTriggered byMeaning
BINANCE_TIMESTAMP_OUT_OF_RECV_WINDOWBinance code -1021Request timestamp fell outside recvWindow — usually clock skew.
BINANCE_INVALID_SIGNATUREBinance code -1022HMAC signature didn't validate — check the API secret used to sign.
BINANCE_INVALID_API_KEYBinance codes -2014 / -2015, or HTTP 401API key missing, malformed, or lacks permission for this endpoint.
BINANCE_ORDER_NOT_FOUNDBinance code -2013, or HTTP 404No order matches the given orderId/origClientOrderId + symbol.
BINANCE_INSUFFICIENT_BALANCEBinance code -2010Account balance too low to place the order.
BINANCE_ORDER_FILTER_FAILUREBinance code -1013Order violates one of the symbol's trading filters (min notional, lot size, price precision, etc.).
BINANCE_ILLEGAL_CHARSBinance code -1100A parameter contains characters Binance rejects.
BINANCE_INVALID_SYMBOLBinance code -1121The trading pair doesn't exist or isn't tradable.
BINANCE_CANCEL_REJECTEDBinance code -2011Cancel request rejected — e.g. order already filled/cancelled.
BINANCE_CANCEL_REPLACE_REJECTEDBinance code -2012Cancel-replace request rejected.
BINANCE_RATE_LIMIT_EXCEEDEDHTTP 429Request-weight or order-count limit exceeded. See Rate Limiting.
BINANCE_IP_BANNEDHTTP 418IP temporarily banned after repeated violations. Message includes the Retry-After duration in seconds.
BINANCE_UPSTREAM_ERRORHTTP 500 / 502, or any other unmapped statusBinance-side failure, or a status this mapper doesn't otherwise classify.
BINANCE_UPSTREAM_TIMEOUTHTTP 504Binance didn't respond in time.
BINANCE_REQUEST_REJECTEDHTTP 400 not matched to any numeric code aboveGenuinely 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.