跳到正文

获取资产在指定周期内的最新 K 线

GET
/candles/{id}/{interval}/latest

授权

ApiKeyAuth
类型
API Key (header: CP-X-API-KEY)

参数

路径参数

id*

Asset ID, symbol, or supported source ID.

类型
string
必填
示例
"bitcoin""BTC"
interval*

Candle interval.

类型
string
必填
有效值
"1h""1d""1w""1M"

响应

Latest candle in [open_time_ms, open, high, low, close] format.

application/json
JSON
[
  
1704067200000,
  
"67890.123456",
  
"67890.123456",
  
"67890.123456",
  
"67890.123456"
]

试验场

授权
变量

示例