K线数据
Last updated
Last updated
curl https://openapi.moorbit.com/api/v1/kline?pairName=eth_btc&period=1day&size=100
{
"data": [
{
"pair": "ETH_BTC",
"time": 1566835200,
"open": 0.018426,
"high": 0.018586,
"low": 0.018256,
"close": 0.018389,
"volume": 276565.188,
"amount": 5101.228544780
},
{
"pair": "ETH_BTC",
"time": 1566921600,
"open": 0.018389,
"high": 0.018433,
"low": 0.018282,
"close": 0.018384,
"volume": 138469.691,
"amount": 2542.058119740
},
{
"pair": "ETH_BTC",
"time": 1567008000,
"open": 0.018384,
"high": 0.018384,
"low": 0.018384,
"close": 0.018384,
"volume": 0.0,
"amount": 0.0
},
{
"pair": "ETH_BTC",
"time": 1567094400,
"open": 0.017704,
"high": 0.017713,
"low": 0.017651,
"close": 0.017688,
"volume": 20873.679,
"amount": 369.204144990
},
{
"pair": "ETH_BTC",
"time": 1567180800,
"open": 0.017688,
"high": 0.017688,
"low": 0.017688,
"close": 0.017688,
"volume": 0.0,
"amount": 0.0
},
{
"pair": "ETH_BTC",
"time": 1567267200,
"open": 0.017688,
"high": 0.017688,
"low": 0.017688,
"close": 0.017688,
"volume": 0.0,
"amount": 0.0
},
{
"pair": "ETH_BTC",
"time": 1567353600,
"open": 0.017688,
"high": 0.017688,
"low": 0.017688,
"close": 0.017688,
"volume": 0.0,
"amount": 0.0
},
{
"pair": "ETH_BTC",
"time": 1567440000,
"open": 0.017688,
"high": 0.017688,
"low": 0.017688,
"close": 0.017688,
"volume": 0.0,
"amount": 0.0
},
{
"pair": "ETH_BTC",
"time": 1567526400,
"open": 0.016900,
"high": 0.016963,
"low": 0.016801,
"close": 0.016852,
"volume": 210293.318,
"amount": 3552.617188072
},
{
"pair": "ETH_BTC",
"time": 1567612800,
"open": 0.016252,
"high": 0.016602,
"low": 0.0162,
"close": 0.016451,
"volume": 65088.47710,
"amount": 1064.80785468790
},
{
"pair": "ETH_BTC",
"time": 1567699200,
"open": 0.016452,
"high": 0.016584,
"low": 0.016146,
"close": 0.016416,
"volume": 163442.65640,
"amount": 2671.85527369290
},
{
"pair": "ETH_BTC",
"time": 1567785600,
"open": 0.016417,
"high": 0.01658,
"low": 0.016301,
"close": 0.016464,
"volume": 65855.86480,
"amount": 1078.37383778280
},
{
"pair": "ETH_BTC",
"time": 1567872000,
"open": 0.016464,
"high": 0.016464,
"low": 0.016464,
"close": 0.016464,
"volume": 0.0,
"amount": 0.0
},
{
"pair": "ETH_BTC",
"time": 1567958400,
"open": 0.017437,
"high": 0.017743,
"low": 0.017221,
"close": 0.017446,
"volume": 33452.36390,
"amount": 584.62853548830
},
{
"pair": "ETH_BTC",
"time": 1568044800,
"open": 0.017761,
"high": 0.017839,
"low": 0.017513,
"close": 0.017809,
"volume": 36411.94240,
"amount": 643.93576838790
},
{
"pair": "ETH_BTC",
"time": 1568131200,
"open": 0.017808,
"high": 0.017985,
"low": 0.017739,
"close": 0.017818,
"volume": 28226.33050,
"amount": 503.07617441530
}
],
"code": 0,
"message": "Success"
}
类别
说明
方法
GET
地址
/api/v1/kline?symbol=:symbol&period=:period&size=:size
鉴权
无需鉴权
限流
每秒10次
参数名
数据类型
说明
pairName
string
交易对,默认值ETH_BTC
period
string
k线类型,枚举如下:
1min - 1分钟线
5min - 5分钟线
15min - 15分钟线
30min - 30分钟线
1hour - 1小时线
2hour - 2小时线
4hour - 4小时线
6hour - 6小时线
12hour - 12小时线
1day - 1天线
1week - 1周线
默认值 15min
size
int
K线数据条数,最多返回150条,默认返回150条。
字段名称
数据类型
说明
pair
string
交易对
time
long
linux时间戳(秒)
open
decimal
开盘价
high
decimal
最高价
low
decimal
最低价
close
decimal
收盘价
volume
decimal
成交量
amount
decimal
成交额