Skip to main content
Glama

Chart token price history

portal_evm_get_ohlc
Read-only

Generate chart-ready OHLC candles and recent trade tape from DEX swap events on EVM networks, supporting Uniswap v2/v3/v4 and Aerodrome Slipstream pools.

Instructions

Build chart-ready EVM OHLC candles plus a recent trade tape from supported DEX event sources, including Uniswap v2-style swaps, Uniswap v3/v4, and Aerodrome Slipstream.

COMMON USER ASKS:

  • Base Uniswap v2-style swap candles

  • Base Uniswap candles

  • Base Uniswap v4 candles

WHEN TO USE:

  • You need OHLC candles for supported EVM event-derived price sources.

  • You want a candle chart and recent trades instead of scalar time-series buckets.

  • You want a Dexscreener-style pool chart with hover-ready candle metadata and a trade tape.

DON'T USE:

  • You only need counts or scalar metrics over time.

  • You want a simple activity chart for a network rather than pool candles.

EXAMPLES:

  • Base Uniswap v2-style swap candles: {"network":"base-mainnet","source":"uniswap_v2_swap","pool_address":"0x","duration":"1h","interval":"5m","price_in":"auto","include_recent_trades":true}

  • Base Uniswap candles: {"network":"base-mainnet","source":"uniswap_v3_swap","pool_address":"0x","duration":"1h","interval":"5m","price_in":"auto"}

  • Base Uniswap v4 candles: {"network":"base-mainnet","source":"uniswap_v4_swap","pool_id":"0x","duration":"1h","interval":"5m","price_in":"auto","include_recent_trades":true}

  • Base Aerodrome Slipstream candles: {"network":"base-mainnet","source":"aerodrome_slipstream_swap","pool_address":"0x","duration":"1h","interval":"5m","price_in":"token1"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feeNoOptional Uniswap v4 LP fee in hundredths of a bip, e.g. 3000 for 0.30%.
modeNoExecution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.deep
cursorNoContinuation cursor from a previous candle page
sourceNoWhich event source to build candles from. Prefer swap-derived sources for factual trade prices and volumes. Uniswap v4 uses PoolManager Swap events filtered by pool_id, not a per-pool contract address.uniswap_v3_swap
networkNoEVM network name (default: base-mainnet)base-mainnet
pool_idNoUniswap v4 pool id (bytes32). Optional when you provide the full v4 pool key instead.
durationNoHow much recent history to cover. Accepts compact durations like "1h" or natural phrases like "past 30 minutes".1h
intervalNoCandle interval. auto uses chart-friendly defaults like 1h→5m and 24h→1h.auto
price_inNoChoose which token the displayed price should be expressed in. auto picks the more human-readable quote side.auto
base_tokenNoLegacy orientation input. Prefer price_in instead.
pool_addressNoPool/pair contract address for address-keyed sources like Uniswap v3, Slipstream, or Sync-derived CPMM pools.
tick_spacingNoOptional Uniswap v4 tick spacing. Required with the rest of the pool key when deriving pool_id.
hooks_addressNoOptional Uniswap v4 hooks contract address. Defaults to the zero address when omitted.
token0_symbolNoOptional token0 symbol label for summaries
token1_symbolNoOptional token1 symbol label for summaries
token0_addressNoOptional token0 address to infer known decimals
token1_addressNoOptional token1 address to infer known decimals
token0_decimalsNoOptional token0 decimals for human-readable prices
token1_decimalsNoOptional token1 decimals for human-readable prices
currency0_addressNoOptional Uniswap v4 currency0 address. Use with currency1_address, fee, and tick_spacing to derive pool_id factually.
currency1_addressNoOptional Uniswap v4 currency1 address. Use with currency0_address, fee, and tick_spacing to derive pool_id factually.
recent_trades_limitNoMaximum number of recent trades to return in the trade tape.
pool_manager_addressNoUniswap v4 PoolManager address. Optional on networks with a built-in official Uniswap deployment mapping.
include_recent_tradesNoInclude a recent trade tape for swap-derived sources when factual per-trade amounts are available.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_uiNoOptional chart, table, and follow-up presentation metadata.
_llmNoHints that help an AI client locate the primary evidence.
_metaNoNetwork, block range, timing, and row-count metadata.
errorNoStructured failure details when the tool cannot complete the request.
itemsNoPrimary result rows when the tool returns a list.
valueNoPrimary result when the tool returns a scalar value.
answerNoConcise answer grounded in the returned blockchain data.
_noticeNoImportant limitation or truncation notice.
displayNoPlain-language labels for presenting the result.
_noticesNoImportant limitations or truncation notices.
_summaryNoHuman-readable summary of the result.
_coverageNoCompleteness of the requested window and result set.
_evidenceNoReplayable arguments, exact-data digest, row count, and completeness receipt.
_orderingNoOrdering guarantees for the returned data.
_executionNoBounded execution and scan details.
_freshnessNoFreshness and finality information for the returned data.
next_stepsNoSafe follow-up actions and continuation guidance.
_paginationNoPagination state and an optional continuation cursor.
investigationNoEvidence paths, useful pivots, and result limitations.
pipes_handoffNoOptional SQD Pipes guidance for custom data needs.
_tool_contractNoTool identity, intent, and supported blockchain families.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.8.3
    • addedOutput schema / properties / _evidence
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Replayable arguments, exact-data digest, row count, and completeness receipt.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed7 schema fields changedv0.8.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / fee / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / fee / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / tick_spacing / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / tick_spacing / minimum
      Added value: +-9007199254740991
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "_coverage": {
      +      "description": "Completeness of the requested window and result set."
      +    },
      +    "_execution": {
      +      "additionalProperties": {},
      +      "description": "Bounded execution and scan details.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "_freshness": {
      +      "description": "Freshness and finality information for the returned data."
      +    },
      +    "_llm": {
      +      "description": "Hints that help an AI client locate the primary evidence."
      +    },
      +    "_meta": {
      +      "additionalProperties": {},
      +      "description": "Network, block range, timing, and row-count metadata.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "_notice": {
      +      "description": "Important limitation or truncation notice.",
      +      "type": "string"
      +    },
      +    "_notices": {
      +      "description": "Important limitations or truncation notices.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "_ordering": {
      +      "description": "Ordering guarantees for the returned data."
      +    },
      +    "_pagination": {
      +      "additionalProperties": {},
      +      "description": "Pagination state and an optional continuation cursor.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "_summary": {
      +      "description": "Human-readable summary of the result.",
      +      "type": "string"
      +    },
      +    "_tool_contract": {
      +      "additionalProperties": {},
      +      "description": "Tool identity, intent, and supported blockchain families.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "_ui": {
      +      "description": "Optional chart, table, and follow-up presentation metadata."
      +    },
      +    "answer": {
      +      "description": "Concise answer grounded in the returned blockchain data.",
      +      "type": "string"
      +    },
      +    "display": {
      +      "additionalProperties": {},
      +      "description": "Plain-language labels for presenting the result.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "error": {
      +      "additionalProperties": {},
      +      "description": "Structured failure details when the tool cannot complete the request.",
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "origin": {
      +          "type": "string"
      +        },
      +        "retry_after_ms": {
      +          "type": "number"
      +        },
      +        "retryable": {
      +          "type": "boolean"
      +        },
      +        "suggestions": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "summary": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "origin",
      +        "summary",
      +        "retryable",
      +        "suggestions"
      +      ],
      +      "type": "object"
      +    },
      +    "investigation": {
      +      "additionalProperties": {},
      +      "description": "Evidence paths, useful pivots, and result limitations.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "items": {
      +      "description": "Primary result rows when the tool returns a list.",
      +      "items": {},
      +      "type": "array"
      +    },
      +    "next_steps": {
      +      "additionalProperties": {},
      +      "description": "Safe follow-up actions and continuation guidance.",
      +      "properties": {
      +        "actions": {
      +          "items": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "continuation": {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "custom_data": {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "actions"
      +      ],
      +      "type": "object"
      +    },
      +    "pipes_handoff": {
      +      "description": "Optional SQD Pipes guidance for custom data needs."
      +    },
      +    "value": {
      +      "description": "Primary result when the tool returns a scalar value."
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observedv0.7.9

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds useful behavioral context beyond annotations: it explains the output includes both OHLC candles and a trade tape, that prices come from event-derived sources, and that v4 candles are built from PoolManager Swap events. This goes beyond simple read-only labeling without being exhaustive.

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?

The description is longer than average, but it is well-organized into labeled sections and front-loaded with the core purpose. The COMMON USER ASKS and EXAMPLES are somewhat redundant with the parameter list and source enum, but they serve as practical invocation templates and are not wasted words.

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 tool with 24 parameters, 5 enums, an output schema, and a broad sibling family, this description is highly complete. It covers supported sources, usage boundaries, common wording variants, and concrete JSON examples. Nothing an agent needs to decide whether and how to call this tool 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 description coverage is 100%, so the schema already documents all 24 parameters. The description's examples demonstrate realistic parameter combinations, but the prose does not add new semantic meaning beyond the schema. This meets the baseline of 3 without exceeding it.

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?

The description states a specific action ('Build chart-ready EVM OHLC candles plus a recent trade tape') and names the exact event sources it supports (Uniswap v2/v3/v4, Aerodrome Slipstream). It clearly differentiates this tool from siblings like portal_hyperliquid_get_ohlc and portal_get_time_series by specifying EVM DEX-derived candle data.

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?

The description includes explicit WHEN TO USE and DON'T USE sections, along with concrete COMMON USER ASKS and EXAMPLES. It tells the agent when candle charts are appropriate and when to avoid this tool in favor of scalar metrics or simple activity charts, giving clear decision criteria.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/subsquid-labs/portal-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server