行情数据
获取价格历史
品种在过去一小时、一天、一周、一个月或一年的价格,以适合绘图的均匀间隔呈现。
GET
/ api/ v1 / markets/ historycurl --request GET \
--url "https://reirex.com/api/v1/markets/history?symbol=BTC&range=1d" \
--header "Accept: application/json"200 OKapplication/json
{
"symbol": "BTC",
"range": "1d",
"source": "live",
"points": [
{
"t": "2026-10-13T16:14:00.000Z",
"p": 73500
},
{
"t": "2026-10-13T16:29:09.474Z",
"p": 73555.4
},
{
"t": "2026-10-13T16:44:18.948Z",
"p": 73609.1
},
// 另有 93 项
]
}range | 点数 | 间隔 |
|---|---|---|
1h | 60 | 1 分钟 |
1d | 96 | 15 分钟 |
1w | 168 | 1 小时 |
1m | 180 | 4 小时 |
1y | 365 | 1 天 |
查询参数
symbolstring必填品种代码,例如
BTC、ASML、EURUSD或XAU。rangestring必填时间跨度,截至当前。
可选值
1h1d1w1m1y
响应
symbolstring品种代码。
rangestring你请求的时间跨度。
sourcestring价格来源。
pointsobject[]价格,从旧到新。

