CoinPaprika Go SDK
The official Go client library for the CoinPaprika API provides convenient access to cryptocurrency market data, including coin prices, volumes, market caps, and more.Installation
Install the CoinPaprika Go SDK using go get:Quick Start
Basic Usage
Using Custom HTTP Client
Pro API with API Key
Get your API key at coinpaprika.com/api
Common Use Cases
Getting Market Data
Coin Information
Historical Data
Search and Price Converter
Error Handling
Advanced Usage
Rate Limiting
The client does not automatically handle rate limiting. If you exceed the request limit for your plan, the API will return an error with an HTTP 429 “Too Many Requests” status code. Your application should handle these errors, for example by implementing a backoff-and-retry mechanism.Custom Request Options
Available Methods
The Go SDK is organized into services that correspond to the API endpoints.Global
client.Global.Get()
- Get global market data.
Coins
client.Coins.List()
- List all coins.client.Coins.GetByID(coinID)
- Get a specific coin by ID.client.Coins.GetEventsByCoinID(coinID)
- Get events for a coin.client.Coins.GetExchangesByCoinID(coinID)
- Get exchanges for a coin.client.Coins.GetMarketsByCoinID(coinID)
- Get markets for a coin.client.Coins.GetTwitterByCoinID(coinID)
- Get Twitter timeline for a coin.client.Coins.GetOHLCVLastFullDayByCoinID(coinID)
- Get OHLCV for the last full day.client.Coins.GetOHLCVHistorical(coinID, options)
- Get historical OHLCV.client.Coins.GetOHLCVTodayByCoinID(coinID)
- Get today’s OHLCV.
People
client.People.GetByID(personID)
- Get a person by ID.
Tags
client.Tags.List(options)
- List all tags.client.Tags.GetByID(tagID, options)
- Get a tag by ID.
Tickers
client.Tickers.List(options)
- Get tickers for all coins.client.Tickers.GetByCoinID(coinID, options)
- Get ticker for a specific coin.client.Tickers.GetHistoricalByCoinID(coinID, options)
- Get historical ticks.
Exchanges
client.Exchanges.List(options)
- List all exchanges.client.Exchanges.GetByID(exchangeID)
- Get a specific exchange.client.Exchanges.GetMarketsByExchangeID(exchangeID, options)
- Get markets for an exchange.
Tools
client.Tools.Search(query, options)
- Search for assets.client.Tools.PriceConverter(options)
- Convert between currencies.
Examples Repository
Check out practical examples in the official repository.Requirements
- Go 1.13 or higher
- Internet connection for API calls