资源加载中... loading...

GetRobotDetail

The GetRobotDetail method is used to get the details of the live trading under the FMZ Quant Trading Platform account corresponding to the API KEY in the request. The Id of the live trading to be retrieved is the live trading Id specified by the robotId parameter.

{
    "code": 0,
    "data": {
        "result": {
            "robot": {
                // Next payment time, namely the effective cut-off time after the current payment
                "charge_time": 1561992608,                                                  
                // Elapsed Time
                "charged": 3600,                                                            
                // Amount consumed (0.125 CNY = 12500000 / 1e8)
                "consumed": 12500000,                                                       
                "date": "2019-07-01 21:50:08",
                "debug": "{\"Nano\":1561989722431145193,\"Stderr\":\"\",\"Stdout\":\"\"}",  
                // Stop time
                "end_time": "2019-07-01 22:02:02",                                          
                // The docker ID assigned when live trading is running; if it is automatic, the value is -1
                "fixed_id": 85960,                                                          
                "id": 150288,
                "is_deleted": 0,
                // Whether it has the permission to manage live trading
                "is_manager": true,                                                         
                // Whether it is a simulation trading
                "is_sandbox": 0,                                                            
                // Live trading name
                "name": "Spread monitoring2",                                                         
                // Docker ID
                "node_id": 85960,                                                           
                // The exchange objects configured by live trading
                "pexchanges": {                                                             
                    // 14703 is pid, and "GateIO" is exchange name
                    "14703": "GateIO",                                                      
                    "15445": "ZB",
                    "42960": "OKEX",
                    "44314": "Huobi"
                },
                // label information of the exchange object configured by live trading
                "plabels": {                                                                
                    "14703": "Gate.IO (old name: BTER)",
                    "15445": "ZB",
                    "42960": "OKEX spot V3 test",
                    "44314": "Huobi - newest test"
                },
                "profit": 0,
                // Whether to show public
                "public": 0,                                                                
                // Recent active time
                "refresh": 1561989724000,                                                   
                "robot_args": "[[\"TickInterval\",500],[\"StrOnePair\",\"spot:Huobi:spot;spot:OKEX:spot;false;60;5;0;0\"],[\"StrTwoPair\",\"spot:ZB:spot;spot:GateIO:spot;false;60;5;0;0\"],[\"StrThreePair\",\"null\"],[\"StrFourPair\",\"null\"],[\"StrSixPair\",\"null\"],[\"StrFivePair\",\"null\"],[\"ResetChart\",false]]",
                "start_time": "2019-07-01 22:00:54",
                // Live trading status
                "status": 4,                                                                
                "strategy_args": "[[\"TickInterval\",\"Detection frequency (ms)\",\"This is millisecond. Don't set it too small.\",500],[\"StrOnePair\",\"Combination1\",\"Spread Combination\",\"spot:Huobi:spot;spot:OKCoin:spot;false;60;5;0;0\"],[\"StrTwoPair\",\"Combination2\",\"Spread Combination\",\"future:Futures_OKCoin:this_week;spot:OKCoin:spot;false;60;5;0;0\"],[\"StrThreePair\",\"Combination3\",\"Spread Combination\",\"future:Futures_OKCoin:this_week;future:Futures_OKCoin:quarter;true;60;5;0;0\"],[\"StrFourPair\",\"Combination4\",\"Spread Combination\",\"null\"],[\"StrSixPair\",\"Combination6\",\"Combination\",\"null\"],[\"StrFivePair\",\"Combination5\",\"Combination\",\"null\"],[\"ResetChart\",\"whether to clear the previous chart\",\"clear the previous chart\",false]]",
                // Configured exchange objects, set trading pair information
                "strategy_exchange_pairs": "[60,[44314,42960,15445,14703],[\"BTC_USDT\",\"BTC_USDT\",\"ETH_USDT\",\"ETH_USDT\"]]",
                // Strategy ID
                "strategy_id": 21337,                                                       
                // Strategy's last modification time
                "strategy_last_modified": "2018-11-29 12:07:58",                            
                // Strategy name
                "strategy_name": "Digital currency spread monitoring and analysis",                                       
                "summary": "Polling time consuming: 500ms\n`[{\"type\":\"table\",\"title\":\"pair basic data\",\"cols\":[\"ID\",\"NameA - NameB\",\"SymbolA - SymbolB\",\"UpdCycle\",\"isUSD\",\"Collect\"],\"rows\":[[\"0 \",\"Huobi/OKEX\",\"spot/spot\",60,false,\"612ms\"],[\"1 \",\"ZB/GateIO\",\"spot/spot\",60,false,\"501ms\"]]},{\"type\":\"table\",\"title\":\"pair ticker data\",\"cols\":[\"ID\",\"NameA - NameB\",\"SymbolA - SymbolB\",\"A_Bids1\",\"B_Asks1\",\"Plus\",\"A_Asks1\",\"B_Bids1\",\"Minus\"],\"rows\":[[\"0 \",\"Huobi/OKEX\",\"spot/spot\",10518.02,10525.1,-7.08,10520,10523,-3],[\"1 \",\"ZB/GateIO\",\"spot/spot\",285.68,286,-0.32,285.8,285.85,-0.05]]},{\"type\":\"table\",\"title\":\"pair statistical data\",\"cols\":[\"ID\",\"NameA - NameB\",\"SymbolA - SymbolB\",\"Maximum spread\",\"Minimum spread\",\"Mean positive premium\",\"Mean negative premium\"],\"rows\":[[\"0 \",\"Huobi/OKEX\",\"spot/spot\",0,-3,0,-1.47],[\"1 \",\"ZB/GateIO\",\"spot/spot\",0.03,-0.05,0.03,-0.05]]}]`\n",
                // Whether to enable offline alert
                "wd": 0                                                                      
            }
        },
        "error": null
    }
}

The robotId parameter is used to specify the Id of the live trading for which the details are to be obtained. You can use the GetRobotList method to obtain information about the live trading under the account, which contains the live trading Id. robotId true number

The summary attribute in the returned data (information on the bot status bar; cached for 10 second; not the latest data) currently has a data amount limit (cached data). The data amount limit is 200KB, and the excess data will be truncated. If you need more status bar information data, you can use the GetRobotLogs interface to get (when GetRobotLogs obtains the information of status bar, the field summary is the latest data).

The attribute description of strategy_exchange_pairs, take the following data as an example:

[60,[44314,42960,15445,14703],[\"BTC_USDT\",\"BTC_USDT\",\"ETH_USDT\",\"ETH_USDT\"]]

The first data 60 represents the default K-line period set by live trading is 1 minute, namely 60 seconds. [44314,42960,15445,14703] is the exchange object pid configured for live trading (according to the addition order). [\"BTC_USDT\",\"BTC_USDT\",\"ETH_USDT\",\"ETH_USDT\"] is the trading pair set for the exchange object configured by live trading (in the order of addition and in one-to-one correspondence with pid).

RestartRobot GetAccount