coinglecko
coinglecko
A type-safe CoinGecko API client for Gleam (Erlang + JavaScript targets).
Quick Start (Erlang)
import coinglecko/client
import coinglecko/ping
import gleam/httpc
import gleam/result
import gleam/string
pub fn main() {
let send = fn(req) { httpc.send(req) |> result.map_error(string.inspect) }
let client = client.new_demo(api_key: "CG-your-key-here")
let assert Ok(pong) = ping.check(client, send:)
}
Quick Start (JavaScript)
import coinglecko/client
import coinglecko/ping
let client = client.new_demo(api_key: "CG-your-key-here")
let assert Ok(req) = ping.check_request(client)
// Send with gleam_fetch, then call ping.decode_response(body)
Modules
coinglecko/client— Client construction and configurationcoinglecko/error— Error typescoinglecko/ping— Server status checkcoinglecko/simple— Simple price datacoinglecko/coins— Coin data (list, markets, details, charts, OHLC)coinglecko/search— Search and trendingcoinglecko/global— Global market data and DeFicoinglecko/exchanges— Exchange data and tickerscoinglecko/categories— Coin categoriescoinglecko/asset_platforms— Blockchain platformscoinglecko/nfts— NFT collections and market datacoinglecko/derivatives— Derivatives tickers and exchangescoinglecko/exchange_rates— BTC exchange ratescoinglecko/companies— Public company treasury holdingscoinglecko/pagination— Pagination helperscoinglecko/rate_limit— Rate limit header parsingcoinglecko/retry— Configurable retry utility