Order Types

Supported SDK enums are MARKET, LIMIT, PEG, STOP_MARKET, and STOP_LIMIT.

Summary

TypePrice fieldNotesTypical TIF
MARKETOptional capOptional slippage_bps; quantity XOR quote_notionalIOC only
LIMITRequiredSupports post-only/reduce-only/STPGTC, GTD, IOC, FOK
PEGNot acceptedpeg_offset_bps from Pyth markGTC, GTD
STOP_MARKETNot acceptedtrigger_price; optional slippage_bpsGTC, GTD
STOP_LIMITRequiredtrigger_price + priceGTC, GTD

See Order Compatibility for the full matrix. Public TIF strings are GTC / IOC / FOK / GTD.

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",
  "order_type": "MARKET",
  "quantity": "0.1",
  "time_in_force": "IOC",
  "slippage_bps": 50
}

If price is supplied on a market order, it acts as a price cap. slippage_bps optionally caps walk vs mark (basis points); omitted → venue max.

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",
  "order_type": "LIMIT",
  "quantity": "0.1",
  "price": "95000",
  "time_in_force": "GTC"
}

Peg

Tracks the sequencer's Pyth mark plus a signed basis-point offset.

{
  "symbol": "BTC-USDC-PERP",
  "side": "BUY",
  "order_type": "PEG",
  "peg_offset_bps": -5,
  "quantity": "0.1",
  "time_in_force": "GTC"
}

price is not accepted on PEG; the effective price is Pyth mark adjusted by peg_offset_bps.

Stop market / stop limit

Stop orders arm at trigger_price, then submit a market or limit child. slippage_bps applies to stop-market the same way as market.