CoinGeckoApi (coin_gecko_api v0.1.0) View Source
Documentation for CoinGeckoApi
.
This interface is based on version 3 of the api. Base URL is "https://api.coingecko.com/api/v3/" Also check out CoinGecko api for more information at https://www.coingecko.com/en/api.
Link to this section Summary
Functions
Get current data (name, price, market, ... including exchange tickers) for a coin
Get coin info from contract address
Get historical market data include price, market cap, and 24h volume (granularity auto) from a contract address
Get historical market data include price, market cap, and 24h volume (granularity auto) from a contract address
Get historical data (name, price, market, stats) at a given date for a coin
Get historical market data include price, market cap, and 24h volume (granularity auto)
Get historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto)
Get coin's OHLC (beta)
Get status updates for a given coin (beta)
Get coin tickers (paginated to 100 items)
List all supported coins id, name and symbol (no pagination required) returns a list with objects like this: %{"id" => "1", "name" => "coin_name", "symbol" => "coin_symbol"}
Use this to obtain all the coins market data (price, market cap, volume)
List all derivative tickers
List all derivative exchanges
show derivative exchange data
List all derivative exchanges name and identifier
Get events, paginated by 100
Get list of event countries
Get list of event types
get BTC-to-Currency exchange rates
List all exchanges
get exchange volume in BTC and top 100 tickers only
get status updates for a given exchange (beta)
Get volume_chart data for a given exchange (beta)
List all supported market id and name
List all finance platforms
List all finance products
Get cryptocurrency global data
Get cryptocurrency global decentralized finance (defi_ data)
List all market indexes
list market indexes id and name
Ping API
Get trending search coins on coingecko from last 24 hours
Get the current price of any cryptocurrencies in any other supported currencies that you need. returns object like this: %{"bitcoin" => %{"usd" => 35861}}
Get list of supported_vs_currencies
Get current price of tokens (using contract addresses) for a given platform in any other currency that you need. returns object like this
Link to this section Functions
coins(id \\ "bitcoin", params \\ %{"tickers" => "true", "market_data" => "true", "community_data" => "true", "developer_data" => "true", "sparkline" => "false"})
View SourceGet current data (name, price, market, ... including exchange tickers) for a coin
coins_id_contract_contract_address(id \\ "ethereum", contract_address \\ "0xc00e94cb662c3520282e6f5717214004a7f26888")
View SourceGet coin info from contract address
coins_id_contract_contract_address_market_chart(id \\ "ethereum", contract_address \\ "0xc00e94cb662c3520282e6f5717214004a7f26888", params \\ %{"vs_currency" => "usd", "days" => "100"})
View SourceGet historical market data include price, market cap, and 24h volume (granularity auto) from a contract address
coins_id_contract_contract_address_market_chart_range(id \\ "ethereum", contract_address \\ "0xc00e94cb662c3520282e6f5717214004a7f26888", params \\ %{"vs_currency" => "usd", "from" => "1392577232", "to" => "1422577232"})
View SourceGet historical market data include price, market cap, and 24h volume (granularity auto) from a contract address
coins_id_history(id \\ "bitcoin", params \\ %{"date" => "01-01-2015"})
View SourceGet historical data (name, price, market, stats) at a given date for a coin
coins_id_market_chart(id \\ "bitcoin", params \\ %{"vs_currency" => "usd", "days" => "100"})
View SourceGet historical market data include price, market cap, and 24h volume (granularity auto)
coins_id_market_chart_range(id \\ "bitcoin", params \\ %{"vs_currency" => "usd", "from" => "1392577232", "to" => "1422577232"})
View SourceGet historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto)
coins_id_ohlc(id \\ "bitcoin", params \\ %{"vs_currency" => "usd", "days" => "90"})
View SourceGet coin's OHLC (beta)
Candle’s body:
1 - 2 days: 30 minutes 3 - 30 days: 4 hours 31 and before: 4 days
Get status updates for a given coin (beta)
Get coin tickers (paginated to 100 items)
List all supported coins id, name and symbol (no pagination required) returns a list with objects like this: %{"id" => "1", "name" => "coin_name", "symbol" => "coin_symbol"}
coins_markets(params \\ %{"vs_currency" => "usd", "ids" => "bitcoin", "order" => "market_cap_desc", "per_page" => "100", "sparkline" => "false"})
View SourceUse this to obtain all the coins market data (price, market cap, volume)
List all derivative tickers
List all derivative exchanges
show derivative exchange data
List all derivative exchanges name and identifier
Get events, paginated by 100
Get list of event countries
Get list of event types
get BTC-to-Currency exchange rates
List all exchanges
get exchange volume in BTC and top 100 tickers only
get status updates for a given exchange (beta)
Get volume_chart data for a given exchange (beta)
List all supported market id and name
List all finance platforms
List all finance products
Get cryptocurrency global data
Get cryptocurrency global decentralized finance (defi_ data)
List all market indexes
list market indexes id and name
Ping API
Examples
iex(1)> CoinGeckoApi.ping
%{"gecko_says" => "(V3) To the Moon!"}
Get trending search coins on coingecko from last 24 hours
simple_price(params \\ %{"ids" => "bitcoin", "vs_currencies" => "usd", "include_market_cap" => "true", "include_24hr_vol" => "true", "include_24hr_change" => "true", "include_last_updated_at" => "true"})
View SourceGet the current price of any cryptocurrencies in any other supported currencies that you need. returns object like this: %{"bitcoin" => %{"usd" => 35861}}
Get list of supported_vs_currencies
simple_token_price(params \\ %{"contract_addresses" => "0xc00e94cb662c3520282e6f5717214004a7f26888", "vs_currencies" => "usd", "include_market_cap" => "true", "include_24hr_vol" => "true", "include_24hr_change" => "true", "include_last_updated_at" => "true"})
View SourceGet current price of tokens (using contract addresses) for a given platform in any other currency that you need. returns object like this:
%{
"0xc00e94cb662c3520282e6f5717214004a7f26888" => %{
"last_updated_at" => 1611109511,
"usd" => 213.46,
"usd_24h_change" => -6.384358204432436,
"usd_24h_vol" => 87929838.57157373,
"usd_market_cap" => 888756153.0997704
}
}