Cancel All CM Open Conditional Orders
Weight: 1
Request parameters.
Cancel all active LIMIT orders on specific symbol
Weight: 1
Request parameters.
Cancel All UM Open Conditional Orders
Weight: 1
Request parameters.
Cancel all active LIMIT orders on specific symbol
Weight: 1
Request parameters.
Cancel CM Conditional Order
Either strategyId or newClientStrategyId must be sent.
Weight: 1
Request parameters.
Cancel an active LIMIT order
Either orderId or origClientOrderId must be sent.
Weight: 1
Request parameters.
Cancel Margin Account All Open Orders on a Symbol
Weight: 5
Request parameters.
Cancel Margin Account OCO Orders
Additional notes: Canceling an individual leg will cancel the entire OCO
Weight: 2
Request parameters.
Cancel Margin Account Order
Either orderId or origClientOrderId must be sent.
Weight: 2
Request parameters.
Cancel UM Conditional Order
Either strategyId or newClientStrategyId must be sent.
Weight: 1
Request parameters.
Cancel an active UM LIMIT order
Either orderId or origClientOrderId must be sent.
Weight: 1
Request parameters.
Get trades for a specific account and CM symbol.
Either symbol or pair must be sent
symbol and pair cannot be sent together
pair and fromId cannot be sent together
OrderId can only be sent together with symbol
If a pair is sent, tickers for all symbols of the pair will be returned
The parameter fromId cannot be sent with startTime or endTime
If startTime and endTime are both not sent, then the last '24 hours' data will be returned.
The time between startTime and endTime cannot be longer than 24 hours.
Weight: 20 with symbol, 40 with pair
Request parameters.
Query CM Position ADL Quantile Estimation Values update every 30s. Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to high. For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, "LONG", "SHORT", and "BOTH" will be returned to show the positions' adl quantiles of different position sides. If the positions of the symbol are crossed margined in Hedge Mode: "HEDGE" as a sign will be returned instead of "BOTH"; A same value caculated on unrealized pnls on long and short sides' positions will be shown for "LONG" and "SHORT" when there are positions in both of long and short sides.
Weight: 5
Request parameters.
Get user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off )
Weight: 30
Request parameters.
Apply for a margin loan.
Weight: 100
Request parameters.
Send in a new OCO for a margin account
Price Restrictions:
SELL: Limit Price > Last Price > Stop Price
BUY: Limit Price < Last Price < Stop Price
Quantity Restrictions:
Both legs must have the same quantity
ICEBERG quantities however do not have to be the same.
Order Rate Limit
OCO counts as 2 orders against the order rate limit.
Weight: 1
Request parameters.
Repay for a margin loan.
Weight: 100
Request parameters.
Repay debt for a margin loan.
The repay asset amount cannot exceed 50000 USD equivalent value for a single request.
If amount is not sent, all the asset loan will be repaid if having enough specific repay assets.
If amount is sent, only the certain amount of the asset loan will be repaid if having enough specific repay assets.
The system will use the same asset to repay the loan first (if have) no matter whether put the asset in specifyRepayAssets
Weight: 3000
Request parameters.
Margin Account Trade List
Weight: 5
Request parameters.
Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue
Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
Both quantity and price must be sent
When the new quantity or price doesn't satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is.
However the order will be cancelled by the amendment in the following situations:
when the order is in partially filled status and the new quantity <= executedQty
When the order is GTX and the new price will cause it to be executed immediately
Weight: 1
Request parameters.
Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue
Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent. Both quantity and price must be sent When the new quantity or price doesn't satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is. However the order will be cancelled by the amendment in the following situations: when the order is in partially filled status and the new quantity <= executedQty When the order is GTX and the new price will cause it to be executed immediately
Weight: 1
Request parameters.
New CM Conditional Order
Order with type STOP/TAKE_PROFIT, parameter timeInForce can be sent ( default GTC).
Condition orders will be triggered when:
STOP, STOP_MARKET:
BUY: "MARK_PRICE" >= stopPrice
SELL: "MARK_PRICE" <= stopPrice
TAKE_PROFIT, TAKE_PROFIT_MARKET:
BUY: "MARK_PRICE" <= stopPrice
SELL: "MARK_PRICE" >= stopPrice
TRAILING_STOP_MARKET:
BUY: the lowest mark price after order placed <= activationPrice, and the latest mark price >= the lowest mark price * (1 + callbackRate)
SELL: the highest mark price after order placed >= activationPrice, and the latest mark price <= the highest mark price * (1 - callbackRate)
For TRAILING_STOP_MARKET, if you got such error code. {"code": -2021, "msg": "Order would immediately trigger."} means that the parameters you send do not meet the following requirements:
BUY: activationPrice should be smaller than latest mark price.
SELL: activationPrice should be larger than latest mark price.
Condition orders will be triggered when:
If parameterpriceProtectis sent as true:
when price reaches the stopPrice ,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol
"triggerProtect" of a symbol can be got from GET /fapi/v1/exchangeInfo
STOP, STOP_MARKET:
BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
TAKE_PROFIT, TAKE_PROFIT_MARKET:
BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
Weight: 1
Request parameters.
Place new CM order
If newOrderRespType is sent as RESULT :
MARKET order: the final FILLED result of the order will be return directly.
LIMIT order with special timeInForce: the final status result of the order(FILLED or EXPIRED) will be returned directly.
Weight: 1
Request parameters.
New Margin Order
Weight: 1
Request parameters.
Place new UM conditional order
Order with type STOP/TAKE_PROFIT, parameter timeInForce can be sent ( default GTC).
Condition orders will be triggered when:
STOP, STOP_MARKET:
BUY: "MARK_PRICE" >= stopPrice
SELL: "MARK_PRICE" <= stopPrice
TAKE_PROFIT, TAKE_PROFIT_MARKET:
BUY: "MARK_PRICE" <= stopPrice
SELL: "MARK_PRICE" >= stopPrice
TRAILING_STOP_MARKET:
BUY: the lowest mark price after order placed <= activationPrice, and the latest mark price >= the lowest mark price * (1 + callbackRate)
SELL: the highest mark price after order placed >= activationPrice, and the latest mark price <= the highest mark price * (1 - callbackRate)
For TRAILING_STOP_MARKET, if you got such error code. {"code": -2021, "msg": "Order would immediately trigger."} means that the parameters you send do not meet the following requirements:
BUY: activationPrice should be smaller than latest mark price.
SELL: activationPrice should be larger than latest mark price.
Condition orders will be triggered when:
If parameterpriceProtectis sent as true:
when price reaches the stopPrice ,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol
"triggerProtect" of a symbol can be got from GET /fapi/v1/exchangeInfo
STOP, STOP_MARKET:
BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
TAKE_PROFIT, TAKE_PROFIT_MARKET:
BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
selfTradePreventionMode is only effective when timeInForce set to IOC or GTC or GTD.
In extreme market conditions, timeInForce GTD order auto cancel time might be delayed comparing to goodTillDate
Weight: 1
Request parameters.
Place new UM order
If newOrderRespType is sent as RESULT :
MARKET order: the final FILLED result of the order will be return directly.
LIMIT order with special timeInForce: the final status result of the order(FILLED or EXPIRED) will be returned directly.
selfTradePreventionMode is only effective when timeInForce set to IOC or GTC or GTD.
In extreme market conditions, timeInForce GTD order auto cancel time might be delayed comparing to goodTillDate
Weight: 1
Request parameters.
Query All CM Conditional Orders
These orders will not be found:
order strategyStatus is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 7 days < current time
The query time period must be less than 7 days( default as the recent 7 days).
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Request parameters.
Get all account CM orders; active, canceled, or filled.
Either symbol or pair must be sent.
If orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.
These orders will not be found:
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 3 days < current time
Weight: 20 with symbol, 40 with pair
Request parameters.
Get all open conditional orders on a symbol. Careful when accessing this with no symbol.
If the symbol is not sent, orders for all symbols will be returned in an array.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Request parameters.
Get all open orders on a symbol.
If the symbol is not sent, orders for all symbols will be returned in an array.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no symbol.
Request parameters.
Get all open conditional orders on a symbol.
If the symbol is not sent, orders for all symbols will be returned in an array.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no symbol.
Request parameters.
Get all open orders on a symbol.
If the symbol is not sent, orders for all symbols will be returned in an array.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Request parameters.
Query All Margin Account Orders
Weight: 100
Request parameters.
Query All UM Conditional Orders
These orders will not be found:
order strategyStatus is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 7 days < current time
The query time period must be less than 7 days( default as the recent 7 days).
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Request parameters.
Get all account UM orders; active, canceled, or filled.
These orders will not be found:
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 3 days < current time
If orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.
The query time period must be less then 7 days( default as the recent 7 days).
Weight: 5
Request parameters.
Query CM Conditional Order History
Either strategyId or newClientStrategyId must be sent.
NEW orders will not be found.
These orders will not be found:
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 7 days < current time
Weight: 1
Request parameters.
Get order modification history
Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
Weight: 1
Request parameters.
Check an CM order's status.
Either orderId or origClientOrderId must be sent.
These orders will not be found:
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 3 days < current time
Weight: 1
Request parameters.
Query Current CM Open Conditional Order
Either strategyId or newClientStrategyId must be sent.
If the queried order has been triggered, cancelled or expired, the error message "Order does not exist" will be returned.
Weight: 1
Request parameters.
Query current CM open order
Either orderId or origClientOrderId must be sent.
If the queried order has been filled or cancelled, the error message "Order does not exist" will be returned.
Weight: 1
Request parameters.
Query Current Margin Open Order
Weight: 5
Request parameters.
Query Current UM Open Conditional Order
Either strategyId or newClientStrategyId must be sent.
If the queried order has been CANCELED, TRIGGERED或EXPIRED, the error message "Order does not exist" will be returned.
Weight: 1
Request parameters.
Query current UM open order
Either orderId or origClientOrderId must be sent.
If the queried order has been filled or cancelled, the error message "Order does not exist" will be returned.
Weight: 1
Request parameters.
Query Margin Account Order
Weight: 10
Request parameters.
Query all OCO for a specific margin account based on provided optional parameters
Weight: 100
Request parameters.
Retrieves a specific OCO based on provided optional parameters
Weight: 5
Request parameters.
Query Margin Account's Open OCO
Weight: 5
Request parameters.
Query UM Conditional Order History
Either strategyId or newClientStrategyId must be sent.
NEW orders will not be found.
These orders will not be found:
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 7 days < current time
Weight: 1
Request parameters.
Get order modification history
Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
Weight: 1
Request parameters.
Check an UM order's status.
These orders will not be found:
Either orderId or origClientOrderId must be sent.
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 3 days < current time
Weight: 1
Request parameters.
Query User's CM Force Orders
If "autoCloseType" is not sent, orders with both of the types will be returned If "startTime" is not sent, data within 7 days before "endTime" can be queried
Weight: 20 with symbol, 50 without symbol
Request parameters.
Query user's margin force orders
Weight: 1
Request parameters.
Query User's UM Force Orders
If autoCloseType is not sent, orders with both of the types will be returned
If startTime is not sent, data within 7 days before endTime can be queried
Weight: 20 with symbol, 50 without symbol
Request parameters.
Change user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) on EVERY symbol
The BNB would not be collected from UM-PM account to the Portfolio Margin account.
Weight: 1
Request parameters.
Get trades for a specific account and UM symbol.
If startTime and endTime are both not sent, then the last '7 days' data will be returned.
The time between startTime and endTime cannot be longer than 7 days.
The parameter fromId cannot be sent with startTime or endTime.
Weight: 5
Request parameters.
Query UM Position ADL Quantile Estimation
Values update every 30s. Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to high. For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, "LONG", "SHORT", and "BOTH" will be returned to show the positions' adl quantiles of different position sides. If the positions of the symbol are crossed margined in Hedge Mode: "HEDGE" as a sign will be returned instead of "BOTH"; A same value caculated on unrealized pnls on long and short sides' positions will be shown for "LONG" and "SHORT" when there are positions in both of long and short sides.
Weight: 5
Request parameters.
TradeApi - object-oriented interface TradeApi