Dexilon API Documentation
  • 👋Getting Started
  • General Info
    • ⚙️General API information
      • Base URLs
      • HTTP Return Codes
      • Enum Definition
    • 💻Clients
      • Dexilon Chain Client
    • 🚦Limits
      • REST API Rate limits
      • WS Stream Rate Limits
    • 🔐Security
      • Registration Flow
      • Authentication Flow
      • Sending Dexilon Transactions
      • Private API Calls
        • Access Token
        • Refresh Access Token
      • Timing security
    • ⚠️Error Codes
      • REST API Error Codes
      • WS Stream Error Codes
    • 🔍Audits
      • Bridge Audit
      • Smart-Contract Audit
  • Restful API
    • 📊Market Data Endpoints
      • Test Connectivity
      • Check Server Time
      • Exchange Information
      • Order Book
      • Recent Trades List
      • Kline/Candlestick Data
      • Symbol Data
      • Funding Rate History
      • Open Interest
      • Taker Buy/Sell Volume
      • Index Price History
      • Fee Tiers Structure
      • Fee Tiers Discount
      • Symbol Rules
      • Leverage Rules
    • ⚒️Account and Trades Endpoints
      • 🔒Account Information
      • 🔒Get User Address
      • 🔒Positions Information
      • 🔒Assets Information
      • 🔒Change Initial Leverage
      • 🔒Change Margin Type
      • 🔒Modify Isolated Position Margin
      • 🔒Create Withdrawal
      • 🔒Create market order
      • 🔒Create limit order
      • 🔒Cancel Order
      • 🔒Cancel All Orders
      • 🔒Query Order
      • 🔒Get Open Orders
      • 🔒Get Order History
      • 🔒Get Trade History
      • 🔒Get Transaction History
    • 🏆Rewards Endpoints
      • Current Reward Round
      • Reward Distribution
      • Rewards Settings
      • Current Tournament
      • Tournament Members
      • 🔒User's Reward Distributions
      • 🔒User's Reward Round Profit
      • 🔒User's Tournament Rating
    • 💸Liquidation Auctions Endpoints
      • Open Lots
      • Lot History
      • 🔒Place Bid
  • WebSocket Streams
    • 📈Market Data WS Streams
      • Working with Public Streams
      • Mark Price Stream
      • Mark Price Stream For All Markets
      • Kline/Candlestick Stream
      • Ticker Stream
      • Ticker Stream For All Markets
      • Partial Book Depth Stream
      • Book Ticker Stream
      • Trade Stream
      • Aggregate Trade Stream
      • Liquidation Trade Stream
      • Liquidation Auction Stream
    • 👥User Data WS Stream
      • 🔒Working with Private Streams
      • 🔒Order Update Stream
      • 🔒Account Update Stream
      • 🔒L2 Account Update Stream
Powered by GitBook
On this page
  1. General Info
  2. Error Codes

REST API Error Codes

In case of some error during using API you will receive response with following format.

  • When you try to cancel order but it has beed executed already

{
    "code": 2002,
    "name": "CANCEL_REJECTED",
    "details": [ "Order has been executed." ]
}
  • When you try to update margin mode, but did't pass 'mode' parameter

{
    "code" : 4000,
    "name" : "BAD_REQUEST",
    "details" : [ "Parameter 'mode' is invalid. Cannot be null." ]
}

All Error Codes:

Code
Http
Name
Messages
1000
500

UNKNOWN

An unknown error occurred while processing the request.An unknown error occurred while processing the request.

1002
500

DISCONNECTED

Internal error; unable to process your request. Please try again.

1003
401

UNAUTHORIZED

You are not authorized to execute this request.

Invalid eth user address.

Eth and Cosmos user addresses doesn't mapped.

1004
403

FORBIDDEN

You don't have access to execute this request.

1005
429

TOO_MANY_REQUESTS

Too many requests queued.

Way too many requests; User/IP will be banned next %s minutes. Please use the web socket for live updates to avoid bans.

1006
null

TIMEOUT

Timeout waiting for response from backend server. Send status unknown; execution status unknown.

1007
400

UNEXPECTED_RESPONSE

An unexpected response was received from the message bus. Execution status unknown.

1008
400

UNSUPPORTED_OPERATION

This operation is not supported.

1009
400

INVALID_SIGNATURE

Signature for this request is not valid.

1010
500

SERVICE_SHUTTING_DOWN

This service is no longer available. Please try again.

1012
400

INVALID_TIMESTAMP_OUTSIDE_RECV_WINDOW

Timestamp for this request is outside of the recvWindow.

2001
400

NEW_ORDER_REJECTED

The maximum precision of order's price is 6.

The minimum order's notional in 50 USDT.

The maximum available to buy is %s USDT.

The maximum available to sell is %s USDT.

The maximum allowed market order amount for %s is %s.

Order book is empty.

The buy price of limit orders should be less or equal to (1 + cap ratio ) * current Mark Price of the contract. The sell price of limit orders should be higher or equal to (1 - floor ratio) * current Mark price of the contract

The maximum market order's notional is %s %s.

2002
400

CANCEL_REJECTED

Order has been executed. All orders from the batch are executed

2003
400

UPDATE_LEVERAGE_REJECTED

User has open orders

Too high leverage ratio: liquidation condition.

Leverage is smaller than permitted: insufficient margin balance.

This positions already with that leverage: no need to change leverage.

Too high leverage ratio: insufficient position notional.

2004
400

WITHDRAW_REJECTED

Balance is insufficient.

2005
400

NO_SUCH_ORDER

There is no such order.

2006
400

USER_IN_LIQUIDATION

User in liquidation mode now.

2007
400

MAX_OPEN_ORDER_EXCEEDED

Reach max open order limit.

2008
400

UPDATE_LOCKED_BALANCE_REJECTED

Too high locked balance: insufficient margin balance.

Too low locked balance: liquidation condition.

Add margin only support for isolated position.

Cannot add position margin: position is 0.

2009
400

UPDATE_MARGIN_MODE_REJECTED

This positions already in that margin mode: no need to change margin type.

Margin type cannot be changed if there exists position.

Margin type cannot be changed if there exists open orders.

2011
400

ORDER_ID_OR_CLIENT_ORDER_ID_MUST_BE_SENT

Either 'orderId' or 'clientOrderId' must be sent.

4000
400

BAD_REQUEST

Custom message with details of request

4001
400

BAD_PRECISION

Precision is over the maximum defined for this asset.

4004
404

NOT_FOUND

No handler.

4005
405

UNSUPPORTED_MEDIA_TYPE

Unsupported media type.

4006
406

METHOD_NOT_ALLOWED

Method not allowed.

Wrong parameter %s

PreviousError CodesNextWS Stream Error Codes

Last updated 2 years ago

⚠️