#[repr(i16)]pub enum ErrorCode {
Show 94 variants
Unknown = -1_000,
Disconnected = -1_001,
Unauthorized = -1_002,
TooManyRequests = -1_003,
UnexpectedResp = -1_006,
Timeout = -1_007,
ServerBusy = -1_008,
ErrorMsgReceived = -1_010,
InvalidMessage = -1_013,
UnknownOrderComposition = -1_014,
TooManyOrders = -1_015,
ServiceShuttingDown = -1_016,
UnsupportedOperation = -1_020,
InvalidTimestamp = -1_021,
InvalidSignature = -1_022,
CompIdInUse = -1_033,
TooManyConnections = -1_034,
LoggedOut = -1_035,
IllegalChars = -1_100,
TooManyParameters = -1_101,
MandatoryParamEmptyOrMalformed = -1_102,
UnknownParam = -1_103,
UnreadParameters = -1_104,
ParamEmpty = -1_105,
ParamNotRequired = -1_106,
ParamOverflow = -1_108,
BadPrecision = -1_111,
NoDepth = -1_112,
TifNotRequired = -1_114,
InvalidTif = -1_115,
InvalidOrderType = -1_116,
InvalidSide = -1_117,
EmptyNewClOrdId = -1_118,
EmptyOrgClOrdId = -1_119,
BadInterval = -1_120,
BadSymbol = -1_121,
InvalidSymbolstatus = -1_122,
InvalidListenKey = -1_125,
MoreThanXxHours = -1_127,
OptionalParamsBadCombo = -1_128,
InvalidParameter = -1_130,
BadStrategyType = -1_134,
InvalidJson = -1_135,
InvalidTickerType = -1_139,
InvalidCancelRestrictions = -1_145,
DuplicateSymbols = -1_151,
InvalidSbeHeader = -1_152,
UnsupportedSchemaId = -1_153,
SbeDisabled = -1_155,
OcoOrderTypeRejected = -1_158,
OcoIcebergqtyTimeinforce = -1_160,
DeprecatedSchema = -1_161,
BuyOcoLimitMustBeBelow = -1_165,
SellOcoLimitMustBeAbove = -1_166,
BothOcoOrdersCannotBeLimit = -1_168,
InvalidTagNumber = -1_169,
TagNotDefinedInMessage = -1_170,
TagAppearsMoreThanOnce = -1_171,
TagOutOfOrder = -1_172,
GroupFieldsOutOfOrder = -1_173,
InvalidComponent = -1_174,
ResetSeqNumSupport = -1_175,
AlreadyLoggedIn = -1_176,
GarbledMessage = -1_177,
BadSenderCompid = -1_178,
BadSeqNum = -1_179,
ExpectedLogon = -1_180,
TooManyMessages = -1_181,
ParamsBadCombo = -1_182,
NotAllowedInDropCopySessions = -1_183,
DropCopySessionNotAllowed = -1_184,
DropCopySessionRequired = -1_185,
NotAllowedInOrderEntrySessions = -1_186,
NotAllowedInMarketDataSessions = -1_187,
IncorrectNumInGroupCount = -1_188,
DuplicateEntriesInAGroup = -1_189,
InvalidRequestId = -1_190,
TooManySubscriptions = -1_191,
InvalidTimeUnit = -1_194,
BuyOcoStopLossMustBeAbove = -1_196,
SellOcoStopLossMustBeBelow = -1_197,
BuyOcoTakeProfitMustBeBelow = -1_198,
SellOcoTakeProfitMustBeAbove = -1_199,
NewOrderRejected = -2_010,
CancelRejected = -2_011,
NoSuchOrder = -2_013,
BadApiKeyFmt = -2_014,
RejectedMbxKey = -2_015,
NoTradingWindow = -2_016,
OrderCancelReplacePartiallyFailed = -2_021,
OrderCancelReplaceFailed = -2_022,
OrderArchived = -2_026,
OrderAmendRejected = -2_038,
ClientOrderIdInvalid = -2_039,
}Expand description
Error codes for Binance.
Variants§
Unknown = -1_000
An unknown error occurred while processing the request.
Disconnected = -1_001
Internal error; unable to process your request. Please try again.
You are not authorized to execute this request.
TooManyRequests = -1_003
Too many requests queued. Too much request weight used; current limit is %s request weight per %s. Please use WebSocket Streams for live updates to avoid polling the API. Way too much request weight used; IP banned until %s. Please use WebSocket Streams for live updates to avoid bans.
UnexpectedResp = -1_006
An unexpected response was received from the message bus. Execution status unknown.
Timeout = -1_007
Timeout waiting for response from backend server. Send status unknown; execution status unknown.
ServerBusy = -1_008
Server is currently overloaded with other requests. Please try again in a few minutes.
ErrorMsgReceived = -1_010
This code is sent when an error has been returned by the matching engine.
InvalidMessage = -1_013
The request is rejected by the API. (i.e. The request didn’t reach the Matching Engine.) Potential error messages can be found in Filter Failures or Failures during order placement.
UnknownOrderComposition = -1_014
Unsupported order combination.
TooManyOrders = -1_015
Too many new orders. Too many new orders; current limit is %s orders per %s.
ServiceShuttingDown = -1_016
This service is no longer available.
UnsupportedOperation = -1_020
This operation is not supported.
InvalidTimestamp = -1_021
Timestamp for this request is outside of the recvWindow. Timestamp for this request was 1000ms ahead of the server’s time.
InvalidSignature = -1_022
Signature for this request is not valid.
CompIdInUse = -1_033
SenderCompId(49) is currently in use. Concurrent use of the same SenderCompId within one account is not allowed.
TooManyConnections = -1_034
Too many concurrent connections; current limit is ‘%s’. Too many connection attempts for account; current limit is %s per ‘%s’. Too many connection attempts from IP; current limit is %s per ‘%s’.
LoggedOut = -1_035
Please send Logout<5> message to close the session.
IllegalChars = -1_100
Illegal characters found in a parameter. Illegal characters found in parameter ‘%s’; legal range is ‘%s’.
TooManyParameters = -1_101
Too many parameters sent for this endpoint. Too many parameters; expected ‘%s’ and received ‘%s’. Duplicate values for a parameter detected.
MandatoryParamEmptyOrMalformed = -1_102
A mandatory parameter was not sent, was empty/null, or malformed. Mandatory parameter ‘%s’ was not sent, was empty/null, or malformed. Param ‘%s’ or ‘%s’ must be sent, but both were empty/null! Required tag ‘%s’ missing. Field value was empty or malformed. ‘%s’ contains unexpected value. Cannot be greater than %s.
UnknownParam = -1_103
An unknown parameter was sent. Undefined Tag.
UnreadParameters = -1_104
Not all sent parameters were read. Not all sent parameters were read; read ‘%s’ parameter(s) but was sent ‘%s’.
ParamEmpty = -1_105
A parameter was empty. Parameter ‘%s’ was empty.
ParamNotRequired = -1_106
A parameter was sent when not required. Parameter ‘%s’ sent when not required. A tag ‘%s’ was sent when not required.
ParamOverflow = -1_108
Parameter ‘%s’ overflowed.
BadPrecision = -1_111
Parameter ‘%s’ has too much precision.
NoDepth = -1_112
No orders on book for symbol.
TifNotRequired = -1_114
TimeInForce parameter sent when not required.
InvalidTif = -1_115
Invalid timeInForce.
InvalidOrderType = -1_116
Invalid orderType.
InvalidSide = -1_117
Invalid side.
EmptyNewClOrdId = -1_118
New client order ID was empty.
EmptyOrgClOrdId = -1_119
Original client order ID was empty.
BadInterval = -1_120
Invalid interval.
BadSymbol = -1_121
Invalid symbol.
InvalidSymbolstatus = -1_122
Invalid symbolStatus.
InvalidListenKey = -1_125
This listenKey does not exist.
MoreThanXxHours = -1_127
Lookup interval is too big. More than %s hours between startTime and endTime.
OptionalParamsBadCombo = -1_128
Combination of optional parameters invalid. Combination of optional fields invalid. Recommendation: ‘%s’ and ‘%s’ must both be sent. Fields [%s] must be sent together or omitted entirely. Invalid MDEntryType (269) combination. BID and OFFER must be requested together.
InvalidParameter = -1_130
Invalid data sent for a parameter. Data sent for parameter ‘%s’ is not valid.
BadStrategyType = -1_134
strategyType was less than 1000000. TargetStrategy (847) was less than 1000000.
InvalidJson = -1_135
Invalid JSON Request JSON sent for parameter ‘%s’ is not valid
InvalidTickerType = -1_139
Invalid ticker type.
InvalidCancelRestrictions = -1_145
cancelRestrictions has to be either ONLY_NEW or ONLY_PARTIALLY_FILLED.
DuplicateSymbols = -1_151
Symbol is present multiple times in the list.
InvalidSbeHeader = -1_152
Invalid X-MBX-SBE header; expected <SCHEMA_ID>:
UnsupportedSchemaId = -1_153
Unsupported SBE schema ID or version specified in the X-MBX-SBE header.
SbeDisabled = -1_155
SBE is not enabled.
OcoOrderTypeRejected = -1_158
Order type not supported in OCO. If the order type provided in the aboveType and/or belowType is not supported.
OcoIcebergqtyTimeinforce = -1_160
Parameter ‘%s’ is not supported if aboveTimeInForce/belowTimeInForce is not GTC. If the order type for the above or below leg is STOP_LOSS_LIMIT, and icebergQty is provided for that leg, the timeInForce has to be GTC else it will throw an error. TimeInForce (59) must be GTC (1) when MaxFloor (111) is used.
DeprecatedSchema = -1_161
Unable to encode the response in SBE schema ‘x’. Please use schema ‘y’ or higher.
BuyOcoLimitMustBeBelow = -1_165
A limit order in a buy OCO must be below.
SellOcoLimitMustBeAbove = -1_166
A limit order in a sell OCO must be above.
BothOcoOrdersCannotBeLimit = -1_168
At least one OCO order must be contingent.
InvalidTagNumber = -1_169
Invalid tag number.
TagNotDefinedInMessage = -1_170
Tag ‘%s’ not defined for this message type.
TagAppearsMoreThanOnce = -1_171
Tag ‘%s’ appears more than once.
TagOutOfOrder = -1_172
Tag ‘%s’ specified out of required order.
GroupFieldsOutOfOrder = -1_173
Repeating group ‘%s’ fields out of order.
InvalidComponent = -1_174
Component ‘%s’ is incorrectly populated on ‘%s’ order. Recommendation: ‘%s’
ResetSeqNumSupport = -1_175
Continuation of sequence numbers to new session is currently unsupported. Sequence numbers must be reset for each new session.
AlreadyLoggedIn = -1_176
GarbledMessage = -1_177
CheckSum(10) contains an incorrect value. BeginString (8) is not the first tag in a message. MsgType (35) is not the third tag in a message. BodyLength (9) does not contain the correct byte count. Only printable ASCII characters and SOH (Start of Header) are allowed.
BadSenderCompid = -1_178
SenderCompId(49) contains an incorrect value. The SenderCompID value should not change throughout the lifetime of a session.
BadSeqNum = -1_179
MsgSeqNum(34) contains an unexpected value. Expected: ‘%d’.
ExpectedLogon = -1_180
TooManyMessages = -1_181
Too many messages; current limit is ‘%d’ messages per ‘%s’.
ParamsBadCombo = -1_182
Conflicting fields: [%s]
NotAllowedInDropCopySessions = -1_183
Requested operation is not allowed in DropCopy sessions.
DropCopySessionNotAllowed = -1_184
DropCopy sessions are not supported on this server. Please reconnect to a drop copy server.
DropCopySessionRequired = -1_185
Only DropCopy sessions are supported on this server. Either reconnect to order entry server or send DropCopyFlag (9406) field.
NotAllowedInOrderEntrySessions = -1_186
Requested operation is not allowed in order entry sessions.
NotAllowedInMarketDataSessions = -1_187
Requested operation is not allowed in market data sessions.
IncorrectNumInGroupCount = -1_188
Incorrect NumInGroup count for repeating group ‘%s’.
DuplicateEntriesInAGroup = -1_189
Group ‘%s’ contains duplicate entries.
InvalidRequestId = -1_190
MDReqID (262) contains a subscription request id that is already in use on this connection. MDReqID (262) contains an unsubscription request id that does not match any active subscription.
TooManySubscriptions = -1_191
Too many subscriptions. Connection may create up to ‘%s’ subscriptions at a time. Similar subscription is already active on this connection. Symbol=‘%s’, active subscription id: ‘%s’.
InvalidTimeUnit = -1_194
Invalid value for time unit; expected either MICROSECOND or MILLISECOND.
BuyOcoStopLossMustBeAbove = -1_196
A stop loss order in a buy OCO must be above.
SellOcoStopLossMustBeBelow = -1_197
A stop loss order in a sell OCO must be below.
BuyOcoTakeProfitMustBeBelow = -1_198
A take profit order in a buy OCO must be below.
SellOcoTakeProfitMustBeAbove = -1_199
A take profit order in a sell OCO must be above.
NewOrderRejected = -2_010
NEW_ORDER_REJECTED This code is sent when an error has been returned by the matching engine.
CancelRejected = -2_011
CANCEL_REJECTED This code is sent when an error has been returned by the matching engine.
NoSuchOrder = -2_013
Order does not exist.
BadApiKeyFmt = -2_014
API-key format invalid.
RejectedMbxKey = -2_015
Invalid API-key, IP, or permissions for action.
NoTradingWindow = -2_016
No trading window could be found for the symbol. Try ticker/24hrs instead.
OrderCancelReplacePartiallyFailed = -2_021
This code is sent when either the cancellation of the order failed or the new order placement failed but not both. Errors regarding placing orders via cancelReplace
OrderCancelReplaceFailed = -2_022
This code is sent when both the cancellation of the order failed and the new order placement failed. Errors regarding placing orders via cancelReplace
OrderArchived = -2_026
Order was canceled or expired with no executed qty over 90 days ago and has been archived.
OrderAmendRejected = -2_038
This code is sent when an error has been returned by the matching engine.
ClientOrderIdInvalid = -2_039
Client order ID is not correct for this order ID.