IOC, FOK and GTC: Preserve the Agent’s Execution Deadline
By DX Research Group · · Execution mechanics
Time-in-force is part of trading authorization. A worked liquidity case separates immediate execution, resting exposure and unsupported FOK intent.
An immediate execution instruction and a standing quote authorize different future behavior. We would compile lifetime alongside side, size and price, so the agent can explain how long an unexecuted intention remains active. The inspected Hyperliquid API lists IOC, GTC and ALO. FOK is absent from that documented limit-order enumeration; a connector should return unsupported when the mandate requires all-or-none immediate execution.
Choose lifetime before choosing size
Illustrative case: an agent wants 10 units with a buy limit of $101. Available asks inside the limit contain 6 units. An IOC can execute 6 and cancel the remaining 4. A GTC can execute 6 and leave 4 resting, continuing exposure after the original turn. An all-or-none FOK instruction would require zero execution when immediate capacity is only 6. A local depth check followed by IOC cannot reproduce that atomic guarantee because liquidity can change between observation and matching.
Compile an execution lifetime
Store requested lifetime, effective venue TIF and the active strategy version. Reject unsupported FOK before signing. For GTC, attach a local review deadline to the order record and schedule its review through the authorized runtime lifecycle. A review deadline and venue expiry are separate fields. Test the same book with IOC and GTC, then test insufficient depth under requested FOK. The expected result is an explicit unsupported action, without silently accepting a partial immediate purchase.
Replay the policy boundary
Compare the fraction completed immediately, the time spent with resting exposure and the quantity still authorized after review. A strategy can improve immediate completion by accepting a different lifetime, but that result should be attributed to changed permission. Preserve the original all-or-none request in the report so a connector capability limitation stays visible to the owner.
Our execution and reconciliation framework provides the broader mandate-to-outcome trace. The state and memory contract explains how the verified result should enter the next decision. These notes narrow those published methods to one execution boundary; the worked amounts above are illustrative and the test is a proposed local fixture. The source inspected for the venue-specific statements is the official Hyperliquid exchange endpoint.
The owner-facing explanation should retain the requested execution deadline. This lets a later reviewer see whether an incomplete purchase came from scarce liquidity, unsupported order semantics or a deliberate decision to leave no standing exposure.