查看原始 JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"source"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"sort": {
"type": "array",
"items": {
"type": "object",
"required": [
"field"
],
"properties": {
"field": {
"type": "string",
"minLength": 1,
"description": "用于排序的列名。示例:amount_usd。"
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "排序方向,默认 asc。示例:desc。"
}
},
"additionalProperties": false
},
"description": "ORDER BY 排序条件。示例:[{\"field\": \"amount_usd\", \"order\": \"desc\"}]。"
},
"limit": {
"type": "integer",
"maximum": 10000,
"minimum": 1,
"description": "最多返回的行数,服务端默认 20,上限为 10000。示例:20。"
},
"fields": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "要返回的列,省略时返回全部列。示例:[\"block_time\", \"amount_usd\"]。"
},
"offset": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "分页时跳过的行数,默认 0。示例:0。"
},
"source": {
"type": "string",
"pattern": "^agent\\.[a-z0-9_]+$",
"description": "包含命名空间的完整表名,可通过 /onchain/schema 查找。示例:agent.ethereum_dex_trades。"
},
"filters": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"op",
"value"
],
"properties": {
"op": {
"enum": [
"eq",
"neq",
"gt",
"gte",
"lt",
"lte",
"like",
"in",
"not_in"
],
"type": "string",
"description": "比较运算符。使用 in/not_in 时,value 必须是 JSON 数组。示例:gte。"
},
"field": {
"type": "string",
"minLength": 1,
"description": "要筛选的列名。示例:block_date。不要按 symbol 列筛选,因为该列未建立索引;请先通过 /search/token 将代币代码解析为合约地址。"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
}
}
],
"description": "用于比较的值;使用 in/not_in 时应填写 JSON 数组。示例:2026-07-01。"
}
},
"additionalProperties": false
},
"description": "WHERE 筛选条件,各条件之间按 AND 组合。查询大表时务必限制 block_date 范围,否则会超时。示例:[{\"field\": \"block_date\", \"op\": \"gte\", \"value\": \"2026-07-01\"}]。"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}