POST /v1/order/openfor
Submit a gasless order (the user signed signPayload; the solver submits and pays gas), or
register a proxy-lane order (the user already sent executionTx; nothing is signed).
Request
Request body
OpenForRequest:
The signature’s wire encoding depends on the winner’s family:
Response
data (OpenForAck):
Behavior
- The lane decides. A signed lane with no signature, or a proxy lane with one, is
EIN0010. A winner that completes through the open flow (a bridge winner) isEIN0001pointing atPOST /order. The sameEIN0010covers an unknown quote, another organization’s quote, and a malformed signature on the external gasless lane (aggregator-gasless) — one code on purpose. - The hub does not verify an EVM escrow signature. On
oif-escrow-gaslessit forwards the signature as sent, and the upstream judges it: a bad one comes back asEIN0021, reference… (SOLVER_REJECTED), orhttp 400 (VALIDATION_ERROR)for a signature sent without the0x00scheme byte. A bad Solana envelope isEIN0007(below). - Rate limit. Every request whose body validates is charged to your organization’s order bucket
(Limits) before the quote is read or anything is reserved. A shed is
EIN0080and has reserved and forwarded nothing, so re-posting the same body aftererror_params[0]milliseconds is safe. - Re-posting is safe. A quote the hub has recorded a submission for is answered with the original ack, with no second forward and no time limit — provided the re-post passes the lane’s signature-presence rule above. The replay is keyed on the quote, not the body: a re-post carrying a different signature, even an invalid one, gets the original ack too. A re-post never opens a second order.
- Lost the answer? Derive
hubOrderIdand read the status before re-posting — Handling errors. The gateway’s availability answers (EPX0050,EPX0051, andEPX0052when the hub took longer than the gateway’s 10 s) are lost answers too, with an unknown outcome. The gateway keeps this call running at the hub when your client times out or disconnects, but cuts it at those 10 s; if the hub was forwarding then, the forward is cancelled with it, since it runs on the request’s context: the reservation stays pending, the status read answersEIN0009, and every re-post answersEIN0052until an operator reconciles it (known issue). - The forward reservation. Before forwarding, the hub reserves the quote. An accepted forward
records the submission (the re-post above). A forward the upstream definitively refused
(
EIN0021, a refused proxy-lane registration, a refused hub credential) releases the reservation, and so does a forward the hub’s own outbound admission stopped before sending (EIN0081from its limiter,EIN0050from an open circuit breaker): back off and re-post the same body, which forwards again. Don’t re-post a declined signed order, though: the aggregator answers the repeat with a502, which the hub serves asEIN0050(upstream unavailable: http 502) and then treats as a forward that went unanswered, so every later re-post answersEIN0052(known issue). Re-quote and sign again instead. A forward that was sent and not answered (EIN0050after a timeout or a 5xx, orEIN0081for the upstream’s own 429), or answered in a way the hub cannot read (EIN0052at once), keeps the reservation, because the upstream may have opened the order: every re-post then answersEIN0052until an operator reconciles the reservation — the hub never releases it on its own. Whether an upstream 429 proves that no order was opened is an open question; until it is settled, a 429 is treated as unknown. - Solana envelopes are checked by the hub before forwarding: 97 bytes, flag
0x00, the public key equal to the order’s user, the signature valid over the disclosedtransactionMessage, and the message’s order id equal to the quote’s. A failure isEIN0007. - Sui and Aptos are destination-only chains; no Move escrow is disclosed.
- Expiry. On the signed lanes (
oif-escrow-gasless,oif-escrow-nonevm,aggregator-gasless) a submission at or afterexpiresAtisEIN0005, and nothing is reserved or forwarded, even while the quoting process still holds the template. The replay of a recorded submission and theEIN0052check come first, so both still answer after expiry. On the proxy lanes the hub keeps a quote registrable for 20 minutes after it was issued, prepared or not, but the aggregator refuses a registration onceexpiresAthas passed:EIN0007, referencefail-closed rejected: upstream refused: http 400 (QUOTE_EXPIRED)(known issue). So register as soon as the transaction is sent, well beforeexpiresAt. Past the hub’s 20 minutes the answer isEIN0005. - Once a proxy-lane transaction is out, never re-quote. The user’s own transaction opened the
order in escrow before this call, so a new quote would mean a second deposit, whatever this call
answers. A refused registration (
EIN0005,EIN0007,EIN0050upstreamAuth) leaves the deposit where it is: it completes on chain anyway — the solver still fills it — but the hub never records the order, so it is missing fromGET /ordersand the status routes. Follow it by the send transaction’s hash onGET /onchain/tx/{chainDomain}/{txHash}/order, thenGET /onchain/{orderId}/fill, and withdraw after the escrow expires if it is not filled (Refunds). - A registration does not prove the deposit. Neither the hub nor the aggregator checks that
the transaction was sent: a proxy-lane quote registered without it is acked
createdand stayscreatedupstream (known issue). Register only after sending; theopenfact onGET /onchain/{orderId}/fillis the proof. - A non-prepared quote must be submitted to the replica that quoted it (its template is held in that process for 30 s, 20 min on the proxy lanes); a prepared quote works on any replica.
- Not configured. A deployment with no OIF aggregator (
infinity.upstream.oif.baseUrlunset) answers this routeEIN0007(referencefail-closed rejected: openFor route not wired).
Errors
The gateway’s own refusals — a refused credential, a route not open to it, a rate limit, the hub unreachable or too slow — can come back from every route, with an
EPX code and a real HTTP status (Errors — gateway codes); EIN0049 (internal, scrubbed) can come back from any route.
Example
Response
Illustrative values; formats follow the Response table.See also
- SDK:
client.submitOpenFor()(Lost answers);client.executeQuote()signs, submits and tracks in one call (Executing orders) - Step execution
- Handling errors
- Execution errors
- Quickstart