Skip to main content
Glama

arbitrage_history

Read-onlyIdempotent

Historical arbitrage opportunities — top 5 per day (MCP-compatible) — Returns a daily history of the top 5 cross-exchange arbitrage opportunities detected by the platform. Each day entry lists the 5 highest-spread opportunities saved by the cron job, including token symbol, spread percentage, buy/sell exchanges, and average USD volume. Useful for AI agents answering questions like 'which tokens appear most frequently in arbitrage?' or 'what is the average daily spread?'. Data is accumulated daily; older than 180 days is automatically purged. Response: { days, history: [{date, opportunities: [{symbol, spreadPct, buyExchange, sellExchange, usdVolume}]}], total, updatedAt }. Query parameter: ?days=7 (default 7, max 180). No authentication required. 60 requests/min rate limit. 5-min in-process cache. — Use this for daily historical data; use the corresponding live snapshot tool for current conditions and the monthly tool for long-term trends.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to look back (default 7, max 180).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
totalNoTotal number of individual opportunity rows returned.
historyNoPer-day list of top arbitrage opportunities, newest first.
updatedAtNo
attributionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "attribution": {
      +      "$ref": "#/components/schemas/Attribution"
      +    },
      +    "days": {
      +      "type": "number"
      +    },
      +    "history": {
      +      "description": "Per-day list of top arbitrage opportunities, newest first.",
      +      "items": {
      +        "properties": {
      +          "date": {
      +            "description": "Snapshot date (YYYY-MM-DD).",
      +            "type": "string"
      +          },
      +          "opportunities": {
      +            "description": "Top arbitrage opportunities for this day (up to 5), sorted by spread descending.",
      +            "items": {
      +              "properties": {
      +                "buyExchange": {
      +                  "description": "DEX/chain where the token is cheapest (buy here).",
      +                  "type": "string"
      +                },
      +                "sellExchange": {
      +                  "description": "DEX/chain where the token is most expensive (sell here).",
      +                  "type": "string"
      +                },
      +                "spreadPct": {
      +                  "description": "Price spread between exchanges as a percentage, e.g. 1.23 = 1.23%.",
      +                  "type": "number"
      +                },
      +                "symbol": {
      +                  "description": "Token symbol, e.g. 'ETH'.",
      +                  "type": "string"
      +                },
      +                "usdVolume": {
      +                  "description": "Average 24h USD volume across the buy and sell pairs.",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total": {
      +      "description": "Total number of individual opportunity rows returned.",
      +      "type": "number"
      +    },
      +    "updatedAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly, openWorld, idempotent, and non-destructive. The description adds substantial behavioral context beyond that: data is accumulated daily, older than 180 days is purged, no authentication is required, there is a 60 requests/min rate limit, and a 5-min in-process cache exists. No contradiction with annotations.

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?

The description is dense but every clause earns its place: purpose, data granularity, example use cases, retention policy, response shape, parameter semantics, operational limits, and routing guidance. It is front-loaded with the most important differentiator ('top 5 per day') and closes with explicit sibling routing.

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?

For a simple read-only tool with one parameter and an output schema, the description is complete. It covers what the tool returns, why an agent would call it, how to parameterize it, how long data is retained, rate and cache behavior, and when to prefer a sibling tool instead. Nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

The input schema already fully documents the `days` parameter with default, min, max, and description, so the baseline is 3. The description adds meaningful context by linking the 180-day max to the automatic data purge, and by restating the query parameter in a usage context. This is a modest but genuine increment over the schema.

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?

States a specific verb and resource: 'Returns a daily history of the top 5 cross-exchange arbitrage opportunities detected by the platform.' The scope ('top 5 per day', 'daily historical data') clearly distinguishes it from the monthly arbitrage tool and the live snapshot tool mentioned.

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

Usage Guidelines5/5

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

Explicitly says when to use it: for daily historical data and for AI-agent questions about frequency and average spreads. It also names alternatives: 'use the corresponding live snapshot tool for current conditions and the monthly tool for long-term trends.' This gives the agent both inclusion and exclusion guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources