settings
| JSON object
| No | Live trading configuration parameters. The settings parameter 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 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.
|