GetRobotLogs


```json
{
    "code": 0,
    "data": {
        "result": {
            "chart": "",
            "chartTime": 0,
            "logs": [{
                "Total": 20,
                "Max": 20,
                "Min": 1,
                "Arr": []
            }, {
                "Total": 0,
                "Max": 0,
                "Min": 0,
                "Arr": []
            }, {
                "Total": 0,
                "Max": 0,
                "Min": 0,
                "Arr": []
            }],
            "node_id": 123,
            "online": true,
            "refresh": 1732201544000,
            "status": 4,
            "summary": "...",
            "updateTime": 1732201532636,
            "wd": 0
        },
        "error": null
    }
}
  • logs: 日志信息;查询出的若干条日志数据存储在Arr字段中。 logs中第一个数据结构为实盘数据库中策略日志表的日志记录。 logs中第二个数据结构为实盘数据库中收益日志表的日志记录。 logs中第三个数据结构为实盘数据库中图表日志表的日志记录。
  • summary: 实盘状态栏数据。
robotId
true
number
```logMinId```参数用于指定日志记录的最小ID。
logMinId
true
number
```logMaxId```参数用于指定日志记录的最大ID。
logMaxId
true
number
```logOffset```参数用于设置偏移量。在由```logMinId```和```logMaxId```确定的范围内,根据```logOffset```跳过指定数量的记录,从而确定数据获取的起始位置。
logOffset
true
number
```logLimit```参数用于设置从起始位置开始要获取的数据记录条数。
logLimit
true
number
```profitMinId```参数用于设置收益日志的最小ID。
profitMinId
true
number
```profitMaxId```参数用于设置收益日志的最大ID。
profitMaxId
true
number
```profitOffset```参数用于设置偏移量,即跳过指定数量的记录作为起始位置。
profitOffset
true
number
```profitLimit```参数用于设置从起始位置开始要获取的数据记录条数。
profitLimit
true
number
```chartMinId```参数用于设置图表数据记录的最小ID。
chartMinId
true
number
```chartMaxId```参数用于设置图表数据记录的最大ID。
chartMaxId
true
number
```chartOffset```参数用于设置偏移量。
chartOffset
true
number
```chartLimit```参数用于设置要获取的记录条数。
chartLimit
true
number
```chartUpdateBaseId```参数用于设置查询更新记录的基准ID。
chartUpdateBaseId
true
number
```chartUpdateDate```参数用于设置数据记录的更新时间戳,系统将筛选出大于此时间戳的记录。
chartUpdateDate
true
number
```summaryLimit```参数用于设置要查询的状态栏数据字节数。该参数为整型,用于查询实盘的状态栏数据。

设置为0表示不查询状态栏信息;设置为非0值表示要查询的状态栏信息字节数(此接口不限制数据量,可以指定一个较大的summaryLimit参数来获取所有状态栏信息)。状态栏数据存储在返回数据的```summary```字段中。
summaryLimit
true
number

- 数据库中的策略日志表
  返回数据中```logs```的属性值(数组结构)的第一个元素中(日志数据)```Arr```属性值描述如下:

  ```plaintext
  "Arr": [
      [3977, 3, "Futures_OKCoin", "", 0, 0, "Sell(688.9, 2): 20016", 1526954372591, "", ""],
      [3976, 5, "", "", 0, 0, "OKCoin:this_week 仓位过多, 多: 2", 1526954372410, "", ""]
  ],

| id | logType | eid | orderId | price | amount | extra | date | contractType | direction | | - | - | - | - | - | - | - | - | - | - | | 3977 | 3 | “Futures_OKCoin” | “” | 0 | 0 | “Sell(688.9, 2): 20016” | 1526954372591 | “” | “” | | 3976 | 5 | “” | “” | 0 | 0 | “OKCoin:this_week 仓位过多, 多: 2” | 1526954372410 | “” | “” |


  ```logType```值对应的日志类型描述如下:

  | logType: | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
  | - | - | - | - | - | - | - | - |
  | logType意义: | BUY | SALE | RETRACT | ERROR | PROFIT | MESSAGE | RESTART |
  | 中文意义 | 买入订单日志 | 卖出订单日志 | 撤单 | 错误 | 收益 | 消息 | 重启 |

- 数据库中的收益图表日志表
  该图表日志表数据与策略日志表中的收益日志保持一致。

  ```plaintext
  "Arr": [
      [202, 2515.44, 1575896700315],
      [201, 1415.44, 1575896341568]
  ]

以其中一条日志数据为例:

  [202, 2515.44, 1575896700315]
- 数据库中的图表日志表

  ```plaintext
  "Arr": [
      [23637, 0, "{\"close\":648,\"high\":650.5,\"low\":647,\"open\":650,\"x\":1575960300000}"],
      [23636, 5, "{\"x\":1575960300000,\"y\":3.0735}"]
  ]

以其中一条日志数据为例:

  [23637, 0, "{\"close\":648,\"high\":650.5,\"low\":647,\"open\":650,\"x\":1575960300000}"],

23637为日志ID,0为图表数据系列索引,最后的数据"{\"close\":648,\"high\":650.5,\"low\":647,\"open\":650,\"x\":1575960300000}"为日志数据,该条数据为图表上的K线数据。