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 orderbook. Use price: 0 in the transaction. A market order defaults to a 10% slippage cap relative to the oracle price. Internally it becomes an IOC limit at oracle ±10%, so it fills against liquidity within 10% of the oracle. It cancels the rest instead of filling arbitrarily far from fair value. Set max_slippage_bps to widen or tighten the cap. If the book is empty or 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 reference price used to evaluate the trigger depends on the market's asset class:
- Real estate: trigger evaluated against the oracle price. Your stop fires only when the oracle updates (daily at 9:05 AM ET), not when the orderbook moves intraday. This prevents stop-hunting on thin orderbooks.
- Continuous markets: trigger evaluated against the median mark (median of oracle, impact mid, last trade). Your stop fires when the chain's real-time fair price crosses your trigger, with single-source manipulation rejected by the median property. This matches what you see on the chart.
The same reference rules apply to liquidations on each asset class, so triggers and liquidations stay in sync. See Mark price for the full mechanics.
Stop limit
Same as stop market, but places a limit order at price instead of a market order when triggered. Gives you price control after the trigger fires, but risks not filling if the market moves past your 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": "Market",
"limit_price": null
},
"stop_loss": {
"trigger_price": 55000000000,
"order_type": "Market",
"limit_price": null
}
}
}Both take_profit and stop_loss are optional. A triggered exit executes as a market order with a default 10% slippage cap relative to the oracle price (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 one of your own resting orders on the same account. 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 belong to the same account_id. 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.
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. You submit a market buy for the same market and same account. Before your buy matches your sell:
- The engine detects both orders share
account_id. - 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.