orbs_prepare_order_intent
Prepare a spot order for external wallet signing. Returns EIP-712 typed data, approval calldata, submit URL, and order metadata for all order types.
Instructions
Prepare a Spot order for external wallet signing. Returns EIP-712 typed data, approval calldata, submit URL, and order metadata. Supports all order types.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| epoch | No | Seconds between chunk fills (0 for single, 60 default for chunked) | |
| start | No | Order start time as Unix timestamp (default: now) | |
| account | Yes | Swapper wallet address | |
| chainId | No | Chain ID (defaults to runtime config) | |
| toToken | Yes | Destination token address | |
| deadline | No | Order deadline as Unix timestamp (default: auto-calculated) | |
| fromToken | Yes | Source token address | |
| fromAmount | Yes | Amount in smallest token units | |
| outputLimit | No | Minimum output per chunk in output token units (0 = market order) | |
| slippageBps | No | Slippage tolerance in BPS (default 500 = 5%) | |
| exactApproval | No | If true, approve only the exact amount needed instead of unlimited | |
| fromMaxAmount | No | Total input amount for chunked orders (defaults to fromAmount for single orders) | |
| outputTriggerLower | No | Lower trigger price per chunk for stop-loss orders | |
| outputTriggerUpper | No | Upper trigger price per chunk for take-profit orders |