Time-Weighted Average Price(Twap) New Order(TRADE)
API Description
Send in a Twap new order. Only support on USDⓈ-M Contracts.
HTTP Request
POST /sapi/v1/algo/futures/newOrderTwap
Request Weight(UID)
3000
Request Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | Trading symbol eg. BTCUSDT |
side | ENUM | YES | Trading side ( BUY or SELL ) |
positionSide | ENUM | NO | Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. |
quantity | DECIMAL | YES | Quantity of base asset; The notional (quantity * mark price(base asset) ) must be more than the equivalent of 1,000 USDT and less than the equivalent of 1,000,000 USDT |
duration | LONG | YES | Duration for TWAP orders in seconds. [300, 86400] |
clientAlgoId | STRING | NO | A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value |
reduceOnly | BOOLEAN | NO | "true" or "false". Default "false"; Cannot be sent in Hedge Mode; Cannot be sent when you open a position |
limitPrice | DECIMAL | NO | Limit price of the order; If it is not sent, will place order by market price by default |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Other Info:
- Total Algo open orders max allowed:
30
orders.- Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi.
- Receiving
"success": true
does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders
orGET sapi/v1/algo/futures/historicalOrders
) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive"success": true
, but the order status will beexpired
after we check it.quantity
* 60 /duration
should be larger than minQtyduration
cannot be less than 5 mins or more than 24 hours.- For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol.
- You need to enable
Futures Trading Permission
for the api key which requests this endpoint.- Base URL: https://api.binance.com
Response Example
{
"clientAlgoId": "65ce1630101a480b85915d7e11fd5078",
"success": true,
"code": 0,
"msg": "OK"
}