Skip to Content
VPerpDocs

Order Types & Execution Controls

Complete trader and developer reference for Limit (GTC/IOC/ALO), Market, Reduce-Only (200 cap), Mark-Price TP/SL, Brackets, Modify, MassQuote, TWAP, and Dead-Man's Switch.

Time-in-Force
GTC · IOC · ALO
ALO gets Class-3 priority
Reduce-Only Cap
200 Resting / Acct
IOC & fired stops exempt
Trigger Price
Mark Price Only
Wick-resistant TP / SL
MassQuote
64 Mkts · 256 Legs
Single signed refresh
Key Takeaways
  • Use Post-Only (Alo) in dedicated batches to guarantee Maker fees/rebates AND unlock Class 3 priority ahead of same-block Takers.
  • Every account gets 200 dedicated Reduce-Only resting slots on top of its regular open-order cap—and non-resting IOC closes plus already-fired stop-loss triggers are permanently exempt from order caps.
  • All conditional TP/SL triggers evaluate strictly against Mark Price (Last-Price triggers, Trailing Stops, and native ScaleOrder are disabled in V1 to prevent wick manipulation).
  • Dead-Man’s Switch (scheduleCancel) requires zero minimum trading volume and supports both global and market-scoped auto-cancellation.

Quick Support Matrix

Order Type / ControlStatusPriorityKey Limits & Rules
Limit (Gtc)ActiveClass 4Rests FIFO on CLOB; 0.05× – 20× price band
Limit (Ioc) / MarketActiveClass 4Immediate fill up to limit / ±5% band; remainder cancels
Post-Only (Alo)ActiveClass 3Maker-only; rejected if crossing BBO
Reduce-Only (r: true)ActiveSame as baseMax 200 resting RO limits/acct; IOC & fired triggers exempt
Mark-Price TP / SLActiveClass 4 / EOBMark Price only; perp requires r: true; max 1,000 triggers/acct
TP/SL Order GroupsActiveClass 4normalTpsl (entry + OCO bracket) and positionTpsl
Modify / BatchModifyActiveClass 1Up to 256 modifies/tx; "atomic": true for all-or-nothing
Mass Quote (massQuote)ActiveClass 3 (Alo)Up to 64 markets & 256 legs; replaceMarket / replaceSide / append
TWAP (twapOrder)ActiveBlock-StartMax 10 active/acct; 5m – 7d; 30s IOC slices (±3% mark); min 100 USDC
Dead-Man's SwitchActiveClass 2Global or markets subset; 0 volume min; 1.5s lead; 100/UTC day
Last-Price TP/SLDisabled V1—Disabled to prevent single-wick stop hunting
Trailing StopDisabled V1—Disabled in V1 protocol write scope
Native Scale OrderDisabled V1—Submit up to 256 limit legs in one order batch instead

1. Limit Orders (Gtc, Ioc, Alo) & Market Orders

GTC (Good-Til-Cancelled)

Standard Limit

Matches immediately against crossing liquidity; any unfilled remainder rests on the CLOB.

  • Taker fee on immediate fills; Maker fee/rebate on resting fills
  • Rests until filled, modified, or cancelled
  • Must sit within 0.05× – 20× reference price

IOC (Immediate-or-Cancel) / Market

Aggressive Execution

Executes immediately up to your limit price (or ±5% market slippage band) and cancels any remainder.

  • Never leaves a resting order on the book
  • Aggressive prices past ±5% clamp inward onto valid ticks
  • Subject to leverage-tiered max immediate notional (500k–30M USDC)

ALO (Add-Liquidity-Only)

Class-3 Maker Priority

Guaranteed Maker execution—rejected immediately (PostOnlyRejected) if it would cross the spread.

  • Pure Alo batches execute in Class 3 ahead of Class 4 takers
  • Never accidentally pays Taker fees on sudden book moves
  • Ideal for market makers and fee-sensitive entries

2. Reduce-Only Orders (r: true) & the 200 Resting Cap

Setting "r": true enforces that an order can only shrink or close an existing position and can never reverse direction:

  • 200 Dedicated Resting RO Slots: Every account can place up to 200 resting Reduce-Only limit orders—completely separate from its standard open_order_cap (1,000–5,000).
  • Independent Exit Buckets: Resting RO limits, Take-Profit triggers, and Stop-Loss triggers each budget independently against your position size so having a full-size SL does not block placing a full-size TP.
  • Automatic Size Trimming (ro_orders): If your position decreases, VCore automatically trims or cancels excess resting RO limits starting from the furthest (worst) price.
  • Permanent Close Exemptions: Non-resting Ioc/Market reduce-only closes, liquidations, and already-fired RO triggers are never blocked by open_order_cap, the 200 RO limit, or congestion throttling; full-position closes are also exempt from the 10 USDC minimum notional rule.
