跳到正文

    按 / 搜索,按 [ 和 ] 前往上一页和下一页。

    开发者参考

    读取 API 与推送

    读取 API 提供市场状态、历史数据和账户信息;SSE 推送和公共频道实时推送变化。所有 Schema 均由代码生成。

    约定

    • 整数金额是规范的十进制字符串(无符号、无前导零),在任何语言中都保持精确;每个 Schema 都注明了单位。
    • 错误使用统一的结构:ok: false、错误码、说明,以及限流时需要等待的时长。
    • 账户状态带有版本号;客户端只在增量所指的版本之上应用增量,出现缺口时重新订阅。

    接口

    GET /state/trading

    市场、限额、费率、冲击参数、暂停状态与上限(也通过 trading:current 推送)。

    响应: tradingStateV2Schema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 2
        },
        "indexedThroughBlock": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "indexedThroughTimestamp": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "tradingPaused": {
          "type": "boolean"
        },
        "breaker": {
          "type": "object",
          "properties": {
            "tripped": {
              "type": "boolean"
            },
            "trippedAtMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "guardianResetAtMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "autoResetAtMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "halfLifeSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            }
          },
          "required": [
            "tripped",
            "trippedAtMs",
            "guardianResetAtMs",
            "autoResetAtMs",
            "halfLifeSec"
          ]
        },
        "minMarginRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "minNotionalRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "fees": {
          "type": "object",
          "properties": {
            "winWad": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "lossWad": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "liqWad": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "stakerShareBps": {
              "default": 5000,
              "type": "integer",
              "minimum": 0,
              "maximum": 65535
            },
            "referralFeeBps": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 65535
            },
            "referralDiscountBps": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 65535
            },
            "liqReferralEnabled": {
              "default": false,
              "type": "boolean"
            }
          },
          "required": [
            "winWad",
            "lossWad",
            "liqWad"
          ]
        },
        "settlement": {
          "type": "object",
          "properties": {
            "payoutCurve": {
              "type": "string",
              "enum": [
                "standard",
                "offHours"
              ]
            },
            "closeChecksBust": {
              "type": "boolean"
            }
          },
          "required": [
            "payoutCurve",
            "closeChecksBust"
          ]
        },
        "limits": {
          "type": "object",
          "properties": {
            "maxCloseIds": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            "maxOpenPositionsPerUser": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            "maxDebtNodes": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            "maxLiqBatch": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            }
          },
          "required": [
            "maxCloseIds",
            "maxOpenPositionsPerUser",
            "maxDebtNodes",
            "maxLiqBatch"
          ]
        },
        "withdraw": {
          "type": "object",
          "properties": {
            "min6": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "activationFeeWei": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "activationChargedToSender": {
              "type": "boolean"
            }
          },
          "required": [
            "min6",
            "activationFeeWei",
            "activationChargedToSender"
          ]
        },
        "sessions": {
          "type": "object",
          "properties": {
            "maxSessionDurationSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            },
            "maxIntentTtlSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            }
          },
          "required": [
            "maxSessionDurationSec",
            "maxIntentTtlSec"
          ]
        },
        "directClose": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "disabled",
                "failsafe",
                "always"
              ]
            },
            "failsafeDelaySec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            },
            "lastBatchAtMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "mode",
            "failsafeDelaySec",
            "lastBatchAtMs"
          ]
        },
        "staking": {
          "type": "object",
          "properties": {
            "accRewardPerShareRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "accPrecision": {
              "type": "string",
              "const": "1e36"
            },
            "totalStakedRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "accRewardPerShareRaw",
            "accPrecision",
            "totalStakedRaw"
          ]
        },
        "instruments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "symbol": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "assetIndex": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "priceScale": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "szDecimals": {
                "type": "integer",
                "minimum": 0,
                "maximum": 6
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "retired"
                ]
              },
              "retiredAtMs": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "freezeSource": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "bbo",
                      "mark",
                      "oracle"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "frozenBidRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "frozenAskRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maxLeverage": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000
              },
              "maxNotionalRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "bustBufferWad": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "deadbandDivisor": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4294967295
              },
              "impact": {
                "type": "object",
                "properties": {
                  "baseRateWad": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "rateMultiplierWad": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "positionMultiplierWad": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "referenceNotionalRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  }
                },
                "required": [
                  "baseRateWad",
                  "rateMultiplierWad",
                  "positionMultiplierWad",
                  "referenceNotionalRaw"
                ]
              },
              "guard": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "off",
                      "openOnly",
                      "full"
                    ]
                  },
                  "maxSpreadBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "markBandBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "oracleBandBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "markClampBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "oracleClampBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "minProfitHoldSec": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  }
                },
                "required": [
                  "mode",
                  "maxSpreadBps",
                  "markBandBps",
                  "oracleBandBps",
                  "markClampBps",
                  "oracleClampBps",
                  "minProfitHoldSec"
                ]
              },
              "flow": {
                "type": "object",
                "properties": {
                  "maxOpenNotionalPerBlockRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "maxAccountNotionalRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "sideCapFloorRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "sideCapCeilingRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "sideCapEquityBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  }
                },
                "required": [
                  "maxOpenNotionalPerBlockRaw",
                  "maxAccountNotionalRaw",
                  "sideCapFloorRaw",
                  "sideCapCeilingRaw",
                  "sideCapEquityBps"
                ]
              },
              "oi": {
                "type": "object",
                "properties": {
                  "longRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "shortRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "longCapRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "shortCapRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "capCeilingRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  }
                },
                "required": [
                  "longRaw",
                  "shortRaw",
                  "longCapRaw",
                  "shortCapRaw",
                  "capCeilingRaw"
                ]
              },
              "relayer": {
                "type": "object",
                "properties": {
                  "closeHoldMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "maxNotionalRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  }
                },
                "required": [
                  "closeHoldMs",
                  "maxNotionalRaw"
                ]
              }
            },
            "required": [
              "id",
              "symbol",
              "assetIndex",
              "priceScale",
              "szDecimals",
              "status",
              "retiredAtMs",
              "freezeSource",
              "frozenBidRaw",
              "frozenAskRaw",
              "maxLeverage",
              "maxNotionalRaw",
              "bustBufferWad",
              "deadbandDivisor",
              "impact",
              "guard",
              "flow",
              "oi",
              "relayer"
            ]
          }
        },
        "intake": {
          "type": "object",
          "properties": {
            "revision": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "pausedActions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "openPosition",
                      "closePositions",
                      "withdrawToCore",
                      "registerSessionKey",
                      "registerSessionKeyV2",
                      "revokeSessionKeys",
                      "stake",
                      "unstake",
                      "claim",
                      "distribute",
                      "registerDeposit"
                    ]
                  },
                  {
                    "type": "string",
                    "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
                  }
                ]
              }
            },
            "pausedOpenInstruments": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              }
            },
            "allowlistOnly": {
              "type": "boolean"
            },
            "minimumStakeRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "termsVersion": {
              "type": "string"
            }
          },
          "required": [
            "revision",
            "pausedActions",
            "pausedOpenInstruments",
            "allowlistOnly",
            "minimumStakeRaw",
            "termsVersion"
          ]
        },
        "minClientBuild": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "schemaVersion",
        "indexedThroughBlock",
        "indexedThroughTimestamp",
        "tradingPaused",
        "breaker",
        "minMarginRaw",
        "minNotionalRaw",
        "fees",
        "settlement",
        "limits",
        "withdraw",
        "sessions",
        "directClose",
        "staking",
        "instruments",
        "intake"
      ]
    }

    GET /state/user/live

    单个钱包的 SSE 推送:先发快照,再发带版本号的增量。

    SSE 推送

    GET /state/house/current

    当前流动性池与交易者汇总(也通过 house:current 推送)。

    响应: houseCurrentSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "revision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "historyGeneration": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "historyRevision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "sourceAsOfMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "head": {
          "type": "array",
          "prefixItems": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "items": {},
          "minItems": 9
        },
        "extra": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$"
          },
          "additionalProperties": {
            "type": "array",
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        },
        "heads": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "enum": [
              "1000",
              "60000",
              "3600000",
              "86400000"
            ]
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "baseTimeMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "timeOffsetsMs": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "gapIndices": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "intervalMs": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "columns": {
                "type": "object",
                "properties": {
                  "lp": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "pnl": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "q": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "bl": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "bs": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "el": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "es": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "dl": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  }
                },
                "required": [
                  "lp",
                  "pnl",
                  "q",
                  "bl",
                  "bs",
                  "el",
                  "es"
                ],
                "additionalProperties": {}
              },
              "source": {
                "type": "object",
                "properties": {
                  "asOfMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "generation": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "asOfMs"
                ]
              }
            },
            "required": [
              "baseTimeMs",
              "timeOffsetsMs",
              "gapIndices",
              "intervalMs",
              "columns",
              "source"
            ]
          }
        }
      },
      "required": [
        "ok",
        "revision",
        "historyGeneration",
        "historyRevision",
        "sourceAsOfMs",
        "head",
        "heads"
      ]
    }

    GET /state/house/history

    按秒统计的汇总历史。

    响应: houseHistorySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "baseTimeMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "timeOffsetsMs": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "gapIndices": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "intervalMs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "columns": {
          "type": "object",
          "properties": {
            "lp": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "pnl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "q": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "bl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "bs": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "el": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "es": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "dl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          },
          "required": [
            "lp",
            "pnl",
            "q",
            "bl",
            "bs",
            "el",
            "es"
          ],
          "additionalProperties": {}
        },
        "source": {
          "type": "object",
          "properties": {
            "asOfMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "asOfMs"
          ]
        }
      },
      "required": [
        "baseTimeMs",
        "timeOffsetsMs",
        "gapIndices",
        "intervalMs",
        "columns",
        "source"
      ]
    }

    GET /state/house/delta

    标记价格上下 1% 范围内的池子盈亏。

    响应: houseDeltaSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "sourceAsOfMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "delta": {
          "type": "object",
          "properties": {
            "coin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            },
            "t": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "mark": {
              "type": "number"
            },
            "range": {
              "type": "number"
            },
            "samples": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "positionCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "values": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "min": {
              "type": "number"
            },
            "max": {
              "type": "number"
            }
          },
          "required": [
            "coin",
            "t",
            "mark",
            "range",
            "samples",
            "positionCount",
            "values",
            "min",
            "max"
          ]
        }
      },
      "required": [
        "ok",
        "sourceAsOfMs",
        "delta"
      ]
    }

    GET /state/protocol/position-topology

    持仓分布热力图。

    响应: positionTopologySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "grid": {
          "type": "object",
          "properties": {
            "w": {
              "type": "number",
              "const": 96
            },
            "h": {
              "type": "number",
              "const": 64
            },
            "data": {
              "minItems": 6144,
              "maxItems": 6144,
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 255
              }
            }
          },
          "required": [
            "w",
            "h",
            "data"
          ]
        },
        "nExt": {
          "type": "number"
        },
        "pExt": {
          "type": "number"
        },
        "computedAtMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "ok",
        "count",
        "grid",
        "nExt",
        "pExt",
        "computedAtMs"
      ]
    }

    GET /state/leaderboard/positions

    按时间窗口排列的头部持仓。

    响应: leaderboardPositionsSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "rows": {
          "maxItems": 15,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "rank": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "positionId": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "address": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{40}$"
              },
              "leaderboardName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "instrument": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "instrumentId": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "instrumentPriceScale": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "instrumentTerminal": {
                "type": "boolean"
              },
              "side": {
                "type": "string",
                "enum": [
                  "long",
                  "short"
                ]
              },
              "leverage": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "margin": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "entryPrice": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "exitPrice": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "pnl": {
                "type": "string",
                "pattern": "^(?:0|-?[1-9][0-9]*)$"
              },
              "openedAt": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "closedAt": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "rank",
              "positionId",
              "address",
              "leaderboardName",
              "instrument",
              "instrumentId",
              "instrumentPriceScale",
              "instrumentTerminal",
              "side",
              "leverage",
              "margin",
              "entryPrice",
              "exitPrice",
              "pnl",
              "openedAt",
              "closedAt"
            ]
          }
        }
      },
      "required": [
        "ok",
        "rows"
      ]
    }

    GET /state/leaderboard/accounts

    账户排行榜。

    响应: leaderboardAccountsSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "summary": {
          "type": "object",
          "properties": {
            "uniqueAccounts": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "trackedBalance": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "trackedQueued": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "trackedOpenNotional": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "trackedToken": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "uniqueAccounts",
            "trackedBalance",
            "trackedQueued",
            "trackedOpenNotional",
            "trackedToken"
          ]
        },
        "accounts": {
          "maxItems": 25,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{40}$"
              },
              "leaderboardName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "realizedPnl": {
                "type": "string",
                "pattern": "^(?:0|-?[1-9][0-9]*)$"
              },
              "totalWindowedPnl": {
                "type": "string",
                "pattern": "^(?:0|-?[1-9][0-9]*)$"
              },
              "totalVolume": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "lastActiveTs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "currentBalance": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "currentQueued": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "currentOpenNotional": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "currentUnrealizedPnl": {
                "type": "string",
                "pattern": "^(?:0|-?[1-9][0-9]*)$"
              },
              "tokenTotal": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "stakingRewards": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "_leaderboardRank": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "address",
              "leaderboardName",
              "realizedPnl",
              "totalWindowedPnl",
              "totalVolume",
              "lastActiveTs",
              "currentBalance",
              "currentQueued",
              "currentOpenNotional",
              "currentUnrealizedPnl",
              "tokenTotal",
              "stakingRewards",
              "_leaderboardRank"
            ]
          }
        },
        "pageInfo": {
          "type": "object",
          "properties": {
            "page": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "totalPages": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "page",
            "totalPages"
          ]
        }
      },
      "required": [
        "ok",
        "count",
        "summary",
        "accounts",
        "pageInfo"
      ]
    }

    GET /state/leaderboard/accounts/:a

    某个账户在排行榜上的数据。

    响应: leaderboardSelfSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "selfIndex": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "selfRow": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "address": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "leaderboardName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "realizedPnl": {
                  "type": "string",
                  "pattern": "^(?:0|-?[1-9][0-9]*)$"
                },
                "totalWindowedPnl": {
                  "type": "string",
                  "pattern": "^(?:0|-?[1-9][0-9]*)$"
                },
                "totalVolume": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "lastActiveTs": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "currentBalance": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "currentQueued": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "currentOpenNotional": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "currentUnrealizedPnl": {
                  "type": "string",
                  "pattern": "^(?:0|-?[1-9][0-9]*)$"
                },
                "tokenTotal": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "stakingRewards": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "_leaderboardRank": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "address",
                "leaderboardName",
                "realizedPnl",
                "totalWindowedPnl",
                "totalVolume",
                "lastActiveTs",
                "currentBalance",
                "currentQueued",
                "currentOpenNotional",
                "currentUnrealizedPnl",
                "tokenTotal",
                "stakingRewards",
                "_leaderboardRank"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "ok",
        "selfIndex",
        "selfRow"
      ]
    }

    GET /query/protocol/summary

    协议汇总数据(也通过 protocol:summary 推送)。

    响应: protocolSummarySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "stale": {
          "type": "boolean"
        },
        "source": {
          "type": "object",
          "properties": {
            "block": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "genesis": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "block",
            "at",
            "genesis"
          ]
        },
        "balances": {
          "type": "object",
          "properties": {
            "tvl": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "margin": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "lp": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "reserve": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "queue": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "tvl",
            "margin",
            "lp",
            "reserve",
            "queue"
          ]
        },
        "activity": {
          "type": "object",
          "properties": {
            "volume": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "open": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "volume",
            "open"
          ]
        },
        "fees": {
          "type": "object",
          "properties": {
            "pending": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "lifetime": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "pending",
            "lifetime"
          ]
        },
        "token": {
          "type": "object",
          "properties": {
            "supply": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "staked": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "trackedLp": {
              "type": "string",
              "pattern": "^(?:0|-?[1-9][0-9]*)$"
            },
            "accumulator": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "tailProgress": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "reserve": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "unallocated": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "pendingRewards": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "cliff": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "cap": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "excess": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "rate": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "decay": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "supply",
            "staked",
            "trackedLp",
            "accumulator",
            "tailProgress",
            "reserve",
            "unallocated",
            "pendingRewards",
            "cliff",
            "cap",
            "excess",
            "rate",
            "decay"
          ]
        }
      },
      "required": [
        "ok",
        "source",
        "balances",
        "activity",
        "fees",
        "token"
      ]
    }

    GET /query/protocol/queue-summary

    赔付队列:总额、长度与队首。

    响应: queueSummarySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "stale": {
          "type": "boolean"
        },
        "source": {
          "type": "object",
          "properties": {
            "block": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "block",
            "at"
          ]
        },
        "total": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "largest": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "nodeId": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "user": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "amount": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                }
              },
              "required": [
                "nodeId",
                "user",
                "amount"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "front": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "nodeId": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "user": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "amount": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                }
              },
              "required": [
                "nodeId",
                "user",
                "amount"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "ok",
        "source",
        "total",
        "count",
        "largest",
        "front"
      ]
    }

    GET /query/protocol/history

    按时间间隔统计的协议历史。

    响应: protocolHistorySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "startMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "intervalMs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "source": {
          "type": "object",
          "properties": {
            "asOfMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "revision": {
              "type": "string"
            },
            "generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "asOfMs"
          ]
        },
        "columns": {
          "type": "object",
          "properties": {
            "tvl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "stakingRewards": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "volume": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "volumeBtc": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "volumeEth": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "traderPnl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "users": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "liquidation": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "trades": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "tokenSupply": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "tokenStaked": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "stakerRevenue": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          },
          "required": [
            "tvl",
            "stakingRewards",
            "volume",
            "volumeBtc",
            "volumeEth",
            "traderPnl",
            "users",
            "liquidation",
            "trades",
            "tokenSupply",
            "tokenStaked",
            "stakerRevenue"
          ]
        },
        "totals": {
          "type": "object",
          "properties": {
            "tvlRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "rewardsRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "volumeRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "liquidationRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "tradesRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "usersRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "stakerFees24hRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "tvlRaw",
            "rewardsRaw",
            "volumeRaw",
            "liquidationRaw",
            "tradesRaw",
            "usersRaw",
            "stakerFees24hRaw"
          ]
        }
      },
      "required": [
        "startMs",
        "intervalMs",
        "source",
        "columns",
        "totals"
      ]
    }

    GET /query/protocol/token/activity

    代币铸造与质押活动。

    响应: tokenActivitySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "maxItems": 25,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "blockNumber": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "logIndex": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "timestampMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "txHash": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "amountRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "minted",
                  "staked",
                  "unstaked"
                ]
              },
              "userAddress": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{40}$"
              }
            },
            "required": [
              "blockNumber",
              "logIndex",
              "timestampMs",
              "txHash",
              "amountRaw",
              "kind",
              "userAddress"
            ]
          }
        },
        "latestDistribution": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "blockNumber": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "timestampMs": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "txHash": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{64}$"
                },
                "newRewardsRaw": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "allocatedRaw": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "unallocatedRaw": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "accRewardPerShareRaw": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "totalStakedRaw": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                }
              },
              "required": [
                "blockNumber",
                "timestampMs",
                "txHash",
                "newRewardsRaw",
                "allocatedRaw",
                "unallocatedRaw",
                "accRewardPerShareRaw",
                "totalStakedRaw"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "items",
        "latestDistribution"
      ]
    }

    GET /query/protocol/trades/recent

    最近成交。

    响应: recentTradesSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "events": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "seq": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "ts": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "wallet": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{40}$"
              },
              "instrument": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "instrumentId": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "instrumentTerminal": {
                "type": "boolean"
              },
              "side": {
                "type": "string",
                "enum": [
                  "long",
                  "short"
                ]
              },
              "leverage": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "notionalUsd": {
                "type": "number"
              },
              "positionId": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "open",
                  "close",
                  "liq"
                ]
              },
              "entry": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "exit": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pnlUsd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "intentId": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^0x[0-9a-f]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "seq",
              "ts",
              "wallet",
              "instrument",
              "instrumentId",
              "instrumentTerminal",
              "side",
              "leverage",
              "notionalUsd",
              "positionId",
              "kind",
              "entry",
              "exit",
              "pnlUsd",
              "intentId"
            ]
          }
        }
      },
      "required": [
        "ok",
        "count",
        "events"
      ]
    }

    GET /query/protocol/market-stats

    各合约 24 小时成交量。

    响应: marketStatsSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "markets": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "volume_24h": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              }
            },
            "required": [
              "volume_24h"
            ]
          }
        }
      },
      "required": [
        "ok",
        "markets"
      ]
    }

    GET /query/markets/:id/price-history

    某合约记录的成交价格历史。

    响应: priceHistorySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "baseTimeMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "timeOffsetsMs": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "gapIndices": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "intervalMs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "columns": {
          "type": "object",
          "properties": {
            "price": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          },
          "required": [
            "price"
          ],
          "additionalProperties": {}
        },
        "series": {
          "type": "string",
          "pattern": "^market:(0|[1-9][0-9]*)$"
        },
        "aggregation": {
          "type": "string",
          "const": "last"
        },
        "fromMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "toMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "coverage": {
          "type": "object",
          "properties": {
            "complete": {
              "type": "boolean"
            },
            "availableFromMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "availableToMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "complete",
            "availableFromMs",
            "availableToMs"
          ]
        },
        "source": {
          "type": "object",
          "properties": {
            "asOfMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "revision": {
              "type": "string"
            },
            "generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "asOfMs"
          ]
        }
      },
      "required": [
        "baseTimeMs",
        "timeOffsetsMs",
        "gapIndices",
        "intervalMs",
        "columns",
        "series",
        "aggregation",
        "fromMs",
        "toMs",
        "coverage",
        "source"
      ]
    }

    GET /query/markets/:id/liquidation-map

    按爆仓价分布的未平仓量。

    响应: liquidationMapSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "instrumentId": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "range": {
          "type": "string",
          "enum": [
            "1",
            "2",
            "5",
            "10",
            "25",
            "0.1",
            "0.25",
            "0.5"
          ]
        },
        "fromRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "toRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "priceScale": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "source": {
          "type": "object",
          "properties": {
            "block": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "priceAt": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "block",
            "at",
            "priceAt"
          ]
        },
        "buckets": {
          "minItems": 150,
          "maxItems": 150,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            ],
            "items": false,
            "minItems": 4,
            "maxItems": 4
          }
        },
        "below": {
          "type": "array",
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          ],
          "items": false,
          "minItems": 4,
          "maxItems": 4
        },
        "above": {
          "type": "array",
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          ],
          "items": false,
          "minItems": 4,
          "maxItems": 4
        }
      },
      "required": [
        "ok",
        "instrumentId",
        "range",
        "fromRaw",
        "toRaw",
        "priceScale",
        "source",
        "buckets",
        "below",
        "above"
      ]
    }

    GET /query/house/history

    按时间间隔统计的池子历史。

    响应: houseHistorySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "baseTimeMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "timeOffsetsMs": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "gapIndices": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "intervalMs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "columns": {
          "type": "object",
          "properties": {
            "lp": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "pnl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "q": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "bl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "bs": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "el": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "es": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "dl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          },
          "required": [
            "lp",
            "pnl",
            "q",
            "bl",
            "bs",
            "el",
            "es"
          ],
          "additionalProperties": {}
        },
        "source": {
          "type": "object",
          "properties": {
            "asOfMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "asOfMs"
          ]
        }
      },
      "required": [
        "baseTimeMs",
        "timeOffsetsMs",
        "gapIndices",
        "intervalMs",
        "columns",
        "source"
      ]
    }

    GET /query/house/staker-payouts

    质押者累计收益。

    响应: stakerPayoutsSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "intervalMs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "baseUsd": {
          "type": "number"
        },
        "points": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "number"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        }
      },
      "required": [
        "intervalMs",
        "baseUsd",
        "points"
      ]
    }

    GET /query/accounts/:a/trades

    账户成交记录(分页)。

    请求: pageQuerySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,512}$"
        },
        "limit": {
          "type": "string",
          "pattern": "^[1-9][0-9]{0,2}$"
        }
      }
    }
    响应: accountTradesSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "timestampMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "txHash": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "positionId": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "instrumentId": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "symbol": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "assetIndex": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "priceScale": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "terminal": {
                "type": "boolean"
              },
              "retired": {
                "type": "boolean"
              },
              "isLong": {
                "type": "boolean"
              },
              "entryPriceRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "marginRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "leverage": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "kind": {
                "type": "string",
                "enum": [
                  "PositionClosed",
                  "Liquidated"
                ]
              },
              "openedAtMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "exitPriceRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "adjustedPnlRaw": {
                "type": "string",
                "pattern": "^(?:0|-?[1-9][0-9]*)$"
              },
              "userPaidFeeRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "mintedRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "mintBasisRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "mintBatchTotalRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "timestampMs",
              "txHash",
              "positionId",
              "instrumentId",
              "symbol",
              "assetIndex",
              "priceScale",
              "terminal",
              "retired",
              "isLong",
              "entryPriceRaw",
              "marginRaw",
              "leverage",
              "kind",
              "openedAtMs",
              "exitPriceRaw",
              "adjustedPnlRaw",
              "userPaidFeeRaw",
              "mintedRaw",
              "mintBasisRaw",
              "mintBatchTotalRaw"
            ]
          }
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,512}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "items",
        "nextCursor"
      ]
    }

    GET /query/accounts/:a/cashflows

    账户的充值、提现与赔付记录(分页)。

    请求: pageQuerySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,512}$"
        },
        "limit": {
          "type": "string",
          "pattern": "^[1-9][0-9]{0,2}$"
        }
      }
    }
    响应: accountCashflowsSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "timestampMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "txHash": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "amountRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "Deposit",
                  "Withdrawal"
                ]
              },
              "recipientAmountRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "route": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "hypercore",
                          "hyperevm",
                          "ethereum",
                          "arbitrum",
                          "solana"
                        ]
                      },
                      {
                        "type": "string",
                        "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "withdrawalStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "signed",
                      "submitted",
                      "in_transit",
                      "settled",
                      "needs_signature",
                      "failed"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "timestampMs",
              "txHash",
              "amountRaw",
              "kind",
              "recipientAmountRaw",
              "route",
              "withdrawalStatus"
            ]
          }
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,512}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "items",
        "nextCursor"
      ]
    }

    GET /query/accounts/:a/staking

    账户质押记录(分页)。

    请求: pageQuerySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,512}$"
        },
        "limit": {
          "type": "string",
          "pattern": "^[1-9][0-9]{0,2}$"
        }
      }
    }
    响应: accountStakingSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "timestampMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "txHash": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "amountRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "staked",
                  "unstaked",
                  "claimed"
                ]
              }
            },
            "required": [
              "timestampMs",
              "txHash",
              "amountRaw",
              "kind"
            ]
          }
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,512}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "items",
        "nextCursor"
      ]
    }

    GET /query/accounts/:a/queue

    账户赔付队列记录(分页)。

    请求: pageQuerySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,512}$"
        },
        "limit": {
          "type": "string",
          "pattern": "^[1-9][0-9]{0,2}$"
        }
      }
    }
    响应: accountQueueHistorySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "timestampMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "txHash": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "amountRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "enqueued",
                  "harvested",
                  "debt_consumed"
                ]
              },
              "eventCount": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "timestampMs",
              "txHash",
              "amountRaw",
              "kind",
              "eventCount"
            ]
          }
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,512}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "items",
        "nextCursor"
      ]
    }

    GET /query/accounts/:a/queue-ring

    账户自己排队中的赔付,格式为 [nodeId, amount, ahead, position],位置从 1 开始计数。

    响应: queueRingSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "source": {
          "type": "object",
          "properties": {
            "block": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "block",
            "at"
          ]
        },
        "total": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "object",
          "properties": {
            "total": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "total",
            "count"
          ]
        },
        "truncated": {
          "type": "boolean"
        },
        "entries": {
          "maxItems": 500,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            ],
            "items": false,
            "minItems": 4,
            "maxItems": 4
          }
        }
      },
      "required": [
        "ok",
        "source",
        "total",
        "count",
        "account",
        "truncated",
        "entries"
      ]
    }

    GET /query/accounts/:a/queue-balances

    账户的排队余额(位置从 1 开始计数,与 queue-ring 相同)。

    响应: queueBalancesSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "source": {
          "type": "object",
          "properties": {
            "block": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "block",
            "at"
          ]
        },
        "total": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "object",
          "properties": {
            "total": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "total",
            "count"
          ]
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "nodeId": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "amount": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "enqueuedAtMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "enqueuedTxHash": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "position": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "amountAhead": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              }
            },
            "required": [
              "nodeId",
              "amount",
              "enqueuedAtMs",
              "enqueuedTxHash",
              "position",
              "amountAhead"
            ]
          }
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,512}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "ok",
        "source",
        "total",
        "count",
        "account",
        "items",
        "nextCursor"
      ]
    }

    GET /query/accounts/:a/portfolio-history

    权益与盈亏历史。

    响应: portfolioHistorySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "baseTimeMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "timeOffsetsMs": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "gapIndices": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "intervalMs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "columns": {
          "type": "object",
          "properties": {
            "equity": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "pnl": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "stakingRewards": {
              "type": "array",
              "items": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          },
          "required": [
            "equity",
            "pnl"
          ],
          "additionalProperties": {}
        },
        "series": {
          "type": "string",
          "const": "portfolio"
        },
        "aggregation": {
          "type": "string",
          "const": "samples"
        },
        "fromMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "toMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "coverage": {
          "type": "object",
          "properties": {
            "complete": {
              "type": "boolean"
            },
            "availableFromMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "availableToMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "complete",
            "availableFromMs",
            "availableToMs"
          ]
        },
        "source": {
          "type": "object",
          "properties": {
            "asOfMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "revision": {
              "type": "string"
            },
            "generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "asOfMs"
          ]
        }
      },
      "required": [
        "baseTimeMs",
        "timeOffsetsMs",
        "gapIndices",
        "intervalMs",
        "columns",
        "series",
        "aggregation",
        "fromMs",
        "toMs",
        "coverage",
        "source"
      ]
    }

    GET /query/accounts/:a/funding

    进行中的充值与提现及其状态。

    响应: accountFundingSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "route": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "hypercore",
                      "hyperevm",
                      "ethereum",
                      "arbitrum",
                      "solana"
                    ]
                  },
                  {
                    "type": "string",
                    "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
                  }
                ]
              },
              "destination": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "amount": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "signed",
                  "submitted",
                  "in_transit",
                  "settled",
                  "needs_signature",
                  "failed"
                ]
              },
              "createdAtMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "exchangeTxHash": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^0x[0-9a-f]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "burnTxHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "onward": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "nonce": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "maximumFee": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "createRecipient": {
                        "type": "boolean"
                      },
                      "detail": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 512,
                            "pattern": "^[a-z][A-Za-z0-9]{0,63}(?::[\\s\\S]*)?$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "nonce",
                      "maximumFee",
                      "createRecipient",
                      "detail"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "route",
              "destination",
              "amount",
              "status",
              "createdAtMs",
              "exchangeTxHash",
              "burnTxHash",
              "onward"
            ]
          }
        },
        "coreAccount": {
          "type": "boolean"
        }
      },
      "required": [
        "items",
        "coreAccount"
      ]
    }

    GET /query/accounts/:a/leaderboard-badges

    账户的排行榜徽章。

    响应: leaderboardBadgesSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "badges": {
          "type": "object",
          "properties": {
            "daily": {
              "type": "object",
              "properties": {
                "first": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "top3": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "top15": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "first",
                "top3",
                "top15"
              ]
            },
            "weekly": {
              "type": "object",
              "properties": {
                "first": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "top3": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "top15": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "first",
                "top3",
                "top15"
              ]
            },
            "monthly": {
              "type": "object",
              "properties": {
                "first": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "top3": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "top15": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "first",
                "top3",
                "top15"
              ]
            },
            "allTime": {
              "type": "object",
              "properties": {
                "first": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "top3": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "top15": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "first",
                "top3",
                "top15"
              ]
            }
          },
          "required": [
            "daily",
            "weekly",
            "monthly",
            "allTime"
          ]
        },
        "total": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "badges",
        "total"
      ]
    }

    GET /query/accounts/:a/positions

    按编号查询持仓。

    响应: accountPositionsSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "open": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "owner": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{40}$"
              },
              "instrumentId": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "isLong": {
                "type": "boolean"
              },
              "useDebt": {
                "type": "boolean"
              },
              "entryPriceRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "marginRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "leverage": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "bustPriceRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "openedAtMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "closedAtMs": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "exitPriceRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "netPnlRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|-?[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "liquidated": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "owner",
              "instrumentId",
              "isLong",
              "useDebt",
              "entryPriceRaw",
              "marginRaw",
              "leverage",
              "bustPriceRaw",
              "openedAtMs",
              "closedAtMs",
              "exitPriceRaw",
              "netPnlRaw",
              "liquidated"
            ]
          }
        },
        "closed": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "owner": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{40}$"
              },
              "instrumentId": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "isLong": {
                "type": "boolean"
              },
              "useDebt": {
                "type": "boolean"
              },
              "entryPriceRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "marginRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "leverage": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "bustPriceRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "openedAtMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "closedAtMs": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "exitPriceRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "netPnlRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|-?[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "liquidated": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "owner",
              "instrumentId",
              "isLong",
              "useDebt",
              "entryPriceRaw",
              "marginRaw",
              "leverage",
              "bustPriceRaw",
              "openedAtMs",
              "closedAtMs",
              "exitPriceRaw",
              "netPnlRaw",
              "liquidated"
            ]
          }
        }
      },
      "required": [
        "open",
        "closed"
      ]
    }

    GET /query/notices

    运营公告(纯文本)。

    响应: noticesSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "notices": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "tone": {
                "type": "string",
                "enum": [
                  "info",
                  "warning",
                  "critical"
                ]
              },
              "placements": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "toast",
                    "tape"
                  ]
                }
              },
              "title": {
                "type": "string"
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eventAtMs": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expiresAtMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "id",
              "tone",
              "placements",
              "title",
              "body",
              "eventAtMs",
              "expiresAtMs"
            ]
          }
        }
      },
      "required": [
        "notices"
      ]
    }

    GET /query/leaderboard/name/:a

    账户的公开显示名称。

    响应: leaderboardNameSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "leaderboardName": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "ok",
        "address",
        "leaderboardName"
      ]
    }

    POST /query/leaderboard/name

    设置或清除显示名称(personal_sign 签名)。

    请求: leaderboardNameRequestSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "address": {
              "type": "string",
              "pattern": "^0x[0-9a-f]{40}$"
            },
            "action": {
              "type": "string",
              "const": "set"
            },
            "name": {
              "type": "string"
            },
            "signedAtMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "signature": {
              "type": "string",
              "pattern": "^0x[0-9a-f]{130}$"
            }
          },
          "required": [
            "address",
            "action",
            "name",
            "signedAtMs",
            "signature"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "address": {
              "type": "string",
              "pattern": "^0x[0-9a-f]{40}$"
            },
            "action": {
              "type": "string",
              "const": "clear"
            },
            "name": {
              "type": "string",
              "const": ""
            },
            "signedAtMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "signature": {
              "type": "string",
              "pattern": "^0x[0-9a-f]{130}$"
            }
          },
          "required": [
            "address",
            "action",
            "name",
            "signedAtMs",
            "signature"
          ],
          "additionalProperties": false
        }
      ]
    }
    响应: leaderboardNameResponseSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "leaderboardName": {
          "type": [
            "string",
            "null"
          ]
        },
        "changed": {
          "type": "boolean"
        },
        "nextNameChangeAtMs": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "ok",
        "address",
        "leaderboardName",
        "changed",
        "nextNameChangeAtMs"
      ]
    }

    GET /query/avatars

    1–50 个地址已保存的头像种子(`addresses=a,b,…`:小写、升序、不重复)。未保存种子的地址不出现;客户端改用由地址折叠得到的种子绘制。

    响应: avatarsSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "avatars": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{40}$"
          },
          "additionalProperties": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}$"
          }
        }
      },
      "required": [
        "ok",
        "avatars"
      ]
    }

    POST /query/avatars

    保存头像种子(personal_sign 签名)。需先充值(403 avatar_activity_required);每个 IP 每分钟 10 次,每个地址每小时 5 次(429)。

    请求: avatarRequestSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "seed": {
          "type": "string",
          "pattern": "^[0-9a-f]{8}$"
        },
        "signedAtMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "signature": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{130}$"
        }
      },
      "required": [
        "address",
        "seed",
        "signedAtMs",
        "signature"
      ],
      "additionalProperties": false
    }
    响应: avatarResponseSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "seed": {
          "type": "string",
          "pattern": "^[0-9a-f]{8}$"
        },
        "changed": {
          "type": "boolean"
        }
      },
      "required": [
        "ok",
        "address",
        "seed",
        "changed"
      ]
    }

    GET /query/referrals/code/:a

    账户的推荐码(尚未设置时为空)。

    响应: referralCodeSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{3,20}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "ok",
        "address",
        "code"
      ]
    }

    GET /query/referrals/resolve/:code

    推荐码对应的地址(无账户持有时返回 404 not_found)。

    响应: referralCodeResolveSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "code": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{3,20}$"
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        }
      },
      "required": [
        "ok",
        "code",
        "address"
      ]
    }

    POST /query/referrals/code

    设置或清除推荐码(personal_sign 签名)。需先充值(403 referral_code_activity_required);每天最多更改一次(429 referral_code_cooldown);每个 IP 每分钟 10 次,每个地址每小时 5 次(429)。

    请求: referralCodeRequestSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "address": {
              "type": "string",
              "pattern": "^0x[0-9a-f]{40}$"
            },
            "action": {
              "type": "string",
              "const": "set"
            },
            "code": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{3,20}$"
            },
            "signedAtMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "signature": {
              "type": "string",
              "pattern": "^0x[0-9a-f]{130}$"
            }
          },
          "required": [
            "address",
            "action",
            "code",
            "signedAtMs",
            "signature"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "address": {
              "type": "string",
              "pattern": "^0x[0-9a-f]{40}$"
            },
            "action": {
              "type": "string",
              "const": "clear"
            },
            "code": {
              "type": "string",
              "const": ""
            },
            "signedAtMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "signature": {
              "type": "string",
              "pattern": "^0x[0-9a-f]{130}$"
            }
          },
          "required": [
            "address",
            "action",
            "code",
            "signedAtMs",
            "signature"
          ],
          "additionalProperties": false
        }
      ]
    }
    响应: referralCodeResponseSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{3,20}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "changed": {
          "type": "boolean"
        },
        "nextCodeChangeAtMs": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "ok",
        "address",
        "code",
        "changed",
        "nextCodeChangeAtMs"
      ]
    }

    GET /query/referrals/:a

    账户的推荐页:推荐码、推荐人、作为推荐人的累计收益,以及最近的推荐费分配。

    响应: referralSummarySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{3,20}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "referrer": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "address": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_-]{3,20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "boundBlock": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "address",
                "code",
                "boundBlock"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "savedRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "referees": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "extraRewardBps": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "earnedRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "extraRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "feeRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "recent": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "blockNumber": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "kind": {
                "type": "string",
                "enum": [
                  "close",
                  "liquidation"
                ]
              },
              "user": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{40}$"
              },
              "feeRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "toReferrerRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "discountRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "extraRewardRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "txHash": {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              }
            },
            "required": [
              "blockNumber",
              "kind",
              "user",
              "feeRaw",
              "toReferrerRaw",
              "discountRaw",
              "extraRewardRaw",
              "txHash"
            ]
          }
        }
      },
      "required": [
        "ok",
        "address",
        "code",
        "referrer",
        "savedRaw",
        "referees",
        "extraRewardBps",
        "earnedRaw",
        "extraRaw",
        "feeRaw",
        "recent"
      ]
    }

    GET /terms/status

    某地址接受的条款版本;尚无生效条款时(版本为 '0'),`published` 为 false。

    响应: termsStatusSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "currentVersion": {
          "type": "string",
          "minLength": 1
        },
        "published": {
          "type": "boolean"
        },
        "acceptedVersion": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "acceptedAtMs": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "currentVersion",
        "published",
        "acceptedVersion",
        "acceptedAtMs"
      ]
    }

    POST /terms/accept

    记录对条款的接受(personal_sign 签名)。尚未发布条款时返回 400;每个 IP 每分钟 10 次(429)。

    请求: termsAcceptRequestSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 32
        },
        "signedAtMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "signature": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{130}$"
        }
      },
      "required": [
        "address",
        "version",
        "signedAtMs",
        "signature"
      ],
      "additionalProperties": false
    }

    POST /funding/deposits/check

    查询用户的充值代理地址(须与本地计算的地址比对)。钱包接受已发布的条款之前返回 403 terms_required。

    请求: depositCheckRequestSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "user": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        }
      },
      "required": [
        "user"
      ],
      "additionalProperties": false
    }
    响应: depositCheckResponseSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "proxy": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        }
      },
      "required": [
        "proxy"
      ]
    }

    POST /funding/deposits/track

    登记一笔充值以便跟踪(路线:hyperevm、ethereum、arbitrum、solana、robinhood;每个用户最多 20 笔进行中,超出返回 429)。

    请求: depositTrackRequestSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "user": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "route": {
          "type": "string",
          "enum": [
            "hyperevm",
            "ethereum",
            "arbitrum",
            "solana",
            "robinhood"
          ]
        },
        "sourceTxHash": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^0x[0-9a-f]{64}$"
            },
            {
              "type": "string",
              "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
            }
          ]
        }
      },
      "required": [
        "user",
        "route",
        "sourceTxHash"
      ],
      "additionalProperties": false
    }
    响应: depositTrackResponseSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{64}$"
        }
      },
      "required": [
        "id"
      ]
    }

    错误码

    代码HTTP 状态
    invalid_query400
    invalid_request400
    avatar_activity_required403
    name_activity_required403
    referral_code_activity_required403
    terms_required403
    not_found404
    intake_action_paused422
    name_change_cooldown429
    rate_limited429
    referral_code_cooldown429
    region_restricted451
    request_failed500
    unavailable503

    账户推送

    GET /state/user/live 是针对单个钱包的 SSE 推送。它先发送一条 liveness 事件告知心跳间隔,然后是 wallet 快照,之后是 wallet 增量;heartbeat 事件用于保持连接。

    事件数据
    liveness
    livenessSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "heartbeatIntervalMs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "heartbeatIntervalMs"
      ]
    }
    wallet
    walletSnapshotSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "accountRevision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "indexedThroughBlock": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "walletRevision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "indexedThroughTimestamp": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "sessionKeys": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "pattern": "^0x[0-9a-f]{40}$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            ],
            "items": {},
            "minItems": 2
          }
        },
        "queueRevision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "balance": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "queued": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "locked": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "funds": {
          "type": "object",
          "properties": {
            "reservedBalance": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "reservedQueued": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "availableBalance": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "availableQueued": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "reservedBalance",
            "reservedQueued",
            "availableBalance",
            "availableQueued"
          ]
        },
        "queueNodeCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "consumableDebt": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "token": {
          "type": "object",
          "properties": {
            "balance": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "staked": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "credited": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "rewardDebt": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "balance",
            "staked",
            "credited",
            "rewardDebt"
          ]
        },
        "lifetime": {
          "type": "object",
          "properties": {
            "depositedRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "withdrawnRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "realizedPnlRaw": {
              "type": "string",
              "pattern": "^(?:0|-?[1-9][0-9]*)$"
            },
            "feesPaidRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "tradedNotionalRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "stakingRewardsClaimedRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "mintedRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "depositedRaw",
            "withdrawnRaw",
            "realizedPnlRaw",
            "feesPaidRaw",
            "tradedNotionalRaw",
            "stakingRewardsClaimedRaw",
            "mintedRaw"
          ]
        },
        "operations": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "openPosition",
                      "closePositions",
                      "withdrawToCore",
                      "registerSessionKey",
                      "registerSessionKeyV2",
                      "revokeSessionKeys",
                      "stake",
                      "unstake",
                      "claim",
                      "distribute"
                    ]
                  },
                  {
                    "type": "string",
                    "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "anyOf": [
                  {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^(?:0|[1-9][0-9]*)$"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            ],
            "items": {},
            "minItems": 11
          }
        },
        "openPositions": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              {
                "type": "boolean"
              },
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^0x[0-9a-f]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            ],
            "items": {},
            "minItems": 10
          }
        }
      },
      "required": [
        "address",
        "accountRevision",
        "indexedThroughBlock",
        "walletRevision",
        "indexedThroughTimestamp",
        "sessionKeys",
        "queueRevision",
        "balance",
        "queued",
        "locked",
        "funds",
        "queueNodeCount",
        "consumableDebt",
        "token",
        "lifetime",
        "operations",
        "openPositions"
      ]
    }
    walletPatchSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "baseAccountRevision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{40}$"
        },
        "accountRevision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "state": {
          "type": "object",
          "properties": {
            "indexedThroughBlock": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "walletRevision": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "indexedThroughTimestamp": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "sessionKeys": {
              "type": "array",
              "items": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "string",
                    "pattern": "^0x[0-9a-f]{40}$"
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                ],
                "items": {},
                "minItems": 2
              }
            },
            "queueRevision": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "balance": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "queued": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "locked": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "funds": {
              "type": "object",
              "properties": {
                "reservedBalance": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "reservedQueued": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "availableBalance": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "availableQueued": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                }
              }
            },
            "queueNodeCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            },
            "consumableDebt": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "token": {
              "type": "object",
              "properties": {
                "balance": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "staked": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "credited": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "rewardDebt": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                }
              }
            }
          }
        },
        "lifetime": {
          "type": "object",
          "properties": {
            "depositedRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "withdrawnRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "realizedPnlRaw": {
              "type": "string",
              "pattern": "^(?:0|-?[1-9][0-9]*)$"
            },
            "feesPaidRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "tradedNotionalRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "stakingRewardsClaimedRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "mintedRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          }
        },
        "closedPositions": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "pattern": "^(?:0|-?[1-9][0-9]*)$"
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              }
            ],
            "items": {},
            "minItems": 8
          }
        },
        "intentOutcomes": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "succeeded",
                      "failed",
                      "expired",
                      "cancelled",
                      "unknown"
                    ]
                  },
                  {
                    "type": "string",
                    "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
                  }
                ]
              },
              {
                "type": [
                  "string",
                  "null"
                ]
              }
            ],
            "items": {},
            "minItems": 3
          }
        },
        "addedPositions": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              {
                "type": "boolean"
              },
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^0x[0-9a-f]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            ],
            "items": {},
            "minItems": 10
          }
        },
        "removedPositionIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^(?:0|[1-9][0-9]*)$"
          }
        },
        "addedOperations": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "openPosition",
                      "closePositions",
                      "withdrawToCore",
                      "registerSessionKey",
                      "registerSessionKeyV2",
                      "revokeSessionKeys",
                      "stake",
                      "unstake",
                      "claim",
                      "distribute"
                    ]
                  },
                  {
                    "type": "string",
                    "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "anyOf": [
                  {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^(?:0|[1-9][0-9]*)$"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            ],
            "items": {},
            "minItems": 11
          }
        },
        "removedOperationIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{64}$"
          }
        }
      },
      "required": [
        "baseAccountRevision",
        "address",
        "accountRevision",
        "state",
        "addedPositions",
        "removedPositionIds",
        "addedOperations",
        "removedOperationIds"
      ]
    }
    heartbeat无

    公共频道

    全市场的更新在以下频道发布:

    trading:current

    /state/trading 数据帧,有变化时推送(每个区块最多一次)。

    tradingStateV2Schema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 2
        },
        "indexedThroughBlock": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "indexedThroughTimestamp": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "tradingPaused": {
          "type": "boolean"
        },
        "breaker": {
          "type": "object",
          "properties": {
            "tripped": {
              "type": "boolean"
            },
            "trippedAtMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "guardianResetAtMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "autoResetAtMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "halfLifeSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            }
          },
          "required": [
            "tripped",
            "trippedAtMs",
            "guardianResetAtMs",
            "autoResetAtMs",
            "halfLifeSec"
          ]
        },
        "minMarginRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "minNotionalRaw": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "fees": {
          "type": "object",
          "properties": {
            "winWad": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "lossWad": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "liqWad": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "stakerShareBps": {
              "default": 5000,
              "type": "integer",
              "minimum": 0,
              "maximum": 65535
            },
            "referralFeeBps": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 65535
            },
            "referralDiscountBps": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 65535
            },
            "liqReferralEnabled": {
              "default": false,
              "type": "boolean"
            }
          },
          "required": [
            "winWad",
            "lossWad",
            "liqWad"
          ]
        },
        "settlement": {
          "type": "object",
          "properties": {
            "payoutCurve": {
              "type": "string",
              "enum": [
                "standard",
                "offHours"
              ]
            },
            "closeChecksBust": {
              "type": "boolean"
            }
          },
          "required": [
            "payoutCurve",
            "closeChecksBust"
          ]
        },
        "limits": {
          "type": "object",
          "properties": {
            "maxCloseIds": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            "maxOpenPositionsPerUser": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            "maxDebtNodes": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            "maxLiqBatch": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            }
          },
          "required": [
            "maxCloseIds",
            "maxOpenPositionsPerUser",
            "maxDebtNodes",
            "maxLiqBatch"
          ]
        },
        "withdraw": {
          "type": "object",
          "properties": {
            "min6": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "activationFeeWei": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "activationChargedToSender": {
              "type": "boolean"
            }
          },
          "required": [
            "min6",
            "activationFeeWei",
            "activationChargedToSender"
          ]
        },
        "sessions": {
          "type": "object",
          "properties": {
            "maxSessionDurationSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            },
            "maxIntentTtlSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            }
          },
          "required": [
            "maxSessionDurationSec",
            "maxIntentTtlSec"
          ]
        },
        "directClose": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "disabled",
                "failsafe",
                "always"
              ]
            },
            "failsafeDelaySec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295
            },
            "lastBatchAtMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "mode",
            "failsafeDelaySec",
            "lastBatchAtMs"
          ]
        },
        "staking": {
          "type": "object",
          "properties": {
            "accRewardPerShareRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "accPrecision": {
              "type": "string",
              "const": "1e36"
            },
            "totalStakedRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "accRewardPerShareRaw",
            "accPrecision",
            "totalStakedRaw"
          ]
        },
        "instruments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "symbol": {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              "assetIndex": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "priceScale": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "szDecimals": {
                "type": "integer",
                "minimum": 0,
                "maximum": 6
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "retired"
                ]
              },
              "retiredAtMs": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "freezeSource": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "bbo",
                      "mark",
                      "oracle"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "frozenBidRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "frozenAskRaw": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maxLeverage": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000
              },
              "maxNotionalRaw": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "bustBufferWad": {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              "deadbandDivisor": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4294967295
              },
              "impact": {
                "type": "object",
                "properties": {
                  "baseRateWad": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "rateMultiplierWad": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "positionMultiplierWad": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "referenceNotionalRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  }
                },
                "required": [
                  "baseRateWad",
                  "rateMultiplierWad",
                  "positionMultiplierWad",
                  "referenceNotionalRaw"
                ]
              },
              "guard": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "off",
                      "openOnly",
                      "full"
                    ]
                  },
                  "maxSpreadBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "markBandBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "oracleBandBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "markClampBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "oracleClampBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "minProfitHoldSec": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  }
                },
                "required": [
                  "mode",
                  "maxSpreadBps",
                  "markBandBps",
                  "oracleBandBps",
                  "markClampBps",
                  "oracleClampBps",
                  "minProfitHoldSec"
                ]
              },
              "flow": {
                "type": "object",
                "properties": {
                  "maxOpenNotionalPerBlockRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "maxAccountNotionalRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "sideCapFloorRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "sideCapCeilingRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "sideCapEquityBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  }
                },
                "required": [
                  "maxOpenNotionalPerBlockRaw",
                  "maxAccountNotionalRaw",
                  "sideCapFloorRaw",
                  "sideCapCeilingRaw",
                  "sideCapEquityBps"
                ]
              },
              "oi": {
                "type": "object",
                "properties": {
                  "longRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "shortRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "longCapRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "shortCapRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "capCeilingRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  }
                },
                "required": [
                  "longRaw",
                  "shortRaw",
                  "longCapRaw",
                  "shortCapRaw",
                  "capCeilingRaw"
                ]
              },
              "relayer": {
                "type": "object",
                "properties": {
                  "closeHoldMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "maxNotionalRaw": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  }
                },
                "required": [
                  "closeHoldMs",
                  "maxNotionalRaw"
                ]
              }
            },
            "required": [
              "id",
              "symbol",
              "assetIndex",
              "priceScale",
              "szDecimals",
              "status",
              "retiredAtMs",
              "freezeSource",
              "frozenBidRaw",
              "frozenAskRaw",
              "maxLeverage",
              "maxNotionalRaw",
              "bustBufferWad",
              "deadbandDivisor",
              "impact",
              "guard",
              "flow",
              "oi",
              "relayer"
            ]
          }
        },
        "intake": {
          "type": "object",
          "properties": {
            "revision": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "pausedActions": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "openPosition",
                      "closePositions",
                      "withdrawToCore",
                      "registerSessionKey",
                      "registerSessionKeyV2",
                      "revokeSessionKeys",
                      "stake",
                      "unstake",
                      "claim",
                      "distribute",
                      "registerDeposit"
                    ]
                  },
                  {
                    "type": "string",
                    "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
                  }
                ]
              }
            },
            "pausedOpenInstruments": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              }
            },
            "allowlistOnly": {
              "type": "boolean"
            },
            "minimumStakeRaw": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "termsVersion": {
              "type": "string"
            }
          },
          "required": [
            "revision",
            "pausedActions",
            "pausedOpenInstruments",
            "allowlistOnly",
            "minimumStakeRaw",
            "termsVersion"
          ]
        },
        "minClientBuild": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "schemaVersion",
        "indexedThroughBlock",
        "indexedThroughTimestamp",
        "tradingPaused",
        "breaker",
        "minMarginRaw",
        "minNotionalRaw",
        "fees",
        "settlement",
        "limits",
        "withdraw",
        "sessions",
        "directClose",
        "staking",
        "instruments",
        "intake"
      ]
    }

    public:trades

    每个区块的公开成交。

    publicTradesPayloadSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "seq": {
            "type": "string",
            "pattern": "^(?:0|[1-9][0-9]*)$"
          },
          "ts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "wallet": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{40}$"
          },
          "instrument": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16
          },
          "instrumentId": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295
          },
          "instrumentTerminal": {
            "type": "boolean"
          },
          "side": {
            "type": "string",
            "enum": [
              "long",
              "short"
            ]
          },
          "leverage": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295
          },
          "notionalUsd": {
            "type": "number"
          },
          "positionId": {
            "type": "string",
            "pattern": "^(?:0|[1-9][0-9]*)$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "open",
              "close",
              "liq"
            ]
          },
          "entry": {
            "type": "string",
            "pattern": "^(?:0|[1-9][0-9]*)$"
          },
          "exit": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?:0|[1-9][0-9]*)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "pnlUsd": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "seq",
          "ts",
          "wallet",
          "instrument",
          "instrumentId",
          "instrumentTerminal",
          "side",
          "leverage",
          "notionalUsd",
          "positionId",
          "kind",
          "entry",
          "exit",
          "pnlUsd"
        ]
      }
    }

    pressure:current

    中继队列压力(以 JSON 文本发布,支持恢复与增量压缩)。

    pressurePayloadSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tickRevision": {
          "type": "string",
          "pattern": "^[0-9a-f-]{36}:(?:0|[1-9][0-9]*)$"
        },
        "snapshot": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "ok": {
              "type": "boolean"
            },
            "stale": {
              "type": "boolean"
            },
            "ts": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "source": {
              "type": "string"
            },
            "blockGasLimit": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "totalQueuedGas": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "totalSubmittedGas": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "totalPendingGas": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "saturationPct": {
              "type": "number"
            },
            "pendingCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "activeIntents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "submittedIntents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "queuedIntents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "chain": {
              "type": "object",
              "properties": {
                "ok": {
                  "type": "boolean"
                },
                "stale": {
                  "type": "boolean"
                },
                "source": {
                  "type": "string"
                },
                "latestBlockNumber": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "latestBlockTimestampMs": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "latestBlockGasUsed": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "latestBlockGasLimit": {
                  "type": "string",
                  "pattern": "^(?:0|[1-9][0-9]*)$"
                },
                "latestBlockUsagePct": {
                  "type": "number"
                },
                "blocks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "number": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "timestampMs": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "gasUsed": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "gasLimit": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "usagePct": {
                        "type": "number"
                      },
                      "protocolGasUsed": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "baseFeePerGas": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "transactionCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "ordinary",
                          "big"
                        ]
                      }
                    },
                    "required": [
                      "number",
                      "timestampMs",
                      "gasUsed",
                      "gasLimit",
                      "usagePct",
                      "protocolGasUsed",
                      "baseFeePerGas",
                      "transactionCount",
                      "kind"
                    ]
                  }
                }
              },
              "required": [
                "ok",
                "stale",
                "source",
                "latestBlockNumber",
                "latestBlockTimestampMs",
                "latestBlockGasUsed",
                "latestBlockGasLimit",
                "latestBlockUsagePct",
                "blocks"
              ]
            }
          },
          "required": [
            "schemaVersion",
            "ok",
            "stale",
            "ts",
            "source",
            "blockGasLimit",
            "totalQueuedGas",
            "totalSubmittedGas",
            "totalPendingGas",
            "saturationPct",
            "pendingCount",
            "activeIntents",
            "submittedIntents",
            "queuedIntents",
            "chain"
          ]
        }
      },
      "required": [
        "tickRevision",
        "snapshot"
      ]
    }

    protocol:summary

    协议汇总数据,有变化时推送。

    protocolSummarySchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "stale": {
          "type": "boolean"
        },
        "source": {
          "type": "object",
          "properties": {
            "block": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "genesis": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "block",
            "at",
            "genesis"
          ]
        },
        "balances": {
          "type": "object",
          "properties": {
            "tvl": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "margin": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "lp": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "reserve": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "queue": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "tvl",
            "margin",
            "lp",
            "reserve",
            "queue"
          ]
        },
        "activity": {
          "type": "object",
          "properties": {
            "volume": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "open": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "volume",
            "open"
          ]
        },
        "fees": {
          "type": "object",
          "properties": {
            "pending": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "lifetime": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "pending",
            "lifetime"
          ]
        },
        "token": {
          "type": "object",
          "properties": {
            "supply": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "staked": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "trackedLp": {
              "type": "string",
              "pattern": "^(?:0|-?[1-9][0-9]*)$"
            },
            "accumulator": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "tailProgress": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "reserve": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "unallocated": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "pendingRewards": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "cliff": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "cap": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "excess": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "rate": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "decay": {
              "type": "string",
              "pattern": "^(?:0|[1-9][0-9]*)$"
            }
          },
          "required": [
            "supply",
            "staked",
            "trackedLp",
            "accumulator",
            "tailProgress",
            "reserve",
            "unallocated",
            "pendingRewards",
            "cliff",
            "cap",
            "excess",
            "rate",
            "decay"
          ]
        }
      },
      "required": [
        "ok",
        "source",
        "balances",
        "activity",
        "fees",
        "token"
      ]
    }

    house:current

    池子汇总数据,有变化时推送。

    houseCurrentSchema · JSON Schema
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "revision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "historyGeneration": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "historyRevision": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)$"
        },
        "sourceAsOfMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "head": {
          "type": "array",
          "prefixItems": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "items": {},
          "minItems": 9
        },
        "extra": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$"
          },
          "additionalProperties": {
            "type": "array",
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        },
        "heads": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "enum": [
              "1000",
              "60000",
              "3600000",
              "86400000"
            ]
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "baseTimeMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "timeOffsetsMs": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "gapIndices": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "intervalMs": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "columns": {
                "type": "object",
                "properties": {
                  "lp": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "pnl": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "q": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "bl": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "bs": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "el": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "es": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "dl": {
                    "type": "array",
                    "items": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  }
                },
                "required": [
                  "lp",
                  "pnl",
                  "q",
                  "bl",
                  "bs",
                  "el",
                  "es"
                ],
                "additionalProperties": {}
              },
              "source": {
                "type": "object",
                "properties": {
                  "asOfMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "generation": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "asOfMs"
                ]
              }
            },
            "required": [
              "baseTimeMs",
              "timeOffsetsMs",
              "gapIndices",
              "intervalMs",
              "columns",
              "source"
            ]
          }
        }
      },
      "required": [
        "ok",
        "revision",
        "historyGeneration",
        "historyRevision",
        "sourceAsOfMs",
        "head",
        "heads"
      ]
    }
    最后更新: