Constructor
Optional
options: Optionsthe options passed for client library, at the moment only timeout are support
Optional
apiKey: stringOptional
apiStatic
Private
Readonly
API_Static
Private
Readonly
PRO_Get current data (name, price, market, ... including exchange tickers) for a coin IMPORTANT: Ticker object is limited to 100 items, to get more tickers, use /coins/{id}/tickers Ticker is_stale is true when ticker that has not been updated/unchanged from the exchange for a while. Ticker is_anomaly is true if ticker’s price is outliered by our system. You are responsible for managing how you want to display these information (e.g. footnote, different background, change opacity, hide)
Optional
community_Include community_data data (true/false) [default: true]
Optional
developer_Include developer_data data (true/false) [default: true]
pass the coin id (can be obtained from /coins) eg. bitcoin
Optional
localization?: booleanInclude all localized languages in response (true/false)
Optional
market_Include market_data (true/false) [default: true]
Optional
sparkline?: booleanInclude sparkline 7 days data (eg. true, false)
Optional
tickers?: booleannclude tickers data (true/false) [default: true]
Get historical data (name, price, market, stats) at a given date for a coin
The date of data snapshot in dd-mm-yyyy eg. 30-12-2017
pass the coin id (can be obtained from /coins) eg. bitcoin
Optional
localization?: booleanSet to false to exclude localized languages in response
Get historical market data include price, market cap, and 24h volume (granularity auto) Minutely data will be used for duration within 1 day, Hourly data will be used for duration between 1 day and 90 days, Daily data will be used for duration above 90 days.
Data up to number of days ago (eg. 1,14,30,max)
pass the coin id (can be obtained from /coins) eg. bitcoin
Optional
interval?: stringData interval. Possible value: daily
The target currency of market data (usd, eur, jpy, etc.)
Get historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto) Minutely data will be used for duration within 1 day, Hourly data will be used for duration between 1 day and 90 days, Daily data will be used for duration above 90 days.
From date in UNIX Timestamp (eg. 1392577232)
pass the coin id (can be obtained from /coins) eg. bitcoin
To date in UNIX Timestamp (eg. 1618716149)
The target currency of market data (usd, eur, jpy, etc.)
Get coin's OHLC (Beta)
Candle’s body:
1 - 2 days: 30 minutes
3 - 30 days: 4 hours
31 and before: 4 days
https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__ohlc
Sample output
[
[
1618113600000,
79296.36,
79296.36,
79279.94,
79279.94
]
. ... ... . .. . .. . . . . .
]
Data up to number of days ago (1/7/14/30/90/180/365/max)
pass the coin id (can be obtained from /coins) eg. bitcoin
The target currency of market data (usd, eur, jpy, etc.)
Get coin tickers (paginated to 100 items)
IMPORTANT: Ticker is_stale is true when ticker that has not been updated/unchanged from the exchange for a while. Ticker is_anomaly is true if ticker’s price is outliered by our system. You are responsible for managing how you want to display these information (e.g. footnote, different background, change opacity, hide)
Optional
depth?: booleanflag to show 2% orderbook depth. valid values: true, false
Optional
exchange_filter results by exchange_ids (ref: v3/exchanges/list)
pass the coin id (can be obtained from /coins) eg. bitcoin
Optional
include_flag to show exchange_logo
Optional
order?: "volume_desc" | "trust_score_desc" | "trust_score_asc"valid values: trust_score_desc (default), trust_score_asc and volume_desc
Optional
page?: numberPage through results
List all supported coins id, name and symbol (no pagination required) Use this to obtain all the coins’ id in order to make API calls
Optional
include_flag to include platform contract addresses (eg. 0x… for Ethereum based tokens). valid values: true, false
List all supported coins price, market cap, volume, and market related data
Optional
category?: "decentralized_finance_defi" | "stablecoins"filter by coin category, only decentralized_finance_defi and stablecoins are supported at the moment
Optional
ids?: stringThe ids of the coin, comma separated crytocurrency symbols (base). refers to /coins/list. When left empty, returns numbers the coins observing the params limit and start
Optional
order?: "market_cap_desc" | "gecko_desc" | "gecko_asc" | "market_cap_asc" | "volume_asc" | "volume_desc" | "id_asc" | "id_desc"valid values: market_cap_desc, gecko_desc, gecko_asc, market_cap_asc, market_cap_desc, volume_asc, volume_desc, id_asc, id_desc
Optional
page?: numberPage through results
Optional
per_Total results per page (valid values: 1…250)
Optional
price_Optional
sparkline?: booleanInclude sparkline 7 days data (eg. true, false)
The target currency of market data (usd, eur, jpy, etc.)
Get historical market data include price, market cap, and 24h volume (granularity auto) from a contract address
https://www.coingecko.com/api/documentations/v3#/contract/get_coins__id__contract__contract_address_
current data for a coin
Get historical market data include price, market cap, and 24h volume (granularity auto)
current data for a coin
Token’s contract address
Data up to number of days ago (eg. 1,14,30,max)
Asset platform (only ethereum is supported at this moment)
The target currency of market data (usd, eur, jpy, etc.)
Get historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto) from a contract address
current data for a coin
Get historical market data include price, market cap, and 24h volume
Token’s contract address
Optional
from?: numberFrom date in UNIX Timestamp (eg. 1392577232)
Asset platform (only ethereum is supported at this moment)
From date in UNIX Timestamp (eg. 1618716149)
The target currency of market data (usd, eur, jpy, etc.)
List all derivative tickers
https://www.coingecko.com/api/documentations/v3#/derivatives_(beta)/get_derivatives
Optional
include_'all’, ‘unexpired’] - expired to show unexpired tickers, all to list all tickers, defaults to unexpired
List all derivative tickers
https://www.coingecko.com/api/documentations/v3#/derivatives_(beta)/get_derivatives_exchanges
Optional
order?: "name_asc" | "name_desc" | "open_interest_btc_asc" | "open_interest_btc_desc" | "trade_volume_24h_btc_asc" | "trade_volume_24h_btc_desc"order results using following params name_asc,name_desc,open_interest_btc_asc,open_interest_btc_desc,trade_volume_24h_btc_asc,trade_volume_24h_btc_desc
Optional
page?: numberPage through results
Optional
per_Total results per page
show derivative exchange data
https://www.coingecko.com/api/documentations/v3#/derivatives_(beta)/get_derivatives_exchanges__id_
pass the exchange id (can be obtained from derivatives/exchanges/list) eg. bitmex
Optional
include_['all’, ‘unexpired’] - expired to show unexpired tickers, all to list all tickers, leave blank to omit tickers data in response
List all derivative exchanges name and identifier
https://www.coingecko.com/api/documentations/v3#/derivatives_(beta)/get_derivatives_exchanges_list
List all supported markets id and name (no pagination required)
https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges__id_
Use this to obtain all the markets’ id in order to make API calls
IMPORTANT:
Ticker object is limited to 100 items, to get more tickers, use /exchanges/{id}/tickers
Ticker is_stale is true when ticker that has not been updated/unchanged from the exchange for a while.
Ticker is_anomaly is true if ticker’s price is outliered by our system.
You are responsible for managing how you want to display these information (e.g. footnote, different background, change opacity, hide)
Get exchange volume in BTC and top 100 tickers only
the exchange id (can be obtained from /exchanges/list) eg. binance
Get exchange tickers (paginated, 100 tickers per page)
https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges__id__tickers
Use this to obtain all the markets’ id in order to make API calls
IMPORTANT:
Ticker object is limited to 100 items, to get more tickers, use /exchanges/{id}/tickers
Ticker is_stale is true when ticker that has not been updated/unchanged from the exchange for a while.
Ticker is_anomaly is true if ticker’s price is outliered by our system.
You are responsible for managing how you want to display these information (e.g. footnote, different background, change opacity, hide)
Get exchange volume in BTC and top 100 tickers only
Optional
coin_filter tickers by coin_ids (ref: v3/coins/list)
Optional
depth?: stringflag to show 2% orderbook depth i.e., cost_to_move_up_usd and cost_to_move_down_usd
pass the exchange id (can be obtained from /exchanges/list) eg. binance
Optional
include_flag to show exchange_logo
Optional
order?: "volume_desc" | "trust_score_desc" | "trust_score_asc"Optional
page?: numberPage through results
Get status updates for a given exchange (beta)
https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges__id__volume_chart
Get status updates for a given exchange
Get status updates for a given exchange
Data up to number of days ago (eg. 1,14,30)
pass the exchange id (can be obtained from /exchanges/list) eg. binance
List all supported markets id and name (no pagination required)
https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges_list
Use this to obtain all the markets’ id in order to make API calls
Get historical market data include price, market cap, and 24h volume
List all exchanges
https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)/get_exchanges
List all exchanges
Get historical market data include price, market cap, and 24h volume
Optional
page?: numberPage through results
Optional
per_Total results per page (valid values: 1…250)
Get BTC-to-Currency exchange rates
https://www.coingecko.com/api/documentations/v3#/exchange_rates/get_exchange_rates
List all finance platforms
https://www.coingecko.com/api/documentations/v3#/finance_(beta)/get_finance_platforms
Optional
input: { Optional
page?: numberData up to number of days ago (eg. 1,14,30)
Optional
per_Total results per page
Get cryptocurrency global data
https://www.coingecko.com/api/documentations/v3#/global/get_global
Get global data - total_volume, total_market_cap, ongoing icos etc
Get cryptocurrency global decentralized finance(defi) data
https://www.coingecko.com/api/documentations/v3#/global/get_global
Get Top 100 Cryptocurrency Global Eecentralized Finance(defi) data
List all market indexes
https://www.coingecko.com/api/documentations/v3#/indexes_(beta)/get_indexes
Optional
input: { Optional
page?: numberData up to number of days ago (eg. 1,14,30)
Optional
per_Total results per page
list market indexes id and name
https://www.coingecko.com/api/documentations/v3#/indexes_(beta)/get_indexes_list
get market index by market id and index id
https://www.coingecko.com/api/documentations/v3#/indexes_(beta)/get_indexes__market_id___id_
Optional
input: { Optional
id?: numberpass the index id (can be obtained from /indexes/list)
Optional
market_pass the market id (can be obtained from /exchanges/list)
Optional
path_pass the index id (can be obtained from /indexes/list)
Private
httpMake HTTP request to the given endpoint
json content
the full https URL
Private
makeGeneric function to make request use in internal function
Check API server status
Search for coins, categories and markets listed on CoinGecko ordered by largest Market Cap first.
Optional
query?: stringyour search query.
Top-7 trending coins on CoinGecko as searched by users in the last 24 hours (Ordered by most popular first)
Private
withGet the current price of any cryptocurrencies in any other supported currencies that you need.
false
The ids of the coin, comma separated crytocurrency symbols (base). refers to /coins/list. When left empty, returns numbers the coins observing the params limit and start
Optional
include_Optional
include_Optional
include_Optional
include_vs_currency of coins, comma-separated if querying more than 1 vs_currency. *refers to simple/supported_vs_currencies
Get current price of tokens (using contract addresses) for a given platform in any other currency that you need.
The dictionary of price pair with details
{
"0x8207c1ffc5b6804f6024322ccf34f29c3541ae26": {
"btc": 0.00003754,
"btc_market_cap": 7914.297728099776,
"btc_24h_vol": 2397.477480037078,
"btc_24h_change": 3.7958858800037834,
"eth": 0.0009474,
"eth_market_cap": 199730.22336519035,
"eth_24h_vol": 60504.258122696505,
"eth_24h_change": 2.8068351977135007,
"last_updated_at": 1618664199
}
}
The contract address of tokens, comma separated
The id of the platform issuing tokens (Only ethereum is supported for now)
Optional
include_Optional
include_Optional
include_Optional
include_vs_currency of coins, comma-separated if querying more than 1 vs_currency. *refers to simple/supported_vs_currencies
Generated using TypeDoc
The wrap client to access all api on coin gecko