HTX Futures Retail Price Improvement Program (RPI Orders)

20.09 14:42:11 (UTC+3)Посібники з ф'ючерсів USDT-M

Overview

The HTX Retail Price Improvement Program is a mechanism designed to achieve a win-win outcome for market makers and retail traders through RPI orders.

The program provides an order type (RPI order) that matches exclusively with non-algorithmic orders, protecting maker orders from being preempted by algorithmic orders and maintaining market fairness. At the same time, it offers traders more abundant market liquidity and better execution prices.

 

I. What Is an RPI Order?

An RPI order is a special limit order that can only be submitted via OpenAPI by whitelisted market makers. It features four core characteristics:

  • Targeted Matching: Matches exclusively with non-algorithmic orders submitted via the App and Web interfaces. It does not match with API orders (including other RPI orders) or grid bot orders.
  • Lowest priority: At the same price level, RPI orders will only participate in matching after all non-RPI orders have been executed.
  • Maker Only: These are passive limit orders that always provide liquidity to the order book, never taking liquidity.
  • Visibility Difference: Displayed normally on the App and Web interfaces; invisible in the public API order book.

 

II. Who Can Submit RPI Orders?

RPI orders can only be submitted via OpenAPI by approved, whitelisted market makers, and are strictly restricted to whitelisted trading pairs.

  • The following message is displayed when non-whitelisted accounts submit an RPI order: Your account is not authorized to place RPI orders.
  • If RPI is not enabled for futures trading, the following message is displayed: This futures pair does not support RPI orders.
  • If the RPI function is disabled on the platform, the following message is displayed: The RPI function is currently disabled.

 

III. How to Submit RPI Orders?

RPI orders can only be submitted via OpenAPI, supporting both REST and WebSocket methods. When placing an order, the order type (type) must be set to a limit order, and the time_in_force field must be set to rpi. All other parameters remain identical to standard limit orders.

 

REST Method

All Futures V5 order placement endpoints support RPI orders (the type must be limit). Simply set the time_in_force field to rpi in addition to the existing request parameters:

  • Futures Order Placement: POST /v5/order
  • Batch Order Placement: POST /v5/batch-order

Request example (key fields only; please refer to the Futures Order Placement API documentation for complete parameters):

{

"contract_code": "BTC-USDT",

"type": "limit",

"direction": "buy",

"price": "50000",

"vol": "1",

"time_in_force": "rpi"

}

 

WebSocket Method

The WebSocket (WS) trading channels also support RPI order placement, using the same parameters as the REST API:

  • Futures Order Placement: Channel place_order
  • Batch Order Placement: Channel place_batch_orders

Common Error Messages

Error Message

Trigger

Your account is not authorized to place RPI orders.

A non-whitelisted account attempts to place an RPI order

This futures pair does not support RPI orders.

RPI is not enabled for this futures product (enable_rpi=false)

The RPI function is currently disabled.

The RPI global switch is disabled on the platform

The RPI order type must be limit.

The type is not set to limit when an RPI order is placed.

Which Futures Trading Pairs Support RPI Orders?

Call the futures information endpoint GET /linear-swap-api/v1/swap_contract_info. Each futures pair in the response includes an enable_rpi field (Boolean). A value of true indicates that RPI support is enabled for the futures pair, while a value of false indicates that it is not supported.

Response Example (key fields only):

{

"status": "ok",

"data": [

{

"contract_code": "BTC-USDT",

"enable_rpi": true

},

{

"contract_code": "ETH-USDT",

"enable_rpi": false

}

]

}

If an RPI order request is submitted for a futures trading pair that does not support RPI, the system will return the error message "This futures pair does not support RPI orders".

 

IV. Matching Scope

Orders That Can Be Matched with RPI Orders

  • Source: APP / Web interface
  • Type: Manually submitted, non-algorithmic orders

 

Orders Not Eligible for RPI Matching

  • All API orders (including other RPI orders)
  • Grid bot orders

 

V. Trading Rules

Rule Item

Description

Supported Products

USDT-M perpetuals

Order Mechanism

Identical to standard limit orders (same margin requirements, minimum/maximum order sizes, and price limits)

Supported Operations

Batch order placement, modification (price/quantity), cancellation, batch order cancellation, and partial order execution

Incompatibility

Cannot be combined with conditional orders (TP/SL, trigger order, etc.)

Price Limit

At order placement, orders cannot cross the price of non-RPI orders on the opposite side; otherwise, they will be canceled

Price Limit Example

  • Submitting an RPI buy order at a price of 64,900 → Accepted.
  • Submitting an RPI buy order at a price of 65,020 → Rejected, as it crosses the non-RPI order at Ask 2 (price 65,020).

Level

Price

Quantity

Ask 2

65,020

25

Ask 1

65,000 (RPI)

15

Bid 1

64,900 (RPI)

10

Bid 2

64,880

20

VI. Order Visibility

Module

Scenario

Description

Order Book

APP / Web

