API Access:https://support.hbfile.net/hc/en-us/articles/900001603466
1.0.7 2020-1-29 【Added:Get a Batch of Market Data Overview、Get Kline Data of Mark Price、Subscribe Kline Data of Mark Price、Request Kline Data of Mark Price、Query Settlement Records of Users(Isolated and Cross). 7-28 Added fields to modify interface. The order_id of submitted trigger order response has been changed from the original natural number self-incrementing ID to a unique identification ID with a length of 18 digits. It is recommended to use the order_id_str (order_id in string type) of submitted order response to avoid the occurrence of truncation by the system because excessive length.】
- Added Get a Batch of Market Data Overview
- Interface Name: [General]Get a Batch of Market Data Overview
- Interface Type: public
- Interface URL: /linear-swap-ex/market/detail/batch_merged
- Added Get Kline Data of Mark Price
- Interface Name: [General]Get Kline Data of Mark Price
- Interface Type: public
- Interface URL: /index/market/history/linear_swap_mark_price_kline
- Added Subscribe Kline Data of Mark Price
- Interface Name: [General]Subscribe Kline Data of Mark Price
- Interface Type: public
- Subscription topic: market.$contract_code.mark_price.$period
- Added Request Kline Data of Mark Price
- Interface Name: [General]Request Kline Data of Mark Price
- Interface Type: public
- Subscription topic: market.$contract_code.mark_price.$period
- Added [Isolated]Query Settlement Records of Users
- Interface Name: [Isolated]Query Settlement Records of Users
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_user_settlement_records
- Added [Cross]Query Settlement Records of Users
- Interface Name: [Cross]Query Settlement Records of Users
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_user_settlement_records
- Modified [Isolated]Cancel All Orders(Added two optional parameters in request: direction, indicates order direction, if not filled in means both with available values: “buy”, “sell”; offset, order offset, if not filled in means both with available values: “open”, “close”.)
- Interface Name: [Isolated]Cancel All Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cancelall
- Modified [Cross]Cancel All Orders(Added two optional parameters in request: direction, indicates order direction, if not filled in means both with available values: “buy”, “sell”. offset, order offset, if not filled in means both with available values: “open”, “close”.)
- Interface Name: [Cross]Cancel All Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_cancelall
- Modified [Isolated]Get Information of an Order(Added one field in return "data": real_profit(real profit when close position).)
- Interface Name: [Isolated]Get Information of an Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_order_info
- Modified [Cross]Get Information of an Order(Added one field in return "data": real_profit(real profit when close position).)
- Interface Name: [Cross]Get Information of an Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_order_info
- Modified [Isolated]Order details acquisition(Added field in return parameters both "data" and "trades": real_profit(real profit when close position). And added one filed in "trades" to indicates each trade profit:profit(profit when close position))
- Interface Name: [Isolated]Order details acquisition
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_order_detail
- Modified [Cross]Order details acquisition(Added field in return parameters both "data" and "trades": real_profit(real profit when close position). And added one filed in "trades" to indicates each trade profit:profit(profit when close position))
- Interface Name: [Cross]Order details acquisition
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_order_detail
- Modified [Isolated]Current unfilled order acquisition(Added two optional parameters in request: sort_by, is sort field, if not filled in means order by create_at descending, with available values “created_at”(descending order), “update_time”(descending order); trade_type, indicates trade type, if not filled in means all, with available values: 0:all, 1:open long, 2:open short, 3:close short, 4:close long. Added two fields in return parameter "orders": update_time(order updated time, in milliseconds), real_profit(real profit when close position).)
- Interface Name: [Isolated]Current unfilled order acquisition
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_openorders
- Modified [Cross]Current unfilled order acquisition(Added two optional parameters in request: sort_by, is sort field, if not filled in means order by create_at descending, with available values “created_at”(descending order), “update_time”(descending order); trade_type, indicates trade type, if not filled in means all, with available values: 0:all, 1:open long, 2:open short, 3:close short, 4:close long. Added two fields in return parameter "orders": update_time(order updated time, in milliseconds); real_profit(real profit when close position).)
- Interface Name: [Cross]Current unfilled order acquisition
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_openorders
- Modified [Isolated]Get History Orders(Added one field in return parameter "orders": real_profit(real profit when close position).)
- Interface Name: [Isolated]Get History Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_hisorders
- Modified [Cross]Get History Orders(Added one field in return parameter "orders": real_profit(real profit when close position).)
- Interface Name: [Cross]Get History Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_hisorders
- Modified [Isolated]Acquire History Match Results(Added one field in return parameter "trades": real_profit(real profit when close position).)
- Interface Name: [Isolated]Acquire History Match Results
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_matchresults
- Modified [Cross]Acquire History Match Results(Added one field in return parameter "trades": real_profit(real profit when close position).)
- Interface Name: [Cross]Acquire History Match Results
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_matchresults
- Modified [Isolated]Subscribe Order Data(sub)(Added one field in return data: real_profit(real profit when close position). added field in return parameter "trade": profit(profit when close position), real_profit(real profit when close position))
- Interface Name: [Isolated]Subscribe Order Data(sub)
- Interface Type: private
- Subscription topic: orders.$contract_code
- Modified [Cross]Subscribe Order Data(sub)(Added one field in return data: real_profit(real profit when close position). added field in return parameter "trade": profit(profit when close position), real_profit(real profit when close position))
- Interface Name: [Cross]Subscribe Order Data(sub)
- Interface Type: private
- Subscription topic: orders_cross.$contract_code
- Modified [Isolated]Cancel All Trigger Orders(Added two optional parameters in request: direction, indicates order direction, if not filled in means both with available values: “buy”, “sell”; offset, order offset, if not filled in means both with available values: “open”, “close”.)
- Interface Name: [Isolated]Cancel All Trigger Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_trigger_cancelall
- Modified [Cross]Cancel All Trigger Orders(Added two optional parameters in request: direction, indicates order direction, if not filled in means both with available values: “buy”, “sell”; offset, order offset, if not filled in means both with available values: “open”, “close”.)
- Interface Name: [Cross]Cancel All Trigger Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_trigger_cancelall
- Modified [Isolated]Cancel all Take-profit and Stop-loss Orders(Added one option parameter in request: direction, indicates order direction, if not filled in means cancel all)
- Interface Name: [Isolated]Cancel all Take-profit and Stop-loss Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_tpsl_cancelall
- Modified [Cross]Cancel all Take-profit and Stop-loss Orders(Added one option parameter in request: direction, indicates order direction, if not filled in means cancle all)
- Interface Name: [Cross]Cancel all Take-profit and Stop-loss Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_tpsl_cancelall
- Modified [Isolated]Query Trigger Order Open Orders(Added one optional parameter in request: trade_type, order trade type, if not filled in means all with available values 0:all, 1:open long, 2:open short, 3:close short, 4:close long.)
- Interface Name: [Isolated]Query Trigger Order Open Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_trigger_openorders
- Modified [Cross]Query Trigger Order Open Orders(Added one optional parameter in request: trade_type, order trade type, if not filled in means all with available values 0:all, 1:open long, 2:open short, 3:close short, 4:close long.)
- Interface Name: [Cross]Query Trigger Order Open Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_trigger_openorders
- Modified [Isolated]Query Open Take-profit and Stop-loss Orders(Added one optional parameter in request: trade_type, order trade type, if not filled in means all with available values 0:all, 3:close short, 4:close long.)
- Interface Name: [Isolated]Query Open Take-profit and Stop-loss Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_tpsl_openorders
- Modified [Cross]Query Open Take-profit and Stop-loss Orders(Added one optional parameter in request: trade_type, order trade type, if not filled in means all with available values 0:all, 3:close short, 4:close long.)
- Interface Name: [Cross]Query Open Take-profit and Stop-loss Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_tpsl_openorders
1.0.6 2021-01-12 【1 Added Get the estimated settlement price. 2-13 Added ”Set a Take-profit and Stop-loss Order“ interfaces. 14-35 Added fields to modify interface. Added the first-level menu of [Contract Trigger Order], and add take-profit and stop-loss related interfaces and move the original contract trigger order related interfaces to this menu 】
- Added Get the estimated settlement price
- Interface Name: [General]Get the estimated settlement price
- Interface Type: public
- Interface URL: /linear-swap-api/v1/swap_estimated_settlement_price
- Added Set a Take-profit and Stop-loss Order for an Existing Position(Isolated)
- Interface Name: [Isolated]Set a Take-profit and Stop-loss Order for an Existing Position
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_tpsl_order
- Added Set a Take-profit and Stop-loss Order for an Existing Position(Cross)
- Interface Name: [Cross]Set a Take-profit and Stop-loss Order for an Existing Position
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_tpsl_order
- Added Cancel a Take-profit and Stop-loss Order(Isolated)
- Interface Name: [Isolated]Cancel a Take-profit and Stop-loss Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_tpsl_cancel
- Added Cancel a Take-profit and Stop-loss Order(Cross)
- Interface Name: [Cross]Cancel a Take-profit and Stop-loss Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_tpsl_cancel
- Added Cancel all Take-profit and Stop-loss Orders(Isolated)
- Interface Name: [Isolated]Cancel all Take-profit and Stop-loss Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_tpsl_cancelall
- Added Cancel all Take-profit and Stop-loss Orders(Cross)
- Interface Name: [Cross]Cancel all Take-profit and Stop-loss Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_tpsl_cancelall
- Added Query Open Take-profit and Stop-loss Orders (Isolated)
- Interface Name: [Isolated]Query Open Take-profit and Stop-loss Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_tpsl_openorders
- Added Query Open Take-profit and Stop-loss Orders(Cross)
- Interface Name: [Cross]Query Open Take-profit and Stop-loss Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_tpsl_openorders
- Added Query Take-profit and Stop-loss History Orders(Isolated)
- Interface Name: [Isolated]Query Take-profit and Stop-loss History Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_tpsl_hisorders
- Added Query Take-profit and Stop-loss History Orders(Cross)
- Interface Name: [Cross]Query Take-profit and Stop-loss History Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_tpsl_hisorders
- Added Query Info Of Take-profit and Stop-loss Order That Related To Position Opening Order(Isolated)
- Interface Name: [Isolated]Query Info Of Take-profit and Stop-loss Order That Related To Position Opening Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_relation_tpsl_order
- Added Query Info Of Take-profit and Stop-loss Order That Related To Position Opening Order(Cross)
- Interface Name: [Cross]Query Info Of Take-profit and Stop-loss Order That Related To Position Opening Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_relation_tpsl_order
- Modifed "Place an order" Interface(Isolated)(added optional parameters: tp_trigger_price (Trigger price of take-profit order), tp_order_price (Order price of take-profit order), tp_order_price_type (Order type of take-profit order), sl_trigger_price (Trigger price of stop-loss order), sl_order_price (Order price of stop-loss order), sl_order_price_type (Order type of stop-loss order))
- Interface Name: [Isolated]Place an Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_order
- Modifed "Place an order" Interface(Cross)(added optional parameters: tp_trigger_price (Trigger price of take-profit order), tp_order_price (Order price of take-profit order), tp_order_price_type (Order type of take-profit order), sl_trigger_price (Trigger price of stop-loss order), sl_order_price (Order price of stop-loss order), sl_order_price_type (Order type of stop-loss order))
- Interface Name: [Cross]Place an Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_order
- Modified "Place a batch of orders"Interface(Isolated) (added optional parameters in parameters "orders_data": tp_trigger_price (Trigger price of take-profit order),tp_order_price (Order price of take-profit order), tp_order_price_typeOrder type of take-profit order), sl_trigger_price (Trigger price of stop-loss order), sl_order_price (Order price of stop-loss order), sl_order_price_type (Order type of stop-loss order))
- Interface Name: [Isolated]Place a Batch of Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_batchorder
- Modified "Place a batch of orders"Interface(Cross) (added optional parameters in parameters "orders_data": tp_trigger_price (Trigger price of take-profit order),tp_order_price (Order price of take-profit order), tp_order_price_typeOrder type of take-profit order), sl_trigger_price (Trigger price of stop-loss order), sl_order_price (Order price of stop-loss order), sl_order_price_type (Order type of stop-loss order))
- Interface Name: [Cross]Place a Batch of Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_batchorder
- Modified "Get Information of an Order" Interface(Isolated)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Isolated]Get Information of an Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_order_info
- Modified "Get Information of an Order" Interface(Cross)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Cross]Get Information of an Order
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_order_info
- Modified "Order details acquisition" Interface(Isolated)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Isolated]Order details acquisition
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_order_detail
- Modified "Order details acquisition" Interface(Cross)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Cross]Order details acquisition
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_order_detail
- Modified "Query Open Orders" Interface(Isolated)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values"in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Isolated]Current unfilled order acquisition
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_openorders
- Modified "Query Open Orders" Interface(Cross)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values"in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Cross]Current unfilled order acquisition
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_openorders
- Modified "Get History Orders" Interface(Isolated)(Added paprameter "sort_by" to represent "sort fields" with optional value“create_date” and “update_time"; added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no), and "update_time" to indicate order's update time); and "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit or stop-loss))
- Interface Name: [Isolated]Get History Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_hisorders
- Modified "Get History Orders" Interface(Cross)(Added paprameter "sort_by" to represent "sort fields" with optional value“create_date” and “update_time"; added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no), and "update_time" to indicate order's update time); and "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit or stop-loss))
- Interface Name: [Cross]Get History Orders
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_hisorders
- Modified "Subscribe Order Data(sub)" Interface(Isolated)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Isolated]Subscribe Order Data(sub)
- Interface Type: private
- Subscription Topic: orders.$contract_code
- Modified "Subscribe Order Data(sub)" Interface(Cross)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Cross]Subscribe Order Data(sub)
- Interface Type: private
- Subscription Topic: orders_cross.$contract_code
- Modified "Subscribe Match Order Data(sub)" Interface(Isolated)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Isolated]Subscribe Match Order Data(sub)
- Interface Type: private
- Subscription Topic: matchOrders.$contract_code
- Modified "Subscribe Match Order Data(sub)" Interface(Cross)(Added return parameter "is_tpsl" to indicate whether to set take-profit and stop-loss order, 1: yes, 0: no); added "enumerated values" in return parameter "order_source"(“tpsl” indicates triggered by take-profit and stop-loss))
- Interface Name: [Cross]Subscribe Match Order Data(sub)
- Interface Type: private
- Subscription Topic: matchOrders_cross.$contract_code
- Modified "Query Trigger Order History" Interface(Isolated)(Added paprameter "sort_by" to represent "sort fields" with optional values “created_at” and “update_time”). added "update_time" to indicate order's update time))
- Interface Name: [Isolated]Query Trigger Order History
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_trigger_hisorders
- Modified "Query Trigger Order History" Interface(Cross)(Added paprameter "sort_by" to represent "sort fields" with optional values “created_at” and “update_time”). added "update_time" to indicate order's update time))
- Interface Name: [Cross]Query Trigger Order History
- Interface Type: private
- Interface URL: /linear-swap-api/v1/swap_cross_trigger_hisorders
- Modified "Get Swap Open Interest Information" Interface (Added "trade_volume" in return parameter "data" to indicate trading volume within the last 24 hours (cont), and "trade_amount" to indicate trading volume within the last 24 hours (coin), and "trade_turnover" to represent trading amount within the last 24 hours.)
- Interface Name: [General]Get Swap Open Interest Information
- Interface Type: public
- Interface URL: /linear-swap-api/v1/swap_open_interest
- Modified "Subscribe Market Detail Data" Interface (Added "ask" in return parameter “tick” to represent “sell one” and “bid” to represent "buy one".)
- Interface Name: [General]Subscribe Market Detail Data
- Interface Type: public
- Subscription Topic: market.$contract_code.detail
- Modified "Query Swap Info" Interface(Added "delivery_time" in return parameter "data" to represent delivery time(millesecond timestamp))
- Interface Name: [General]Query Swap Info
- Interface Type: public
- Interface URL: /linear-swap-api/v1/swap_contract_info
- Modified "Subscribe Contract Info" Interface(Added "delivery_time" in return parameter "data" to represent delivery time(millesecond timestamp))
- Interface Name: [General] Subscribe Contract Info (no authentication)(sub)
- Interface Type: public
- Subscription Topic: public.$contract_code.contract_info
1.0.5 2020-12-18 【Newly added:Added WS interface for subscribing system status updates push】
1.Added WS interface for subscribing system status updates push
- Interface name: [General]subscribe system status updates
- Interface type: public
- Subscription topic:public.$service.heartbeat
1.0.4 2020-12-11 【1-33 Added interfaces for cross margin mode. 34-60 Added fields to modify interface】
1、Added Cross Margin Mode Query Information On Tiered Adjustment Factor
- Interface Name:[Cross]Query Information On Tiered Adjustment Factor
- Interface Type:public
- Interface URL:/linear-swap-api/v1/swap_cross_adjustfactor
2、Added Cross Margin Mode Query Information On Transfer State
- Interface Name:[Cross]Query Information On Transfer State
- Interface Type:public
- Interface URL:/linear-swap-api/v1/swap_cross_transfer_state
3、Added Cross Margin Mode Query Information On Trade State
- Interface Name:[Cross]Query Information On Trade State
- Interface Type:public
- Interface URL:/linear-swap-api/v1/swap_cross_trade_state
4、Added Cross Margin Mode Query User's Account Information
- Interface Name:[Cross]Query User's Account Information
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_account_info
5、Added Cross Margin Mode Query User's Position Information
- Interface Name:[Cross]Query User's Position Information
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_position_info
6、Added Cross Margin Mode Query Assets Information Of All Sub-Accounts Under The Master Account
- Interface Name:[Cross]Query Assets Information Of All Sub-Accounts Under The Master Account
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_sub_account_list
7、Added Cross Margin Mode Query A Sub-Account's Assets Information
- Interface Name:[Cross]Query A Sub-Account's Assets Information
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_sub_account_info
8、Added Cross Margin Mode Query A Sub-Account's Position Information
- Interface Name:[Cross]Query A Sub-Account's Position Information
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_sub_position_info
9、Added Cross Margin Mode Query Information On Transfer Limit
- Interface Name:[Cross]Query Information On Transfer Limit
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_transfer_limit
10、Added Cross Margin Mode Query Information On Position Limit
- Interface Name:[Cross]Query Information On Position Limit
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_position_limit
11、Added Cross Margin Mode Query Assets And Positions
- Interface Name:[Cross]Query Assets And Positions
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_account_position_info
12、Added Cross Margin Mode Query User’s Available Leverage
- Interface Name:[Cross]Query User’s Available Leverage
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_available_level_rate
13、Added Cross Margin Mode Switch Leverage
- Interface Name:[Cross]Switch Leverage
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_switch_lever_rate
14、Added Cross Margin Mode Place An Order
- Interface Name:[Cross]Place An Order
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_order
15、Added Cross Margin Mode Place A Batch Of Orders
- Interface Name:[Cross]Place A Batch Of Orders
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_batchorder
16、Added Cross Margin Mode Cancel An Order
- Interface Name:[Cross]Cancel An Order
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_cancel
17、Added Cross Margin Mode Cancel All Orders
- Interface Name:[Cross]Cancel All Orders
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_cancelall
18、Added Cross Margin Mode Get Information of order
- Interface Name:[Cross]Get Information of order
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_order_info
19、Added Cross Margin ModeGet Detail Information of order
- Interface Name:[Cross]Get Detail Information of order
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_order_detail
20、Added Cross Margin Mode Current unfilled order acquisition
- Interface Name:[Cross]Current unfilled order acquisition
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_openorders
21、Added Cross Margin Mode Get History Orders
- Interface Name:[Cross]Get History Orders
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_hisorders
22、Added Cross Margin Mode Get History Match Results
- Interface Name:[Cross]Get History Match Results
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_matchresults
23、Added Cross Margin Mode Place Lightning Close Position
- Interface Name:[Cross]Place Lightning Close Position
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_lightning_close_position
24、Added Cross Margin Mode Place Trigger Order
- Interface Name:[Cross]Place Trigger Order
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_trigger_order
25、Added Cross Margin Mode Cancel Trigger Order
- Interface Name:[Cross]Cancel Trigger Order
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_trigger_cancel
26、Added Cross Margin Mode Cancel All Trigger Orders
- Interface Name:[Cross]Cancel All Trigger Orders
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_trigger_cancelall
27、Added Cross Margin Mode Query Open Trigger Order
- Interface Name:[Cross]Query Open Trigger Order
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_trigger_openorders
28、Added Cross Margin Mode Query Trigger Order History
- Interface Name:[Cross]Query Trigger Order History
- Interface Type:private
- Interface URL:/linear-swap-api/v1/swap_cross_trigger_hisorders
29、Added Cross Margin Mode Subscribe Order Data
- Interface Name:[Cross]Subscribe Order Data
- Interface Type:private
- Subscription topic:orders_cross.$contract_code
30、Added Cross Margin Mode Subscribe Account Equity Updates Data
- Interface Name:[Cross]Subscribe Account Equity Updates Data
- Interface Type:private
- Subscription topic:accounts_cross.$margin_account
31、Added Cross Margin Mode Subscribe Position Updates
- Interface Name:[Cross]Subscribe Position Updates
- Interface Type:private
- Subscription topic:positions_cross.$contract_code
32、Added Cross Margin Mode Subscribe Match Order Data
- Interface Name:[Cross]Subscribe Match Order Data
- Interface Type:private
- Subscription topic:matchOrders_cross.$contract_code
33、Added Cross Margin Mode Subscribe trigger orders updates
- Interface Name:[Cross]Subscribe trigger orders updates
- Interface Type:private
- Subscription topic:trigger_order_cross.$contract_code
34、Query Swap Info Added fields (added “support_margin_mode” parameter; added “support_margin_mode” in return parameter “data” to represent the margin mode that a contract supports.)
- Interface Name:Query Swap Info
- Interface Type:public
- Interface URL:linear-swap-api/v1/swap_contract_info
35、Query information on Tiered Adjustment Factor Added fields for return parameters ( added “margin_mode” to represent margin mode)
- Interface Name:Query information on Tiered Adjustment Factor
- Interface Type:public
- Interface URL:/linear-swap-api/v1/swap_adjustfactor
36、Query information on system status Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query information on system status
- Interface Type:public
- Interface URL:/linear-swap-api/v1/swap_api_state
37、Query User’s Account Information Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query User’s Account Information
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_account_info
38、Query a single sub-account's assets information Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query a single sub-account's assets information
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_sub_account_info
39、Query Assets And Positions Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query Assets And Positions
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_account_position_info
40、Query assets information of all sub-accounts under the master account Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query assets information of all sub-accounts under the master account
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_sub_account_list
41、Query User’s Position Information Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query User’s Position Information
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_position_info
42、Query a single sub-account's position information Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query a single sub-account's position information
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_sub_position_info
43、Query account financial records Added fields (added “contract_code” to represent contract code)
- Interface Name:Query account financial records
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_financial_record
44、Order details acquisition Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Order details acquisition
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_order_detail
45、Current unfilled order acquisition Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Current unfilled order acquisition
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_openorders
46、Get History Orders Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Get History Orders
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_hisorders
47、Acquire History Match Results Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Acquire History Match Results
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_matchresults
48、Query Trigger Order Open Orders Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query Trigger Order Open Orders
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_trigger_openorders
49、Query Trigger Order History Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query Trigger Order History
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_trigger_hisorders
50、Query information on Transfer Limit Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Query information on Transfer Limit
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_transfer_limit
51、Query information on position limit Added fields for return parameters ( added “margin_mode” to represent margin mode)
- Interface Name:Query information on position limit
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_position_limit
52、Query user’s available leverage Added fields for return parameters ( added “margin_mode” to represent margin mode)
- Interface Name:Query user’s available leverage
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_available_level_rate
53、Switch Leverage Added fields for return parameters ( added “margin_mode” to represent margin mode)
- Interface Name:Switch Leverage
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_switch_lever_rate
54、Subscribe Order Data Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Subscribe Order Data
- Interface Type:private
- Subscription topic:orders.$contract_code
55、Subscribe Match Order Data Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Subscribe Match Order Data
- Interface Type:private
- Subscription topic:matchOrders.$contract_code
56、Subscribe trigger orders updates Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Subscribe trigger orders updates
- Interface Type:private
- Subscription topic:trigger_order.$contract_code
57、Subscribe Position Updates Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Subscribe Position Updates
- Interface Type:private
- Subscription topic:positions.$contract_code
58、Subscribe Account Equity Updates Data Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Subscribe Account Equity Updates Data
- Interface Type:private
- Subscription topic:accounts.$contract_code
59、Subscribe Contract Info (no authentication) Added fields for return parameters ( added “support_margin_mode” to represent support margin mode)
- Interface Name:Subscribe Contract Info (no authentication)
- Interface Type:public
- Subscription topic:public.$contract_code.contract_info
60、Get Information of an Order Added fields for return parameters (added “margin_account” for return parameters to represent margin account; added “margin_mode” to represent margin mode)
- Interface Name:Get Information of an Order
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_order_info
1.0.3 2020-12-02 【Modified “Order details acquisition” interface (When querying cancelation data of orders that have not been partially filled, if “created_at” and “order_type” parameters are not uploaded, the data that can be queried reduced from last 12 hours to last 2 hours.); modified “Query history orders” interface (When querying cancelation data of orders that have not been partially filled, the data that can be retained reduced from last 24 hours to last 2 hours.)】
1、Modified “Order details acquisition” interface (When querying cancelation data of orders that have not been partially filled, if “created_at” and “order_type” parameters are not uploaded, the data that can be queried reduced from last 12 hours to last 2 hours.)
- Interface Name:Order details acquisition
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_order_detail
2、modified “Query history orders” interface (When querying cancelation data of orders that have not been partially filled, the data that can be retained reduced from last 24 hours to last 2 hours.)
- Interface Name:Get History Orders
- Interface Type:private
- Interface URL:linear-swap-api/v1/swap_hisorders
1.0.2 2020-11-24 【 Added: Query historical settlement records of the platform interface. Modified: Added fields of return parameter for "Query Liquidation Orders" interface and "Subscribe Liquidation Order Data" interface】
1、Added “Query historical settlement records of the platform” interface
- Interface Name: Query historical settlement records of the platform
- Interface Type: public
- Interface URL: linear-swap-api/v1/swap_settlement_records
2、Added fields of return parameter for "Query Liquidation Orders" interface(“amount” and “trade_turnover” are added for return parameter “data". "amount" represents the liquidation amount (token); “trade_turnover” represents the liquidation amount (quotation token) )
- Interface Name: Query Liquidation Orders
- Interface Type: public
- Interface URL: linear-swap-api/v1/swap_liquidation_orders
3、Added fields of return parameter for "Subscribe Liquidation Order Data" interface(“amount” and “trade_turnover” are added for return parameter “data". "amount" represents the liquidation amount (token); “trade_turnover” represents the liquidation amount (quotation token))
- Interface Name: Subscribe Liquidation Order Data
- Interface Type: public
- Subscription topic: public.$contract_code.liquidation_orders
1.0.1 2020-10-29 【Updated: websocket messages of account topic will be pushed when leverage switch succeeds; websocket messages of position topic will be pushed when leverage switch succeeds;】
1、Subscribe Account Equity Updates Data(Return parameters added “switch_lever_rate” event type to represent switching leverages. When the leverage is successfully switched, a latest information on assets will be pushed with event “switch_lever_rate".)
- Interface Name:Subscribe Account Equity Updates Data
- Interface Type:private
- Subscribe topic:accounts.$contract_code
2、Subscribe Position Updates(Return parameters added “switch_lever_rate” event type to represent switching leverages. When the leverage is successfully switched, a latest information on positions will be pushed with event “switch_lever_rate" (the information will not be pushed when the user's position is 0).)
- Interface Name:Subscribe Position Updates
- Interface Type:private
- Subscribe topic:positions.$contract_code
1.0.0 2020-10-26 14:00(GMT+8)
Comments
0 comments
Article is closed for comments.