Gate|12月 18, 2025 11:54
Gate Announcement on the Change of Order Quantity Field Type and Function Launch Plan for USDT Perpetual Contract
Gate USDT perpetual contract orders support decimals - explanation for changes in field types
To enhance the flexibility of contract trading and fully support placing orders with small numbers of sheets, Gate will upgrade the interfaces related to USDT perpetual contracts in stages. This upgrade will affect the parsing logic of fields related to order size in REST API and WebSocket. Please evaluate and adjust the strategy logic in advance according to the stage plan to ensure that your trading is not affected.
1.1 Upgrade Plan Description (Overall Divided into 3 Stages)
Stage 1: Field type compatibility upgrade (launched on December 9, 2025):
The underlying data structure adjustment has been completed.
The field types related to the number of contracts have been upgraded from Integer to String.
Currently in compatibility mode, the X-Gate-Size-Decimal field is passed into the request header to achieve compatibility processing of the contract number field.
The setting method is as follows:
|Header Parameters | Description | Remarks|
| :--- | :--- | :--- |
|X-Gate-Size-Decimal=1 | Change the field type related to the number of sheets from Integer to String | 1. Support receiving and responding to String types; This stage does not support decimals|
|X-Gate-Size-Decimal=0 or not using this header field defaults to not using this field | Number of sheets related field type is Integer | 1. Does not support receiving decimal data 2. Precision processing - rounded down|
If the header (X-Gate-Size-Decimal) field is not set, by default, the size field will still return Integer type for receiving and responding
Stage 2: The ability to place orders with a small number of sheets has been launched
1. It is planned to launch the system capability for placing orders with a small number of USDT perpetual contracts on December 30, 2025. At this stage, only the underlying capabilities and interface support will be completed, and no contract market will be opened for actual support of placing orders with a small number of contracts. The actual ordering rules for users will remain unchanged.
Starting from the end of January 2026, the contract market will gradually open up to support the function of placing orders with a small number of sheets. The specific opening of the market and time will be subject to the platform's subsequent announcements.
3. After the decimal order function is opened in the contract market, users who still use the old field type and are not adapted may encounter:
Abnormal accuracy analysis of market depth
Inconsistent order accuracy
Abnormal accuracy of transaction orders
Therefore, all API users are reminded to complete field type adaptation as much as possible before the end of January 2026
Stage 3: Comprehensive market support+comprehensive switching of fields to String type
-We will fully open up the ability to place orders with a small number of sheets for all contract transactions.
-At a fixed time, the system will default to returning a String type and adjust the default value of the header (X-Gate-Size Decoder). The default parsing behavior will switch from 0 to 1, providing a brief transition period for users who have not yet completed the adaptation.
-After the transition period ends, the X-Gate-Size-Decimal header request header field will be officially abandoned and its configuration will no longer be effective.
-All fields related to the number of orders will use the String type uniformly. To ensure accuracy and compatibility, the old type Integer will no longer be supported.
-The specific effective time will be notified in advance through official announcements, please make sure to complete the adaptation in advance.
1.2 Phase 1 Upgrade Details
1. Rest and Websocket have added header fields X-Gate-Size-Decimal to control the accuracy of fields related to the number of sheets
|Header parameters | Description | Remarks|
| :--- | :--- | :--- |
|X-Gate-Size-Decimal=1 | Change the field type related to the number of sheets from Integer to String | 1 Support receiving and responding to String types; This stage does not support decimals|
|X-Gate-Size-Decimal=0 or not using this header field defaults to not using this field | Number of sheets related field type is Integer | 1. Does not support receiving decimal data 2. Precision processing - rounded down|
Suggestion: The client should adjust the number of contract sheets and change the field type in a timely manner. Once the contract supports decimal trading function for placing orders, it can be quickly experienced and used.
2. Set header reference example
Rest
```
Set request headers
headers =
{
'KEY': API_KEY,
'Timestamp': timestamp,
'SIGN': signature,
'X-Gate-Size-Decimal' : '1' , Enable decimal sheets
'Content-Type': 'application/json',
'Accept': 'application/json'
}
```
Websocket
```
Set request headers
Enable decimal sheets
headers[' X-Gate-Size-Decimal '] = '1'
```
1.3 Interface for changing the number of contract sheets and field types (please compare in detail)
1. Rest related fields
|Interface Type | Interface | Field | Remarks|
| :--- | :--- | :--- | :--- |
|Public | 1. Query all contract information GET/futures/settle/contracts2. Query individual contract information GET/futures/settle/contracts/contract | Minimum order quantity order_stize_min Maximum order quantity order_stze_max Historical cumulative transaction trade_Size Current long user total position position_Size | 1. Use header field X-Gate-Size Decimal=1. The above field type will be changed from Integer type to String type 2 The client needs to adjust the receiving type of the field|
|Public | 1. Query contract market depth information GET/futures/set/order-book | Quantity s ||
|Public | 1. Query contract market transaction records GET/futures/set/trades | Transaction quantity size ||
|Public | 1. Query contract market K-line GET/futures/set/handlesticks | Trading volume (number of sheets) v ||
|Public | 1. Querying contract statistics GET/futures/set/contract_stats | Long short position (Zhang) long_iq_Size Short short position (Zhang) short_iq_Size Total position (Zhang) open_interest Large long short position ratio top_1sr_Size Large long position (Zhang) top_1ng_Size Large short position (Zhang) top_sthort_size Long position (Zhang) long_taker_size Short position (Zhang) short_taker_size ||
|Public | 1. Query historical data of forced liquidation GET/futures/set/liq_orders | Position size, forced liquidation order quantity, ordersize, system forced liquidation order size, left ||
|Private | 1. Query the user's position list GET/futures/settle/positions2. Get individual position information GET/futures/settle/positions/contract3. Update position margin POST/futures/settle/positions/contract/markin4. Update position leverage POST/futures/settle/positions/contract/everage5. Switch to full position mode POST/futures/settle/positions/cross_comode 6. Switch to full position mode POST/futures/settle/dual-comp/positions/cross_comode in dual position mode 7. Update position risk limit POST/futures/settle/positions/contract/risk_imit8. Set position mode POST/futures/settle/cross_comode Get the position information in dual position mode GET/futures/settle/duale_comp/positions/contract10. Update the margin POST/futures/settle/duale_comp/positions/contract1 in dual position mode Update the leverage POST/futures/set/duale_comp/positions/contract/everyone in dual position mode. 12. Update the risk limit POST/futures/set/duale_comp/positions/contract/risk_imit | Position size ||
|Private | 1. Contract order transaction POST/terms/settle/orders 2. Query contract order list GET/terms/settle/orders 3. Batch cancel pending orders DELETE/terms/settle/orders 4. Query contract order list (time interval) GET/terms/settle/order_timerange 5. Contract transaction batch order POST/terms/settle/batch_orders 6. Query individual order details GET/terms/settle/orders/order_id 7. Cancel individual order DELETE/terms/settle/orders/order_id 8. Modify individual order PUT/terms/settle/orders/order_id 9. Position bbo Contract order POST/out ures/small/bbo-orders | Transaction quantity size Iceberg order display quantity Iceberg unfilled quantity left ||
|Private | 1. Search for personal transaction records GET/futures/set/my_trades2. Search for personal transaction records (time interval) GET/futures/set/my_trades_time range | Transaction quantity size Close quantity ||
|Private | 1. Query Closing Position GET/futures/set/position_close | Maximum Open Position Max_Size Accumulated Closing Position Accum_Size ||
|Private | 1. Query forced liquidation history GET/futures/set/guides | Position quantity size Strong liquidation order size Left ||
|Private | 1. Query ADL automatic reduction order information GET/futures/set/auto_deleveages | Transaction quantity trade_Size Position size after automatic reduction ||
|Private | 1. Query the automatic order list GET/options/set/price_orders2. Cancel all automatic orders DELETE/options/set/price_orders3. Query individual automatic order information GET/options/set/price_orders/order_id 4. Cancel individual automatic orders DELETE/options/set/price_orders/order_id 5. Modify individual automatic orders PUT/options/set/price_order_id | Add number of sheets field amount string type ||
2. Websocket related fields
|Channel type | Channel | Return field | Remarks|
| :--- | :--- | :--- | :--- |
|Public | 1. Public Trading Channel futures. trades | Transaction Quantity Size | 1. Use header field X-Gate-Size-Decimal=1. The above field type will be changed from Integer to String. 2. The client needs to adjust the receiving type of the field|
|Public | 1. ticker channel futures. tickets | total quantity totaled | size ||
|Public | 1. BBO Channel futures.book_ticker | Number of Best Sellers A Number of Best Buyers B ||
|Public | 1. In depth update channel futures.order_fook_uUpdate | The number of pending transactions in the seller's position a. s The number of pending transactions in the buyer's position b. s ||
|Public | 1. Full depth channel futures.order-book | Seller's pending transaction quantity a. s Buyer's pending transaction quantity b. s ||
|Public | 1. DeepV2 channel futures.obu | [price, size] size may push decimals ||
|Public | 1. K-line channel futures. handlesticks | Volume v ||
|Public | 1. Public Strong Leveling Channel futures. public_stiquidates | Strong Leveling Order Quantity Size ||
|Public | 1. Contract Statistics Data Channel futures.contract_stats | Long Sell Out Volume (in Zhang), Long Sell Out Volume (in Zhang), Short Sell Out Volume (in Zhang), Short Sell Out Volume (in Zhang), Total Position (in Zhang), Open-INterest ||
|Private | 1. Order Channel Futures. Orders | Iceberg Order Display Quantity Iceberg Remaining Tradeable Quantity Left Order Quantity Size ||
|Private | 1. Private transaction channel futures. usertrades | Transaction quantity size ||
|Private | 1. ADL channel futures.auto_deleverages | Position size | Trading size ||
|Private | 1. Position Channel Futures. Positions | Position Quantity Size ||
|Private | 1. Price triggers order channel futures.autorders | position_strade_Size ||
|Private | 1. Strong Leveling Order Channel Futures. Liquidates | Remaining Tradeable Quantity Left Position Quantity Size ||
|Private | 1. Order futures.order_place 2. Batch order futures.order_match_place 3. Cancel futures.order_cancel4. Batch cancel futures.order_cancelcp5 based on id 5. Change futures.orders_amend6. Query order list futures.orders_list 7. Query order details futures.order_status | Order quantity size remaining tradable quantity left Iceberg order display quantity ||
1.4 Querying contract information that supports decimal ordering
1. Set header: X-Gate-Size-Decimal=1
2. Request contract information interface
```
curl --location ' https://api.gateio.ws/api/v4/futures/usdt/contracts ' \\
--header 'X-Gate-Size-Decimal: 1'
```
3. If the return field order_steze_min is a decimal, it means that the contract supports placing orders with decimal numbers.
1.5 Further explanation
API update log: https://www. (gate.com)/docs/developers/apiv4/zh_CN/ changelog
If you have any questions, please contact API technical support or refer to the API documentation. Thank you for your support and understanding.
Gate team
December 18th, 2025
Share To
Timeline
HotFlash
APP
X
Telegram
CopyLink