trade_preview
Validate order size, TIF, risk limits and margin impact read-only before executing a trade; returns fill estimate, fees, position, and refusal codes with remediation.
Instructions
Preview a trade WITHOUT executing. Runs trade_execute's pre-send checks read-only (size parse, order validation incl. TIF, quarantine, local risk limits — never forced) and reports any refusal as valid:false with its code + remediation; also returns the estimated fill price from the book, notional, margin impact, the builder fee the order would carry, and the existing position. Venue trading fees are NOT estimated. ALWAYS call this before trade_execute and show the result to the user for confirmation. Hyperliquid: native perps only (HIP-3 dexes via the CLI --dex).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tif | No | Limit orders: GTC (default) | IOC | FOK | ALO (post-only); venue aliases GTT / GTX / TOB accepted — checked like trade_execute | |
| side | Yes | Order side | |
| size | Yes | Order size (base currency units, e.g., '0.1' for 0.1 BTC) | |
| price | No | Limit price (required for limit orders) | |
| symbol | Yes | Trading symbol (e.g., BTC, ETH, SOL) | |
| exchange | Yes | Exchange: pacifica, hyperliquid, lighter, aster, lighter-rh, ondo, arcus, qfex, risex, txflow (aliases accepted) | |
| orderType | No | Order type | market |
| reduceOnly | No | Reduce-only order (close position only) — checked like trade_execute (quarantine applies only to non-reduce-only orders) |