Order Types

Three order types are supported: market, limit, and peg. Pegged orders use a single type=peg with a peg_reference that selects which reference price to track.

Summary

TypePrice fieldReference trackingTypical TIF
marketOptional (acts as a cap)IOC or FOK
limitRequiredGTC, GTT, IOC, FOK
pegNot acceptedpeg_reference: mid | bid | askGTC, GTT, IOC

See Order Compatibility for the full matrix.

Market

Executes immediately at the best available prices. Walks the book until the order is filled or liquidity is exhausted.

{
  "symbol": "BTC-USDC-PERP",
  "side": "buy",
  "type": "market",
  "quantity": 0.1,
  "time_in_force": "IOC"
}

If price is supplied on a market order, it acts as a price cap — the order will stop walking the book at that level rather than paying worse.

Limit

Executes at the specified price or better. Unfilled remainder rests in the book until matched, cancelled, or expired (per time_in_force).

{
  "symbol": "BTC-USDC-PERP",
  "side": "buy",
  "type": "limit",
  "quantity": 0.1,
  "price": 95000,
  "time_in_force": "GTC"
}

Peg

Tracks a reference price chosen at placement time and automatically reprices as that reference moves. See Pegged Orders for detail on repricing semantics and peg_reference values.

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

price is not accepted on a peg order — the effective price is derived at match time from peg_reference.