Skip to main content
GET
/
coins
/
{id}
/
contract
/
{contract_address}
/
market_chart
Coin Historical Chart Data by Token Address
curl --request GET \
  --url https://api.coingecko.com/api/v3/coins/{id}/contract/{contract_address}/market_chart \
  --header 'x-cg-demo-api-key: <api-key>'
{
  "prices": [
    [
      1779619498604,
      0.9997624087636037
    ],
    [
      1779619877081,
      0.9997817655336941
    ]
  ],
  "market_caps": [
    [
      1779619498604,
      76419636272.78033
    ],
    [
      1779619877081,
      76424065983.84229
    ]
  ],
  "total_volumes": [
    [
      1779619498604,
      9374311493.936354
    ],
    [
      1779619877081,
      9390008044.485624
    ]
  ]
}

Notes

  • Find a token’s contract address on its CoinGecko page or via Coins List with include_platform=true.
  • Auto-granularity when interval is not specified:
    • 1 day from current time = 5-minutely data
    • 2–90 days = hourly data
    • Above 90 days = daily data (00:00 UTC)
The last completed UTC day (00:00) is available 35 minutes after midnight (00:35 UTC). Cache expires at 00:40 UTC.
Historical data via the Demo API is restricted to the past 365 days. Subscribe to a paid plan for the full range.

SDK Examples

const response = await client.coins.contract.marketChart.get('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', {
  id: 'ethereum',
  vs_currency: 'usd',
  days: '1',
});

console.log(JSON.stringify(response, null, 2));

Authorizations

x-cg-demo-api-key
string
header
required

Path Parameters

id
string
default:ethereum
required

Asset platform ID. *refers to /asset_platforms.

contract_address
string
default:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
required

The contract address of token.

Query Parameters

vs_currency
string
default:usd
required

Target currency of market data. *refers to /simple/supported_vs_currencies.

days
string
default:1
required

Data up to number of days ago. You may use any integer or max for number of days.

interval
enum<string>

Data interval, leave empty for auto granularity.

Available options:
daily,
hourly
precision
enum<string>

Decimal place for currency price value.

Available options:
full,
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18

Response

200 - application/json

Coin historical chart data by token address

prices
number[][]
required

Price data points as [timestamp, price] pairs

market_caps
number[][]
required

Market cap data points as [timestamp, market_cap] pairs

total_volumes
number[][]
required

Total volume data points as [timestamp, volume] pairs