Live Trading Status Codes
The status field in the data returned by GetRobotList, GetRobotDetail and GetRobotLogs is the robot status code, with these values.
| Status | Code |
|---|---|
| Preparing (queued, compiling) | 0 |
| Running | 1 |
| Stopping | 2 |
| Exited | 3 |
| Stopped | 4 |
| Strategy error | 5 |
Return values when a start fails
Negative codes never appear in the status field; they are only returned by NewRobot and RestartRobot when the start fails:
| Meaning | Code |
|---|---|
| Strategy not usable: rental expired, neither yours nor rented, deleted, or the given version does not exist | -1 |
| No usable docker: the given docker is offline, or no docker is online | -2 |
| Failed to read the live trading or account data | -3 |
The robot's status changed at the same time as the start (RestartRobot only); query it again and retry | -4 |
| Insufficient balance | -5 |
| The concurrency limit of a rented strategy has been reached and the strategy has no overage price | -6 |
Errors such as exceeding the number of robots the account may run, or having no permission for the live trading, are not reported as return values but as an error with code 6; see Extended API Interface Return Codes.