> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://coingecko.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://coingecko.ferndocs.com/_mcp/server.

# Total Supply Chart by ID

GET https://pro-api.coingecko.com/api/v3/coins/{id}/total_supply_chart

To query historical total supply of a coin by number of days away from now based on provided coin ID

Reference: https://coingecko.ferndocs.com/api-reference/api-reference/coins/total-supply-chart/get

## Authentication

- `x-cg-pro-api-key` header (required) — CoinGecko Pro API Key

## Servers

- `https://pro-api.coingecko.com/api/v3` (Pro, default)
- `https://api.coingecko.com/api/v3` (Demo)

## Request

### Path parameters

- `id` (string, required, default: bitcoin) — Coin ID. *refers to [`/coins/list`](/api-reference/api-reference/coins/list/get).

### Query parameters

- `days` (string, required, default: 1) — Data up to number of days ago. Valid values: any integer or `max`.
- `interval` (enum, optional) — Data interval.
  - Allowed values: `daily`

## Response

### 200

Historical total supply chart data

- `total_supply` (list of list of TotalSupplyChartTotalSupplyItemsItems, required) — Total supply data points as [timestamp, supply] pairs

## Types

### TotalSupplyChartTotalSupplyItemsItems

## Examples

**Response**

```json
{
  "total_supply": [
    [
      1779700797940,
      "20034078.0"
    ],
    [
      1779701097614,
      "20034078.0"
    ],
    [
      1779701399178,
      "20034078.0"
    ]
  ]
}
```

**SDK Code**

```python coins_totalSupplyChart_get_example
import requests

url = "https://pro-api.coingecko.com/api/v3/coins/bitcoin/total_supply_chart"

querystring = {"days":"1"}

headers = {"x-cg-pro-api-key": "<proApiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript coins_totalSupplyChart_get_example
const url = 'https://pro-api.coingecko.com/api/v3/coins/bitcoin/total_supply_chart?days=1';
const options = {method: 'GET', headers: {'x-cg-pro-api-key': '<proApiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go coins_totalSupplyChart_get_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://pro-api.coingecko.com/api/v3/coins/bitcoin/total_supply_chart?days=1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-cg-pro-api-key", "<proApiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby coins_totalSupplyChart_get_example
require 'uri'
require 'net/http'

url = URI("https://pro-api.coingecko.com/api/v3/coins/bitcoin/total_supply_chart?days=1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-cg-pro-api-key"] = '<proApiKey>'

response = http.request(request)
puts response.read_body
```

```java coins_totalSupplyChart_get_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://pro-api.coingecko.com/api/v3/coins/bitcoin/total_supply_chart?days=1")
  .header("x-cg-pro-api-key", "<proApiKey>")
  .asString();
```

```php coins_totalSupplyChart_get_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://pro-api.coingecko.com/api/v3/coins/bitcoin/total_supply_chart?days=1', [
  'headers' => [
    'x-cg-pro-api-key' => '<proApiKey>',
  ],
]);

echo $response->getBody();
```

```csharp coins_totalSupplyChart_get_example
using RestSharp;

var client = new RestClient("https://pro-api.coingecko.com/api/v3/coins/bitcoin/total_supply_chart?days=1");
var request = new RestRequest(Method.GET);
request.AddHeader("x-cg-pro-api-key", "<proApiKey>");
IRestResponse response = client.Execute(request);
```

```swift coins_totalSupplyChart_get_example
import Foundation

let headers = ["x-cg-pro-api-key": "<proApiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://pro-api.coingecko.com/api/v3/coins/bitcoin/total_supply_chart?days=1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```