跳到正文

获取交易所原生 K 线​

GET
/v2/source-klines

只读取已缓存的交易所 K 线。使用来源行情里的 source、pair 和 nativeQuote 指定市场;价格保持原生计价币种。响应列出未缓存区间以及零成交量补齐 K 线的时间戳。

授权​

bearerAuth

Required when cp_auth.enabled=true. The token must have the oracle scope.

类型
HTTP (bearer)

参数​

查询参数

symbol*

Base asset symbol, e.g. BTC.

类型
string
必填
示例"BTC"
source*

Exchange ID from /v2/source-tickers, e.g. sbi_vc_trade.

类型
string
必填
示例"sbi_vc_trade"
pair*

Native market pair from /v2/source-tickers.

类型
string
必填
示例"EX_BTC_JPY"
nativeQuote*

Native quote from /v2/source-tickers; prices are not converted.

类型
string
必填
示例"JPY"
quote

Accepted for parity with /v2/klines and validated (USD or JPY), but it does not convert prices: rows stay in the native market quote.

类型
string
有效值
"JPY""USD"
interval*

Stored native source interval.

类型
string
必填
有效值
"1m""1h""1d"
startTime

Inclusive Unix timestamp in milliseconds.

类型
integer
格式
"int64"
endTime

Inclusive Unix timestamp in milliseconds.

类型
integer
格式
"int64"
limit

Defaults to 500; maximum 1000.

类型
integer
最小值
1
最大值
1000
默认
500

响应​

Cached closed and available active source Klines, uncovered ranges, and carried-bar open times.

application/json
JSON
{
  
"klines": [
  
  
[
  
  
]
  
],
  
"missingRanges": [
  
  
[
  
  
]
  
],
  
"syntheticOpenTimes": [
  
  
0
  
]
}

试验场​

授权
变量
键
值

示例​