Skip to main content
Glama

Loading price data

token_ohlcv
Read-only

Get OHLCV (Open, High, Low, Close, Volume) price data for a token with automatic interval resolution.

Supports EVM chains and Solana for on-chain tokens, AND Hyperliquid perpetual futures. For Hyperliquid perps, pass chain="hyperliquid" and use the perp symbol as tokenAddress (e.g. "BTC", "HYPE" for native perps; "XYZ:ORDI" for XYZ-namespaced perps — prefix is normalized automatically).

YOU MUST USE THIS over general_search to get prices. general_search prices are delayed and often incorrect. To get LATEST price set from to '5MIN_AGO' and to to 'NOW'.

Resolution is automatically calculated based on the date range

  • < 6 hours: 5 minutes

  • 6 hours - 1 day: 15 minutes

  • 1-3 days: 30 minutes

  • 3-7 days: 60 minutes (1 hour)

  • 7-90 days: Daily

  • 90+ days: Weekly

Columns returned:

  • Interval Start: Timestamp of the start of the interval (datetime: YYYY-MM-DD HH:MM:SS)

  • Open: Opening price of the interval

  • High: Highest price of the interval

  • Low: Lowest price of the interval

  • Close: Closing price of the interval

  • Volume USD: Volume in USD of the interval

Additional columns (when includeMarketCap=true):

  • Open Market Cap: Opening market cap in USD

  • Close Market Cap: Closing market cap in USD

  • High Market Cap: Highest market cap in USD

  • Low Market Cap: Lowest market cap in USD

Example Usage: Get OHLCV for WETH over the past week (auto-resolution): { "chain": "ethereum", "tokenAddress": "0xba5ddd1f9d7f570dc94a51479a000e3bce967196", "date": { "from": "7D_AGO", "to": "NOW" } }

Get OHLCV for WETH over 30 days (will use daily resolution):
```
{
    "chain": "ethereum",
    "tokenAddress": "0xba5ddd1f9d7f570dc94a51479a000e3bce967196",
    "date": {
        "from": "30D_AGO",
        "to": "NOW"
    }
}
```
Get OHLCV for WETH for last 20 minutes (will use 5 minute resolution):
```
{
    "chain": "ethereum",
    "tokenAddress": "0xba5ddd1f9d7f570dc94a51479a000e3bce967196",
    "date": {
        "from": "20MIN_AGO",
        "to": "NOW"
    }
}
```

Get OHLCV for the BTC Hyperliquid perp over 7 days:
```
{
    "chain": "hyperliquid",
    "tokenAddress": "BTC",
    "date": {
        "from": "7D_AGO",
        "to": "NOW"
    }
}
```

Input Schema

