Time-Weighted Average Price (TWAP) orders are suitable for all perpetual futures trading (including USDT-M and BTC-M contracts). TWAP orders calculate the optimal order placement and execution times based on preset parameters. Let’s take an example.
Web Version
1. Place Order
Step 1: Select the contract to be traded on the trading page and click on “TWAP” in the order area.
Step 2: Create your TWAP order according to the following parameters.
- Position Mode: Ensure the position mode preference of the selected contract is consistent.
- Total: Enter the total amount of the order, or use the percentage indicator bar to quickly set the order amount and the proportion of the available margin in the account.
- Duration: Set the duration for the TWAP order to run, ranging from 5 minutes to 24 hours, or choose from quick preset options: 10 minutes, 30 minutes, 1 hour, or 4 hours.
- Time Interval: Select the frequency of order placement, with options ranging from 10 seconds to 120 seconds.
- Reduce-Only: It is only applicable for perpetual futures trades in one-way mode. In hedge mode, for closing orders, traders can switch to the “Close” tab to create a TWAP order.
- Advanced Options: Click “Advanced Options” to set the start conditions and order price preferences for the TWAP order.
Step 3: Double check all the order information you have entered.
2. View / Cancel Orders
After a successful order placement, you can view current unfilled TWAP orders in the “Open Orders” - “TWAP” on the trading page. Orders that have been fully filled or canceled can be viewed in the “Order History”. You can also click the “Details” button to view TWAP order details.
To cancel an order, you can click the “Cancel” button next to the order in the “Open Orders” .
3. Query Historical Order Records
Completed or canceled TWAP orders will be displayed in the “Order History”, where you can view historical order records. You can also click the “Details” button to view detailed information about TWAP orders.
4. TWAP Order Details
TWAP orders that are pending activation, active or terminated all support viewing detailed information. You can click the corresponding “Details” button for TWAP orders under “Open Orders” or “Order History” to display a popup with detailed information. This popup allows you to view the order status, parameter info, and transaction details of the TWAP order.
App Version
1. Place Order
Step 1: Select the contract to be traded on the trading page and tap to expand more order types in the order placement area, then select “TWAP.”
Step 2: Create your TWAP order according to the following parameters.
- Position Mode: Ensure the position mode preference of the selected contract is consistent.
- Total: Enter the total amount of the order, or use the percentage indicator bar to quickly set the order amount and the proportion of the available margin in the account.
- Duration: Set the duration for the TWAP order to run, ranging from 5 minutes to 24 hours, or choose from quick preset options: 10 minutes, 30 minutes, 1 hour, or 4 hours.
- Time Interval: Select the frequency of order placement, with options ranging from 10 seconds to 120 seconds.
- Reduce-Only: It is only applicable for perpetual futures trades in one-way mode. In hedge mode, for closing orders, traders can switch to the “Close” tab to create a TWAP order.
- Advanced Options: Tap “Advanced Options” to set the start conditions and order price preferences for the TWAP order.
Step 3: Double check all the order information you have entered.
2. View / Cancel Orders
After a successful order placement, you can view pending activation or active orders in the “Open Orders” - “TWAP” at the bottom of the trading page. Orders that have been fully filled or canceled can be viewed in the “Order History.” You can also check the filled parts in “My Trades.”
To cancel an order, you can tap the “Cancel” button next to the order in the “Open Orders”.
3. Query Historical Order Records
Completed or canceled TWAP orders will be displayed in the “Order History”. You can tap the bill icon on the right of “Open Orders” at the bottom of the trading page to view historical orders. Below is an illustration of the TWAP order history info:
4. TWAP Order Details
TWAP orders that are pending activation, active or terminated all support viewing detailed information. You can tap TWAP orders in Open Orders or Order History to access the details page to view order status, parameter information and transaction details.
About Advanced Options
Price Var.
You can select Var. or Ratio to set the order price for small orders.
The maximum value for Var. is 1% of the last price on the order book, and the maximum value for Ratio is 1%.
The specific formula is as follows:
Set by Var. | Set by Ratio |
---|---|
Bid Price = Last Lowest Ask Price (Sell 1) + Var. | Bid Price = Last Lowest Ask Price (Sell 1) x (1+Ratio) |
Ask Price = Last Highest Bid Price (Buy 1) - Var. | Ask Price = Last Highest Bid Price (Buy 1) x (1-Ratio) |
Activation Price
For buy orders, a TWAP order will be activated when the last price falls to the activation price or below.
For sell orders, a TWAP order will be activated when the last price rises to the activation price or above.
Time Interval
Taking 2 minutes as an example, after placing the previous order, the next order can only be placed after 2 minutes. The range for the order interval is [10, 120] seconds.
Amount Per Order
Amount per order is used to determine the order amount for each small order.
Calculation Formula: Amount Per Order = Total Order Amount / (Duration x Time Interval)
Note: Both the total duration and the order time interval units are in seconds (s).
Example
1. Set the basic parameters only.
If Ming wants to buy 1 BTC in 5 minutes, TWAP order is the best choice. He set the duration to 5 minutes and the total amount to 1 BTC.
The system will place multiple IOC orders based on the lowest ask price (sell 1 price) until 1 BTC is fully purchased or the order duration reaches 5 minutes.
2. Set the advanced options.
Ming sets a total of 3 BTC for 1 hour the second time. Also set the following conditions:
Total amount of 3 BTC
Duration of 1 hour
Time interval of 120 seconds
Activation price of 30,320 USDT
Var. of 0.2%
Currently, the last price of BTC is 30,311 USDT, which is lower than 30,320 USDT, so the order is directly activated.
The TWAP order will be executed every 120 seconds with 0.1 BTC, as follows:
The first limit order amount is 0.1 BTC. If the sell 1 price is 30,318, then the order price is 30,318 x (1 + 0.2%) = 30,378.6 USDT. All sell orders below 30,378.6 USDT can be bought at the order price of 30,378.6 USDT. Assuming 0.05 BTC is traded and there is 0.05 BTC still unfilled.
The second limit order amount is 0.1 + 0.05 (unfilled portion of the previous order) = 0.15 BTC, with the last sell 1 price as the order price x (1 + 0.2%), and the placement time is 2 minutes after the first order.
……
The thirtieth limit order amount is 0.1 + unfilled portion of the twenty-ninth order, with the last sell 1 price as the order price x (1 + 0.2%), and the placement time is 2 minutes before the end. Orders will stop being placed after the time ends.
Gate.io reserves the final right to interpret the product.