# Bitcoin OHLC Candlestick Data (7 Days) - CoinGecko

**Use case:** 

Open, high, low and close candles for Bitcoin over the last seven days, in the 4-hour steps CoinGecko sets for this window. One row per candle with the UTC timestamp, the date and the change inside the candle - for charting libraries, indicators and short backtests that need OHLC rather than a single daily price. Switch ids to any coin and days to 1, 14, 30, 90, 180 or 365.

## Input

```json
{
  "mode": "ohlc",
  "ids": [
    "bitcoin"
  ],
  "vsCurrency": "usd",
  "limit": 50,
  "order": "market_cap_desc",
  "priceChangeWindows": [
    "1h",
    "24h",
    "7d"
  ],
  "includeSparkline": false,
  "sortDir": "desc",
  "includeDescription": true,
  "includeTickers": false,
  "includeCommunity": false,
  "includeDeveloper": false,
  "includeNfts": false,
  "includeCategories": false,
  "categoryOrder": "market_cap_desc",
  "days": 7,
  "dailyOnly": true,
  "apiPlan": "demo"
}
```

## Output

```json
{
  "coinId": {
    "label": "Coin",
    "format": "text"
  },
  "date": {
    "label": "Date",
    "format": "text"
  },
  "timestamp": {
    "label": "Timestamp",
    "format": "date"
  },
  "price": {
    "label": "Price",
    "format": "number"
  },
  "open": {
    "label": "Open",
    "format": "number"
  },
  "high": {
    "label": "High",
    "format": "number"
  },
  "low": {
    "label": "Low",
    "format": "number"
  },
  "close": {
    "label": "Close",
    "format": "number"
  },
  "marketCap": {
    "label": "Market cap",
    "format": "number"
  },
  "volume24h": {
    "label": "Volume 24h",
    "format": "number"
  },
  "changePct": {
    "label": "Change %",
    "format": "number"
  },
  "currency": {
    "label": "Ccy",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [CoinGecko Scraper — Crypto Prices, Market Cap, Volume, Trending](https://apify.com/yadroo/coingecko-markets.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/yadroo/coingecko-markets.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/yadroo/coingecko-markets.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
