Vessel Finance API
    Vessel Finance API
    • Introduction
    • General Info
    • HMAC Signature Guide
    • Poseidon Signature Guide
    • Internal Transfer Signature Guide
    • Error Code
    • Vessel REST API
      • Public
        • Market Data
          • 24hr Ticker Statistics
          • Kline / Candlestick Data
          • Order Book
          • Recent Trades List
          • Average Price
          • AMM Pool Last 24h Data
        • Exchange Data
          • Ticker Info
          • Asset Info
          • Trade Fee
          • AMM Pool Info
      • User
        • Asset
          • User Asset
          • Withdraw
          • Withdraw History
          • Deposit History
          • Claim History
          • Internal Transfer (Send)
          • Internal Transfer History
        • Order
          • Place Order
          • Cancel Order
          • Open Orders
          • Completed Orders
          • All Orders
          • Query Order
          • Modify Order
        • AMM
          • Add Liquidity
          • Remove Liquidity
          • Collect Fee
          • AMM Position
          • AMM Action History
        • Account
          • User Profile
          • User Trade List
    • Vessel WebSocket
      • Market
        • Order Book
        • K Line
        • Recent Trades
        • 24hr Ticker Statistics
        • Ticker Setting Upade
      • User
        • Authorize
        • Balance
        • Account

    Error Code

    This document provides a comprehensive list of error codes that may be returned by the DEX API. Understanding these error codes will help you handle errors effectively in your applications.

    HTTP Status Codes#

    The API uses standard HTTP status codes to indicate the success or failure of a request:
    HTTP CodeError Type
    2xxSuccess
    4xxClient Error
    5xxServer Error

    Error Response Format#

    When an error occurs, the API will return a JSON response in the following format:
    {
      "code": "ERROR_CODE",
      "message": "A human-readable error message"
    }

    Error Code#

    10xxx - General Errors#

    These are common error codes that apply to any API request. They typically indicate issues like invalid input, missing parameters, or internal server errors.
    HTTP CodeError CodeError Description
    50010000Internal server error
    50210001Bad Gateway
    50310002Unable to connect to server
    50410003Request timestamp is far from the server time
    50410004Timeout
    40110005Unauthorized api key
    40110006Invalid 'VESSEL-PASSPHRASE'
    40110007Failed to verify signature
    40410008API not found
    40510009Request method is not allowed
    42910010IP address rate limit exceeded
    42910011User rate limit exceeded
    50010012System under maintenance. All APIs currently unavailable.

    11xxx - API Request Errors#

    These errors are related to specific issues with the API request itself, such as unauthorized access, rate limits, or endpoint not found.
    HTTP CodeError CodeError Description
    40011001Missing required header '{headerName}'
    40011002Missing required parameter '{paramName}'
    40011003Header '{headerName}' was empty
    40011004Parameter '{paramName}' was empty
    40011005Invalid '{paramName}'. Value must be of type ({type})
    40011006Invalid '{paramName}'. Value not in allowed enum values [{allowedValues}]
    40011007Invalid '{paramName}'. Value exceeds maximum allowed ({maxValue})
    40011008Invalid '{paramName}'. Value does not reach minimum required ({minValue})
    40011009Invalid '{paramName}'. Value must start with '{expectedPrefix}'
    40011010Invalid '{paramName}'. '{paramName}' must be an integral multiple of ({1e(-maxDecimal)})
    40011011Unknown parameter '{paramName}'
    40011012Invalid request body
    40011013Invalid 'symbol'
    40011014Invalid 'assetName'
    40011015Invalid 'assetId'
    40011016Invalid 'level'
    40011017Invalid 'poolId'
    40011018Invalid 'VESSEL-TIMESTAMP'
    40011021Upload limit exceeded. Maximum of ({maxNumber}) files allowed
    40011022File '{fileName}' exceeds maximum size limit ({sizeLimit})
    40011023User not found. Please register first
    40011024Twitter account already verified for this user
    40011025Not eligible to generate invitation code

    12xxx - Spot Trading Errors#

    This category covers errors specific to spot trading operations. Examples include invalid order types, insufficient balance, or market data issues.
    HTTP CodeError CodeError Description
    40012001Insufficient balance
    40012002Duplicate clientOrderId
    40012003Invalid 'clientOrderId'. 'clientOrderId' must be unit252.
    40012004Order not found
    40012005Order already closed
    40012006Order already cancelled
    40012007Order already filled
    40012008Cancel order failed. Can only cancel order with 'NEW' or 'PARTIALLY_FILLED' status
    40012009Modify order failed. Can only modify order with 'NEW' status
    40012010Place order failed. Reach the max open orders allowed ({maxOrderQty})
    40012011Spot market is closed for the symbol
    40012012Invalid Poseidon hash or signature
    40012013Cancel all orders partially failed. Some orders could not be cancelled

    13xxx - AMM (Automated Market Maker) Errors#

    These errors occur in the context of Automated Market Maker functions. Issues such as liquidity provision failures or incorrect AMM pool parameters are categorized here.
    HTTP CodeError CodeError Description
    40013001Insufficient balance
    40013002Invalid Poseidon hash or signature
    40013003Add liquidity failed. Amount of liquidity added less than minimum requirement
    40013004Invalid 'nonce'. 'nonce' must be uint252
    40013005Invalid tick range. 'tickIndexL' must be less than 'tickIndexR'
    40013006Invalid 'tickIndexL'. Value cannot be less than pool minimum tick ({minTick})
    40013007Invalid 'tickIndexR'. Value cannot be more than pool maximum tick ({maxTick})
    40013008Add liquidity failed. Reached the max open positions allowed in this pool ({maxPositionSize})
    40013009Remove liquidity failed. Removing zero liquidity is not allowed
    40013010Remove liquidity failed. Amount of liquidity removed less than minimum requirement.
    40013011AMM position not found
    40013012Duplicate nonce
    40013013Collect fee failed. Empty fee in this position
    40013014Must provide 'tickR' and 'tickL' at the same time

    14xxx - Deposits & Withdrawals Errors#

    Transfer errors are associated with the movement of assets between wallets or accounts, such as failed transfers or invalid recipient addresses.
    HTTP CodeError CodeError Description
    40014001Insufficient balance
    40014002Withdraw history not found
    40014003ClientOrderId duplicated
    40014004Duplicate nonce
    40014005Invalid 'nonce'. 'nonce' must be uint252
    40014006To Address must be registered on Vessel
    40014007Failed to verify Ethereum signature

    20xxx - WebSocket Errors#

    These errors occur when interacting with WebSocket streams. Examples include issues with connection, authentication, or data transmission through WebSocket channels.
    Error CodeError Description
    20000Connection failed due to internal error
    20001Request timestampĀ is far from the server time
    20002Unauthorized api key
    20003Invalid 'VESSEL-PASSPHRASE'
    20004Failed to verify signature
    20005Missing required parameter '{paramName}'
    20006Parameter '{paramName}' was empty
    20007Invalid request body
    20008Unknown parameter '{paramName}'
    20009Invalid 'type'
    20010Invalid 'channel'
    20011Invalid 'Interval'. Value not in allowed enum values [1m, 3m, 5m, 15m, 30m, 1h, 4h, 8h, 12h,1d]
    20012User channel requires authentication first
    20013Multiple authentications not allowed on a single WebSocket connection.
    20014Invalid 'symbol'
    20999Automatically disconnected. A single connection to the WebSocket API is valid for 24 hours. Reconnection is required for continuous communication.
    Previous
    Internal Transfer Signature Guide
    Next
    Vessel REST API
    Built with