Type/to search
Welcome to FMZ Quant Trading Platform
Programming Languages
JavaScript
TypeScript
Python
C++
MyLanguage
PINE Language
Blockly Visual Programming
Workflow
Key Security
Live Trading
Strategy Library
Docker
Deploy Docker
One-Click Docker Rental
Manual Deployment of Bot
Docker Operation Precautions
Global IP Address Specification
Command Line Parameters for Bot Program
Live Trading Data Migration
Docker Monitor
Exchange
Strategy Editor
Backtesting System
Strategy Entry Functions
Strategy Framework and API Functions
Template Library
Strategy Parameters
Interactive Controls
Options Trading
C++ Strategy Writing Guide
JavaScript Strategy Writing Guide
Web3
Built-in Libraries
Extended API Interface
MCP Service
Trading Terminal
Data Explorer
Alpha Factor Analysis Tool
General Protocol
Debugging Tool
Remote Editing
Import and Export of Complete Strategies
Multi-language Support
Live Trading and Strategy Grouping
Live Trading Display
Strategy Sharing and Renting
Live Trading Message Push
Common Causes of Live Trading Errors and Abnormal Exits
Exchange-Specific Notes

The RestartRobot method is used to restart a live trading bot under the FMZ Quant Trading Platform account corresponding to the API KEY in the request. The bot ID to be restarted is specified by the robotId parameter.

Returns

json
{ "code":0, "data":{ "result":1, "error":null } }
  • result: Live trading status code, 1 indicates running.

Arguments

NameTypeRequiredDescription

robotId

number

Yes

The robotId parameter is used to specify the ID of the live trading bot to be restarted. You can use the GetRobotList method to get information about live trading bots under the account, which includes the bot ID.

settings

JSON object

No

Live trading configuration parameters. The settings parameter format is as follows:

json
{ "appid":"test", "args":[], "exchanges":[ {"pair":"SOL_USDT","pid":123}, {"pair":"ETH_USDT","pid":456} ], "name":"Test", "node":123, "period":60, "strategy":123 }
  • appid: Custom field
    Can be used to define labels.
  • args: Strategy parameter settings
    Structure is an array, with each element being a parameter. For example, if the strategy has a parameter Interval and you want to set Interval to 500 when restarting the strategy, args should contain: ["Interval", 500], i.e.: "args": [["Interval", 500]].
  • exchanges: Exchange object configuration bound to the live trading bot
    Structure is an array, where each element is an exchange object configuration.
    • Can bind exchange objects already configured on the platform
      Using pid configuration: {"pair":"SOL_USDT","pid":123}; pid can be queried through the GetPlatformList interface, where the id field in the returned data is the exchange pid.
    • Can directly pass configuration information to bind exchange objects
      Using eid configuration: {"eid":"Huobi","label":"test Huobi","meta":{"AccessKey":"123","SecretKey":"123"},"pair":"BCH_BTC"}; Sensitive information such as the passed API KEY will not be stored by the FMZ Quant Trading Platform, and this data will be directly forwarded to the docker program. If using this type of configuration, this information must be configured each time creating or restarting a live trading bot.
    • Can bind General Protocol exchange objects
      Can pass configuration information: {"eid":"Exchange","label":"test exchange","pair":"BTC_USDT","meta":{"AccessKey":"123","SecretKey":"123","Front":"http://127.0.0.1:6666/test"}}.
      The label attribute is used to set a label for the current General Protocol connected exchange object, which can be retrieved in the strategy using the exchange.GetLabel() function.
  • name: Strategy name
  • node: Docker ID
    Specifies which docker to run on. If this attribute is not set, the system will automatically allocate.
  • period: Default K-line period
    K-line period parameter, 60 means 60 seconds.
  • strategy: Strategy ID
    Can be obtained using the GetStrategyList method.

Remarks

If the live trading bot was created through the extended API interface, it must be restarted using the extended API interface RestartRobot, and the settings parameter must be passed. For live trading bots created on the platform page, they can be restarted through the extended API interface or by clicking the button on the live trading page. The settings parameter can be passed or not. If only the robotId parameter is passed, it will start running according to the current settings of the live trading bot.