Errors
The API uses standard HTTP status codes to indicate the success or failure of the API call,The body of the response will be JSON in the following format:
{
"error_code": "INSTRUMENT_NOT_FOUND"
"message": "instrument not exists"
}
List of Error Messages
Error Code | Description |
---|---|
SYSTEM_ERROR | System is unavailable, please try again later. |
ILLEGAL_PARAMETER | Parameter error. |
INVALID_TOKEN | Invalid token. |
UNSUPPORTED_CATEGORY | Unsupported CATEGORY. |
UNSUPPORTED_SUB_TYPE | Unsupported subscription type. |
TOO_MANY_SYMBOLS | Too many symbols in a single call. |
TOO_MANY_SUBSCRIPTION | Too many quotes pushes. |
UNAUTHORIZED_SUB_TYPE | Unauthorized subscription type. |
INVALID_SYMBOL | Wrong symbol. |
UNSUPPORTED_API_VERSION | Unsupported api version. |
UNAUTHORIZED_CATEGORY | No data permission for this CATEGORY. |
UNSUPPORTED_TIMESPAN | Unsupported candlestick type. |
UNSUPPORTED_TIMESPAN | Unsupported candlestick type. |
GRPC_SYSTEM_ERROR | System error. |
INTERNAL_ERROR | Internal error. |
IP_NOT_ALLOWED | IP forbidden access. |
REQUEST_TOTAL_COUNT_EXCEEDED | The developer's interface call quota is insufficient. |
TOO_MANY_REQUESTS | A large number of requests in a short period of time trigger current limiting. |
MISSING_APP_KEY | Parameter error, missing x-app-key header. |
MISSING_SIGNATURE | Parameter error, missing x-signature header. |
MISSING_ALGORITHM | Parameter error, missing x-signature-algorithm header. |
MISSING_VERSION | Parameter error, missing x-version header. |
MISSING_NONCE | Parameter error, missing x-nonce header. |
MISSING_TIMESTAMP | Parameter error, missing x-timestamp header. |
SIGNATURE_ALGORITHM_NOT_SUPPORTED | Parameter error, the current signature algorithm only supports HMAC-SHA1. |
VERSION_NOT_SUPPORTED | Parameter error, the current version only supports 1.0. |
ILLEAGAL_TIMESTAMP | Parameter error, x-timestamp format error. |
UNAUTHORIZED | Parameter error, app_key not found or app_key has expired. |
INCORRECT_SIGN | Parameter error, signature verification failed. |
CLOCK_SKEW_EXCEEDED | Request rejected, x-timestamp clock offset exceeds maximum limit. |
DUPPLICATED_REQUEST | Request denied for repeated requests. |
ORDER_NOT_FOUND | No order record. |
DAY_ORDER_NOT_ALLOWED_AFT_CORE_TIME | After 4 PM, “Day Order” is no longer valid. |
SYMBOL_CAN_NOT_SELL_SHORT | This stock is not supported for short selling. |
DAY_BUYING_POWER_INSUFFICIENT | Insufficient buying power. |
CAN_NOT_TRADING_FOR_NON_TRADING_HOURS | The current order type does not support pre-market and after-hours trading. |
CAN_NOT_TRADING_FOR_FIXGW_NOT_READY | The current order type does not support pre-market and after-hours trading. |
STOP_PRICE_MUST_BE_LESS_THAN_MARKET_PRICE | Stop price must be less than market price for a sell order. |
STOP_PRICE_MUST_BE_GREAT_THAN_MARKET_PRICE | Stop price must be greater than market price for buy order. |
ACCOUNT_NOT_FOUND | No account found. |
MARGIN_ACCOUNT_CAN_NOT_SELL_SHORT_FOR_LT_2K | Short selling is only available for margin accounts with a minimum Net Account Value of $2,000. |
ORDER_AMOUNT_EXCEED_LIMIT | The order amount has exceeded the limit. |
MARGIN_NOT_ALLOW_FOR_RESTRICTED | Short selling is currently forbidden. |
CAN_NOT_TRADE_FOR_ACCOUNT_BE_RESTRICTED | Order submission was unsuccessful as your account is restricted from stocks&ETFs trading. |
CAN_NOT_OPEN_POSITION_FOR_ACCOUNT | Order submission was unsuccessful as your account is only eligible for closing positions for stocks&ETFs. |
CAN_NOT_CREATE_A_OPEN_ORDER | Not tradable. You can close out your existing positions, but you cannot open any new positions for this security. |
NO_SUCH_TICKER | No quotes available. |
TRADE_ORDER_NOT_EXIST | Order does not exist. |
CANT_GET_A_BROKER_FOR_TRADING_INDICATOR | This symbol is temporarily unavailable for trading. |
OTC_TICKER_NOT_SUPPORT_X_P | Extended hours trading is not available for OTC market stock. |
NO_SUCH_ORDER | Order does not exist. |
TRAILING_STOP_NOT_IN_TRADING_TIME | Trailing stop orders cannot be placed now. |
EXIST_CONTINUOUS_BATCH_ORDER | Please do not submit repeated close position request. |
CLOSE_ORDER_QUANTITY_MUST_LESS_THAN_POSITION | When closing a position, the quantity of the order should be less than the quantity of the holding position. |
CLOSE_ORDER_SIDE_MUST_NOT_SAME_WITH_POSITION | When the position is closed, the direction of the existing position is the same as the direction of the order. |
CLOSE_ORDER_SIDE_MUST_NOT_SAME_WITH_EXISTED_ORDER | You have existing open orders to close this position. Please do not submit repeated request. |
TRAILING_PERCENTAGE_MUST_BE_LESS_THAN_100 | The trail percentage must be no greater than 100%. |
CAN_NOT_REVERSE_POSITION_CUR_POSITION_IS_0 | You have no positions to reverse for this stock. |
CAN_NOT_REVERSE_POSITION_EXISTED_SAME_SIDE_ORDER | There is an open order to close your position of this stock. Please cancel related open orders before requesting reverse position for this stock. |
CAN_NOT_REVERSE_POSITION_SIDE_SAME_WITH_POSITION | The order cannot be placed since short orders are not supported. |
TRAILING_STOP_TIF_ONLY_SUPPORT_DAY | Good Til Canceled (GTC) orders are not supported. |
ORDER_TYPE_NOT_ALLOW | Market orders are temporarily unavailable to open any new positions. |
FRACT_NOT_ALLOW | Fractional trading is not supported. |
ACCOUNT_NOT_ALLOW_TRADE_CS_DENY | Your account has been restricted from trading. |
ACCOUNT_NOT_ALLOW_TRADE_CS_CO | This stock currently can only be liquidated, but you cannot open any new positions. |
ORDER_SIDE_NOT_MATCH_NO_POSITION | You have no positions to sell for this security. |
ORDER_SIDE_NOT_MATCH_WITH_POSITION_QUANTITY | The order quantity should be less than or equal to your current position of this security. |
ORDER_SIDE_NOT_MATCH_WITH_POSITION_ORDER_QUANTITY | There are pending sell orders. |
ORDER_SIDE_NOT_MATCH_WITH_BUY_ORDER | There are pending buy orders. |
ORDER_SIDE_NOT_MATCH_WITH_SELL_ORDER | This order is contradictory to your current position or existing pending orders of this security. |
TICKER_STATUS_NOT_ALLOW_TREADE_CS | This stock is currently halted by exchanges, only limit orders are allowed to open positions right now. |
TICKER_STATUS_NOT_ALLOW_TREADE_OPT | The underlying stock is currently halted by exchanges, order to open positions is not available right now, please try again later. |
NO_POSITION_CASH_ACCOUNT_CAN_NOT_SELL | Cash account doesn't currently support short selling options. |
NO_POSITION_ORDER_SIDE_NOT_MATCH_EXPECT_SELL | You have no positions to sell for this security. |
ORDER_BEFORE_BROKER_TRADING_TIME | The current order type does not support pre-market. |
ORDER_AFTER_BROKER_TRADING_TIME | The current order type does not support post-market. |
STOP_LOSS_PRICE_MUST_BELOW_A_PRICE | The stop price of the stop-loss order should be lower than the price you entered. |
STOP_LOSS_PRICE_MUST_ABOVE_A_PRICE | The stop price of the stop-loss order should be higher than the price you entered. |
STOP_PROFIT_PRICE_MUST_BELOW_A_PRICE | The limit price of the take-profit order should be lower than the price you entered. |
STOP_PROFIT_PRICE_MUST_ABOVE_A_PRICE | The limit price of the take-profit order should be higher than the price you entered. |
STOP_LOSS_PROFIT_PRICE_INTERNAL_ERROR | The price of the take-profit or stop-loss order does not meet the specified minimum price interval. |
STOP_LOSS_PROFIT_MASTER_SIDE_MUST_BE_BUY | It must be a buy order for stop loss profit. |
CAN_NOT_TRADING_OTC_FOR_ACCOUNT | Your account has been restricted from trading otc. |
OPERATOR_CAN_NOT_BE_NULL | The operator can not be null. |
ACCOUNT_NOT_FOUND_FROM_APEX | Your account is not eligible for fractional shares trading. |
STOCK_ORDER_PRICE_PRECISION_EXCEED | Price increment should be 0.01 when price is equal or greater than 0.9999. |
STOP_PRICE_MUST_BE_LESS_THAN_LIMIT_PRICE | Stop price must be less than limit price. |
STOP_PRICE_MUST_BE_LESS_THAN_MARKET_PRICE_P | Stop price must be less than pre-close price for a sell order during pre-market hours. |
STOP_PRICE_MUST_BE_LESS_THAN_MARKET_PRICE_L | Stop price must be less than close price for a sell order during post-market hours. |
STOP_PRICE_MUST_BE_GREAT_THAN_MARKET_PRICE_P | Stop price must be greater than pre-close price for a buy order during pre-market hours. |
STOP_PRICE_MUST_BE_GREAT_THAN_MARKET_PRICE_L | Stop price must be greater than close price for a buy order during post-market hours. |
STOP_PRICE_MUST_BE_GREATER_THAN_LIMIT_PRICE | Stop price must be greater than limit price for a sell order. |
DAY_ORDER_NOT_ALLOWED_AFT_CORE_TIME_LIMIT | Regular trading hours has ended and you placed day orders. |
DAY_ORDER_NOT_ALLOWED_AFT_CORE_TIME_OTHERS | Regular trading hours has ended. Market orders / stop orders / stop limit orders are not supported during extended hours. |
DAY_ORDER_NOT_ALLOWED_AFT_CORE_TIME_MARKET | Regular trading hours has ended. Market orders are not supported during extended hours for regular trading days. |
DAY_ORDER_NOT_ALLOWED_AFT_CORE_TIME_STOP_LIMIT | Regular trading hours has ended. Stop orders/stop limit orders are not supported during extended hours. |
EXIST_SAME_ORDER | Repeated order request. |
EXIST_PENDING_REPLACE_ORDER | Order can not be modified before previous modification completes. |
EXIST_PENDING_CANCEL_ORDER | Order can not be canceled before previous cancellation completes. |
ERROR_NEW_ORDER | Failed to place order. |
ERROR_NEW_DAY_ORDER_AFTER_CORE_TIME | Day order is not allowed after market closed. |
ORDER_CANT_NOT_BE_REPLACE | Order can not be modified. |
ORDER_REPLACE_ERROR | Failed to modify order. |
ERROR_CANCEL_ORDER | Failed to cancel order. |
UNFILLED_SELL_ORDER_IN_CASH_ACCOUNT | There is an existing open sell order and short selling is not supported for a cash account. |
UNFILLED_SELL_ORDER_IN_MARGIN_ACCOUNT | There is an existing open sell order. This stock is currently not supported for short selling. |
CASH_ACCOUNT_CAN_NOT_SELL_SHORT | You can’t sell more shares than you hold. |
CASH_ACCOUNT_CAN_NOT_SHORT_OPTION | Cash account doesn't currently support short selling options. |
MARGIN_NOT_ALLOW_FOR_RESTRICTED_WITH_UNFILLED_ORDER | There is an existing open sell order. This account is currently not supported for short selling. |
MARGIN_ACCOUNT_CAN_NOT_SELL_SHORT_FOR_LT_2K_WITH_UNFILLED_ORDER | There is an existing open sell order. Your account has less than $2000 and is not available for short selling. |
LIMIT_PRICE_DISMATCH_TICK_PRICE_PILOT | Limit rder price is not in tick size increments. |
STOP_PRICE_DISMATCH_TICK_PRICE_PILOT | Stop order price is not in tick size increments. |
DAY_BUYING_POWER_INSUFFICIENT_O_P | Insufficient buying power. Your buying power must be 15% greater than the estimated amount of the purchase to place a market order in the pre-market. |
DAY_BUYING_POWER_INSUFFICIENT_M | Insufficient buying power. Your buying power must be 2% greater than the estimated amount of the purchase to place a market order during regular market hours. |
DAY_BUYING_POWER_INSUFFICIENT_NOT_SUPPORT_CREDIT | Insufficient buying power due to the high risk of low-priced stocks and leveraged ETFs. |
MAINTENANCE_REQ_INSUFFICIENT | Failed to place order due to insufficient margin excess. |
CAN_NOT_TRADING_FOR_SOD_NOT_READY | Network error, please try again later. |
CAN_NOT_TRADING_FOR_FIXGW_NOT_READY_LIMIT | The current order type does not support pre-market and after-hours trading. |
ERROR_STOP_LOSS_QUANTITY | The number of take-profit orders and the number of stop-loss orders must be the same. |
COMBO_ORDER_MUST_HAVE_MASTER | Primary order is required for this advanced order. |
ERROR_COMBO_ORDER_SIZE | You can add up to 6 subsidiary orders. |
CANT_PLACE_COMBO_ORDER | You have an open order of this stock now. |
CNAT_PLACE_NORMAL_ORDER | You have an open advanced order of this stock now. |
CANT_USE_UNSETTLE_FUNDS_FOR_COMBO_ORDER | Insufficient settled funds, cash account can only use settled funds to place advanced orders. |
CANT_TRADE_FOR_PRICE_BELOW_001 | Opening position is not allowed when stock price is below $0.01. |
CANT_TRADE_FOR_PRICE_BETWEEN_001_AND_0099 | A minimum order size of 1000 is required when stock price is between $0.01 and $0.099. |
CANT_TRADE_FOR_PRICE_BETWEEN_0099_AND_0999 | A minimum order size of 100 is required when stock price is between $0.1 and $0.999. |
STOP_ORDER_NOT_SUPPORT_EXTEND_HOUR | Extended hours trading is not available for Stop Loss/Take Profit order. |
REPLACE_QTY_CANT_LESS_THAN_STRIKE_QTY | The modified quantity must be greater than filled quantity. |
CANT_REVERSE_POSITION_FOR_EXIST_PSLP | You have an open stop-loss/take-profit order already. |
CANT_REVERSE_POSITION_FOR_EXIST_MSLP | Total shares of open closing orders exceed shares of current position. |
STOP_LOSS_PROFIT_SIDE_MUST_BE_SAME | The order side of take-profit order and stop-loss order should be identical. |
STOP_LOSS_PROFIT_SIDE_CANT_SAME_WITH_POSITION | The order side of take-profit and stop-loss orders should be opposite to the open position. |
STOP_LOSS_PROFIT_TIF_MUST_BE_SAME | The take-profit order and stop-loss order should have the same Time-in-force. |
CANT_PLACE_PSLP_WITHOUT_POSITION | Stop-loss/take-profit order cannot be placed because you don't have a position for this stock. |
CANT_REVERSE_POSITION_BY_PSLP | The quantity of take-profit and stop-loss orders should be smaller than the open position. |
ORDER_QUANTITY_EXCEED_LIMIT | Order quantity must be below 200,000. |
TRADE_WEBULL_REQUEST_PROCESSING | Request is being processed. |
TRADE_COMMON_DUPLICATE_REQUEST | Please do not submit request repeatedly. |
TRADE_LMTPRICE_GT_AUXPRICE | The limit price should be higher than the stop price. |
TRADE_LMTPRICE_LT_AUXPRICE | The limit price should be lower than the stop price. |
TRAILING_PRICE_MUST_BE_POSITIVE | The trailing price should be higher than $0. |
GTX_NOT_SUPPORT_MARKET | This order type does not support pre-market and after-market trading. |
CAN_NOT_MODIFY_ORDER_TYPE | The order type cannot be modified. |