GET/v1/api/depth
URL:
https://api.crossexchange.io/GET/v1/api/depth?pair=ETH_USDT&depth=20&accuracy=1
Request filed:
|
Pair name |
String |
depth |
Rows of order books, the same rows of bid and ask. eg.20, return 20 rows bids and 20 rows asks. |
Integer |
accuracy | Precision, it's have 4 level: 0/1/2/3, the highest accuracy is 0 (default), differently decimals for each pair. | Integer |
Response:
{
"code": 0,
"prec_list": [
6,
5,
4,
3
],
"prec_len": 5,
"data": {
"bids": [
[
"0.01100",
"0.1",
"0.00110"
],
[
"0.01000",
"0.31",
"0.00310"
]
],
"asks": [],
"timestamp": "1530938989767"
},
"channel": "depth",
"pair": "ETH_USDT"
}
prec_list |
The list of decimal places for decimal group, |
Int[] |
prec_len |
The default number of decimal places for the price. |
Int |
data |
Return the full list for the first time, update sends return the changed list. | double
|
timestamp |
timestamp | Long
|
channel |
ticker | depth | Kline | trades
|
String |
pair |
Trading pair name | String |
Error:
{
"code": -1,
"msg": "fail"
}
code |
response status, 0 is success, other is fail. |
msg |
error massage |