Time in Force
TL;DRTime-in-force on Darknyx is expressed two ways: the order type decides whether an
order may rest (limit rests; IOC and FOK do not), and
expiry_slot decides
how long a resting order lives. Order expiry is measured in Solana slots, not
wall-clock time.The two controls
Every order carries an
expiry_slot, bounded by the protocol’s maximum so a
note cannot be locked forever. The current ceiling is 4,500 slots (roughly 30
minutes at 400 ms slots). A resting order is swept when the chain passes its
expiry.
expiry_slot is always an absolute future slot. 0 is not an indefinite/GTC
sentinel; use /time to resolve the current slot before signing.
Available behaviors
GTC: Good-til-Cancelled
A limit order whoseexpiry_slot is at the venue’s allowed horizon. It
rests until it fills, you cancel it, or it reaches that bounded expiry. This is
“good until cancelled” within the protocol’s maximum order lifetime, not an
indefinite order.
GTT: Good-til-Time
A limit order with anexpiry_slot chosen to match a wall-clock deadline. To
place “good for the next ten minutes,” read /time for the
current slot and project your deadline onto a slot (Solana targets roughly 400 ms
per slot). The SDK does this conversion for you:
expiry_slot, the order is swept and an expired event is
emitted on the Orders Channel.
IOC: Immediate-or-Cancel
Anioc order. Fills what it can in its arrival batch, cancels the rest. It
never rests, but its expiry_slot must still leave enough time for the match
and settlement pipeline.
FOK: Fill-or-Kill
Afok order. Fills its whole size in its arrival batch or is dropped. It never
rests and never partially fills, but still carries a settlement-safe expiry.
Summary
Slots, not timestampsBecause settlement is on Solana, expiry is anchored to the chain’s clock, the
slot, so it stays consistent with on-chain state.
/time gives you both the slot
and the wall-clock instant so you can convert between them. See
Order Types for how the type controls resting, and
Execution Attributes for fill-size constraints.