-
Notifications
You must be signed in to change notification settings - Fork 87
052order
张帅磊 edited this page Jun 10, 2020
·
8 revisions
#Example
#Request
{
"method":"order.query",
"params":[
"BTCBCH", # market
0, # side, 0 no limit, 1 sell, 2 buy
0, # ofsset
10 # limit
],
"id":15
}
#Response
{
"error": null,
"result": {
"limit": 10,
"offset": 0,
"total": 1,
"records": [
{
"id": 48239,
"type": 1,
"side": 2,
"user": 553,
"account": 0,
"option": 32,
"ctime": 1590373332.036361,
"mtime": 1590373332.036361,
"market": "BCHBTC",
"source": "outest",
"client_id": "abc",
"price": "0.01900000",
"amount": "2.00000000",
"taker_fee": "0.0001",
"maker_fee": "0.0001",
"left": "2.00000000",
"deal_stock": "0.00000000",
"deal_money": "0.00000000000000000000",
"deal_fee": "0.000000000000000000000000",
"asset_fee": "0.000000000000000000000000",
"fee_discount": "1.0000",
"last_deal_amount": "0",
"last_deal_price": "0",
"last_deal_time": 0.0,
"last_deal_id": 0,
"last_role": 0,
"fee_asset": null
}
]
},
"id": 15
}
#Example
#Request
{
"method":"order.subscribe",
"params":["BTCBCH"], # market list
"id":15
}
#notify
{
"method": "order.update",
"params": [
2, #event: event type,Integer, 1: PUT, 2: UPDATE, 3: FINISH
{
"id": 48239,
"type": 1,
"side": 2,
"user": 553,
"account": 0,
"option": 32,
"ctime": 1590373332.036361,
"mtime": 1590373332.036361,
"market": "BCHBTC",
"source": "outest",
"client_id": "abc",
"price": "0.01900000",
"amount": "2.00000000",
"taker_fee": "0.0001",
"maker_fee": "0.0001",
"left": "2.00000000",
"deal_stock": "0.00000000",
"deal_money": "0.00000000000000000000",
"deal_fee": "0.000000000000000000000000",
"asset_fee": "0.000000000000000000000000",
"fee_discount": "1.0000",
"last_deal_amount": "0",
"last_deal_price": "0",
"last_deal_time": 0.0,
"last_deal_id": 0,
"last_role": 0,
"fee_asset": null
}
],
"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