Compare DEX and CEX price
compare_priceCompare a token's DEX pool price against centralised exchange books in both directions, factoring taker fees and constant-product price impact, and find the trade size where impact erases the spread.
Instructions
One token, one size: the best pool price against every centralised book, both directions round (buy on the DEX and sell at the CEX bid, or the reverse), with the two taker fees and the constant-product price impact for that size charged before anything is called an opportunity. Also reports the size at which impact eats the whole edge, and the naive mid-to-mid spread side by side so the difference between the two numbers is visible.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "compare_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain to look on, for example ethereum, solana, base, bsc, arbitrum. Guessed from the address shape when omitted. | |
| query | No | Ticker (PEPE) or contract address (0x… / a Solana mint). | |
| venue | No | Restrict the comparison to one centralised venue. | |
| size_usd | No | Trade size in dollars used for the price impact and the net edge. | |
| cex_fee_bps | No | Centralised taker fee in basis points, per leg of the round trip. | |
| dex_fee_bps | No | DEX fee in basis points. DexScreener does not publish the fee tier, so this is the caller's assumption and it is reported back. | |
| min_depth_usd | No | Below this real pool depth a row is flagged thin: the spread is real but the pool cannot absorb a trade. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||