-
Notifications
You must be signed in to change notification settings - Fork 87
044depth
杨晓强 edited this page Jan 20, 2022
·
13 revisions
See request count and merge constraint here Acquire market depth
- result: checksum is a signed integer (32 bit) of full depth data and is for verify the accuracy of depth data, the checksum string will be bid1_price:bid1_amount:bid2_price:bid2_amount:ask1_price:ask1_amount:... if there is no bids, the checksum string will be ask1_price:ask1_amount:ask2_price:ask2_amount...
#Example
#Request
{
"method":"depth.query",
"params":[
"BTCBCH", #1.market: See<API invocation description·market>
20, #2.limit: Count limit, Integer
"0" #3.interval: Merge,String
],
"id":15
}
#Response
{
"error": null,
"result": {
"bids": [ #Depth of Buy
[
"12.25", #Buy in price
"0.0588" #Buy in count
]
],
"asks": [ #Depth of Sell
[
"12.94", #Sell out price
"0.1524" #Sell out count
]
],
"checksum": 21658179
},
"id": 15
}
#Example
#Request
{
"method":"depth.subscribe",
"params":[
"BTCBCH", #1.market: See<API invocation description·market>
5, #2.limit: Count limit
"0", #3.interval: Merge,String
true #4.diff, Boolen, Optional, default is true
],
"id":15
}
#notify
{
"method": "depth.update",
"params": [
false, #Boolean, true: for complete result,false: for update based on latest retrun result
{ #Update info
"bids": [ #Depth of Buy
[
"12.25", #Buy in price
"0.0588" #Buy in count
]
],
"asks": [ #Depth of Sell
[
"12.94", #Sell out price
"0.1524" #Sell out count
]
],
"checksum": 21658179
}
],
"id": null
}
#Example
#Request
{
"method":"depth.subscribe_multi",
"params":
[
[
"BTCBCH", #1.market: See<API invocation description·market>
5, #2.limit: Count limit
"0" #3.interval: Merge,String
true #4.diff, Boolen, Optional, default is true
],
[
"BTCUSDT",
5,
"0",
false
],
[
...
]
]
"id":15
}
#notify
{
"method": "depth.update",
"params": [
false, #Boolean, true: for complete result,false: for update based on latest retrun result
{ #Update info
"bids": [ #Depth of Buy
[
"12.25", #Buy in price
"0.0588" #Buy in count
]
],
"asks": [ #Depth of Sell
[
"12.94", #Sell out price
"0.1524" #Sell out count
]
],
"checksum": 21658179
}
],
"id": null
}
Common API
Market API
-
Acquire Market List
-
Acquire Market Statistics
-
Acquire Market Depth
-
Acquire Latest Transaction Data
-
Acquire K-Line Data
-
Acquire Market Information
-
Acquire Single Market Information
-
Acquire AMM Market List
Account API
-
Inquire Account Info
-
Inquire Withdrawal List
-
Submit A Withdrawal Order
-
Cancel Withdrawal
-
Inquire Deposit List
-
Transfer between main account and sub account
-
Transfer between main account and margin account
-
Get deposit address
-
Generate deposit address
-
Inquire Sub Account Balance
-
Inquire Sub Account Balance History
-
Create Sub Account
-
Frozen Sub Account
-
Unfrozen Sub Account
-
Acquire Credit Account Info
Trading API
-
Place Limit Order
-
Place Multiple Limit Orders
-
Place Market Order
-
Place Stop Limit Order
-
Place IOC Order
-
Acquire Unexecuted Order List
-
Acquire Executed Order List
-
Acquire Order Status
-
Acquire Multiple Orders Status
-
Acquire Executed Order Detail
-
Acquire User Deals
-
Cancel Order
-
Cancel Multiple Orders
-
Cancel All Orders
Margin API
-
Inquire Margin Account Info
-
Inquire Margin Account Market Info
-
Inquire Margin Account of A Currency
-
Acquire Margin Account Settings
-
Acquire Margin Account Settings of A Currency
-
Acquire Loan List
-
Place Loan
-
Place Flat
-
Margin Balance Transfer
Contract API