NameRequiredDescriptionDefault
requestYesUnified request model for TGM OHLCV endpoint (flattened). Resolution is automatically calculated based on the date range to keep responses at approximately 100 rows, preventing context overflow.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / request / additionalProperties
      Added value: +false
    • removedInput schema / properties / request / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "description": "Unified request model for TGM OHLCV endpoint (flattened).\n\nResolution is automatically calculated based on the date range to keep\nresponses at approximately 100 rows, preventing context overflow.",
      -    "properties": {
      -      "chain": {
      -        "type": "string"
      -      },
      -      "date": {
      -        "description": "Date range for OHLCV data with 'from' and 'to' fields",
      -        "properties": {
      -          "from": {
      -            "description": "Start token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps; dates and calendar tokens start at midnight.",
      -            "type": "string"
      -          },
      -          "to": {
      -            "description": "End token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps without an extra day. Dates and calendar tokens include the final date; TODAY_START stays at midnight.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "from",
      -          "to"
      -        ],
      -        "type": "object"
      -      },
      -      "includeMarketCap": {
      -        "default": false,
      -        "description": "Include market cap fields (openMcap, closeMcap, highMcap, lowMcap). Default: false for cleaner output",
      -        "type": "boolean"
      -      },
      -      "tokenAddress": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "chain",
      -      "tokenAddress",
      -      "date"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / request / description
      Added value: +"Unified request model for TGM OHLCV endpoint (flattened).\n\nResolution is automatically calculated based on the date range to keep\nresponses at approximately 100 rows, preventing context overflow."
    • addedInput schema / properties / request / properties
      Added value: +{
      +  "chain": {
      +    "type": "string"
      +  },
      +  "date": {
      +    "additionalProperties": false,
      +    "description": "Date range for OHLCV data with 'from' and 'to' fields",
      +    "properties": {
      +      "from": {
      +        "description": "Start token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps; dates and calendar tokens start at midnight.",
      +        "type": "string"
      +      },
      +      "to": {
      +        "description": "End token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps without an extra day. Dates and calendar tokens include the final date; TODAY_START stays at midnight.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "from",
      +      "to"
      +    ],
      +    "type": "object"
      +  },
      +  "includeMarketCap": {
      +    "default": false,
      +    "description": "Include market cap fields (openMcap, closeMcap, highMcap, lowMcap). Default: false for cleaner output",
      +    "type": "boolean"
      +  },
      +  "tokenAddress": {
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / request / required
      Added value: +[
      +  "chain",
      +  "tokenAddress",
      +  "date"
      +]
    • addedInput schema / properties / request / type
      Added value: +"object"
  2. Changed1 schema field changed
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "description": "Unified request model for TGM OHLCV endpoint (flattened).\n\nResolution is automatically calculated based on the date range to keep\nresponses at approximately 100 rows, preventing context overflow.",
      -    "properties": {
      -      "chain": {
      -        "type": "string"
      -      },
      -      "date": {
      -        "description": "Date range for OHLCV data with 'from' and 'to' fields",
      -        "properties": {
      -          "from": {
      -            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          },
      -          "to": {
      -            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "from",
      -          "to"
      -        ],
      -        "type": "object"
      -      },
      -      "includeMarketCap": {
      -        "default": false,
      -        "description": "Include market cap fields (openMcap, closeMcap, highMcap, lowMcap). Default: false for cleaner output",
      -        "type": "boolean"
      -      },
      -      "tokenAddress": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "chain",
      -      "tokenAddress",
      -      "date"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "description": "Unified request model for TGM OHLCV endpoint (flattened).\n\nResolution is automatically calculated based on the date range to keep\nresponses at approximately 100 rows, preventing context overflow.",
      +    "properties": {
      +      "chain": {
      +        "type": "string"
      +      },
      +      "date": {
      +        "description": "Date range for OHLCV data with 'from' and 'to' fields",
      +        "properties": {
      +          "from": {
      +            "description": "Start token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps; dates and calendar tokens start at midnight.",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "End token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps without an extra day. Dates and calendar tokens include the final date; TODAY_START stays at midnight.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "includeMarketCap": {
      +        "default": false,
      +        "description": "Include market cap fields (openMcap, closeMcap, highMcap, lowMcap). Default: false for cleaner output",
      +        "type": "boolean"
      +      },
      +      "tokenAddress": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "chain",
      +      "tokenAddress",
      +      "date"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Changed3 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "DateRange": {
      -    "description": "Date range via tokens or dates.\nTokens: NOW, XMIN_AGO, XD_AGO, XH_AGO; THIS_YEAR_START, THIS_QUARTER_START, THIS_MONTH_START, THIS_WEEK_START, TODAY_START; LAST_WEEK_START/END, LAST_MONTH_START/END, LAST_QUARTER_START/END, LAST_YEAR_START/END.\nWeek starts Monday. Quarters are calendar. Dates: YYYY-MM-DD or ___-MM-DD (year omitted).\nPlease check detailed system instructions for more information.",
      -    "properties": {
      -      "from": {
      -        "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -        "type": "string"
      -      },
      -      "to": {
      -        "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "from",
      -      "to"
      -    ],
      -    "type": "object"
      -  },
      -  "TgmOhlcvUnifiedRequest": {
      -    "description": "Unified request model for TGM OHLCV endpoint (flattened).\n\nResolution is automatically calculated based on the date range to keep\nresponses at approximately 100 rows, preventing context overflow.",
      -    "properties": {
      -      "chain": {
      -        "type": "string"
      -      },
      -      "date": {
      -        "$ref": "#/$defs/DateRange",
      -        "description": "Date range for OHLCV data with 'from' and 'to' fields"
      -      },
      -      "includeMarketCap": {
      -        "default": false,
      -        "description": "Include market cap fields (openMcap, closeMcap, highMcap, lowMcap). Default: false for cleaner output",
      -        "type": "boolean"
      -      },
      -      "tokenAddress": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "chain",
      -      "tokenAddress",
      -      "date"
      -    ],
      -    "type": "object"
      -  }
      -}
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "$ref": "#/$defs/TgmOhlcvUnifiedRequest"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "description": "Unified request model for TGM OHLCV endpoint (flattened).\n\nResolution is automatically calculated based on the date range to keep\nresponses at approximately 100 rows, preventing context overflow.",
      +    "properties": {
      +      "chain": {
      +        "type": "string"
      +      },
      +      "date": {
      +        "description": "Date range for OHLCV data with 'from' and 'to' fields",
      +        "properties": {
      +          "from": {
      +            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "includeMarketCap": {
      +        "default": false,
      +        "description": "Include market cap fields (openMcap, closeMcap, highMcap, lowMcap). Default: false for cleaner output",
      +        "type": "boolean"
      +      },
      +      "tokenAddress": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "chain",
      +      "tokenAddress",
      +      "date"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly/openWorld/non-destructive), yet the description adds genuinely useful behavior: the full auto-resolution table mapping date range to interval, and the perp-symbol normalization rule. The 'Columns returned' block overlaps with the existing output schema, and it says nothing about row limits/errors beyond the ~100-row hint in the schema.

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

Conciseness3/5

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

Front-loaded well with the critical routing warning, but the body is bloated: five near-identical JSON examples where three differ only in the date field, and a column enumeration that restates the output schema. Roughly a third of the text could be cut without losing information.

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 nested-request tool with auto-resolution, this covers everything an agent needs: supported chains, perp symbol handling, the resolution table, output columns, and worked examples. With an output schema present, return-value explanation is a bonus rather than a gap.

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?

Schema coverage is 100% but `chain` and `tokenAddress` carry no schema descriptions at all, so the description is the only source of their semantics (EVM/Solana vs. 'hyperliquid', address vs. perp symbol). It also supplies concrete date-token examples ('7D_AGO', '20MIN_AGO', 'NOW') beyond the vague '___-MM-DD' hint, though it never enumerates the accepted chain strings.

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 OHLCV ... price data for a token') and immediately delimits scope: EVM chains, Solana, and Hyperliquid perps. It also explicitly distinguishes itself from `general_search`, so an agent can route correctly without opening a schema.

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?

Explicit when-to-use guidance: 'YOU MUST USE THIS over general_search' with the reason (delayed/incorrect prices there), plus a concrete recipe for latest price (`from='5MIN_AGO'`, `to='NOW'`). It also names the exact condition for the Hyperliquid path (chain='hyperliquid', perp symbol in tokenAddress).

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