Skip to content
Scrappa Get API key
CoinGecko API 1 credit / request

CoinGecko History API Documentation

GET https://scrappa.co/api/coingecko/history

CoinGecko History API Documentation Read a price, market cap and volume series for one coin id. Each point has an ISO-8601 timestamp and a price with currency. Pass a day count from 1 to 365. The free public series reaches back 365 days. A larger count returns 422. An unknown id or empty series costs no credit. Cost: 1 credit per successful request. Scrappa is an independent service and is not affiliated with or endorsed by CoinGecko.

CoinGecko History API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/coingecko/history
Auth header
x-api-key
Cost
1 credit / request
id = 1234567890
Response preview
200 OK
{
    "data": {
        "id": "bitcoin",
        "days": 30,
        "points": 30,
        "history": [
            {
                "price": 67000.5,
                "volume": 28000000000,
                "currency": "USD",
                "timestamp": "2026-10-18T00:00:00Z",
                "market_cap": 1320000000000
            }
        ],
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

2 optional filters available.

id string Required

Lowercase CoinGecko id, e.g. bitcoin.

Example value 1234567890
days integer Optional

Number of days, 1 to 365, default 30. The free public series reaches back 365 days.

Example value 10
currency string Optional

Quote currency: USD (default), EUR, GBP or BTC. Other values return 422.

Example value USD

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "id": "bitcoin",
        "days": 30,
        "points": 30,
        "history": [
            {
                "price": 67000.5,
                "volume": 28000000000,
                "currency": "USD",
                "timestamp": "2026-10-18T00:00:00Z",
                "market_cap": 1320000000000
            }
        ],
        "currency": "USD",
        "requested_days": 30
    },
    "meta": {
        "source": "coingecko",
        "credits": 1,
        "billable": true,
        "endpoint_family": "history"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "days": [
            "days is at most 3650."
        ]
    },
    "message": "The request validation failed"
}
503

Service Unavailable

The upstream data is temporarily unavailable. This response is not billable.

{
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The CoinGecko data is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.