RPI orders are displayed normally without special tags; automatically hidden when prices cross. Hidden orders remain active in the matching engine and can be executed when conditions are met.

OpenAPI

Not visible.

Personal Order History

APP / Web

Market makers can view RPI orders and the "RPI" tag in current and historical order records; regular users' orders show no special tags.

OpenAPI

RPI orders are displayed normally and can be distinguished from regular orders.

 

VII. Fee Structure

RPI orders are subject to an exclusive RPI maker fee rate, which replaces the market maker's original maker fee rate. Non-RPI orders continue to be charged at the original fee rate.

The exclusive RPI fee rate can be queried via the endpoint GET /linear-swap-api/v1/swap_fee. A new rpi_fee_rate field is added to the response parameters, representing the current effective RPI maker fee rate. If RPI does not apply to the futures pair, an empty string is returned. Alternatively, you may consult the HTX Market Maker Operations team directly.

 

VIII. API Endpoint and Data Stream Updates

To support the futures RPI order mechanism, existing endpoints have been adjusted according to the following rules.

Futures Basic Information (REST)

Endpoint Name

HTTP Request

Description of Changes

Futures Information

GET /linear-swap-api/v1/swap_contract_info

The response parameters include a new enable_rpi (Boolean) field indicating whether the futures pair supports RPI orders.

Order Placement and Query Endpoints (REST)

Endpoint Name

HTTP Request

Description of Changes

Place Futures Orders

POST /v5/order

A new enumerated value rpi is added to the request parameter time_in_force.

Place Batch Orders

POST /v5/batch-order

A new enumerated value rpi is added to the request parameter time_in_force.

Query Current Open Orders

GET /v5/trade/order/opens

A new value rpi is added to the response field time_in_force.

View Order History

GET /v5/trade/order/history

A new value rpi is added to the response field time_in_force. In addition, cancel_reason now includes a new cancellation reason: RPI order prices cannot cross non-RPI order prices.

Query Order Details

GET /v5/trade/order

A new value rpi is added to the response field time_in_force. In addition, cancel_reason now includes a new cancellation reason: RPI order prices cannot cross non-RPI order prices.

Order Push (WebSocket)

Channel

Description

Description of Changes

orders.$contract_code

Order update push

A new value rpi is added to the time_in_force field, allowing RPI orders to be distinguished from regular orders in real time. In addition, cancel_reason now includes a new cancellation reason: RPI order prices cannot cross non-RPI order prices.

match_orders.$contract_code

Trade details push

A new value rpi is added to the time_in_force field. In addition, cancel_reason now includes a new cancellation reason: RPI order prices cannot cross non-RPI order prices.

REST Market Data

Endpoint Name

HTTP Request

Description of Changes

Order Book Depth

GET /linear-swap-ex/market/depth

Adds an optional parameter include_rpi (Boolean, default false). When set to true, the response includes RPI order book depth. When set to false, the behavior remains the same as the existing endpoint.

Best Price Level

GET /linear-swap-ex/market/bbo

RPI orders are not included, and no changes are required. To obtain the best price levels including RPI orders, use GET /linear-swap-ex/market/depth?include_rpi=true to retrieve the top-level data.

Merged Details

GET /linear-swap-ex/market/detail/merged

Order book depth does not include RPI orders, whereas trade data includes RPI orders.

Batch Merged Details

/v2/linear-swap-ex/market/detail/batch_merged

Order book depth does not include RPI orders, whereas trade data includes RPI orders.

Candlestick (K-Line) Data

GET /linear-swap-ex/market/history/kline

No structural changes; RPI executions are factored into the metrics normally.

Recent Market Trades

GET /linear-swap-ex/market/trade

The response for each trade adds an is_rpi_trade (Boolean) field; true indicates the execution was generated by an RPI order.

Recent Trade History

GET /linear-swap-ex/market/history/trade

Same as above, with the addition of the is_rpi_trade field

Futures Fee Rate Query

GET /linear-swap-api/v1/swap_fee

A new rpi_fee_rate field is added to the response parameters.

WebSocket Market Data Stream

Channel

Includes RPI Orders

Description

market.$contract_code.bbo

No

Best price level push; RPI orders are not included.

market.$contract_code.depth.$type

No

Market depth push; RPI orders are not included.

market.$contract_code.full_depth.$type

Yes (New)

Adds a new push channel to aggregate RPI orders. The protocol is consistent with the depth channel, allowing market makers to independently subscribe to full depth data including RPI.

market.$contract_code.depth.size_${size}.high_freq

No

Incremental depth push; RPI orders are not included.

market.$contract_code.kline.$period

—

K-line push; RPI executions are factored into the metrics normally.

market.$contract_code.detail

—

Merged details push; RPI executions are factored into the metrics normally.

market.$contract_code.trade.detail

—

Trade details push; RPI executions are factored into the metrics normally; a new is_rpi_trade field is added to identify RPI executions.

 

HTX Team

September 20, 2026