Prepare an order (typed data or transaction to sign)
prepare_orderNo version argument: every order runs on the v4 backend. Which optional arguments apply is decided by the quote that minted the quoteId, so decide before emitting any: a quote that offered a 'bySignature' permit takes permitSignature + permitDeadline once that permit is signed; route:'transaction' applies only to a SwapByTransaction... quote (a native-token sell) and takes no signatures at all. Never send a signature argument unsolicited - it exists to carry back a signature the quote explicitly asked for. Non-custodial: this returns what the user signs, and commits nothing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| route | No | Which execution route the quote needs, taken from its __typename: 'intent' (default) for everything except SwapByTransaction..., which takes 'transaction' and returns the on-chain transaction plus an orderReceipt, the route a native-token sell takes. | |
| quoteId | Yes | quoteId from get_swap_quote. | |
| permitDeadline | No | Unix seconds, the 'deadline' from the permit message that was signed. Required with permitSignature. | |
| permitSignature | No | The user's signature (0x...) over the PermitTypedData a quote's approvals offered under 'bySignature'. Sending it skips the approval transaction. Never send it on a first call - you only have one once a quote has handed you a permit to sign. Requires permitDeadline. |