Skip to main content
Glama

Tanod Finance

chainpeek: ETH and BTC OHLCV price candles from on-chain DEX swaps

get_dex_price_candles
Read-onlyIdempotent

chainpeek: Get ETH or BTC OHLCV price candles from on-chain DEX swaps. 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). Input: pair, optional interval and limit. 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.

Input Schema

TableJSON 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

TableJSON 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. 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"
      +}
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources