Error Handling

About 2 min

Error Handling

Corresponding to the code and message in the public response parameters, which are used to describe the result of the business request, the corresponding description is as follows:

Error CodeMessageDescription
0successThe request was successful
1server errorThis status code will be returned when the request parameters cannot be processed, or the server itself is abnormal.
2network read time outThe request network timed out, you need to check the network status, you can consider deploying OpenAPI services nearby, or use a stable private line service
4access forbiddenAccess denied, possible reasons:
1. If the IP whitelist is set, but the machine that initiates the request is not in the whitelist
2. It may be due to frequent requests of the account, or errors Too many requests, resulting in being added to the blacklist
3. Long connection signature verification failed
4. Too many targets for long connection subscriptions, exceeding the limit
5rate limit errorThe request frequency exceeds the limit. In this case, the HTTP status code returned is 429, and the error message will return the description of the limit times per unit time
1000common param errorParsing public parameters will result in the return of this result, possible reasons:
1. The requested method does not support (method parameter error)
2. The requested URL address is incorrect
>3. The requested parameters are not in the standard JSON format
4. Public parameters (not bizContent) have verification errors, such as timestamp format errors, fields are empty, sign signature field verification errors, etc.
1010biz param errorerror in parsing bizContent parameter, possible cause:
The business parameter check error (such as begin_time format error, sec_type does not support)
1100global account response errorGlobal account transaction error, such as:
1. TRADE DUPLICATE ORDER ID: the transaction order number is duplicated
2. TRADE ORDER NOT ALLOWED: currently not allowed to place an order
1200prime account response errorComprehensive account transaction error, such as:
1.BAD_REQUEST: Orders cannot be place at this moment: Orders cannot be placed at this moment
2.BAD_REQUEST :You cannot place market or stop order during pre-market and after-hours trading: You cannot place market or stop order during pre-market and after-hours trading of US stocks
3.The order quantity you entered exceeds your currently available position: The order quantity exceeds the tradable quantity
4.bad_request: We don't support trading of this stock now: This target transaction is not supported
1300paper account response errorPaper account transaction error, the error description is basically the same as that returned by the integrated account
2100stock response errorStock quote related error
2200option response erroroption market related error
2300futures response errorfutures market related errors
3xxxsubscribe errorSubscription data-related errors, possible causes:
1. TigerId exception during subscription
2. Server exception occurred during subscription
3. Unsupported market provider Parameter
4. Unsupported subscription type
5. The number of subscriptions exceeds the limit requirement
4000permission deniedInsufficient access rights, access denied, possible reasons:
1. The time period for requesting K-line quotes exceeds the allowed range
2. The time period for requesting time-sharing data exceeds The allowed range
3. The device requesting the quotation is not within the allowed range (only one device can use the quotation when multiple devices preempt at the same time)
4. The quotation permission does not meet the requirements
4001kick out by a new connectionThe long connection channel has been kicked out by a new connection
Last update: