expected_surplus
Estimate how much better Ophis quotes than the open market for a sell: fetches the Ophis orderbook sell-quote and a public all-DEX aggregator (KyberSwap) quote for the same input, and returns beatBps (+ = Ophis returns more of the buy token). Use before build_order to show the expected edge. The reference can reflect thin or manipulated liquidity, so treat beatBps as advisory, not a sole execution signal. Sell-side (exact-in) only. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | The trading account address (quotes are account-aware). | |
| chainId | Yes | EVM chain id (use a chainId from list_chains `tradeable`). | |
| buyToken | Yes | Buy token address (0x...). | |
| sellToken | Yes | Sell token address (0x...). | |
| sellAmount | Yes | Exact sell amount in atoms (uint256 decimal string). |