查看原始 JSON
{
"type": "object",
"required": [
"queryParams"
],
"properties": {
"queryParams": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"pair"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"from": {
"type": "string",
"minLength": 1,
"description": "开始时间,可使用 Unix 秒级时间戳或日期字符串(YYYY-MM-DD、ISO8601)。示例:2026-03-01。"
},
"pair": {
"type": "string",
"minLength": 1,
"description": "交易对,例如 BTC/USDT。示例:BTC/USDT。"
},
"type": {
"enum": [
"spot",
"swap",
"perpetual",
"perp"
],
"type": "string",
"default": "spot",
"description": "市场类型:spot 表示现货;swap、perpetual 或 perp 表示永续合约。默认 spot。示例:spot。"
},
"limit": {
"type": "integer",
"default": 100,
"maximum": 1000,
"minimum": 1,
"description": "最多返回的 K 线数量,默认 100。交易所可能设置更低的上限,例如 200–1000。查询更长时间范围时,用上次返回的最后一个时间戳作为下一次的 from。示例:100。"
},
"exchange": {
"enum": [
"binance",
"okx",
"bybit",
"bitget",
"coinbase",
"kraken",
"gate",
"htx",
"kucoin",
"mexc",
"upbit",
"bitfinex",
"bitstamp",
"deribit",
"bitmex",
"bithumb",
"hyperliquid"
],
"type": "string",
"default": "binance",
"description": "交易所标识,默认 binance。hyperliquid 使用 USDC 结算的永续合约,例如 BTC/USDC:USDC,查询时请使用以 USDC 报价的交易对。示例:binance。"
},
"interval": {
"enum": [
"1m",
"3m",
"5m",
"15m",
"30m",
"1h",
"2h",
"4h",
"6h",
"8h",
"12h",
"1d",
"3d",
"1w",
"1M"
],
"type": "string",
"default": "1h",
"description": "每条价格与成交量 K 线的时间周期。此端点只接受 interval,不接受 time_range;请用 from 和 limit 控制查询范围。默认 1h。示例:1h。"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}