Type/to search
Getting Started
Platform Basics
Writing Strategies
Development Tools
Backtesting System
Advanced Topics
Data and Research
Extended API Interface
AI Integration
Create ApiKey
Authentication Methods
Extended API Interface Details
Extended API Interface Return Codes
Live Trading Status Codes

Every response of the extended API has the JSON structure below: code tells whether the request itself succeeded, and the method's result is in data.

json
{ "code": 0, "data": { "result": null, "error": null } }

code is the status of the request itself:

DescriptionCode
Success0
Invalid API KEY: the AccessKey does not exist or is disabled; or a wrong secret_key in direct verification1
Invalid signature2
Nonce error: the nonce is not greater than the previous one, or differs from server time by more than 1 hour3
Invalid method: the method does not exist, is not public, or this API KEY has no permission for it4
Invalid arguments: args is not valid JSON, or the request cannot be dispatched (e.g. mismatched method/args counts)5
The method failed while running (e.g. no permission for the robot, robot busy, too many running robots); see below6
The request's source IP is not in this API KEY's IP whitelist7

With code 0 the method's result is in data.result. When the number or types of the arguments do not match the method, code is still 0, data.result is null and data.error holds the error message (null on success). For example, with the wrong number of arguments:

json
{ "code": 0, "data": { "result": null, "error": "Params number mismatch for StopRobot: expected 1, got 0" } }

When the method fails while running, code is 6, the message is in the top-level error field and data is null. For example, when operating on a robot that is not yours:

json
{ "code": 6, "error": "Access Denied", "data": null }