Automatic Reduce-Only Trimming on Partial Close
RO Mechanics

You hold a 10 ETH Long and place two Reduce-Only sell limits: 6 ETH @ 3,500 and 4 ETH @ 3,600 (total resting RO = 10 ETH).

  • Later, you market-sell 5 ETH, leaving a 5 ETH Long.
  • Because 10 ETH resting RO now exceeds your 5 ETH position, VCore automatically cancels the worst-priced 4 ETH @ 3,600 and trims 6 ETH @ 3,500 down to 5 ETH @ 3,500—guaranteeing your resting asks can never accidentally flip you Short.

3. Conditional Mark-Price TP/SL & Order Groups (normalTpsl / positionTpsl)

Conditional triggers stay off-book until the market's Mark Price crosses triggerPx:

  • Long Position: tp fires when Mark >= triggerPx; sl fires when Mark <= triggerPx.
  • Short Position: tp fires when Mark <= triggerPx; sl fires when Mark >= triggerPx.
  • Execution Type: isMarket: true fires an Ioc order inside the slippage band; isMarket: false places a Gtc limit at p.
  • Mandatory Perp Rule: Perpetual TP/SL orders must set "r": true (spot triggers exempt). Max 1,000 active triggers per account; up to 256 trigger firings per block.

Order Groups (grouping)

  • "na": Standalone independent orders (up to 256 per batch).
  • "normalTpsl" (Bracket): Entry order + attached TP and/or SL child triggers (max 3 orders). Child triggers activate upon entry fill, inherit resting Builder Fees, and act as OCO (One-Cancels-Other).
  • "positionTpsl": Attach OCO TP/SL directly to an existing open position; automatically cancels when the position closes to zero.

4. Modify, Atomic BatchModify & MassQuote

  • modify / batchModify (Class 1 Priority): Amend up to 256 resting orders in one signature (reduceOnly cannot flip). Pass "atomic": true on batchModify for all-or-nothing execution (BatchModifyAtomic)—if any single leg fails margin or validation, the entire batch rolls back.
  • massQuote (Up to 64 Markets / 256 Legs): Single-signature quoting for market makers (tif: "Alo" [Class 3], "Gtc", or "Ioc"):
    • replaceMarket: Cancels all resting quotes on each included market and posts the new bid/ask ladder.
    • replaceSide: Replaces only the sides (bids and/or asks) populated in each market object, leaving untouched sides intact.
    • append: Inserts new quote legs without cancelling existing ones.

5. TWAP Orders (twapOrder) & Dead-Man's Switch (scheduleCancel)

TWAP Specifications

ParameterRule
Duration (m)5 minutes to 7 days (5..=10,080 min)
Slice CadenceFirst slice fires at +1 s; subsequent slices every 30 s as Ioc within ±3% of Mark Price
Randomization (t)Deterministic jitter [-20%, +19%] on slice sizes when true
Minimums & CapsMin 100 USDC total · min 12 USDC slice · max 10 active/acct (7,500 global running / 2,500 waiting, 7d TTL; 256 slices/block). Parent TWAPs cannot carry Builder Fees
30-Minute Randomized TWAP Breakdown
Worked Example

Submitting a 60,000 USDC BTC buy TWAP over 30 minutes (m: 30, t: true):

  • Slice count: 1 initial slice at t = 1 s + 59 slices every 30 s = 60 slices (average 1,000 USDC / slice, well above the 12 USDC floor).
  • With t: true, each slice deterministically varies between 800 USDC (-20%) and 1,190 USDC (+19%), executing as Ioc bounded strictly within ±3% of live Mark Price.
  • If liquidity temporarily moves beyond ±3%, that slice skips safely rather than taking excessive slippage, and remaining unfilled size rolls cleanly or can be cancelled anytime via twapCancel.

Dead-Man's Switch (scheduleCancel)

  • Zero Volume Requirement: Open to every account from block zero.
  • Global or Market-Scoped: Omit "markets" to cancel all resting orders across every market at time, or pass "markets": [0, 1] (up to 256 markets) to protect specific books only.
  • Guardrails: Minimum lead 1.5 s; max 100 firings/UTC day; does not cancel active conditional triggers or running TWAPs.
  • Scoped Agent Owner Lock: Scoped agents cannot clear or overwrite a DMS armed by the master account or covering markets outside their allowedMarkets.

Frequently Asked Questions

On this page