Skip to main content

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)#


Request Parameters#

symbolSTRINGYESTrading symbol eg. BTCUSDT
sideENUMYESTrading side ( BUY or SELL )
positionSideENUMNODefault BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.
quantityDECIMALYESQuantity 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
durationLONGYESDuration for TWAP orders in seconds. [300, 86400]
clientAlgoIdSTRINGNOA unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value
reduceOnlyBOOLEANNO"true" or "false". Default "false"; Cannot be sent in Hedge Mode; Cannot be sent when you open a position
limitPriceDECIMALNOLimit price of the order; If it is not sent, will place order by market price by default

Other Info:

  • Total Algo open orders max allowed: 10 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 or GET 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 be expired after we check it.
  • quantity * 60 / duration should be larger than minQty
  • duration 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:

Response Example#

{    "clientAlgoId": "65ce1630101a480b85915d7e11fd5078",    "success": true,    "code": 0,    "msg": "OK"}