Restful API 币本位合约
查询k线
参数名称 |
是否必须 |
类型 |
描述 |
默认值 |
取值范围 |
pair |
true |
string |
交易对 |
|
5BTC_USD, 5ETH_USD, ... |
period |
true |
string |
k线周期 |
|
'1min', '3min', '5min', '15min', '30min', '1hour', '2hour', '4hour', '6hour', '12hour', 'day', 'week' |
size |
false |
integer |
数量 |
1000 |
1-1000 |
{
"result":[
{
"time":1602680580000,
"open":"10666.00000000",
"high":"10666.00000000",
"low":"10666.00000000",
"close":"10666.00000000",
"vol":"0.00000000"
},
...
],
"cmd":"kline",
"ver":"2.0"
}
查询合约市场深度
参数名称 |
是否必须 |
类型 |
描述 |
默认值 |
取值范围 |
pair |
true |
string |
交易对 |
|
4BTC_USDT, 4ETH_USDT, ... |
size |
false |
integer |
数量 |
200 |
1-200 |
{
"result":{
"pair":"5BTC_USD",
"update_time":1602669350668,
"asks":[
],
"bids":[
{
"volume":"54054",
"price":"10666"
},
...
]
},
"cmd":"depth",
"ver":"2.0"
}