Get Contract Market Chart by Date Range
Retrieves historical price, market cap, and volume for a token by contract within a specific date range. Returns [timestamp, value] arrays with auto-adjusted granularity; specify exact Unix timestamps for custom windows. Ideal for: analyzing specific time periods, event-based analysis, generating custom date range reports.
Catalog action Blockchain Data
Retrieves historical price, market cap, and volume for a token by contract within a specific date range. Returns [timestamp, value] arrays with auto-adjusted granularity; specify exact Unix timestamps for custom windows. Ideal for: analyzing specific time periods, event-based analysis, generating custom date range reports.
At a Glance
| Field | Value |
|---|---|
| Action ID | coingecko-get-contract-market-chart-range |
| Category | Blockchain Data |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | coingecko, contract, chart, historical, range, price, read |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | Asset platform ID (e.g., 'ethereum', 'polygon-pos', 'arbitrum-one', 'base'). See /asset_platforms endpoint for full list. |
contractAddress | string | Yes | Token contract address on the specified platform. |
vsCurrency | string | Yes | Target currency for price data (e.g., 'usd', 'eur', 'btc'). |
from | number | string | Yes | Start date as Unix timestamp (seconds) or ISO date string (YYYY-MM-DD). |
to | number | string | Yes | End date as Unix timestamp (seconds) or ISO date string (YYYY-MM-DD). |
interval | string | No | Data interval: '5m', 'hourly', or 'daily'. If not specified, auto-selected based on date range. |
precision | number | No | Decimal precision for price values (0-18). |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
coinId | string | Yes | Token identifier (contract address). |
vsCurrency | string | Yes | Target currency. |
prices | array | Yes | Array of price data points |
marketCaps | array | Yes | Array of market cap data points |
totalVolumes | array | Yes | Array of volume data points |
Examples
json{ "type": "coingecko-get-contract-market-chart-range", "payload": { "platform": "example-platform", "contractAddress": "0x0000000000000000000000000000000000000000", "vsCurrency": "example-vsCurrency", "from": "example-from", "to": "example-to" }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/coingecko-get-contract-market-chart-range/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "platform": "example-platform", "contractAddress": "0x0000000000000000000000000000000000000000", "vsCurrency": "example-vsCurrency", "from": "example-from", "to": "example-to" }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
