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
GetAccount
GetNodeList
DeleteNode
GetExchangeList
GetPlatformList
GetStrategyList
GetRobotGroupList
GetRobotList
GetRobotDetail
GetRobotLogs
NewRobot
RestartRobot
StopRobot
CommandRobot
DeleteRobot
PluginRun
pub
Extended API Interface Return Codes
Live Trading Status Codes

Sends an interactive command to a running robot of the account; the strategy receives it with GetCommand.

Examples

Send the command test command to running robot 123; its strategy receives it with GetCommand() and logs it (strategy code in the remarks).

python
# api() is the function in the Python example on the signature authentication page r = api('CommandRobot', 123, 'test command') print(r['data']['result']) # output: True

Returns

TypeDescription

bool

data.result tells whether the command was sent; it is false when the robot is not running.

Arguments

NameTypeRequiredDescription

robotId

number

Yes

ID of the robot that receives the command; see GetRobotList.

cmd

string

Yes

The interactive command; the strategy reads it with GetCommand().

Remarks

A strategy that receives the command:

javascript
// strategy run by robot 123: print each interactive command it receives function main() { while (true) { var cmd = GetCommand() if (cmd) { Log(cmd) } Sleep(2000) } }

To call CommandRobot from a webhook that accepts only one URL, such as TradingView, see Direct Verification.