GetRobotLogs


```json
{
    "code": 0,
    "data": {
        "result": {
            "chart": "",
            "chartTime": 0,
            "logs": [{
                "Total": 8,
                "Max": 94,
                "Min": 87,
                "Arr": []
            }, {
                "Total": 0,
                "Max": 0,
                "Min": 0,
                "Arr": []
            }, {
                "Total": 0,
                "Max": 0,
                "Min": 0,
                "Arr": []
            }],
            "node_id": 123,
            "online": true,
            "refresh": 1732520711000,
            "status": 4,
            "summary": "...",
            "updateTime": 1732520715044,
            "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': [
      [12, 5, '', '', 0, 0, '[]', 1635495362912, '', ''],
      [11, 3, 'Futures_Futu', '', 0, 0, 'Buy(1826.08, 1000): TrdMarket_CN: 缺少必要的参数: secMarket', 1635495362904, '', '']
  ]

|id|logType|eid|orderId|price|amount|extra|date|contractType|direction| |-|-|-|-|-|-|-|-|-|-| |12|5|“|”|0|0|‘[]’|1635495362912|“|”| |11|3|‘Futures_Futu’|“|0|0|‘Buy(1826.08, 1000): TrdMarket_CN: 缺少必要的参数: secMarket’|1635495362904|”|“|


  ```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线数据。