The RestartRobot
method is used to restart the live trading under the API KEY
corresponding to the FMZ Quant Trading Platform account in the request. The Id of the restarted live trading is the live trading Id specified by the robotId
parameter.
{
"code":0,
"data":{
"result":1,
"error":null
}
}
The robotId
parameter is used to specify the Id of the
live trading to be restarted. You can use the GetRobotList
method to get the information of the live trading under the
account, which contains the live trading Id.
robotId
true
number
The live trading configuration parameters, the parameters settings
format is as follows:
{
"appid":"test",
"args":[],
"exchanges":[
{"pair":"SOL_USDT","pid":123},
{"pair":"ETH_USDT","pid":456}
],
"name":"test",
"node":123,
"period":60,
"strategy":123
}
Interval
, and you want to set Interval
to 500 when restarting the strategy, then args
contains: ["Interval", 500]
, that is: "args": [["Interval", 500]]
.pid
configuration: {"pair":"SOL_USDT","pid":123}
; pid
can be queried through the GetPlatformList
interface, and the id
field in the returned data is the exchange pid
.eid
configuration: {"eid":"Huobi","label":"test Huobi","meta":{"AccessKey":"123","SecretKey":"123"},"pair":"BCH_BTC"}
; sensitive information such as API KEY
is not stored by the FMZ Quant Trading Platform, and these data are directly forwarded to the docker program. If this type of configuration is used, the information must be configured each time a live trading is created or restarted.{"eid":"Exchange","label":"test exchange","pair":"BTC_USDT","meta":{"AccessKey":"123","SecretKey":"123","Front":"http://127.0.0.1:6666/test"}}
.
label
attribute is to set a label for the exchange object accessed by the current Custom Protocol, which can be obtained by the exchange.GetLabel()
function in the strategy.GetStrategyList
method.settings false JSON Object
If a live trading is created by the extended API, the extended API RestartRobot (RobotId, Settings)
must be used to restart, and the settings
parameter must be passed. The live trading created on the platform page can be restarted through the extended API or by clicking the button on the page. You can pass or don’t pass the settings
parameter. If you only pass the RobotId
parameter, start live trading according to the current live trading settings.