get_quote
Calculate a PactFi swap quote with constant-product AMM math: expected output, fee, price impact, and minimum received after slippage. Enter a pool ID or token symbols to auto-discover the pool.
Instructions
Get a swap quote from PactFi using constant-product AMM math. Computes expected output, fee, price impact, and minimum received after slippage. Provide either a poolAppId or fromToken+toToken symbols to auto-discover the best pool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to swap in human-readable units (e.g. '100' for 100 ALGO) | |
| toToken | Yes | Token symbol to swap to (e.g. USDC, ALGO) | |
| slippage | No | Slippage tolerance in percent (default 0.5) | |
| fromToken | Yes | Token symbol to swap from (e.g. ALGO, USDC) | |
| poolAppId | No | Pool application ID (optional if fromToken and toToken are provided) |