Order types
Parcl V4 supports four order types and three time-in-force options.
Order types
Market
Fills immediately against the best available liquidity in the order book. Use price: 0 in the transaction. A market order defaults to a 10% slippage cap relative to the oracle price. It fills as an IOC order against liquidity within that cap and cancels the remainder. Set max_slippage_bps to change the cap. If the book has insufficient depth within the cap, the order fills partially or not at all.
Best for: entering or exiting a position quickly when you care more about execution than price.
Limit
Rests on the orderbook at your specified price. Fills when the other side crosses your price. If the price is already crossable at submission time, it fills immediately (unless you set post_only).
Best for: getting a specific price. Limit orders that rest on the book pay the maker fee (which may be a rebate).
Stop market
A market order that activates when the price reaches the trigger price. Does nothing until triggered, then executes as a market order.
- Long stop market: triggers when price rises to or above
trigger_price - Short stop market: triggers when price falls to or below
trigger_price
The exchange evaluates the trigger against the oracle price. A stop fires only when the daily oracle update crosses its threshold. The same reference applies to liquidations. See Mark price.
Stop limit
When triggered, a stop limit places a limit order at price. This gives you
price control after the trigger fires. The order can remain unfilled if the
market moves past the limit.
Time-in-force
Controls what happens to unfilled portions of your order.
GTC (good til canceled)
The default. Unfilled portion rests on the orderbook until you cancel it. Use for limit orders you want to leave open.
IOC (immediate or cancel)
Fills whatever is available immediately, then cancels the rest. Use for market orders or when you want partial fills but don't want an open order.
FOK (fill or kill)
Fills entirely or not at all. If the engine can't match the full size immediately, it rejects the entire order. Use when partial fills aren't acceptable.
Order options
reduce_only
If true, the order can only reduce an existing position. It won't open a new position or increase one. Useful for stop-loss orders where you don't want accidental position increases if you've already closed manually.
post_only
If true, the exchange rejects the order if it would fill immediately (i.e., cross the spread). Guarantees your order rests on the book as a maker order. Use when you specifically want maker fees/rebates.
Attached TP/SL
You can attach take-profit and stop-loss orders when placing the initial order. The exchange creates these as conditional orders that activate after the parent order fills.
{
"PlaceOrder": {
"account_id": 12,
"market_id": 0,
"side": "Long",
"order_type": "Market",
"price": 0,
"size": 1000000,
"trigger_price": null,
"reduce_only": false,
"post_only": false,
"time_in_force": "IOC",
"take_profit": {
"trigger_price": 60000000000,
"order_type": "StopMarket",
"limit_price": null
},
"stop_loss": {
"trigger_price": 55000000000,
"order_type": "StopMarket",
"limit_price": null
}
}
}Both take_profit and stop_loss are optional. Attached exits support the StopMarket shape shown above. Send limit_price: null. Do not rely on an attached StopLimit shape. Attached activation creates a StopMarket exit.
A triggered exit uses the default 10% slippage cap relative to the oracle price as an IOC limit at oracle ±10%. It fills against liquidity within 10% of the oracle and does not rest the remainder. If price has already moved more than 10% past your trigger, the exit may fill only partially or not at all.
Self-trade prevention
An incoming order can never match against a resting order that belongs to you. "You" means every margin account your key owns: your main account, its subaccounts, and any vault you lead. When this would happen, the engine cancels the resting order, and matching continues through the next best price level.
How it works
Before matching any two orders, the engine checks whether the maker and taker accounts have the same owner key. If they do, the engine removes the maker order from the book with CancelReason: SelfTradePrevention, and the taker continues matching against the next best order. No fee is charged, and no fill is recorded.
The Parcl Treasury is the one exception. Its subaccounts run separate strategies with separate capital, and the liquidation backstop unwinds inherited positions against the Treasury market maker's quotes, so Treasury accounts may fill against each other.
The taker order is not affected by the self-match. It fills normally against everything else on the book, up to its size or price limit.
When it fires
Self-trade prevention runs in every matching path:
- Market orders crossing the book
- Limit orders that cross on submission
- Stop market and stop limit orders when triggered
Events
When self-trade prevention cancels a resting order, the exchange emits an OrderCanceled event with reason: "SelfTradePrevention". The event surfaces in WebSocket orders subscriptions and in the events array returned from POST /tx/sign-and-submit.
Example
You have a limit sell resting at $100 on NYC from a subaccount. You submit a market buy for the same market from your main account. Before your buy matches your sell:
- The engine detects both orders share an owner key.
- The engine cancels your limit sell with
SelfTradePrevention. - Your market buy matches the next best ask above $100.
You receive two events: OrderCanceled (your sell) and OrderFilled (your buy, against whoever's next in the book).
FOK and self-trade makers
The engine evaluates fill-or-kill orders for fillability before any matching happens. If your own resting orders sit between the taker and the required liquidity, FOK skips them when computing whether the order can fill. FOK treats your own orders as not on the book for the purpose of the all-or-nothing check.
This means an FOK taker can still fill if there is enough non-self liquidity after excluding your own makers.