Error Handling For Order Operations

In this document, you will find detailed information on how to troubleshoot and resolve errors that may occur during order submission and order cancellation processes.

The tables in this guide provide specific information on the types of errors that may be encountered, their associated status codes, and recommended actions for addressing each error.

We hope that this guide will be a helpful resource for you as you work with our cloud-based system and manage orders in your organization.

Troubleshooting Order Errors

This table lists the status codes that may occur during order submission and cancellation processes, along with their recommended actions for addressing each error.

Status Code
Description

400

Bad Request

401

Unauthorized

404

Not Found

Make sure that you have specified the correct URL or endpoint for requested resource. Also keep this in mind if you request an invalid or non-existent order, you will encounter a HTTP error code 400 instead of 404.

405

Wrong Method

429

Too Many Requests

5xx

Internal Server Error

503

Service Unavailable

Bad Request Errors For Order Operations

Here is an example of a typical response content to a bad request error for order submit and cancel operations:

{
    "success": false,
    "message": "NO_ORDER_MATCHES_YOUR_REQUEST",
    "code": 1052
}

The tables below provide explanations for why an error occurred and offers guidance on how to troubleshoot the error with the error code, message and description:

Order Submit Errors

Message
Code
Description

BALANCE_NOT_ENOUGH

1055

The balance amount is not enough for this operation. Check your balance amount using the /api/v1/users/balances endpoint.

FAILED_MARKET_ORDER

1118

You might be sending wrong quantity or pairSymbol parameter. Quantity fields must be greater than zero, also pairSymbol field should be valid. You can check valid pairs from /api/v2/server/exchangeinfo endpoint.

FAILED_LIMIT_ORDER

1120

You might be sending wrong price, quantity or pairSymbol parameter. Price and quantity fields must be greater than zero, also pairSymbol field should be valid. You can check valid pairs from /api/v2/server/exchangeinfo endpoint.

FAILED_ORDER_WITH_OPEN_ORDERS

1122

FAILED_MIN_TOTAL_AMOUNT

1123

The order quantity is less than the minimum required. You can view the minimum order amount from the /api/v2/server/exchangeinfo endpoint. minExchangeValue value of a pair represents the correct minimum amount for order submitting.

FAILED_STOP_PRICE_GREATER_THAN_BEST_ASK

1124

Stop buy price must be above best ask price. You can check the best ask price information from the /api/v2/ticker endpoint with the askfield.

FAILED_STOP_PRICE_LESS_THAN_BEST_BID

1125

Stop sell price must be below best bid price. You can check the best bid price information from the /api/v2/ticker endpoint with the bidobject.

FAILED_INVALID_PRICE_SCALE

1126

This error indicates that scale of the price you send is not valid for that pair. You can check denominatorScale field from /api/v2/server/exchangeinfo endpoint.

FAILED_INVALID_QUANTITY_SCALE

1127

This error indicates that scale of the quantity you send is not valid for that pair. You can check numeratorScale field from /api/v2/server/exchangeinfo endpoint.

FAILED_INVALID_STOP_PRICE_SCALE

1128

This error indicates that scale of the stopPrice you send is not valid for that pair. You can check denominatorScale field from /api/v2/server/exchangeinfo endpoint.

ORDER_METHOD_NOT_SUPPORTED

1134

You might be sending invalid orderMethod parameter. valid orderMethod parameters should be one of this: limit, market, stopLimit, stopMarket Sometimes even though you send valid orderMethod parameter, that order method might not be allowed for a temporary time period for that pair. You can check orderMethods field from /api/v2/server/exchangeinfo endpoint.

ORDER_TYPE_NOT_SUPPORTED

1193

You might be sending invalid orderTypeparameter. valid orderType parameters should be one of this: buy, sell.

PRICE_MUST_BE_LESS_THAN_MAXPRICE

1226

Buy price must be less than maximum price for Limit and Stop-Limit order methods, for relevant pair. You can view the maximum price information from the /api/v2/server/exchangeinfo endpoint with the maxPrice field. Please ensure that you’re checking correct pair.

PRICE_MUST_BE_LESS_THAN_MINPRICE

1227

Sell price must be greater than min price for Limit and Stop-Limit order methods, for relevant pair. You can view the minimum price information from the /api/v2/server/exchangeinfo endpoint with the minPrice field.

Note: There is an conflict between error message and explanation. Please take description into consideration.

ORDER_MAX_PRICE_EXCEEDED

8003

Limit or StopLimit order price is greater than maximumLimitOrderPrice . You can check the maximumLimitOrderPrice value from the /api/v2/server/exchangeinfo endpoint.

ORDER_MIN_PRICE_EXCEEDED

8004

Limit or StopLimit order price is less than minimumLimitOrderPrice . You can check the minimumLimitOrderPrice value from the /api/v2/server/exchangeinfo endpoint.

ORDER_INSERT_BLOCKED

8005

Order Cancel Errors

Message
Code
Description

ORDER_COULD_NOT_BE_CANCELED

1051

This error may be received in the following scenarios during the order cancellation process.

  • Order Type

    • The order is not cancellable if the order type is Market or Stop Market. Do not retry to cancel for this case.

  • Order Status

    • If order status is “closed”, the order is not cancellable.

  • Temporary Failures

NO_ORDER_MATCHES_YOUR_REQUEST

1052

ORDER_CANCEL_BLOCKED

8006

Last updated