Skip to main content
Glama

Crypto & Macro Market Data (Tanod)

get_dex_price_candles

Read-onlyIdempotent

chainpeek: Get ETH or BTC OHLCV price candles from on-chain DEX swaps. For the oracle price now use get_token_price. Returns OHLCV candles for ETH (WETH/USDC) or BTC (cbBTC/USDC) in USDC from public Uniswap v3 swaps on Base, at 5m, 15m, 1h, 4h or 1d, with the pool, fee tier and the block the data is current to (about a minute behind). Computed by Tanod from one allow-listed pool per pair, not an exchange feed: DEX prices can differ from centralized exchanges; a candle without swaps repeats the previous close; the last candle is still forming. Informational only, not investment advice. A bad pair, interval or limit is a 422 before any payment; a 503 warming_up (index still loading) or rpc_unavailable is not charged. Typically under 0.1 s (served from an index kept current in the background). Price: USD 0.003. Free: 10 chain reads per IP per UTC day. Docs: https://tanod.dev/learn/crypto-ohlcv-candles-api.html

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pair": "<pair>"
    },
    "name": "get_dex_price_candles"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYesWETH/USDC (ETH in USDC, Uniswap v3 0.3% pool on Base) or cbBTC/USDC (BTC in USDC, Uniswap v3 0.05% pool on Base).
limitNoNumber of candles, newest last. Default 48 (1d: 30). Lookback caps: 5m and 15m 200, 1h 168, 4h 42, 1d 30.
intervalNoCandle length, UTC-aligned.1h

Output Schema

NameRequiredDescriptionDefault
dexNo
feeNo
baseNo
noteNo
pairNo
poolNo
as_ofNo
chainNo
countNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
quoteNo
sourceNo
candlesNo
intervalNo
as_of_isoNo
price_unitNo
timestampsNo
as_of_blockNo
interval_secondsNo
last_candle_partialNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • removedInput schema / properties / interval / title
      Removed value: -"Interval"
    • removedInput schema / properties / limit / default
      Removed value: -null
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / pair / title
      Removed value: -"Pair"
    • removedInput schema / title
      Removed value: -"get_dex_price_candlesArguments"
    • removedOutput schema / properties / base / properties
      Removed value: -{
      -  "address": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "decimals": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "symbol": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / candles / items
      Removed value: -{
      -  "properties": {
      -    "close": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "high": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "low": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "open": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "swaps": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "t": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "volume_base": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "volume_quote": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / quote / properties
      Removed value: -{
      -  "address": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "decimals": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "symbol": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "as_of": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "as_of_block": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "as_of_iso": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "base": {
      +      "properties": {
      +        "address": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "decimals": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "symbol": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "candles": {
      +      "items": {
      +        "properties": {
      +          "close": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "high": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "low": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "open": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "swaps": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "t": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "volume_base": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "volume_quote": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "maxItems": 200,
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "chain": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "count": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "dex": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "fee": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "interval": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "interval_seconds": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "last_candle_partial": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "pair": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "pool": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "price_unit": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "quote": {
      +      "properties": {
      +        "address": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "decimals": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "symbol": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "timestamps": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the upstream source (one allow-listed Uniswap v3 pool per pair on Base), staleness (~a minute behind), the fact that gap candles repeat the prior close and the last candle is still forming, and that DEX prices can diverge from CEX feeds. It also documents error semantics (422 before payment, 503 warming_up/rpc_unavailable not charged), latency, price and free quota — far more than the structured fields carry.

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

Conciseness4/5

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

Front-loaded with purpose and the sibling alternative, then progressively deeper operational detail; nearly every clause carries information. It is a dense single paragraph, and the "not investment advice" line plus docs URL are marginal for an agent's tool-selection decision.

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?

An output schema exists, so return-shape explanation is unnecessary, and the description covers what an agent still needs: data provenance, freshness, edge-case candle behavior, failure modes with billing implications, and cost. Nothing material for correct invocation is missing.

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?

Schema coverage is 100%, so the enums, defaults and lookback caps are already documented, making 3 the baseline. The description restates the interval set and adds only that a bad pair, interval or limit yields a 422, which is error behavior rather than new parameter meaning.

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 ("Get ETH or BTC OHLCV price candles from on-chain DEX swaps") plus the exact pairs and intervals returned. It explicitly distinguishes itself from the sibling get_token_price ("For the oracle price now use get_token_price"), so an agent can route between them without opening either schema.

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?

Names one clear alternative and the condition selecting it (spot/oracle price now → get_token_price), which covers the most likely confusion. It does not spell out when to prefer other market-data siblings such as get_dex_volume, so it falls short of fully exhaustive when/when-not 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.