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": [
    [
      1711843200000,
      69702.3087473573
    ],
    [
      1711929600000,
      71246.9514406015
    ],
    [
      1711983682000,
      68887.7495158568
    ]
  ],
  "market_caps": [
    [
      1711843200000,
      1370247487960.09
    ],
    [
      1711929600000,
      1401370211582.37
    ],
    [
      1711983682000,
      1355701979725.16
    ]
  ],
  "total_volumes": [
    [
      1711843200000,
      16408802301.8374
    ],
    [
      1711929600000,
      19723005998.215
    ],
    [
      1711983682000,
      30137418199.6431
    ]
  ]
}

Tips

  • You may obtain the asset platform and contract address via several ways:
    • refers to respective coin page and find ‘contract address’.
    • refers to /coins/list endpoint (include platform = true).

Note

  • You may leave the interval as empty for automatic granularity:
    • 1 day from current time = 5-minutely data
    • 2 - 90 days from current time = hourly data
    • above 90 days from current time = daily data (00:00 UTC)
  • Cache / Update Frequency:
    • Every 5 minutes for all the API plans.
    • The last completed UTC day (00:00) is available 35 minutes after midnight on the next UTC day (00:35). The cache will always expire at 00:40 UTC.
  • Access to historical data via the Public API (Demo plan) is restricted to the past 365 days only. To access the complete range of historical data, please subscribe to one of our paid plans to obtain a Pro-API key.

Authorizations

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

Path Parameters

id
string
default:ethereum
required

asset platform ID *refers to /asset_platforms.

Example:

"ethereum"

contract_address
string
default:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
required

the contract address of token

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

Query Parameters

vs_currency
string
default:usd
required

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

Example:

"usd"

days
string
default:1
required

data up to number of days ago You may use any integer for number of days

interval
enum<string>

data interval, leave empty for auto granularity Possible value: daily

Available options:
daily
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

Get historical market data include price, market cap, and 24hr volume

The response is of type object.