Skip to main content
Glama

Rank cross-DEX spread opportunities on a chain

get_spreads

Discover and rank arbitrage spreads across a chain by gross USD at optimal trade size, with buy/sell venues and liquidity filtering. Use live on-chain sweep or free hourly snapshot.

Instructions

Sweep a whole chain and rank its cross-venue price dislocations, each with the buy venue, sell venue, spread in basis points, the optimal trade size, and the gross USD that size would capture. Ranking is by GROSS USD AT THE OPTIMAL SIZE, not by headline basis points — a 160bps spread against a $1,470 pool is worth about a cent, and the payload says so per row (capturable, warning, shallowestSideTvlUsd). Venues below the liquidity floor are excluded because a spread against a dust pool is an artefact, not an opportunity. Numbers are GROSS: before gas, MEV and any slippage beyond the optimal size. Not a profit estimate and not trade advice. With a RapidAPI key and live=true this runs a fresh on-chain sweep (slow, ~30s, most current). Otherwise it serves the free hourly public snapshot, which is keyless and fast — the response always states which, and when it was generated. Paid route: needs your own RapidAPI key in RAPIDAPI_KEY (free tier available at https://rapidapi.com/donnydev/api/multi-chain-dex-prices-liquidity).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
liveNotrue = run a fresh on-chain sweep now (requires RAPIDAPI_KEY, takes ~30s). false/omitted = the free public snapshot, rebuilt hourly.
chainYesChain key. One of: bsc, polygon, arbitrum, base, avalanche, optimism. Numeric chain IDs are not accepted here — use the key.
limitNoLive sweeps only. Maximum rows, 1..40. Default 15.
minSpreadBpsNoLive sweeps only. Minimum spread in basis points to report. Default 10.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully carries the transparency burden and excels: it discloses ranking by gross USD rather than bps, exclusion of low-liquidity venues, gross vs net numbers, the non-profit/non-advice nature, live vs snapshot timing, response stating data source, and key requirements. This is exemplary behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Although long, every sentence adds meaningful value: main action, ranking rule, an illustrative example, exclusion rationale, gross/net clarification, live vs snapshot behavior, and access instructions. It is well-structured and front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and the presence of four parameters, the description is remarkably complete. It covers input behaviors, output field names, ranking logic, limitations, authentication needs, and response characteristics, leaving no major gaps for an AI agent to operate effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage with detailed descriptions for all parameters, including the live parameter's behavior and the chain enum. The description adds some context about live requiring a key and snapshot timing, but it largely reiterates schema information. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Sweep a whole chain and rank its cross-venue price dislocations' and enumerates the output fields (buy venue, sell venue, spread in bps, optimal size, gross USD). It distinguishes itself from sibling tools like get_prices by focusing on spread opportunities across venues.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use live=true (with RapidAPI key) versus the free hourly snapshot, and explains the ranking metric (gross USD at optimal size). However, it does not explicitly mention alternatives among sibling tools, so it misses the 'when not to use this' aspect.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/donnywin85/arb-dex-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server