API & MCP
Agents need a route decision they can cite. Electra Finance will expose the same published comparisons through a read API and an MCP server.
An agent asks for a pair and a size. The response, when a snapshot exists, carries:
- Provider name and type
- Net output, in USD, after gas and fees
- Gas, in USD
- Price impact, in basis points
- Shortfall versus the best quote, in basis points
- Electra Score, when the leaderboard has one for that provider and chain
- Snapshot time and snapshot hash
There is no execution in this interface, and no custody. Commissions never affect ranking.
Example
{
"tool": "electra.best_route",
"params": {
"pair": "usdc-to-eth-on-base",
"amount_usd": 2000
}
} This is the shape of the request. The API and the MCP server are not live yet, so there is no sample payload of quotes.
Today, this website reads v_latest_best_routes and v_provider_leaderboard with the
public anon key. That key is read-only. The site never uses a service role key.