Skip to content
parchmentdocs
Open app

Orders and fills

Two-step fills

You do not trade at a price you pick. Every open and close is a request that Parchment's keeper fills.

  1. You send a request. An open holds your margin plus the $0.02 execution fee from your free balance. A close holds only the $0.02 fee (its margin is already in the position); if your free balance is short, the rest is taken from the close payout when it fills and dropped otherwise.
  2. The keeper fills it at the next oracle price. Only a signed oracle price published after your request, inside the market's 1 second fill window, can fill it. Parchment's keeper fills on the first such price it sees. The contract accepts any price in that window, so this is keeper policy, not an on-chain guarantee. You get the plain oracle mid, with no spread.

Because the fill price did not exist when you signed, nobody can trade against a price they have already seen. That is why normal fills need no spread.

The price shown in the ticket is a preview at the current mid. Your fill can differ by however far the price moves before the next oracle update. A price limit on the order is not enforced: the order fills at the valid oracle price, whatever it is.

To close automatically at a price you set, see Stop loss and take profit.

What can happen to a request

Refunds always go to your own free balance.

OutcomeMargin$0.02 fee
FilledUsed for the positionKept
Cancelled by youRefundedKept
Expired (no fill in time)RefundedRefunded, unless a price the keeper could have filled on was stored in the fill window
Refunded: opens paused, price feed switched off, session close under way, or a liquidation backlog on your accountRefundedRefunded
Refunded: market closed for the session, set to reduce-only, retired or disabledRefundedKept
Refunded: fee or risk limits changed, or the order breaks a per-position, per-account or event leverage capRefundedKept
Refunded: one-click key revoked before the order filled (from its cancel point)RefundedKept
Liquidated (close only, if the position was past its bust price at the fill)Settled as a liquidationKept
Emergency closedSettled at the emergency priceKept

An order that misses a market-wide cap (open size per side, or new size in the same millisecond) is not refunded at once. It waits, and fills or expires.

Timing

StepTime
Fill window1 second after your request
Unfilled open expiresafter about 10 seconds
Unfilled close expiresafter about 25 seconds (15-second emergency point + 10-second fill deadline)
Cancel available7 seconds after you send the request
Emergency close available15 seconds after you send a close, with an oracle price published after that point
Pending open ordersup to 64 per account

Close requests do not count toward the limit of 64, but each position can have only one pending close.

With one-click trading on, the app can send an expired order once more for you (Retry once automatically in Settings, then Trading). Each resend pays another $0.02.

Close All

Close All in your positions sends a close request for every open position. The app packs them into as few transactions as Sui's limits allow and sends the batches one after another. With one-click trading on, every batch is signed by your session key with no wallet prompt; otherwise your wallet asks you to approve each batch. Each request pays its own $0.02 execution fee.

Each position is tracked on its own, and each close fills at the next oracle price like any other close. Positions on a retired market close at once at the one-step price, which includes a spread. Positions being liquidated, or on a market where closes are blocked right now, are skipped and named. Like a single close, Close All waits out the minimum hold of a position you just opened. If a batch fails, Close All stops there: the batches already sent stay sent, and you can close the rest again.

Emergency close

Once a close has been pending for 15 seconds and an oracle price has been published after that 15-second point, you can close the position yourself without the keeper. An emergency close fills at the oracle mid minus a spread for a long, or plus it for a short. The spread is the larger of the price's confidence interval and 5 basis points of the price.

An unfilled close expires about 25 seconds after you send it. After it expires, you can send a new close.

Pauses

A pause stops new opens. It does not stop closes, emergency closes or liquidations. Only switching off a market's price feed stops exits there, except the session close, which still force-closes positions while the feed is off. See Risks.