Developer Quickstart
Integrate neutral execution benchmarking: slippage, revert rates, MEV detection, and routing topologies, into your application.
API Basics
The ClearTrace API provides programmatic access to our cross-frontend attribution engine and on-chain benchmarking data.
- Base URL:
https://cleartracedata.com/api/v1 - Authentication: Open. No key required, and no data is gated behind one. A free key is available and raises rate limits only.
- Rate Limit: 60 requests per minute per IP address, or 600 with a free key.
- Data Freshness: Data is synchronized from Dune Analytics on a periodic batch pipeline, not a real-time mempool feed. The dashboard shows the last-sync date.
Use ClearTrace from Claude or any AI agent (MCP)
ClearTrace runs an official Model Context Protocol server, so an agent can query execution quality, revert rates and cross-frontend attribution as tools rather than as raw HTTP. It is a remote endpoint over Streamable HTTP, so there is nothing to install.
- Endpoint:
https://cleartracedata.com/mcp - Transport: Streamable HTTP (stateless). No OAuth, no account.
- Tools: execution_benchmarks, revert_rates, attribution, contract_attribution, explain_transaction, gas_prices, request_api_key.
Claude Code
claude mcp add --transport http cleartrace https://cleartracedata.com/mcp
Any MCP client (config file)
{
"mcpServers": {
"cleartrace": {
"type": "http",
"url": "https://cleartracedata.com/mcp",
"headers": { "X-API-Key": "ct_your_key_here" }
}
}
}
The X-API-Key header is optional. Without it you are on the anonymous tier; a free key multiplies every rate limit by 10 and changes nothing else. Every figure served here is public and identical with or without a key, and no data sits behind one. You can mint a key from inside a conversation by asking the agent to call request_api_key, or with:
curl -X POST https://cleartracedata.com/api/v1/keys \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","use_case":"what you are building"}'
Reading the results honestly. The tools carry their own caveats and an agent should pass them through: the slippage score measures slippage only and does not fold in revert rates or MEV; revert rates are comparable only between venues where the user submits the swap themselves; and attribution volumes refresh weekly, dated to the Monday of their window. Contracts we cannot identify are returned unlabeled rather than guessed at.
1. Fetch Protocol Quality Scores
Get a ranked list of DEX aggregators scored by their execution quality and MEV protection.
cURL
curl -X GET "https://cleartracedata.com/api/v1/protocols?limit=3&offset=0" \
-H "Accept: application/json"
Python
importrequests response = requests.get( "https://cleartracedata.com/api/v1/protocols", params={"limit": 3, "offset": 0} )
2. Fetch Recent Transactions
Retrieve a sample of recent on-chain transactions with exact gas costs, routing legs, and execution status.
cURL
curl -X GET "https://cleartracedata.com/api/v1/transactions?chain=arbitrum&aggregator=1inch&limit=5" \
-H "Accept: application/json"
Python
importrequests response = requests.get( "https://cleartracedata.com/api/v1/transactions", params={ "chain": "arbitrum", "aggregator": "1inch", "limit": 5 } )
3. Fetch Bulk Attribution Data
Retrieve aggregated volume data across our 4 attribution vectors. This endpoint provides access to over 172,000 attributed contracts and entities.
cURL
curl -X GET "https://cleartracedata.com/api/v1/attribution?chain=ethereum&limit=1" \
-H "Accept: application/json"
Python
importrequests response = requests.get( "https://cleartracedata.com/api/v1/attribution", params={ "chain": "ethereum", "limit": 1000 } )
4. Detect Sandwich Attacks (MEV)
Pull real sandwich-attack events identified in block ordering: the victim's transaction hash, wallet, trade size, and DEX/pair, plus trailing-7-day attack counts and total value sandwiched per chain. Filter by chain, project, or a minimum victim trade size.
cURL
curl -X GET "https://cleartracedata.com/api/v1/mev/sandwiches?chain=ethereum&min_victim_volume_usd=1000&limit=5" \
-H "Accept: application/json"
Python
importrequests response = requests.get( "https://cleartracedata.com/api/v1/mev/sandwiches", params={ "chain": "ethereum", "min_victim_volume_usd": 1000, "limit": 5 } ) data = response.json()
5. Compare Aggregator Revert Rates
The revert rate is the share of an aggregator's routing transactions that fail on-chain. A reliability metric distinct from slippage, reported per chain. Each row also carries user_revert_rate_pct (methodology v6): the same rate over only senders classified as genuine users. The figure to read for cells whose headline is a documented bot-spam residual. Filter by chain or project.
cURL
curl -X GET "https://cleartracedata.com/api/v1/revert-rates?chain=ethereum&limit=10" \
-H "Accept: application/json"
Python
importrequests response = requests.get( "https://cleartracedata.com/api/v1/revert-rates", params={"chain": "ethereum", "limit": 10} )forrinresponse.json()["revert_rates"]:
6. Map Interface Routing Flows
Each edge is a source → target volume aggregate from the attribution engine: e.g. how much direct-retail volume flows into a given router or unknown proxy. Filter by source or target (substring match).
cURL
curl -X GET "https://cleartracedata.com/api/v1/flows?source=Direct&limit=10" \
-H "Accept: application/json"
Python
importrequests response = requests.get( "https://cleartracedata.com/api/v1/flows", params={"source": "Direct", "limit": 10} )foredgeinresponse.json()["flows"]:
7. Look Up Attribution for an Address
Given any contract or wallet, get its per-chain volume split across the four attribution vectors, enriched with any label we've resolved. Most useful for the unlabeled proxies and hidden frontends the engine surfaces as Unknown Proxy/Frontend (0x…). Add ?chain=ethereum to scope to one chain.
cURL
curl -X GET "https://cleartracedata.com/api/v1/contract/0x83d55acdc72027ed339d267eebaf9a41e47490d5/attribution" \
-H "Accept: application/json"
Python
importrequests addr = "0x83d55acdc72027ed339d267eebaf9a41e47490d5" response = requests.get( f"https://cleartracedata.com/api/v1/contract/{addr}/attribution" ) data = response.json()forrecindata["records"]:
8. Attribute a Single Transaction
Paste any transaction hash to classify it live against the four attribution vectors: which frontend/router originated the trade, the pools touched, fee recipients, and whether it was sandwiched. Results are cached permanently (mined transactions never change). Fee amounts are exact raw token units, with no USD applied. Add ?deep=true to use internal call traces, which catches aggregators that sit as intermediates behind allowance-holder contracts and runs the suffix test per sub-call. Add ?price=true for a best-effort, approximate USD trade size (dominant priced leg, DefiLlama spot price, never a settlement figure).
cURL
curl -X GET "https://cleartracedata.com/api/v1/tx/0xee24d08530006e146b9afc88f015f768447d727685f060c5a801484e7b585982?chain=ethereum" \
-H "Accept: application/json"
Python
importrequests tx = "0xee24d08530006e146b9afc88f015f768447d727685f060c5a801484e7b585982" data = requests.get( f"https://cleartracedata.com/api/v1/tx/{tx}", params={"chain": "ethereum"} ).json()