Restful API Coin-based contract
View Kline
GET https://api.bibox.com/v2/mdata?cmd=kline&pair=5BTC_USD&period=1min&size=10
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | pair | 5BTC_USD, 5ETH_USD, ... | |
period | true | string | Kline period | '1min', '3min', '5min', '15min', '30min', '1hour', '2hour', '4hour', '6hour', '12hour', 'day', 'week' | |
size | false | integer | how many | 1000 | 1-1000 |
- example
// Response
{
"result":[
{
"time":1602680580000,// Timestamp
"open":"10666.00000000",// Opening Price
"high":"10666.00000000",// The highest price
"low":"10666.00000000", // The lowest price
"close":"10666.00000000",// Closing Price
"vol":"0.00000000"// Trading Volume
},
...
],
"cmd":"kline",
"ver":"2.0"
}
View the contract depth of the market
- GET https://api.bibox.com/v2/mdata?cmd=depth&pair=5BTC_USD&size=10
- POST https://api.bibox.com/v1/mdata
- cmd: api/depth
- Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | pair | 4BTC_USDT, 4ETH_USDT, ... | |
size | false | integer | how many | 200 | 1-200 |
- example
// Response
{
"result":{
"pair":"5BTC_USD",
"update_time":1602669350668,
"asks":[//The depth of sellers
],
"bids":[//The depth of buyers
{
"volume":"54054",//The price of pending orders
"price":"10666"//The price of pending order
},
...
]
},
"cmd":"depth",
"ver":"2.0"
}