The resource loading... loading...

RestartRobot

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
    }
}
  • result: Live trading status code, 1 means running.

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
}
  • appid: Custom fields Tags can be defined.
  • args: Strategy parameter settings The structure is an array, each element is a parameter. For example, if the strategy has a parameter Interval, and you want to set Interval to 500 when restarting the strategy, then args contains: ["Interval", 500], that is: "args": [["Interval", 500]].
  • exchanges: Exchange object configuration for live trading binding The structure is an array, where each element is an exchange object configuration.
    • It can bind to the exchange object that has been configured on the platform That is, use 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.
    • We can directly pass in configuration information and bind exchange objects That is, use 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.
    • It can bind Custom Protocol exchange object It can pass in configuration information: {"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.
  • name: Strategy name
  • node: Docker ID Specifies which docker to run on. If this attribute is not set, the docker will be assigned to run automatically.
  • period: Default K-line period K-line period parameter, 60 means 60 seconds.
  • strategy: Strategy ID It can be obtained using the 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.

StopRobot GetRobotDetail