pub struct ResponseError {
pub code: i32,
pub msg: String,
/* private fields */
}
Expand description
The error returned as a JSON from the Binance server. Errors consist of two parts: an error code and a message. Codes are universal, but messages can vary.
Fields§
§code: i32
The numeric code identifying the kind of an error.
msg: String
The helper message for the particular case of an error.
Implementations§
Source§impl Error
10xx - General Server or Network issues
https://binance-docs.github.io/apidocs/spot/en/#10xx-general-server-or-network-issues
impl Error
10xx - General Server or Network issues https://binance-docs.github.io/apidocs/spot/en/#10xx-general-server-or-network-issues
Sourcepub const DISCONNECTED: i32 = -1_001i32
pub const DISCONNECTED: i32 = -1_001i32
Internal error; unable to process your request. Please try again.
Sourcepub const UNAUTHORIZED: i32 = -1_002i32
pub const UNAUTHORIZED: i32 = -1_002i32
You are not authorized to execute this request.
Sourcepub const TOO_MANY_REQUESTS: i32 = -1_003i32
pub const TOO_MANY_REQUESTS: i32 = -1_003i32
Either of the following was happened:
- Too many requests queued.
- Too much request weight used; please use the websocket for live updates to avoid polling the API.
- Way too much request weight used; IP banned. Please use the websocket for live updates to avoid bans.
Sourcepub const UNEXPECTED_RESP: i32 = -1_006i32
pub const UNEXPECTED_RESP: i32 = -1_006i32
An unexpected response was received from the message bus. Execution status unknown.
Sourcepub const TIMEOUT: i32 = -1_007i32
pub const TIMEOUT: i32 = -1_007i32
Timeout waiting for response from backend server. Send status unknown; execution status unknown.
Sourcepub const UNKNOWN_ORDER_COMPOSITION: i32 = -1_014i32
pub const UNKNOWN_ORDER_COMPOSITION: i32 = -1_014i32
Unsupported order combination.
The most probable case is:
- The orderType, timeInForce, stopPrice, and/or icebergQty combination isn’t allowed.
Sourcepub const TOO_MANY_ORDERS: i32 = -1_015i32
pub const TOO_MANY_ORDERS: i32 = -1_015i32
Too many new orders.
Sourcepub const SERVICE_SHUTTING_DOWN: i32 = -1_016i32
pub const SERVICE_SHUTTING_DOWN: i32 = -1_016i32
This service is no longer available.
Sourcepub const UNSUPPORTED_OPERATION: i32 = -1_020i32
pub const UNSUPPORTED_OPERATION: i32 = -1_020i32
This operation is not supported.
Sourcepub const INVALID_TIMESTAMP: i32 = -1_021i32
pub const INVALID_TIMESTAMP: i32 = -1_021i32
Either of the following was happened:
- Timestamp for this request is outside of the recvWindow.
- Timestamp for this request was 1000ms ahead of the server’s time.
Sourcepub const INVALID_SIGNATURE: i32 = -1_022i32
pub const INVALID_SIGNATURE: i32 = -1_022i32
Signature for this request is not valid.
Source§impl Error
11xx - Request issues
https://binance-docs.github.io/apidocs/spot/en/#11xx-2xxx-request-issues
impl Error
11xx - Request issues https://binance-docs.github.io/apidocs/spot/en/#11xx-2xxx-request-issues
Sourcepub const ILLEGAL_CHARS: i32 = -1_100i32
pub const ILLEGAL_CHARS: i32 = -1_100i32
Illegal characters found in a parameter.
Sourcepub const TOO_MANY_PARAMETERS: i32 = -1_101i32
pub const TOO_MANY_PARAMETERS: i32 = -1_101i32
Either of the following was happened:
- Too many parameters sent for this endpoint.
- Duplicate values for a parameter detected.
Sourcepub const MANDATORY_PARAM_EMPTY_OR_MALFORMED: i32 = -1_102i32
pub const MANDATORY_PARAM_EMPTY_OR_MALFORMED: i32 = -1_102i32
Either of the following was happened:
- A mandatory parameter was not sent, was empty/null, or malformed.
- Either of the two parameters must be sent, but both were empty/null.
Sourcepub const UNKNOWN_PARAM: i32 = -1_103i32
pub const UNKNOWN_PARAM: i32 = -1_103i32
An unknown parameter was sent.
Sourcepub const UNREAD_PARAMETERS: i32 = -1_104i32
pub const UNREAD_PARAMETERS: i32 = -1_104i32
Not all sent parameters were read.
Sourcepub const PARAM_EMPTY: i32 = -1_105i32
pub const PARAM_EMPTY: i32 = -1_105i32
A parameter was empty.
Sourcepub const PARAM_NOT_REQUIRED: i32 = -1_106i32
pub const PARAM_NOT_REQUIRED: i32 = -1_106i32
A parameter was sent when not required.
Sourcepub const BAD_PRECISION: i32 = -1_111i32
pub const BAD_PRECISION: i32 = -1_111i32
Precision is over the maximum defined for this asset.
Sourcepub const TIF_NOT_REQUIRED: i32 = -1_114i32
pub const TIF_NOT_REQUIRED: i32 = -1_114i32
TimeInForce parameter sent when not required.
Sourcepub const INVALID_TIF: i32 = -1_115i32
pub const INVALID_TIF: i32 = -1_115i32
Invalid timeInForce.
Sourcepub const INVALID_ORDER_TYPE: i32 = -1_116i32
pub const INVALID_ORDER_TYPE: i32 = -1_116i32
Invalid orderType.
Sourcepub const INVALID_SIDE: i32 = -1_117i32
pub const INVALID_SIDE: i32 = -1_117i32
Invalid side.
Sourcepub const EMPTY_NEW_CL_ORD_ID: i32 = -1_118i32
pub const EMPTY_NEW_CL_ORD_ID: i32 = -1_118i32
New client order ID was empty.
Sourcepub const EMPTY_ORG_CL_ORD_ID: i32 = -1_119i32
pub const EMPTY_ORG_CL_ORD_ID: i32 = -1_119i32
Original client order ID was empty.
Sourcepub const BAD_INTERVAL: i32 = -1_120i32
pub const BAD_INTERVAL: i32 = -1_120i32
Invalid interval.
Sourcepub const BAD_SYMBOL: i32 = -1_121i32
pub const BAD_SYMBOL: i32 = -1_121i32
Invalid symbol.
Sourcepub const INVALID_LISTEN_KEY: i32 = -1_125i32
pub const INVALID_LISTEN_KEY: i32 = -1_125i32
This listenKey does not exist.
Sourcepub const MORE_THAN_XX_HOURS: i32 = -1_127i32
pub const MORE_THAN_XX_HOURS: i32 = -1_127i32
Lookup interval is too big (more than allowed hours between startTime and endTime).
Sourcepub const OPTIONAL_PARAMS_BAD_COMBO: i32 = -1_128i32
pub const OPTIONAL_PARAMS_BAD_COMBO: i32 = -1_128i32
Combination of optional parameters invalid.
Sourcepub const INVALID_PARAMETER: i32 = -1_130i32
pub const INVALID_PARAMETER: i32 = -1_130i32
Invalid data sent for a parameter.
Source§impl Error
20xx - Processing issues
https://binance-docs.github.io/apidocs/spot/en/#11xx-2xxx-request-issues
impl Error
20xx - Processing issues https://binance-docs.github.io/apidocs/spot/en/#11xx-2xxx-request-issues
Sourcepub const NEW_ORDER_REJECTED: i32 = -2_010i32
pub const NEW_ORDER_REJECTED: i32 = -2_010i32
New order was rejected.
Sourcepub const CANCEL_REJECTED: i32 = -2_011i32
pub const CANCEL_REJECTED: i32 = -2_011i32
Cancellation of an order was rejected.
Sourcepub const NO_SUCH_ORDER: i32 = -2_013i32
pub const NO_SUCH_ORDER: i32 = -2_013i32
Order does not exist.
Sourcepub const BAD_API_KEY_FMT: i32 = -2_014i32
pub const BAD_API_KEY_FMT: i32 = -2_014i32
API-key format invalid.
Sourcepub const REJECTED_MBX_KEY: i32 = -2_015i32
pub const REJECTED_MBX_KEY: i32 = -2_015i32
Invalid API-key, IP, or permissions for action.
Sourcepub const NO_TRADING_WINDOW: i32 = -2_016i32
pub const NO_TRADING_WINDOW: i32 = -2_016i32
No trading window could be found for the symbol. Try ticker/24hrs instead.
impl Error
3xxx-5xxx - SAPI-specific issues https://binance-docs.github.io/apidocs/spot/en/#3xxx-5xxx-sapi-specific-issues
impl Error
6xxx - Savings issues https://binance-docs.github.io/apidocs/spot/en/#6xxx-savings-issues
impl Error
70xx - Futures issues https://binance-docs.github.io/apidocs/spot/en/#70xx-futures
impl Error
9xxx - Filter failures https://binance-docs.github.io/apidocs/spot/en/#9xxx-filter-failures
impl Error
10xxx - Futures Cross Collateral https://binance-docs.github.io/apidocs/spot/en/#10xxx-futures-cross-collateral
impl Error
12xxx - Liquid Swap https://binance-docs.github.io/apidocs/spot/en/#12xxx-liquid-swap
impl Error
impl Error
18xxx - Binance Code https://binance-docs.github.io/apidocs/spot/en/#18xxx-binance-code
impl Error
20xxx - Futures Algo https://binance-docs.github.io/apidocs/spot/en/#20xxx-futures-algo
impl Error
21xxx - Portfolio Margin Account https://binance-docs.github.io/apidocs/spot/en/#21xxx-portfolio-margin-account
Source§impl ResponseError
10xx - General Server or Network issues
https://binance-docs.github.io/apidocs/futures/en/#10xx-general-server-or-network-issues
impl ResponseError
10xx - General Server or Network issues https://binance-docs.github.io/apidocs/futures/en/#10xx-general-server-or-network-issues
Sourcepub const FUTURES_DUPLICATE_IP: i32 = -1_004i32
pub const FUTURES_DUPLICATE_IP: i32 = -1_004i32
This IP is already on the white list.
Sourcepub const FUTURES_NO_SUCH_IP: i32 = -1_005i32
pub const FUTURES_NO_SUCH_IP: i32 = -1_005i32
No such IP has been white listed.
Sourcepub const FUTURES_ERROR_MSG_RECEIVED: i32 = -1_010i32
pub const FUTURES_ERROR_MSG_RECEIVED: i32 = -1_010i32
Error message received.
ATTENTION: No intelligible description was provided in the docs.
Sourcepub const FUTURES_NON_WHITE_LIST: i32 = -1_011i32
pub const FUTURES_NON_WHITE_LIST: i32 = -1_011i32
This IP cannot access this route.
Sourcepub const FUTURES_INVALID_MESSAGE: i32 = -1_013i32
pub const FUTURES_INVALID_MESSAGE: i32 = -1_013i32
Invalid message.
ATTENTION: No intelligible description was provided in the docs.
Sourcepub const FUTURES_START_TIME_GREATER_THAN_END_TIME: i32 = -1_023i32
pub const FUTURES_START_TIME_GREATER_THAN_END_TIME: i32 = -1_023i32
Start time is greater than end time.
Source§impl ResponseError
11xx - Request issues
https://binance-docs.github.io/apidocs/futures/en/#11xx-request-issues
impl ResponseError
11xx - Request issues https://binance-docs.github.io/apidocs/futures/en/#11xx-request-issues
Sourcepub const FUTURES_BAD_ASSET: i32 = -1_108i32
pub const FUTURES_BAD_ASSET: i32 = -1_108i32
Invalid asset.
Sourcepub const FUTURES_BAD_ACCOUNT: i32 = -1_109i32
pub const FUTURES_BAD_ACCOUNT: i32 = -1_109i32
Invalid account.
Sourcepub const FUTURES_BAD_INSTRUMENT_TYPE: i32 = -1_110i32
pub const FUTURES_BAD_INSTRUMENT_TYPE: i32 = -1_110i32
Invalid symbolType.
Sourcepub const FUTURES_WITHDRAW_NOT_NEGATIVE: i32 = -1_113i32
pub const FUTURES_WITHDRAW_NOT_NEGATIVE: i32 = -1_113i32
Withdrawal amount must be negative.
Sourcepub const FUTURES_INVALID_NEW_ORDER_RESP_TYPE: i32 = -1_136i32
pub const FUTURES_INVALID_NEW_ORDER_RESP_TYPE: i32 = -1_136i32
Invalid newOrderRespType.
Source§impl ResponseError
20xx - Processing issues
https://binance-docs.github.io/apidocs/futures/en/#20xx-processing-issues
impl ResponseError
20xx - Processing issues https://binance-docs.github.io/apidocs/futures/en/#20xx-processing-issues
Sourcepub const FUTURES_BALANCE_NOT_SUFFICIENT: i32 = -2_018i32
pub const FUTURES_BALANCE_NOT_SUFFICIENT: i32 = -2_018i32
Balance is insufficient.
Sourcepub const FUTURES_MARGIN_NOT_SUFFICIENT: i32 = -2_019i32
pub const FUTURES_MARGIN_NOT_SUFFICIENT: i32 = -2_019i32
Margin is insufficient.
Sourcepub const FUTURES_UNABLE_TO_FILL: i32 = -2_020i32
pub const FUTURES_UNABLE_TO_FILL: i32 = -2_020i32
Unable to fill.
Sourcepub const FUTURES_ORDER_WOULD_IMMEDIATELY_TRIGGER: i32 = -2_021i32
pub const FUTURES_ORDER_WOULD_IMMEDIATELY_TRIGGER: i32 = -2_021i32
Order would immediately trigger.
Sourcepub const FUTURES_REDUCE_ONLY_REJECT: i32 = -2_022i32
pub const FUTURES_REDUCE_ONLY_REJECT: i32 = -2_022i32
ReduceOnly Order is rejected.
Sourcepub const FUTURES_USER_IN_LIQUIDATION: i32 = -2_023i32
pub const FUTURES_USER_IN_LIQUIDATION: i32 = -2_023i32
User in liquidation mode now.
Sourcepub const FUTURES_POSITION_NOT_SUFFICIENT: i32 = -2_024i32
pub const FUTURES_POSITION_NOT_SUFFICIENT: i32 = -2_024i32
Position is not sufficient.
Sourcepub const FUTURES_MAX_OPEN_ORDER_EXCEEDED: i32 = -2_025i32
pub const FUTURES_MAX_OPEN_ORDER_EXCEEDED: i32 = -2_025i32
Maximum open order limit reached.
Sourcepub const FUTURES_REDUCE_ONLY_ORDER_TYPE_NOT_SUPPORTED: i32 = -2_026i32
pub const FUTURES_REDUCE_ONLY_ORDER_TYPE_NOT_SUPPORTED: i32 = -2_026i32
This OrderType is not supported when reduceOnly.
Sourcepub const FUTURES_MAX_LEVERAGE_RATIO: i32 = -2_027i32
pub const FUTURES_MAX_LEVERAGE_RATIO: i32 = -2_027i32
Exceeded the maximum allowable position at current leverage.
Sourcepub const FUTURES_MIN_LEVERAGE_RATIO: i32 = -2_028i32
pub const FUTURES_MIN_LEVERAGE_RATIO: i32 = -2_028i32
Leverage is smaller than permitted: insufficient margin balance.
Source§impl ResponseError
4xxx - Filters and other issues
https://binance-docs.github.io/apidocs/futures/en/#40xx-filters-and-other-issues
impl ResponseError
4xxx - Filters and other issues https://binance-docs.github.io/apidocs/futures/en/#40xx-filters-and-other-issues
Sourcepub const FUTURES_INVALID_ORDER_STATUS: i32 = -4_000i32
pub const FUTURES_INVALID_ORDER_STATUS: i32 = -4_000i32
Invalid order status.
Sourcepub const FUTURES_PRICE_LESS_THAN_ZERO: i32 = -4_001i32
pub const FUTURES_PRICE_LESS_THAN_ZERO: i32 = -4_001i32
Price less than 0.
Sourcepub const FUTURES_PRICE_GREATER_THAN_MAX_PRICE: i32 = -4_002i32
pub const FUTURES_PRICE_GREATER_THAN_MAX_PRICE: i32 = -4_002i32
Price greater than max price.
Sourcepub const FUTURES_QTY_LESS_THAN_ZERO: i32 = -4_003i32
pub const FUTURES_QTY_LESS_THAN_ZERO: i32 = -4_003i32
Quantity less than zero.
Sourcepub const FUTURES_QTY_LESS_THAN_MIN_QTY: i32 = -4_004i32
pub const FUTURES_QTY_LESS_THAN_MIN_QTY: i32 = -4_004i32
Quantity less than min quantity.
Sourcepub const FUTURES_QTY_GREATER_THAN_MAX_QTY: i32 = -4_005i32
pub const FUTURES_QTY_GREATER_THAN_MAX_QTY: i32 = -4_005i32
Quantity greater than max quantity.
Sourcepub const FUTURES_STOP_PRICE_LESS_THAN_ZERO: i32 = -4_006i32
pub const FUTURES_STOP_PRICE_LESS_THAN_ZERO: i32 = -4_006i32
Stop price less than zero.
Sourcepub const FUTURES_STOP_PRICE_GREATER_THAN_MAX_PRICE: i32 = -4_007i32
pub const FUTURES_STOP_PRICE_GREATER_THAN_MAX_PRICE: i32 = -4_007i32
Stop price greater than max price.
Sourcepub const FUTURES_TICK_SIZE_LESS_THAN_ZERO: i32 = -4_008i32
pub const FUTURES_TICK_SIZE_LESS_THAN_ZERO: i32 = -4_008i32
Tick size less than zero.
Sourcepub const FUTURES_MAX_PRICE_LESS_THAN_MIN_PRICE: i32 = -4_009i32
pub const FUTURES_MAX_PRICE_LESS_THAN_MIN_PRICE: i32 = -4_009i32
Max price less than min price.
Sourcepub const FUTURES_MAX_QTY_LESS_THAN_MIN_QTY: i32 = -4_010i32
pub const FUTURES_MAX_QTY_LESS_THAN_MIN_QTY: i32 = -4_010i32
Max qty less than min qty.
Sourcepub const FUTURES_STEP_SIZE_LESS_THAN_ZERO: i32 = -4_011i32
pub const FUTURES_STEP_SIZE_LESS_THAN_ZERO: i32 = -4_011i32
Step size less than zero.
Sourcepub const FUTURES_MAX_NUM_ORDERS_LESS_THAN_ZERO: i32 = -4_012i32
pub const FUTURES_MAX_NUM_ORDERS_LESS_THAN_ZERO: i32 = -4_012i32
Max mum orders less than zero.
Sourcepub const FUTURES_PRICE_LESS_THAN_MIN_PRICE: i32 = -4_013i32
pub const FUTURES_PRICE_LESS_THAN_MIN_PRICE: i32 = -4_013i32
Price less than min price.
Sourcepub const FUTURES_PRICE_NOT_INCREASED_BY_TICK_SIZE: i32 = -4_014i32
pub const FUTURES_PRICE_NOT_INCREASED_BY_TICK_SIZE: i32 = -4_014i32
Price not increased by tick size.
Sourcepub const FUTURES_INVALID_CL_ORD_ID_LEN: i32 = -4_015i32
pub const FUTURES_INVALID_CL_ORD_ID_LEN: i32 = -4_015i32
Client order id is not valid. Consider the length of it should not be more than 36 chars.
Sourcepub const FUTURES_PRICE_HIGHER_THAN_MULTIPLIER_CAP: i32 = -4_016i32
pub const FUTURES_PRICE_HIGHER_THAN_MULTIPLIER_CAP: i32 = -4_016i32
Price is higher than mark price multiplier cap.
Sourcepub const FUTURES_MULTIPLIER_UP_LESS_THAN_ZERO: i32 = -4_017i32
pub const FUTURES_MULTIPLIER_UP_LESS_THAN_ZERO: i32 = -4_017i32
Multiplier up less than zero.
Sourcepub const FUTURES_MULTIPLIER_DOWN_LESS_THAN_ZERO: i32 = -4_018i32
pub const FUTURES_MULTIPLIER_DOWN_LESS_THAN_ZERO: i32 = -4_018i32
Multiplier down less than zero.
Sourcepub const FUTURES_COMPOSITE_SCALE_OVERFLOW: i32 = -4_019i32
pub const FUTURES_COMPOSITE_SCALE_OVERFLOW: i32 = -4_019i32
Composite scale too large.
Sourcepub const FUTURES_TARGET_STRATEGY_INVALID: i32 = -4_020i32
pub const FUTURES_TARGET_STRATEGY_INVALID: i32 = -4_020i32
Target strategy invalid for the given combination of orderType and reduceOnly.
Sourcepub const FUTURES_INVALID_DEPTH_LIMIT: i32 = -4_021i32
pub const FUTURES_INVALID_DEPTH_LIMIT: i32 = -4_021i32
Invalid depth limit.
Sourcepub const FUTURES_WRONG_MARKET_STATUS: i32 = -4_022i32
pub const FUTURES_WRONG_MARKET_STATUS: i32 = -4_022i32
Market status sent is not valid.
Sourcepub const FUTURES_QTY_NOT_INCREASED_BY_STEP_SIZE: i32 = -4_023i32
pub const FUTURES_QTY_NOT_INCREASED_BY_STEP_SIZE: i32 = -4_023i32
Qty not increased by step size.
Sourcepub const FUTURES_PRICE_LOWER_THAN_MULTIPLIER_DOWN: i32 = -4_024i32
pub const FUTURES_PRICE_LOWER_THAN_MULTIPLIER_DOWN: i32 = -4_024i32
Price is lower than mark price multiplier floor.
Sourcepub const FUTURES_MULTIPLIER_DECIMAL_LESS_THAN_ZERO: i32 = -4_025i32
pub const FUTURES_MULTIPLIER_DECIMAL_LESS_THAN_ZERO: i32 = -4_025i32
Multiplier decimal less than zero.
Sourcepub const FUTURES_COMMISSION_INVALID: i32 = -4_026i32
pub const FUTURES_COMMISSION_INVALID: i32 = -4_026i32
Commission invalid (less than zero or greater than the maximum).
Sourcepub const FUTURES_INVALID_ACCOUNT_TYPE: i32 = -4_027i32
pub const FUTURES_INVALID_ACCOUNT_TYPE: i32 = -4_027i32
Invalid account type.
Sourcepub const FUTURES_INVALID_LEVERAGE: i32 = -4_028i32
pub const FUTURES_INVALID_LEVERAGE: i32 = -4_028i32
Invalid leverage.
Sourcepub const FUTURES_INVALID_TICK_SIZE_PRECISION: i32 = -4_029i32
pub const FUTURES_INVALID_TICK_SIZE_PRECISION: i32 = -4_029i32
Tick size precision is invalid.
Sourcepub const FUTURES_INVALID_STEP_SIZE_PRECISION: i32 = -4_030i32
pub const FUTURES_INVALID_STEP_SIZE_PRECISION: i32 = -4_030i32
Step size precision is invalid.
Sourcepub const FUTURES_INVALID_WORKING_TYPE: i32 = -4_031i32
pub const FUTURES_INVALID_WORKING_TYPE: i32 = -4_031i32
Invalid parameter working type.
Sourcepub const FUTURES_EXCEED_MAX_CANCEL_ORDER_SIZE: i32 = -4_032i32
pub const FUTURES_EXCEED_MAX_CANCEL_ORDER_SIZE: i32 = -4_032i32
Exceed maximum cancel order size.
Sourcepub const FUTURES_INSURANCE_ACCOUNT_NOT_FOUND: i32 = -4_033i32
pub const FUTURES_INSURANCE_ACCOUNT_NOT_FOUND: i32 = -4_033i32
Insurance account not found.
Sourcepub const FUTURES_INVALID_BALANCE_TYPE: i32 = -4_044i32
pub const FUTURES_INVALID_BALANCE_TYPE: i32 = -4_044i32
Balance Type is invalid.
Sourcepub const FUTURES_MAX_STOP_ORDER_EXCEEDED: i32 = -4_045i32
pub const FUTURES_MAX_STOP_ORDER_EXCEEDED: i32 = -4_045i32
Reach max stop order limit.
Sourcepub const FUTURES_NO_NEED_TO_CHANGE_MARGIN_TYPE: i32 = -4_046i32
pub const FUTURES_NO_NEED_TO_CHANGE_MARGIN_TYPE: i32 = -4_046i32
No need to change margin type.
Sourcepub const FUTURES_THERE_EXISTS_OPEN_ORDERS: i32 = -4_047i32
pub const FUTURES_THERE_EXISTS_OPEN_ORDERS: i32 = -4_047i32
Margin type cannot be changed if there exists open orders.
Sourcepub const FUTURES_THERE_EXISTS_QUANTITY: i32 = -4_048i32
pub const FUTURES_THERE_EXISTS_QUANTITY: i32 = -4_048i32
Margin type cannot be changed if there exists position.
Sourcepub const FUTURES_ADD_ISOLATED_MARGIN_REJECT: i32 = -4_049i32
pub const FUTURES_ADD_ISOLATED_MARGIN_REJECT: i32 = -4_049i32
Add margin only support for isolated position.
Sourcepub const FUTURES_CROSS_BALANCE_INSUFFICIENT: i32 = -4_050i32
pub const FUTURES_CROSS_BALANCE_INSUFFICIENT: i32 = -4_050i32
Cross balance insufficient.
Sourcepub const FUTURES_ISOLATED_BALANCE_INSUFFICIENT: i32 = -4_051i32
pub const FUTURES_ISOLATED_BALANCE_INSUFFICIENT: i32 = -4_051i32
Isolated balance insufficient.
Sourcepub const FUTURES_NO_NEED_TO_CHANGE_AUTO_ADD_MARGIN: i32 = -4_052i32
pub const FUTURES_NO_NEED_TO_CHANGE_AUTO_ADD_MARGIN: i32 = -4_052i32
No need to change auto add margin.
Sourcepub const FUTURES_AUTO_ADD_CROSSED_MARGIN_REJECT: i32 = -4_053i32
pub const FUTURES_AUTO_ADD_CROSSED_MARGIN_REJECT: i32 = -4_053i32
Auto add margin only support for isolated position.
Sourcepub const FUTURES_ADD_ISOLATED_MARGIN_NO_POSITION_REJECT: i32 = -4_054i32
pub const FUTURES_ADD_ISOLATED_MARGIN_NO_POSITION_REJECT: i32 = -4_054i32
Cannot add position margin: position is 0.
Sourcepub const FUTURES_AMOUNT_MUST_BE_POSITIVE: i32 = -4_055i32
pub const FUTURES_AMOUNT_MUST_BE_POSITIVE: i32 = -4_055i32
Amount must be positive.
Sourcepub const FUTURES_INVALID_API_KEY_TYPE: i32 = -4_056i32
pub const FUTURES_INVALID_API_KEY_TYPE: i32 = -4_056i32
Invalid API key type.
Sourcepub const FUTURES_INVALID_RSA_PUBLIC_KEY: i32 = -4_057i32
pub const FUTURES_INVALID_RSA_PUBLIC_KEY: i32 = -4_057i32
Invalid API public key
Sourcepub const FUTURES_MAX_PRICE_TOO_LARGE: i32 = -4_058i32
pub const FUTURES_MAX_PRICE_TOO_LARGE: i32 = -4_058i32
maxPrice and priceDecimal too large.
Sourcepub const FUTURES_NO_NEED_TO_CHANGE_POSITION_SIDE: i32 = -4_059i32
pub const FUTURES_NO_NEED_TO_CHANGE_POSITION_SIDE: i32 = -4_059i32
No need to change position side.
Sourcepub const FUTURES_INVALID_POSITION_SIDE: i32 = -4_060i32
pub const FUTURES_INVALID_POSITION_SIDE: i32 = -4_060i32
Invalid position side.
Sourcepub const FUTURES_POSITION_SIDE_NOT_MATCH: i32 = -4_061i32
pub const FUTURES_POSITION_SIDE_NOT_MATCH: i32 = -4_061i32
Order’s position side does not match user’s setting.
Sourcepub const FUTURES_REDUCE_ONLY_CONFLICT: i32 = -4_062i32
pub const FUTURES_REDUCE_ONLY_CONFLICT: i32 = -4_062i32
Invalid or improper reduceOnly value.
Sourcepub const FUTURES_INVALID_OPTIONS_REQUEST_TYPE: i32 = -4_063i32
pub const FUTURES_INVALID_OPTIONS_REQUEST_TYPE: i32 = -4_063i32
Invalid options request type.
Sourcepub const FUTURES_INVALID_OPTIONS_TIME_FRAME: i32 = -4_064i32
pub const FUTURES_INVALID_OPTIONS_TIME_FRAME: i32 = -4_064i32
Invalid options time frame.
Sourcepub const FUTURES_INVALID_OPTIONS_AMOUNT: i32 = -4_065i32
pub const FUTURES_INVALID_OPTIONS_AMOUNT: i32 = -4_065i32
Invalid options amount.
Sourcepub const FUTURES_INVALID_OPTIONS_EVENT_TYPE: i32 = -4_066i32
pub const FUTURES_INVALID_OPTIONS_EVENT_TYPE: i32 = -4_066i32
Invalid options event type.
Sourcepub const FUTURES_POSITION_SIDE_CHANGE_EXISTS_OPEN_ORDERS: i32 = -4_067i32
pub const FUTURES_POSITION_SIDE_CHANGE_EXISTS_OPEN_ORDERS: i32 = -4_067i32
Position side cannot be changed if there exists open orders.
Sourcepub const FUTURES_POSITION_SIDE_CHANGE_EXISTS_QUANTITY: i32 = -4_068i32
pub const FUTURES_POSITION_SIDE_CHANGE_EXISTS_QUANTITY: i32 = -4_068i32
Position side cannot be changed if there exists position.
Sourcepub const FUTURES_INVALID_OPTIONS_PREMIUM_FEE: i32 = -4_069i32
pub const FUTURES_INVALID_OPTIONS_PREMIUM_FEE: i32 = -4_069i32
Invalid options premium fee.
Sourcepub const FUTURES_INVALID_CL_OPTIONS_ID_LEN: i32 = -4_070i32
pub const FUTURES_INVALID_CL_OPTIONS_ID_LEN: i32 = -4_070i32
Client options id is not valid. Consider the length of it should be less than 32 chars.
Sourcepub const FUTURES_INVALID_OPTIONS_DIRECTION: i32 = -4_071i32
pub const FUTURES_INVALID_OPTIONS_DIRECTION: i32 = -4_071i32
Invalid options direction.
Sourcepub const FUTURES_OPTIONS_PREMIUM_NOT_UPDATE: i32 = -4_072i32
pub const FUTURES_OPTIONS_PREMIUM_NOT_UPDATE: i32 = -4_072i32
Premium fee is not updated, reject order.
Sourcepub const FUTURES_OPTIONS_PREMIUM_INPUT_LESS_THAN_ZERO: i32 = -4_073i32
pub const FUTURES_OPTIONS_PREMIUM_INPUT_LESS_THAN_ZERO: i32 = -4_073i32
Input premium fee is less than 0, reject order.
Sourcepub const FUTURES_OPTIONS_AMOUNT_BIGGER_THAN_UPPER: i32 = -4_074i32
pub const FUTURES_OPTIONS_AMOUNT_BIGGER_THAN_UPPER: i32 = -4_074i32
Order amount is bigger than upper boundary or less than 0, reject order.
Sourcepub const FUTURES_OPTIONS_PREMIUM_OUTPUT_ZERO: i32 = -4_075i32
pub const FUTURES_OPTIONS_PREMIUM_OUTPUT_ZERO: i32 = -4_075i32
Output premium fee is less than 0, reject order.
Sourcepub const FUTURES_OPTIONS_PREMIUM_TOO_DIFF: i32 = -4_076i32
pub const FUTURES_OPTIONS_PREMIUM_TOO_DIFF: i32 = -4_076i32
Original fee is too much higher than last fee.
Sourcepub const FUTURES_OPTIONS_PREMIUM_REACH_LIMIT: i32 = -4_077i32
pub const FUTURES_OPTIONS_PREMIUM_REACH_LIMIT: i32 = -4_077i32
Place order amount has reached to limit, reject order.
Sourcepub const FUTURES_OPTIONS_COMMON_ERROR: i32 = -4_078i32
pub const FUTURES_OPTIONS_COMMON_ERROR: i32 = -4_078i32
Options internal error.
Sourcepub const FUTURES_INVALID_OPTIONS_ID: i32 = -4_079i32
pub const FUTURES_INVALID_OPTIONS_ID: i32 = -4_079i32
Invalid options id (may be a duplicate for a user).
Sourcepub const FUTURES_OPTIONS_USER_NOT_FOUND: i32 = -4_080i32
pub const FUTURES_OPTIONS_USER_NOT_FOUND: i32 = -4_080i32
User not found.
Sourcepub const FUTURES_OPTIONS_NOT_FOUND: i32 = -4_081i32
pub const FUTURES_OPTIONS_NOT_FOUND: i32 = -4_081i32
Options not found.
Sourcepub const FUTURES_INVALID_BATCH_PLACE_ORDER_SIZE: i32 = -4_082i32
pub const FUTURES_INVALID_BATCH_PLACE_ORDER_SIZE: i32 = -4_082i32
Invalid number of batch place orders.
Sourcepub const FUTURES_PLACE_BATCH_ORDERS_FAIL: i32 = -4_083i32
pub const FUTURES_PLACE_BATCH_ORDERS_FAIL: i32 = -4_083i32
Fail to place batch orders.
Sourcepub const FUTURES_UPCOMING_METHOD: i32 = -4_084i32
pub const FUTURES_UPCOMING_METHOD: i32 = -4_084i32
Method is not allowed currently. Upcoming soon.
Sourcepub const FUTURES_INVALID_NOTIONAL_LIMIT_COEF: i32 = -4_085i32
pub const FUTURES_INVALID_NOTIONAL_LIMIT_COEF: i32 = -4_085i32
Invalid notional limit coefficient.
Sourcepub const FUTURES_INVALID_PRICE_SPREAD_THRESHOLD: i32 = -4_086i32
pub const FUTURES_INVALID_PRICE_SPREAD_THRESHOLD: i32 = -4_086i32
Invalid price spread threshold.
Sourcepub const FUTURES_REDUCE_ONLY_ORDER_PERMISSION: i32 = -4_087i32
pub const FUTURES_REDUCE_ONLY_ORDER_PERMISSION: i32 = -4_087i32
User can only place reduce only order.
Sourcepub const FUTURES_NO_PLACE_ORDER_PERMISSION: i32 = -4_088i32
pub const FUTURES_NO_PLACE_ORDER_PERMISSION: i32 = -4_088i32
User can not place order currently.
Sourcepub const FUTURES_INVALID_CONTRACT_TYPE: i32 = -4_104i32
pub const FUTURES_INVALID_CONTRACT_TYPE: i32 = -4_104i32
Invalid contract type.
Sourcepub const FUTURES_INVALID_CLIENT_TRAN_ID_LEN: i32 = -4_114i32
pub const FUTURES_INVALID_CLIENT_TRAN_ID_LEN: i32 = -4_114i32
clientTranId is not valid. Consider the length of it should be less than 64 chars.
Sourcepub const FUTURES_DUPLICATED_CLIENT_TRAN_ID: i32 = -4_115i32
pub const FUTURES_DUPLICATED_CLIENT_TRAN_ID: i32 = -4_115i32
clientTranId is duplicated. Consider it should be unique within 7 days.
Sourcepub const FUTURES_REDUCE_ONLY_MARGIN_CHECK_FAILED: i32 = -4_118i32
pub const FUTURES_REDUCE_ONLY_MARGIN_CHECK_FAILED: i32 = -4_118i32
ReduceOnly Order Failed. Please check your existing position and open orders.
Sourcepub const FUTURES_MARKET_ORDER_REJECT: i32 = -4_131i32
pub const FUTURES_MARKET_ORDER_REJECT: i32 = -4_131i32
The counterparty’s best price does not meet the PERCENT_PRICE filter limit.
Sourcepub const FUTURES_INVALID_ACTIVATION_PRICE: i32 = -4_135i32
pub const FUTURES_INVALID_ACTIVATION_PRICE: i32 = -4_135i32
Invalid activation price.
Sourcepub const FUTURES_QUANTITY_EXISTS_WITH_CLOSE_POSITION: i32 = -4_137i32
pub const FUTURES_QUANTITY_EXISTS_WITH_CLOSE_POSITION: i32 = -4_137i32
Quantity must be zero with closePosition equals true.
Sourcepub const FUTURES_REDUCE_ONLY_MUST_BE_TRUE: i32 = -4_138i32
pub const FUTURES_REDUCE_ONLY_MUST_BE_TRUE: i32 = -4_138i32
Reduce only must be true with closePosition equals true.
Sourcepub const FUTURES_ORDER_TYPE_CANNOT_BE_MKT: i32 = -4_139i32
pub const FUTURES_ORDER_TYPE_CANNOT_BE_MKT: i32 = -4_139i32
Order type can not be market if it’s unable to cancel.
Sourcepub const FUTURES_INVALID_OPENING_POSITION_STATUS: i32 = -4_140i32
pub const FUTURES_INVALID_OPENING_POSITION_STATUS: i32 = -4_140i32
Invalid symbol status for opening position.
Sourcepub const FUTURES_SYMBOL_ALREADY_CLOSED: i32 = -4_141i32
pub const FUTURES_SYMBOL_ALREADY_CLOSED: i32 = -4_141i32
Symbol is closed.
Sourcepub const FUTURES_STRATEGY_INVALID_TRIGGER_PRICE: i32 = -4_142i32
pub const FUTURES_STRATEGY_INVALID_TRIGGER_PRICE: i32 = -4_142i32
REJECT: take profit or stop order will be triggered immediately.
Sourcepub const FUTURES_INVALID_PAIR: i32 = -4_144i32
pub const FUTURES_INVALID_PAIR: i32 = -4_144i32
Invalid pair.
Sourcepub const FUTURES_ISOLATED_LEVERAGE_REJECT_WITH_POSITION: i32 = -4_161i32
pub const FUTURES_ISOLATED_LEVERAGE_REJECT_WITH_POSITION: i32 = -4_161i32
Leverage reduction is not supported in Isolated Margin Mode with open positions.
Sourcepub const FUTURES_MIN_NOTIONAL: i32 = -4_164i32
pub const FUTURES_MIN_NOTIONAL: i32 = -4_164i32
Order’s notional must be no smaller than 5.0 (unless you choose reduce only).
Sourcepub const FUTURES_INVALID_TIME_INTERVAL: i32 = -4_165i32
pub const FUTURES_INVALID_TIME_INTERVAL: i32 = -4_165i32
Invalid time interval.
Sourcepub const FUTURES_PRICE_HIGHER_THAN_STOP_MULTIPLIER_CAP: i32 = -4_183i32
pub const FUTURES_PRICE_HIGHER_THAN_STOP_MULTIPLIER_CAP: i32 = -4_183i32
Price is higher than stop price multiplier cap.
Sourcepub const FUTURES_PRICE_LOWER_THAN_STOP_MULTIPLIER_DOWN: i32 = -4_184i32
pub const FUTURES_PRICE_LOWER_THAN_STOP_MULTIPLIER_DOWN: i32 = -4_184i32
Price is lower than stop price multiplier floor.
Source§impl ResponseError
10xx - General Server or Network issues
impl ResponseError
10xx - General Server or Network issues
Sourcepub const SPOT_SERVER_BUSY: i32 = -1_004i32
pub const SPOT_SERVER_BUSY: i32 = -1_004i32
Server is busy, please wait and try again
Sourcepub const SPOT_SERVER_BUSY_WITH_REQUESTS: i32 = -1_008i32
pub const SPOT_SERVER_BUSY_WITH_REQUESTS: i32 = -1_008i32
Spot server is currently overloaded with other requests. Please try again in a few minutes.
Sourcepub const SPOT_NOT_FOUND_AUTHENTICATED_OR_AUTHORIZED: i32 = -1_099i32
pub const SPOT_NOT_FOUND_AUTHENTICATED_OR_AUTHORIZED: i32 = -1_099i32
This replaces error code -1999.
Source§impl ResponseError
11xx - Request issues
impl ResponseError
11xx - Request issues
Sourcepub const SPOT_BAD_RECV_WINDOW: i32 = -1_131i32
pub const SPOT_BAD_RECV_WINDOW: i32 = -1_131i32
recvWindow must be less than 60000.
Sourcepub const SPOT_BAD_STRATEGY_TYPE: i32 = -1_134i32
pub const SPOT_BAD_STRATEGY_TYPE: i32 = -1_134i32
strategyType was less than 1000000.