Pegged Orders

A pegged order (type: "peg") tracks a reference price and automatically reprices when that reference moves. Instead of placing a limit at a fixed price and manually adjusting it as the market shifts, a peg follows the market for you.

Peg References

Pegged orders use a single type with a peg_reference field:

peg_referenceTracksTypical use
midMidpoint of best bid and best askResting inside the spread to capture price improvement on both sides
bidCurrent best bidPassive liquidity on the bid, tracking the top of book
askCurrent best askPassive liquidity on the ask, tracking the top of book

How It Works

When the reference price changes (e.g. a new best bid arrives), the matching engine reprices all pegged orders tied to that reference. Repricing happens within the MPC matching cycle — the same latency as any other order operation.

A peg order does not accept a price field. The effective price is derived from the reference at match time.

Pegged orders compose with time_in_force and aon the same way limit orders do: a mid-pegged GTC order rests indefinitely and reprices on every midpoint move; a mid-pegged IOC attempts an immediate fill at the current midpoint and cancels any unfilled remainder.

Example — Peg to Mid

{
  "symbol": "BTC-USDC-PERP",
  "side": "buy",
  "type": "peg",
  "peg_reference": "mid",
  "quantity": 0.1,
  "time_in_force": "GTC"
}

Example — Peg to Bid (Passive)

A buy order pegged to the bid sits at the front of the queue on the buy side without ever crossing the spread:

{
  "symbol": "BTC-USDC-PERP",
  "side": "buy",
  "type": "peg",
  "peg_reference": "bid",
  "quantity": 0.1,
  "time_in_force": "GTC"
}

Modifying Pegged Orders

PATCH /orders/{orderId} accepts quantity changes on pegged orders but not price — the effective price is fixed by peg_reference. To change reference tracking, cancel and re-place.

See Order Compatibility for supported TIF and attribute combinations.