🎯How do the limit orders work?

A Limit Order allows users to automatically open or close a position at a specified price within a set period of time.

When the market price reaches the trigger condition you set, the system will automatically execute your order — creating a true “set-and-forget” trading experience.

💡 Important:

As always in DeFi, a limit order is not guaranteed to execute.

Keepers will only execute your order when the market price is sufficient to cover both your limit price and network fees.

Therefore, your order may not execute immediately when the price first reaches your limit level.

1. Before You Start

  • No gas fees are required to place an order. Gas is only required in case of cancelling your currents orders.

  • Opening orders currently only accept fxUSD as base asset, use your favorite DEX aggregator to get some.

  • You only need to authorize fxUSD and, if applicable, your position NFT.

Looking at automating the limit orders? Look at the developpers doc.

2. Order Parameters

Parameter

Description

Pay

Amount of fxUSD to be used for opening or adding to a position.

Amount

Amount of collateral to be sold when closing or reducing a position.

Limit Price

The price at which the limit order will be executed.

Limit Type

For closing orders, choose Take Profit or Stop Loss.

Trigger Price

The trigger price is calculated automatically based on Limit Price and Slippage, but can be edited manually.

Partial Fill

Whether to allow partial order execution. Recommended for large orders so multiple Keepers can fill portions of it.

Expiration

Order validity period. Default: 7 days (customizable, up to 1 year).

3. Limit Order Types

Type

Description

Limit Open

Opens a position when the market price reaches your set limit price.

Stop Loss Limit

Executes at the Stop Loss (SL) price once the trigger condition is met.

Take Profit Limit

Executes at the Take Profit (TP) price once the trigger condition

is met.

Execution Conditions & Mechanism

  • The protocol uses Chainlink Oracle prices.

  • Only when the Oracle price meets the Trigger Price condition can a keeper initiate the trade.

  • Execution occurs exactly at the Limit Price, with no slippage.

  • Minimum trade size: 100 fxUSD (to incentivize Keeper execution).

  • Open position: the protocol fees are deducted from the position.

  • Close position: keeper handles the protocol fees.

⚠️ Even when conditions are met, execution is not guaranteed and depends on keeper availability and market incentives. Note that this is true for every kind of limit order, not only on f(x) Protocol.

Last updated