跳到正文
注册

行情数据

获取价格历史

品种在过去一小时、一天、一周、一个月或一年的价格,以适合绘图的均匀间隔呈现。

GET/api/v1/markets/history
curl --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点数间隔
1h601 分钟
1d9615 分钟
1w1681 小时
1m1804 小时
1y3651 天

查询参数

  • symbolstring必填

    品种代码,例如 BTC、ASML、EURUSD 或 XAU。

  • rangestring必填

    时间跨度,截至当前。

    可选值1h1d1w1m1y

响应

  • symbolstring

    品种代码。

  • rangestring

    你请求的时间跨度。

  • sourcestring

    价格来源。

  • pointsobject[]

    价格,从旧到新。