Find an API

Search public APIs with auth details & Postman guides

← All APIs

CoinGecko API

api.coingecko.com · Finance

Finance API Key Free Tier Cryptocurrency Finance Market Data

World's largest independent crypto data API — 17,000+ coins, 1,700+ exchanges, price data, market caps, trading volume, and on-chain DEX data. Free Demo plan: 100 calls/min, 10,000/month. No API key required for public endpoints.

Authentication

API Key Free Demo API key at coingecko.com/en/api. Pass as x-cg-demo-api-key header. Public endpoints work without a key at lower rate limits.

Sample Requests

GET Get Bitcoin price

Get current Bitcoin price in USD and EUR.

https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd,eur

Hover any highlighted part to learn what it does

curl -X GET "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd%2Ceur"
import requests
params = {
    "ids": "bitcoin",
    "vs_currencies": "usd,eur"
}
response = requests.get(
    "https://api.coingecko.com/api/v3/simple/price",
    params=params,
)
print(response.json())
const url = new URL('https://api.coingecko.com/api/v3/simple/price');
url.searchParams.set('ids', 'bitcoin');
url.searchParams.set('vs_currencies', 'usd,eur');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

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

func main() {
	baseURL, _ := url.Parse("https://api.coingecko.com/api/v3/simple/price")
	q := baseURL.Query()
	q.Set("ids", "bitcoin")
	q.Set("vs_currencies", "usd,eur")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.coingecko.com/api/v3/simple/price")
uri.query = URI.encode_www_form({
  "ids" => "bitcoin",
  "vs_currencies" => "usd,eur"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.coingecko.com/api/v3/simple/price?" . http_build_query([
    "ids" => "bitcoin",
    "vs_currencies" => "usd,eur"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET List top coins

Get top 10 cryptocurrencies by market cap.

https://api.coingecko.com/api/v3/coins/markets?page=1&order=market_cap_desc&per_page=10&vs_currency=usd

Hover any highlighted part to learn what it does

curl -X GET "https://api.coingecko.com/api/v3/coins/markets?page=1&order=market_cap_desc&per_page=10&vs_currency=usd"
import requests
params = {
    "page": "1",
    "order": "market_cap_desc",
    "per_page": "10",
    "vs_currency": "usd"
}
response = requests.get(
    "https://api.coingecko.com/api/v3/coins/markets",
    params=params,
)
print(response.json())
const url = new URL('https://api.coingecko.com/api/v3/coins/markets');
url.searchParams.set('page', '1');
url.searchParams.set('order', 'market_cap_desc');
url.searchParams.set('per_page', '10');
url.searchParams.set('vs_currency', 'usd');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

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

func main() {
	baseURL, _ := url.Parse("https://api.coingecko.com/api/v3/coins/markets")
	q := baseURL.Query()
	q.Set("page", "1")
	q.Set("order", "market_cap_desc")
	q.Set("per_page", "10")
	q.Set("vs_currency", "usd")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.coingecko.com/api/v3/coins/markets")
uri.query = URI.encode_www_form({
  "page" => "1",
  "order" => "market_cap_desc",
  "per_page" => "10",
  "vs_currency" => "usd"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.coingecko.com/api/v3/coins/markets?" . http_build_query([
    "page" => "1",
    "order" => "market_cap_desc",
    "per_page" => "10",
    "vs_currency" => "usd"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key required for basic use
  2. Get a free Demo key at coingecko.com/en/api for higher limits
  3. Try GET https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd
  4. Markets: GET /coins/markets?vs_currency=usd&order=market_cap_desc&per_page=10

What can you build with CoinGecko API?

CoinGecko API is a Finance API. Developers commonly use finance APIs for:

  • processing payments and handling transactions
  • building subscription and billing systems
  • automating invoicing and financial reporting
  • fraud detection and risk scoring
  • connecting to banking and accounting software

API Key authentication. You'll receive a key after signing up. Send it with every request — in a header or query parameter. Keep it out of client-side code and never commit it to version control. CoinGecko API is free to use up to a usage limit, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