# API Plans Source: https://docs.coinpaprika.com/api-plans Explore the different API plans offered by CoinPaprika to suit your needs, from hobbyist to enterprise-level. To ensure you can explore our capabilities without commitment, we also provide a **generous free tier**. It's the perfect way to test our data, build out a proof-of-concept, and get to know the full range of our API before upgrading. Whether you're building a personal project or a large-scale enterprise application, CoinPaprika has a plan that's right for you. We offer a variety of API plans designed to meet the diverse needs of developers, traders, and businesses. ## Base URLs Depending on the selected plan, you should send requests to the appropriate base URL:
| Plan | Base URL | | :------------- | :------------------------------------ | | **Free** | `https://api.coinpaprika.com/v1/` | | **Starter** | `https://api-pro.coinpaprika.com/v1/` | | **Pro** | `https://api-pro.coinpaprika.com/v1/` | | **Business** | `https://api-pro.coinpaprika.com/v1/` | | **Enterprise** | `https://api-pro.coinpaprika.com/v1/` |
## Pricing For the most up-to-date pricing and to subscribe, please visit our official [**Pricing Page**](https://coinpaprika.com/api/pricing/). ## Feature Comparison ### Core Plan Details
| Feature | Free | Starter | Pro | Business
(Bestseller) | Ultimate | Enterprise | | :------------------------------------------------------ | :----- | :--------- | :---------- | :------------------------- | :------------ | :--------- | | **Price per month** | \$0/mo | \$99.00/mo | \$199.00/mo | \$799.00/mo | \$1,499.00/mo | Custom | | **Endpoints** | 25+ | 25+ | 25+ | 25+ | 25+ | 25+ | | **Calls / month** | 20,000 | 400,000 | 1,000,000 | 5,000,000 | 10,000,000 | No limits | | **Assets available** | 2,000 | All | All | All | All | All |
### Data & History
Feature Free Starter Pro Business
(Bestseller)
Ultimate Enterprise
Daily historical data 1 year 5 years Full Full Full Full
Hourly historical data 1 day 1 month 3 months 1 year No limits No limits
5 minute historical data 1 week 1 month 1 year Full Full
Circulating supply
OHLCV historical data 1 day 1 month 3 months 1 year No limits No limits
OHLCV interval parameter value 24h 24h 24h 1h, 6h, 12h, 24h 1h, 6h, 12h, 24h 5m, 15m, 30m, 1h, 6h, 12h, 24h
Update Interval Up to 10 min Up to 3 min Up to 3 min Up to 3 min Up to 3 min Up to 1 min (with websockets)
API Mappings endpoint
### Support & Infrastructure
Feature Free Starter Pro Business
(Bestseller)
Ultimate Enterprise
Support Community Email Email 24h 24h Real time / Slack
SLA
Dedicated IT infrastructure
### Usage & Commercials
Feature Free Starter Pro Business
(Bestseller)
Ultimate Enterprise
Usage Personal Commercial Commercial Commercial Commercial Commercial
Redistribution
Websockets Included
Payment by crypto
-10% for annual payment
(contact Sales Dept.)

(contact Sales Dept.)

(contact Sales Dept.)
CoinPaprika Ads free

### Get Access Visit our official pricing page to subscribe to a plan. # Get id changelog for all coins Source: https://docs.coinpaprika.com/api-reference/changelog/get-id-changelog-for-all-coins /api-reference/rest-api/openapi.yml get /changelog/ids Returns coin id changes made by coinpaprika.com moderators: * `currency_id` - current id of a coin * `old_id` - old coin id that has been replaced with a new one * `new_id` - new coin id that replaced the old one * `changed_at` - date of the change **Available on the following API plans:** - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # API ID mappings Source: https://docs.coinpaprika.com/api-reference/coins/api-id-mappings /api-reference/rest-api/openapi.yml get /coins/mappings The API ID Mappings endpoint allows you to map IDs from other cryptocurrency API providers to Coinpaprika API IDs. This is especially useful when you have provider-specific IDs and want to interact with the Coinpaprika API using its own standardized IDs. In addition to Coinpaprika's and other providers internal ID system, this endpoint also supports mapping [ISIN(International Securities Identification Number)](https://www.isin.org/isin-for-cryptocurrency/) and [DTI (Digital Token Identifier)](https://www.iso.org/obp/ui/en/#iso:std:iso:24165:-2:ed-1:v1:en) IDs. **Use Cases:** - Map your existing provider IDs (including ISIN and DTI) to Coinpaprika IDs - Retrieve other provider IDs (and ISIN, DTI) corresponding to a given Coinpaprika ID - Easily integrate and standardize data across different platforms with varying ID systems This flexibility enables seamless integration across different crypto data sources and allows you to work with a variety of ID formats within the Coinpaprika ecosystem. **Available mapping providers** - Coinpaprika - Coinmarketcap - Coingecko - Cryptocompare - [ISIN](https://www.isin.org/isin-for-cryptocurrency/) - [DTI](https://www.iso.org/obp/ui/en/#iso:std:iso:24165:-2:ed-1:v1:en) **Available on the following API plans:** - Business - Enterprise **Examples:** Use a single query parameter to get mappings for a specific Coinpaprika, Coinmarketcap, Coingecko, Cryptocompare, ISIN, or DTI ID. The response will include all available mappings for the specified ID. ```shell # Get mappings for a specific Coinpaprika ID curl --request GET \ --url 'https://api-pro.coinpaprika.com/v1/coins/mappings?coinpaprika=btc-bitcoin' \ --header 'Authorization: ' # Get mappings for a specific Coinmarketcap ID curl --request GET \ --url 'https://api-pro.coinpaprika.com/v1/coins/mappings?coinmarketcap=1' \ --header 'Authorization: '\ # Get mappings for a specific Coingecko ID curl --request GET \ --url 'https://api-pro.coinpaprika.com/v1/coins/mappings?coingecko=bitcoin' \ --header 'Authorization: ' # Get mappings for a specific Cryptocompare ID curl --request GET \ --url 'https://api-pro.coinpaprika.com/v1/coins/mappings?cryptocompare=1' \ --header 'Authorization: ' # Get mappings for a specific ISIN ID curl --request GET \ --url 'https://api-pro.coinpaprika.com/v1/coins/mappings?isin=XTV15WLZJMF0' \ --header 'Authorization: ' # Get mappings for a specific DTI ID curl --request GET \ --url 'https://api-pro.coinpaprika.com/v1/coins/mappings?dti=V15WLZJMF' \ --header 'Authorization: ' ``` **Update interval:** Every 1 minute. # Get coin by ID Source: https://docs.coinpaprika.com/api-reference/coins/get-coin-by-id /api-reference/rest-api/openapi.yml get /coins/{coin_id} Returns detailed descriptive information about a single coin, without price or volume data. For price data, check the [/tickers](#operation/getTickers) and [/tickers/{coin_id}](#operation/getTickersById) endpoints. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # Get coin events by coin ID Source: https://docs.coinpaprika.com/api-reference/coins/get-coin-events-by-coin-id /api-reference/rest-api/openapi.yml get /coins/{coin_id}/events Returns events for a given coin. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 5 minutes. # Get exchanges by coin ID Source: https://docs.coinpaprika.com/api-reference/coins/get-exchanges-by-coin-id /api-reference/rest-api/openapi.yml get /coins/{coin_id}/exchanges Returns exchanges where a given coin is traded. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # Get historical OHLC Source: https://docs.coinpaprika.com/api-reference/coins/get-historical-ohlc /api-reference/rest-api/openapi.yml get /coins/{coin_id}/ohlcv/historical Returns Open/High/Low/Close values with volume and market capitalization for any date range. If the `end` date is the current day, data can change with every request until actual close of the day at 23:59:59" **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Maximum time range of data available to fetch depending on the plan:** | Plan | Time range | |------------|-------------------------------------| | Free | Last 24 hours | | Starter | Last 30 days | | Pro | Last 90 days | | Business | Last 365 days | | Enterprise | No limits | **The default interval of returned data for OHLCV is 24 hours:** ``` [ { "time_open": "2020-01-01T00:00:00Z", "time_close": "2020-01-01T23:59:59Z", "open": ..., "high": ..., "low": ..., "close": ..., "volume": ..., "market_cap": ... } ... ] ``` **However, depending on your API plan, you can set a smaller interval by using the query parameter `interval`:** | Plan | `interval` parameter value | |------------|-------------------------------------| | Free | `24h` | | Starter | `24h` | | Pro | `24h` | | Business | `1h`, `6h`, `12h`, `24h` | | Enterprise | `5m`, `15m`, `30m`, `1h`, `6h`, `12h`, `24h` | **Update interval:** Every 5 minute. # Get markets by coin ID Source: https://docs.coinpaprika.com/api-reference/coins/get-markets-by-coin-id /api-reference/rest-api/openapi.yml get /coins/{coin_id}/markets Returns all available markets for a given coin. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # Get OHLC for the last full day Source: https://docs.coinpaprika.com/api-reference/coins/get-ohlc-for-the-last-full-day /api-reference/rest-api/openapi.yml get /coins/{coin_id}/ohlcv/latest Returns Open/High/Low/Close values with volume and market capitalization for the last full day. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 day. # Get today OHLC Source: https://docs.coinpaprika.com/api-reference/coins/get-today-ohlc /api-reference/rest-api/openapi.yml get /coins/{coin_id}/ohlcv/today Returns Open/High/Low/Close values with volume and market capitalization for the current day. Data can change every each request until actual close of the day at 23:59:59. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 5 minute. # Get Twitter timeline tweets for a coin (DEPRECATED) Source: https://docs.coinpaprika.com/api-reference/coins/get-twitter-timeline-tweets-for-a-coin-deprecated /api-reference/rest-api/openapi.yml get /coins/{coin_id}/twitter **THIS ENDPOINT HAS BEEN DEPRECATED AND WILL BE REMOVED.** Please refer to our API documentation for alternatives. --- *Original Description (for historical reference):* Returns the last 50 timeline tweets from the official Twitter profile for a given coin. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 5 minutes. # List coins Source: https://docs.coinpaprika.com/api-reference/coins/list-coins /api-reference/rest-api/openapi.yml get /coins Returns basic information about cryptocurrencies on coinpaprika.com: * identity (`id`, `name`, `symbol`) * ranking (`rank`) * activity status (`is_active`) * type of cryptocurrency (`type`) - `coin` or `token` * information whether the currency is new (`is_new`) - true if the currency was added within the last 5 days **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # Get all contract addressess for a given platform Source: https://docs.coinpaprika.com/api-reference/contracts/get-all-contract-addressess-for-a-given-platform /api-reference/rest-api/openapi.yml get /contracts/{platform_id} Returns all available contracts for a given platform on coinpaprika.com. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # List contracts platforms Source: https://docs.coinpaprika.com/api-reference/contracts/list-contracts-platforms /api-reference/rest-api/openapi.yml get /contracts Returns all available contract platforms on coinpaprika.com. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # Redirect to historical ticks by contract address Source: https://docs.coinpaprika.com/api-reference/contracts/redirect-to-historical-ticks-by-contract-address /api-reference/rest-api/openapi.yml get /contracts/{platform_id}/{contract_address}/historical Returns [historical ticks](#operation/getTickersHistoricalById) for a contract with a given address. **Check [historical ticks endpoint documentation](#operation/getTickersHistoricalById) to find out about the limitations for each API plan.** **Update interval:** Every 5 minute. # Redirect to Ticker by contract address Source: https://docs.coinpaprika.com/api-reference/contracts/redirect-to-ticker-by-contract-address /api-reference/rest-api/openapi.yml get /contracts/{platform_id}/{contract_address} Returns [ticker](#operation/getTickersById) data for a contract with a given address. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 5 minute. # Get exchange by ID Source: https://docs.coinpaprika.com/api-reference/exchanges/get-exchange-by-id /api-reference/rest-api/openapi.yml get /exchanges/{exchange_id} Returns basic information about a given exchange on coinpaprika.com: * identity (`id`, `name`) * ranking * activity status * number of currencies, markets * volumes * etc. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # List an exchange markets Source: https://docs.coinpaprika.com/api-reference/exchanges/list-an-exchange-markets /api-reference/rest-api/openapi.yml get /exchanges/{exchange_id}/markets Returns list of all available markets on a given exchange on coinpaprika.com: * base, quote coin names/symbols, market url * market type * activity and outlier status * price and volume * etc. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # List exchanges Source: https://docs.coinpaprika.com/api-reference/exchanges/list-exchanges /api-reference/rest-api/openapi.yml get /exchanges Returns basic information about exchanges on coinpaprika.com: * identity (`id`, `name`) * ranking * activity status * number of currencies, markets * volumes * etc. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # Get market overview data Source: https://docs.coinpaprika.com/api-reference/global/get-market-overview-data /api-reference/rest-api/openapi.yml get /global Returns current cryptocurrencies market overview metrics, such as: * Global market capitalization * Total 24h volume of all cryptocurrencies * Number of active cryptocurrencies on coinpaprika.com * ATH of 24h volume and market capitalization * and more **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 5 minute. # Get API key info Source: https://docs.coinpaprika.com/api-reference/key/get-api-key-info /api-reference/rest-api/openapi.yml get /key/info Returns API key information: * Name of the API key plan * When the plan started * A flag indicating if the plan is active * Link to the API user portal * Monthly usage **Available on the following API plans:** - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # Get person by ID Source: https://docs.coinpaprika.com/api-reference/people/get-person-by-id /api-reference/rest-api/openapi.yml get /people/{person_id} Returns information about a person with the specified ID, related to the cryptocurrency market. Using this endpoint you can get a description of the person, social media links, number of teams she or he is involved in and the positions in those teams. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 hour. # Getting started Source: https://docs.coinpaprika.com/api-reference/rest-api/introduction The CoinPaprika API provides extensive and reliable data for over 50,000 crypto assets, tracking them across more than 350 exchanges. Below are some of the most popular endpoints to get you started. See also: [Coverage Checker](/tools/coverage), [API Plans](/api-plans), [Streaming API](/api-reference/streaming-api/streaming-introduction) Get the latest price, volume, and market cap data for any coin. Access detailed information about any coin, including social links and whitepapers. Retrieve data on all supported exchanges, including their markets and trading volumes. ## Base URL All **free plan** API endpoints use the following base URL: ``` https://api.coinpaprika.com/v1 ``` For the **paid plans**, the base URL is: ``` https://api-pro.coinpaprika.com/v1 ``` ## Authentication Most of our API endpoints are available without an API key. However, for higher rate limits and access to premium features, we recommend using an API key. Authentication may be required for certain endpoints in the future as we expand our services. To authenticate, include your API key as a Bearer token in the `Authorization` header of your request: ```bash theme={"dark"} curl -H "Authorization: Bearer YOUR_API_KEY" "https://api-pro.coinpaprika.com/v1/users/me" ``` The URL for the paid plans is different from the free plan. Check out our [pricing page](/api-plans) for specific details. You can get your API Key by visiting our official website [here](https://coinpaprika.com/api/) ## Rate limits Our API has the following rate limits based on your subscription plan: * **Free**: 20,000 requests per month * **Starter**: 400,000 requests per month * **Pro**: 1,000,000 requests per month * **Business**: 5,000,000 requests per month * **Ultimate**: 10,000,000 requests per month * **Enterprise**: Custom limits For more details, please see our [pricing page](https://coinpaprika.com/api/pricing). ## SDKs We offer several SDKs to help you integrate with our API more easily: Official Go client for the CoinPaprika API. Official PHP client for the CoinPaprika API. Official Python client for the CoinPaprika API. Official TypeScript/JavaScript client for the CoinPaprika API. # Your First Crypto Stream in 5 Minutes Source: https://docs.coinpaprika.com/api-reference/streaming-api/streaming-api-tutorial A step-by-step guide to connecting to the CoinPaprika Streaming API and receiving live ticker data in less than 5 minutes. # Your First Crypto Stream in 5 Minutes Want to start streaming real-time crypto data right now? This guide will get you connected to the CoinPaprika Streaming API and receiving live price updates in **less than 5 minutes**. We'll walk you through a simple copy-paste Node.js script. No complex setup, just instant data. ## What You'll Need * **A CoinPaprika API Key**: If you don't have one, get it from the [CoinPaprika API page](https://coinpaprika.com/api/panel/). * **Node.js**: If you don't have it installed, download it from the [official Node.js website](https://nodejs.org/). ## Step 1: Set Up Your Project (1 Minute) First, let's create a new project directory and install the necessary `ws` library for handling WebSockets in Node.js. ### Create a Project Folder Open your terminal and run these commands to create a project folder and navigate into it: ```bash theme={"dark"} mkdir coinpaprika-5min-stream cd coinpaprika-5min-stream ``` ### Initialize a Node.js Project Next, run this command to create a `package.json` file for your project. ```bash theme={"dark"} npm init -y ``` ### Install the WebSocket Library Finally, install the `ws` library to handle the WebSocket connection. ```bash theme={"dark"} npm install ws ``` ### Enable ES6 Modules (Important!) To avoid warnings and ensure smooth operation, edit your `package.json` file and add `"type": "module"`: ```json theme={"dark"} { "name": "coinpaprika-5min-stream", "version": "1.0.0", "type": "module", "main": "index.js", "scripts": { "start": "node index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { "ws": "^8.14.0" }, "keywords": [], "author": "", "license": "ISC", "description": "" } ``` ## Step 2: Create and Run the Client (4 Minutes) Now, create a new file named `index.js` in your project folder. This file will contain all the code for our streaming client. Open `index.js` and **paste the following code into it**. Be sure to replace `"YOUR_API_KEY"` with your actual CoinPaprika API key. ```javascript theme={"dark"} // Import the WebSocket library import WebSocket from "ws"; // --- Configuration --- // Replace with your actual CoinPaprika API key const API_KEY = "YOUR_API_KEY"; const WS_URL = "wss://streaming.coinpaprika.com/ticks"; console.log("--- CoinPaprika 5-Minute Ticker ---"); console.log("Starting connection to streaming API..."); // --- WebSocket Connection --- try { // Initialize the WebSocket connection with your API key in the headers const ws = new WebSocket(WS_URL, { headers: { Authorization: API_KEY, }, }); let pingTimeout; // This function is a safeguard that terminates the connection if the server stops sending pings. function heartbeat() { clearTimeout(pingTimeout); console.log("Heartbeat timeout. Terminating connection."); ws.terminate(); } // --- Event Handlers --- // 1. When the connection opens, subscribe to tickers. ws.on("open", () => { console.log("✅ Connection established. Subscribing to tickers..."); pingTimeout = setTimeout(heartbeat, 130 * 1000); // Expect a ping within 130 seconds const subscribePayload = { event: "subscribe", ids: ["btc-bitcoin", "eth-ethereum"], quotes: ["USD"], }; ws.send(JSON.stringify(subscribePayload)); console.log("Subscribed to Bitcoin and Ethereum tickers"); console.log("Waiting for live price updates...\n"); }); // 2. When the server sends a ping, reset the heartbeat timeout. ws.on("ping", () => { console.log("Received server ping. Connection is healthy."); clearTimeout(pingTimeout); pingTimeout = setTimeout(heartbeat, 130 * 1000); }); // 3. When a message is received, log it to the console. ws.on("message", (data) => { try { const message = JSON.parse(data.toString()); // Format the output to be more readable const price = message.quotes?.USD?.p; const volume = message.quotes?.USD?.v24h; const marketCap = message.quotes?.USD?.m; console.log(`📊 ${message.sym} (${message.id}):`); console.log(` 💲 Price: $${price?.toLocaleString() || 'N/A'}`); console.log(` 📈 24h Volume: $${volume?.toLocaleString() || 'N/A'}`); console.log(` 🏦 Market Cap: $${marketCap?.toLocaleString() || 'N/A'}`); console.log(` 🕐 Timestamp: ${new Date(message.ts * 1000).toLocaleString()}\n`); } catch (error) { console.error("Failed to parse message:", error); } }); // 4. When the connection closes, clean up the timeout. ws.on("close", (code, reason) => { console.log(`🔌 Connection closed with code ${code}: ${reason || 'No reason provided'}`); clearTimeout(pingTimeout); }); // 5. Handle any errors that occur. ws.on("error", (err) => { console.error("A WebSocket error occurred:", err.message); }); // 6. Graceful shutdown on Ctrl+C process.on('SIGINT', () => { console.log('\nGracefully shutting down...'); ws.close(); process.exit(0); }); } catch (e) { console.error("Failed to create WebSocket connection:", e.message); process.exit(1); } ``` ### Run the Application You are now ready to go! Save the `index.js` file, and in your terminal, run the following command: ```bash theme={"dark"} node index.js ``` You should immediately see output as the connection is made and data starts streaming in: ``` --- CoinPaprika 5-Minute Ticker --- 🚀 Starting connection to streaming API... ✅ Connection established. Subscribing to tickers... 📡 Subscribed to Bitcoin and Ethereum tickers 💰 Waiting for live price updates... 📊 BTC (btc-bitcoin): 💲 Price: $118,625 📈 24h Volume: $42,480,897,345 🏦 Market Cap: $2,359,846,639,027 🕐 Timestamp: 7/16/2025, 4:09:40 PM 📊 ETH (eth-ethereum): 💲 Price: $3,191 📈 24h Volume: $28,987,190,950 🏦 Market Cap: $384,299,955,255 🕐 Timestamp: 7/16/2025, 4:09:40 PM ``` **To stop the stream**, simply press `Ctrl+C` in your terminal. ## What Just Happened? Congratulations! 🎉 You've successfully: 1. **Connected** to the CoinPaprika Streaming API 2. **Authenticated** using your API key 3. **Subscribed** to Bitcoin and Ethereum price feeds 4. **Received** real-time market data The stream will continue indefinitely, updating you whenever there are price changes on these cryptocurrencies. ## Understanding the Code Let's break down the key parts: * **WebSocket Connection**: Creates a persistent connection to receive real-time data * **Heartbeat**: Monitors connection health and reconnects if needed * **Event Handlers**: Respond to different connection states (open, message, close, error) * **Data Parsing**: Safely parses incoming JSON messages with error handling * **Graceful Shutdown**: Properly closes the connection when you stop the program ## Next Steps This tutorial provides a solid foundation. Here are a few ideas for expanding your application: * **Store the Data**: Save the incoming ticker data to a database for historical analysis. * **Build a UI**: Create a web-based dashboard to visualize the price changes in real time. * **Add More Currencies**: Modify the `subscribePayload` to include other cryptocurrencies you're interested in. * **Implement Reconnection Logic**: Enhance the script to automatically reconnect if the connection is lost. * **Add Alerts**: Set up price alerts when certain thresholds are met. * **Calculate Changes**: Track price changes and display percentage movements. ## Troubleshooting **Common Issues:** * **Module Error**: Make sure you added `"type": "module"` to your `package.json` * **Connection Failed**: Check your API key and internet connection * **No Data**: Verify the currency IDs are correct (e.g., `"btc-bitcoin"`, `"eth-ethereum"`) Happy coding! ### FAQs Use the Node.js snippet in this guide. Replace `YOUR_API_KEY` and run `node index.js`. Use the REST API `GET /coins` or the [Coverage Checker](/tools/coverage) to look up canonical IDs (e.g., `btc-bitcoin`). Change the `quotes` array in the subscribe payload (e.g., \`\['USD', 'BTC']). Implement a heartbeat and reconnect with exponential backoff. See the sample code’s heartbeat logic. WebSockets are available on Enterprise; contact us if you need real-time streaming in production. # Streaming API Introduction Source: https://docs.coinpaprika.com/api-reference/streaming-api/streaming-introduction High-frequency cryptocurrency data via WebSocket # CoinPaprika Streaming API The CoinPaprika Streaming API provides high-frequency cryptocurrency ticker data via WebSocket connections, allowing you to get live price updates, market cap changes, and volume data for your favorite cryptocurrencies. ## Getting Started ### 1. Endpoint Connect to our WebSocket endpoint to start receiving live cryptocurrency data: ``` wss://streaming.coinpaprika.com/ticks ``` ### 2. Authentication All requests require authentication using your API key. You must include it in the `Authorization` header of your WebSocket connection request. To get your API key, visit the [CoinPaprika API](https://coinpaprika.com/api/) page. ### 3. Finding IDs * **Currency IDs (`ids`)**: To subscribe to a currency, you need its unique ID (e.g., `"btc-bitcoin"`). You can find these IDs by using the [Coins endpoint](https://docs.coinpaprika.com/api-reference/coins/get-coin-by-id) from our REST API. * **Quote Currencies (`quotes`)**: You can receive prices quoted in various currencies. The currently supported quote currencies are: `USD`, `BTC`, `ETH`, `BNB`, `MATIC`, `SOL`. ## Subscribing to Tickers Once connected, you can subscribe to or unsubscribe from ticker updates by sending JSON messages. ### Subscribe To receive updates for one or more cryptocurrencies, send a `subscribe` message: ```json theme={"dark"} { "event": "subscribe", "ids": ["btc-bitcoin", "eth-ethereum"], "quotes": ["USD", "BTC"] } ``` ### Unsubscribe To stop receiving updates, send an `unsubscribe` message: ```json theme={"dark"} { "event": "unsubscribe", "ids": ["btc-bitcoin"] } ``` ## Connection Management (Heartbeat) The API uses the standard WebSocket ping/pong mechanism to keep connections alive. Your client does not need to send any application-level ping messages. The server sends a `ping` frame every 120 seconds. Most modern WebSocket client libraries will automatically respond with the required `pong` frame. If the server does not receive a `pong` response, it will assume the connection is stale and close it. The client examples below demonstrate a robust pattern for handling this by setting a timeout that will terminate and reconnect if a server ping is not received within a certain window. ## Code Examples ### Node.js **Prerequisites:** Make sure to add `"type": "module"` to your `package.json` file to enable ES6 imports. ```json theme={"dark"} { "name": "coinpaprika-streaming", "version": "1.0.0", "type": "module", "dependencies": { "ws": "^8.14.0" } } ``` ```javascript theme={"dark"} import WebSocket from "ws"; const API_KEY = "YOUR_API_KEY"; // Replace with your API key const WS_URL = "wss://streaming.coinpaprika.com/ticks"; try { const ws = new WebSocket(WS_URL, { headers: { Authorization: API_KEY, }, }); let pingTimeout; function heartbeat() { // Terminate connection if server doesn't send a ping in time clearTimeout(pingTimeout); console.log("Heartbeat timeout. Terminating connection."); ws.terminate(); } ws.on("open", () => { console.log("Connection established."); pingTimeout = setTimeout(heartbeat, 130 * 1000); // Set initial timeout const subscribePayload = { event: "subscribe", ids: ["btc-bitcoin", "eth-ethereum"], quotes: ["USD", "BTC"], }; ws.send(JSON.stringify(subscribePayload)); console.log("Subscribed to ticker updates for BTC and ETH."); }); ws.on("ping", () => { // Server ping received, reset the timeout console.log("Received server ping. Resetting heartbeat timeout."); clearTimeout(pingTimeout); pingTimeout = setTimeout(heartbeat, 130 * 1000); }); ws.on("message", (data) => { try { const message = JSON.parse(data.toString()); console.log("Received message:", message); } catch (error) { console.error("Failed to parse message:", error); } }); ws.on("close", (code, reason) => { console.log(`Connection closed with code ${code}: ${reason}`); clearTimeout(pingTimeout); }); ws.on("error", (err) => { console.error("WebSocket error:", err); }); } catch (e) { console.error("Failed to connect:", e); } ``` ### Python **Prerequisites:** Install the required dependency: ```bash theme={"dark"} pip install websocket-client ``` ```python theme={"dark"} import websocket import json import time import threading API_KEY = "YOUR_API_KEY" # Replace with your API key WS_URL = "wss://streaming.coinpaprika.com/ticks" def on_message(ws, message): try: data = json.loads(message) print(f"Received message: {data}") except json.JSONDecodeError as e: print(f"Failed to parse message: {e}") def on_error(ws, error): print(f"Error: {error}") def on_close(ws, close_status_code, close_msg): print(f"### Connection closed with code {close_status_code}: {close_msg} ###") def on_open(ws): print("Connection opened.") subscribe_payload = { "event": "subscribe", "ids": ["btc-bitcoin", "eth-ethereum"], "quotes": ["USD", "BTC"], } ws.send(json.dumps(subscribe_payload)) print("Subscribed to ticker updates for BTC and ETH.") if __name__ == "__main__": # websocket.enableTrace(True) # Uncomment for debug logging ws_app = websocket.WebSocketApp( WS_URL, header={"Authorization": API_KEY}, on_open=on_open, on_message=on_message, on_error=on_error, on_close=on_close ) ws_app.run_forever(ping_interval=60, ping_timeout=10) ``` ## Message Format When subscribed, you'll receive live updates in this format: ```json theme={"dark"} { "id": "btc-bitcoin", "sym": "BTC", "ts": 1676916987, "quotes": { "USD": { "m": 608286188, "p": 50000.123, "v24h": 801851299.55 } } } ``` Where: * `id`: CoinPaprika currency ID * `sym`: Currency symbol * `ts`: Unix timestamp * `quotes`: Price data in requested quote currencies * `m`: Market cap * `p`: Current price * `v24h`: 24-hour volume ## Rate Limits * **Quotes per subscription**: Up to 5 quote currencies at once. ## Best Practices 1. **Implement heartbeat monitoring** to ensure a stable connection. 2. **Handle reconnections** gracefully, for example with an exponential backoff strategy. 3. **Subscribe only to needed currencies** to optimize bandwidth. 4. **Store your API token securely** and never expose it in client-side code. 5. **Implement proper error handling** for network issues and connection closures. 6. **Add proper JSON parsing** with try-catch blocks to handle malformed messages. ## Support For technical support or questions about the Streaming API: * Contact: [Fill out the form](https://coinpaprika.com/contact/) * Discord: [Join our community](https://discord.gg/DhJge5TUGM) ### FAQs A WebSocket API streams real-time cryptocurrency market data over a persistent connection. Use it when you need low-latency price, volume, or market cap updates. Yes. Pass your key in the `Authorization` header when establishing the WebSocket connection. Ticks are pushed as markets change. There is no fixed interval; frequency depends on market activity. Yes. Provide arrays for `ids` (e.g., `btc-bitcoin`) and `quotes` (e.g., `USD`, `BTC`) in the subscribe payload. To discover IDs quickly, use the [Coverage Checker](/tools/coverage). Each update includes `quotes.{QUOTE}.p` (price), `quotes.{QUOTE}.v24h` (24h volume), and `quotes.{QUOTE}.m` (market cap), plus a UNIX `ts` timestamp. # Get tag by ID Source: https://docs.coinpaprika.com/api-reference/tags/get-tag-by-id /api-reference/rest-api/openapi.yml get /tags/{tag_id} Returns information about a given cryptocurrency tag: * name * description * type of tag: `technical` or `functional` * number of coins with the tag * number of ICOs with the tag **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 hour. # List tags Source: https://docs.coinpaprika.com/api-reference/tags/list-tags /api-reference/rest-api/openapi.yml get /tags Returns basic information about cryptocurrencies tags (categories): * name * description * type of tag: `technical` or `functional` * number of coins with the tag * number of ICOs with the tag **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 hour. # Get historical ticks for a specific coin Source: https://docs.coinpaprika.com/api-reference/tickers/get-historical-ticks-for-a-specific-coin /api-reference/rest-api/openapi.yml get /tickers/{coin_id}/historical Returns historical values of `price`, `volume_24h`, `market_cap` for a given cryptocurrency on coinpaprika.com: **Available history range depending on the selected API plan:** | Interval | `interval` param values | Free | Starter | Pro | Business | Enterprise | |---|---|---|---|---|---|---| | Daily | `24h`, `1d`, `7d`, `14d`, `30d`, `90d`, `365d` | last 1 year | last 5 years | unlimited | unlimited | unlimited | | Hourly | `1h`, `2h`, `3h`, `6h`, `12h` | last 1 day | last 30 days | last 90 days | last 365 days | unlimited | | 5-minute | `5m`, `10m`, `15m`, `30m`, `45m` | none | last 7 days | last 30 days | last 365 days | unlimited | **Update interval:** Every 5 minutes. # Get ticker by ID (DEPRECATED) Source: https://docs.coinpaprika.com/api-reference/tickers/get-ticker-by-id-deprecated /api-reference/rest-api/openapi.yml get /ticker/{coin_id} **THIS ENDPOINT HAS BEEN DEPRECATED AND WILL BE REMOVED.** Please use the new `/tickers/{coin-id}` endpoint instead. # Get ticker for a specific coin Source: https://docs.coinpaprika.com/api-reference/tickers/get-ticker-for-a-specific-coin /api-reference/rest-api/openapi.yml get /tickers/{coin_id} Returns price data of a single cryptocurrency on coinpaprika.com: * identity (`id`, `name`, `symbol`) * ranking (`rank`) * supplies (`circulating_supply`, `total_supply`, `max_supply`) * [beta coefficient](https://www.investopedia.com/terms/b/beta.asp) (`beta_value`) * price data in a given currency (price, volumes, market cap, price changes, ath) **Available on the following API plans:** - Free - there is no `circulating supply` field in the Free plan. If you need this field, use another API plan. - Starter - Pro - Business - Enterprise **Update interval:** - 60 seconds for Starter, Pro, Business, Enterprise plans - On average 5 minutes for Free # Get ticker information for all coins (DEPRECATED) Source: https://docs.coinpaprika.com/api-reference/tickers/get-ticker-information-for-all-coins-deprecated /api-reference/rest-api/openapi.yml get /ticker **THIS ENDPOINT HAS BEEN DEPRECATED AND WILL BE REMOVED.** Please use the new `/tickers` endpoint instead. # Get tickers for all active coins Source: https://docs.coinpaprika.com/api-reference/tickers/get-tickers-for-all-active-coins /api-reference/rest-api/openapi.yml get /tickers Returns price data of all active cryptocurrencies on coinpaprika.com: * identity (`id`, `name`, `symbol`) * ranking (`rank`) * supplies (`circulating_supply`, `total_supply`, `max_supply`) * [beta coefficient](https://www.investopedia.com/terms/b/beta.asp) (`beta_value`) * price data in a given currency (price, volumes, market cap, price changes, ath) **Available on the following API plans:** - Free - there is no `circulating supply` field in the Free plan. If you need this field, use another API plan. - Starter - Pro - Business - Enterprise **Maximum number of assets returned depending on the selected API plan:** | Plan | Assets | |------------|-------------------------------------| | Free | 2000 | | Starter | No limits | | Pro | No limits | | Business | No limits | | Enterprise | No limits | **Update interval:** - 60 seconds for Starter, Pro, Business, Enterprise plans - On average 5 minutes for Free # Price converter Source: https://docs.coinpaprika.com/api-reference/tools/price-converter /api-reference/rest-api/openapi.yml get /price-converter Converts a set amount of base currency to quote currency. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # Search Source: https://docs.coinpaprika.com/api-reference/tools/search /api-reference/rest-api/openapi.yml get /search Returns currencies, exchanges, icos, people, tags on coinpaprika.com for a given search query. **Available on the following API plans:** - Free - Starter - Pro - Business - Enterprise **Update interval:** Every 1 minute. # /ticks Source: https://docs.coinpaprika.com/api-reference/websockets/ticks # Changelog Source: https://docs.coinpaprika.com/changelog ## 1.7.11 - 2026.03.05 * Added `type` field to `/exchanges/{exchange_id}` endpoint (cex, dex, perpetuals, spot, otc, other) ## 1.7.10 - 2025.04.14 * Added 5m interval for historical OHLCV endpoint ## 1.7.9 - 2024.12.18 * API mappings endpoint documentation ## 1.7.8 - 2024.01.24 * Plan limits update ## 1.7.7 - 2023.06.07 * Added official Python client link ## v1.7.6 - 2023.04.12 * New intervals for OHLCV endpoint ## v1.7.5 - 2022.12.07 * Removed documentation for /beta/ endpoints ## v1.7.4 - 2022.09.19 * Key info endpoint * Coin logo image URL ## v1.7.3 - 2022.09.08 * Plans update ## v1.7.2 - 2022.07.22 * Changelog endpoint documentation ## v1.7.1 - 2022.07.14 * Beta endpoints documentation ## v1.7.0 - 2022.05.06 * API-Pro documentation ## v1.6.1 - 2020.12.09 * Added information about first date with price data for currency ticker /tickers and /tickers/ * Added redirect for historical tickers by contract address /contracts///historical ## v1.6.0 - 2020.10.27 * Added contracts section /contracts, /contracts/, /contracts// # On-chain & DEX data Source: https://docs.coinpaprika.com/dexpaprika ## Introducing DexPaprika As the cryptocurrency landscape evolves, so do the needs of developers and analysts. While CoinPaprika provides comprehensive market data for thousands of assets across centralized exchanges, the world of Decentralized Finance (DeFi) and on-chain activity requires a specialized set of tools. To meet this demand, we are proud to introduce our sister project: **DexPaprika**. Dive into most comprehensive data from Decentralized Exchanges (DEXes), including liquidity pools, swaps, and on-chain analytics. ### What is DexPaprika? DexPaprika is a dedicated API service focused exclusively on providing latest and historical data from the decentralized ecosystem. It's built for developers, traders, and researchers who need granular insights into on-chain activities across multiple blockchains. ### Key features Access up-to-the-second information on liquidity pools from major DEXes. Track token performance, trading volume, and price movements within the DeFi space. Analyze individual swaps and transactions to understand market flow. Get data from a growing list of supported blockchains. If your project involves DeFi, on-chain analysis, or tracking assets on decentralized exchanges, DexPaprika is the perfect tool for you. ## Next steps Dive into the full API reference and start building with on-chain data. Continue exploring the features of the CoinPaprika API. # Frequently asked questions Source: https://docs.coinpaprika.com/faq ## General See also: [REST API Reference](/api-reference/rest-api/introduction), [API Plans](/api-plans), [Coverage Checker](/tools/coverage) * We have more than 53k assets in our database, of which about 8-10k are active (i.e., where trading has taken place in the last 24 hours). The number of assets is growing all the time, while the number of active assets depends on the market situation. * We have over 350 active exchanges, covering all of the mainstream CEX platforms, DEXes, and smaller exchanges as well. * Aggregated global volumes and market cap * Current prices for assets * Historical prices for assets * OHLC with different time resolutions * List of all assets (active/inactive) * Information about exchanges * List of contracts for a given platform * Price conversions in different quotes For more, please visit our full [REST API Reference](/api-reference/rest-api/introduction). Yes, we have SDKs for popular programming languages such as Python, PHP, Go, and JS/TS. You can see the full list in our [Getting Started guide](/api-reference/introduction#sdks). Before using an SDK provided by the community, please check its version and compatibility. If your programming language is not supported, don't worry; the API is provided in a standard JSON/REST format, and its implementation is usually straightforward. ## Plans & pricing Prices from various markets are collected in near real-time. However, the prices available in the REST API have a resolution of up to 10 minutes, up to 3 minutes, or up to 1 minute, depending on your plan. In case you need fresher data, please get in touch with us about our Enterprise solutions. Yes, WebSocket protocol is included in the Enterprise plan. Please contact us for details. We have a global limit of 10 requests/second per IP. Other limits on the number of queries are assigned to the corresponding plan and detailed in the documentation. When the limits are reached, the API returns HTTP codes `429` or `402`. You can find the monthly limits for each plan in our [Getting Started guide](/api-reference/introduction#rate-limits). Limits on the number of HTTP requests are defined according to the selected plan. They can be checked using the [/key/info](/api-reference/key/get-api-key-info) endpoint. Customers using the Enterprise package do not have a limit on the number of requests. Yes, the data can be used for commercial purposes inside the customer's company in all paid packages. However, only the **Enterprise** package allows data to be redistributed or shared, which requires a dedicated contract. Yes, in the **Enterprise** package, we guarantee 99.9% availability of our API. ## Account & billing We accept fiat payments via Stripe for this service. Subscriptions are non-refundable, but if you have a monthly subscription, you may cancel it by the end of the current billing period. For packages sold in the SaaS model, you only need to make a change at the [CoinPaprika API Panel](https://coinpaprika.com/api/panel). For Enterprise contracts, please get in touch with your account manager. To add new or update existing card details, please log in to your CoinPaprika account and go to the "Billing and Credit Card setup" section on your [Invoices page](https://coinpaprika.com/my-account/invoices/). From there, you will be redirected to Stripe to manage your payment methods. Yes, you can purchase any of our plans for your company. After the payment is complete, an invoice with your company's details will be generated and available in your account. You can manage your billing information, including company details, at any time through the [Stripe Customer Portal](https://billing.stripe.com/p/login/14kcNig8a1xr6Ri4gg). You can use the [Stripe Customer Portal](https://billing.stripe.com/p/login/14kcNig8a1xr6Ri4gg) to manage your billing information. ## Support For SaaS customers, please use the contact form on our website. For Enterprise customers, dedicated email/Slack and phone support are available. For Enterprise clients with the highest stability and security requirements, we provide a shared Slack channel and emergency phone support 24/7. The Terms of Service can be found [here](https://coinpaprika.com/terms-of-use/). # CoinPaprika Crypto API — REST Reference Source: https://docs.coinpaprika.com/get-started/api-rest-introduction Crypto API for developers: real-time cryptocurrency prices, market data, and historical data via REST. Build with CoinPaprika's reliable crypto data API. ## CoinPaprika crypto API overview See also: [Coverage Checker](/tools/coverage), [Ticker endpoint](/api-reference/tickers/get-ticker-for-a-specific-coin), [Historical OHLCV](/api-reference/coins/get-historical-ohlc), [Search](/api-reference/tools/search), [Price converter](/api-reference/tools/price-converter) **Click here to access the complete REST API documentation with all endpoints, examples, and interactive playground.** ## Crypto price API and cryptocurrency data API The CoinPaprika REST API provides comprehensive access to real-time cryptocurrency market data, historical prices, volumes, and market cap for over 50,000 assets across 350+ exchanges. Our REST API is designed with developers in mind, offering: * **Simple HTTP requests** - Use standard GET, POST methods * **JSON responses** - Clean, structured data format * **Comprehensive coverage** - From basic price data to detailed analytics * **High reliability** - 99.9% uptime with enterprise-grade infrastructure ## Popular crypto API endpoints Get ticker data for all active coins Get ticker data for a specific coin List all available coins List all supported exchanges Get historical OHLCV data Get global market overview ## Quick start Our API is designed to be simple and intuitive. Here's what you need to know: ### Base URL All API endpoints use the following base URL (for free plan): ``` https://api.coinpaprika.com/v1/ ``` For paid plans, the base URL is: ``` https://api-pro.coinpaprika.com/v1/ ``` ### Authentication Most endpoints are available without authentication, but we recommend using an API key for: * Higher rate limits * Premium features * Priority support To authenticate, include your API key as a Bearer token in the `Authorization` header of your request: ```bash theme={"dark"} curl -H "Authorization: Bearer YOUR_API_KEY" "https://api-pro.coinpaprika.com/v1/users/me" ``` **Pro tip:** Start with our free tier - no credit card required. You can make up to 1,000 requests per day without authentication. You can get your API key by checking out our [pricing page](https://coinpaprika.com/api/pricing/). ### Example request Get the latest Bitcoin price with a simple GET request: ```bash theme={"dark"} curl "https://api.coinpaprika.com/v1/tickers/btc-bitcoin" ``` ## CoinPaprika API support Test endpoints directly in your browser with our interactive playground. Use our official SDKs for Python, JavaScript, PHP, and more. **Ready to go professional?** Explore our [API plans](/api-plans) for higher rate limits, dedicated support, and advanced features. ### FAQs An HTTP API that returns real-time and historical cryptocurrency prices, volumes, and market cap. Use our REST endpoints for server-side and batch use cases. Yes, there’s a free tier with generous limits. Paid plans unlock higher limits and more data history. Use `GET /coins/{id}/ohlcv/historical` and specify `start`, optional `end`, and `interval`. Limits vary by plan; see the Rate Limits section or the Pricing page. When exceeded, the API returns HTTP `429`/`402`. Yes. Use the Streaming API for live ticks; REST covers request/response use cases. # Go SDK Source: https://docs.coinpaprika.com/get-started/sdk-go Official CoinPaprika API Go client library # 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: ```bash theme={"dark"} go get github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika ``` ## Quick Start ### Basic Usage ```go theme={"dark"} package main import ( "fmt" "log" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { // Initialize the client client := coinpaprika.NewClient(nil) // Get all tickers tickers, err := client.Tickers.List(nil) if err != nil { log.Fatal(err) } // Display first 3 coins for idx, ticker := range tickers { if ticker.Name == nil || ticker.Symbol == nil || ticker.Rank == nil { continue } fmt.Println("Name:", *ticker.Name) fmt.Println("Symbol:", *ticker.Symbol) fmt.Println("Rank:", *ticker.Rank) if quoteUSD, ok := ticker.Quotes["USD"]; ok && quoteUSD.Price != nil { fmt.Printf("Price: %.2f USD\n\n", *quoteUSD.Price) } if idx >= 2 { break } } } ``` ### Using Custom HTTP Client ```go theme={"dark"} package main import ( "fmt" "net/http" "time" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { // Create custom HTTP client with timeout customClient := &http.Client{ Timeout: 10 * time.Second, } // Initialize CoinPaprika client with custom HTTP client client := coinpaprika.NewClient(customClient) // Get global market data global, err := client.Global.Get() if err != nil { log.Fatal(err) } fmt.Printf("Total market cap: $%.0f\n", *global.MarketCapUSD) fmt.Printf("24h volume: $%.0f\n", *global.Volume24hUSD) } ``` ### Pro API with API Key ```go theme={"dark"} package main import ( "fmt" "log" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { // Initialize client with API key for Pro features client := coinpaprika.NewClient(nil, coinpaprika.WithAPIKey("YOUR_API_KEY")) // Get tickers with Pro features tickers, err := client.Tickers.List(nil) if err != nil { log.Fatal(err) } fmt.Printf("Retrieved %d tickers\n", len(tickers)) } ``` Get your API key at [coinpaprika.com/api](https://coinpaprika.com/api/) ## Common Use Cases ### Getting Market Data ```go theme={"dark"} package main import ( "fmt" "log" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { client := coinpaprika.NewClient(nil) // Get global market overview global, err := client.Global.Get() if err != nil { log.Fatal(err) } fmt.Println("Global Market Data:") if global.MarketCapUSD != nil { fmt.Printf("- Market Cap: $%.0f\n", *global.MarketCapUSD) } if global.Volume24hUSD != nil { fmt.Printf("- 24h Volume: $%.0f\n", *global.Volume24hUSD) } if global.CryptocurrenciesNumber != nil { fmt.Printf("- Active Cryptocurrencies: %d\n", *global.CryptocurrenciesNumber) } // Get top 10 tickers tickers, err := client.Tickers.List(nil) if err != nil { log.Fatal(err) } fmt.Println("\nTop 10 Cryptocurrencies:") for i, ticker := range tickers { if i >= 10 { break } if ticker.Name == nil || ticker.Symbol == nil || ticker.Rank == nil { continue } var price float64 var change float64 if ticker.Quotes != nil && ticker.Quotes["USD"] != nil { if ticker.Quotes["USD"].Price != nil { price = *ticker.Quotes["USD"].Price } if ticker.Quotes["USD"].PercentChange24h != nil { change = *ticker.Quotes["USD"].PercentChange24h } } fmt.Printf("%d. %s (%s): $%.2f (%.2f%%)\n", *ticker.Rank, *ticker.Name, *ticker.Symbol, price, change) } } ``` ### Coin Information ```go theme={"dark"} package main import ( "fmt" "log" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { client := coinpaprika.NewClient(nil) // Get specific coin data bitcoin, err := client.Coins.GetByID("btc-bitcoin") if err != nil { log.Fatal(err) } fmt.Println("Bitcoin Information:") if bitcoin.Name != nil { fmt.Printf("- Name: %s\n", *bitcoin.Name) } if bitcoin.Symbol != nil { fmt.Printf("- Symbol: %s\n", *bitcoin.Symbol) } if bitcoin.Rank != nil { fmt.Printf("- Rank: %d\n", *bitcoin.Rank) } // Get Bitcoin markets markets, err := client.Coins.GetMarketsByCoinID("btc-bitcoin") if err != nil { log.Fatal(err) } fmt.Printf("Trading on %d markets\n", len(markets)) } ``` ### Historical Data ```go theme={"dark"} package main import ( "fmt" "log" "time" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { client := coinpaprika.NewClient(nil, coinpaprika.WithAPIKey("YOUR_API_KEY")) // Get historical OHLCV data (Pro feature) endTime := time.Now() startTime := endTime.AddDate(0, 0, -7) // Last 7 days ohlcv, err := client.Coins.GetHistoricalOHLCVByCoinID("btc-bitcoin", &coinpaprika.HistoricalOHLCVOptions{ Quote: "usd", Start: startTime, End: endTime, }) if err != nil { log.Fatal(err) } fmt.Printf("Retrieved %d OHLCV data points for Bitcoin\n", len(ohlcv)) for _, data := range ohlcv[:3] { // Show first 3 days fmt.Printf("Date: %s, Open: $%.2f, High: $%.2f, Low: $%.2f, Close: $%.2f\n", data.TimeOpen.Format("2006-01-02"), data.Open, data.High, data.Low, data.Close) } } ``` ### Search and Price Converter ```go theme={"dark"} package main import ( "fmt" "log" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { client := coinpaprika.NewClient(nil) // Search for cryptocurrencies searchResults, err := client.Search.Search(&coinpaprika.SearchOptions{ Query: "bitcoin", Categories: "currencies", Limit: 5, }) if err != nil { log.Fatal(err) } fmt.Printf("Found %d coins matching 'bitcoin'\n", len(searchResults.Currencies)) for _, coin := range searchResults.Currencies { fmt.Printf("- %s (%s)\n", coin.Name, coin.Symbol) } // Price converter conversion, err := client.PriceConverter.PriceConverter(&coinpaprika.PriceConverterOptions{ BaseCurrencyID: "btc-bitcoin", QuoteCurrencyID: "eth-ethereum", Amount: 1, }) if err != nil { log.Fatal(err) } fmt.Printf("1 BTC = %.6f ETH\n", conversion.Price) } ``` ## Error Handling ```go theme={"dark"} package main import ( "fmt" "log" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { client := coinpaprika.NewClient(nil) // Handle errors gracefully coin, err := client.Coins.GetByID("invalid-coin-id") if err != nil { // The client returns a standard error, which may include the HTTP status code from the API. log.Printf("An error occurred: %v", err) return } fmt.Printf("Coin: %s\n", *coin.Name) } ``` ## 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 ```go theme={"dark"} package main import ( "log" "github.com/coinpaprika/coinpaprika-api-go-client/v2/coinpaprika" ) func main() { client := coinpaprika.NewClient(nil) // Get tickers with custom options options := &coinpaprika.TickersOptions{ Quotes: "USD,BTC", } tickers, err := client.Tickers.List(options) if err != nil { panic(err) } // Process tickers... log.Printf("Fetched %d tickers", len(tickers)) } ``` ## Available Methods The Go SDK is organized into services that correspond to the API endpoints. ### Global * [`client.Global.Get()`](/api-reference/global/get-market-overview-data) - Get global market data. ### Coins * [`client.Coins.List()`](/api-reference/coins/list-coins) - List all coins. * [`client.Coins.GetByID(coinID)`](/api-reference/coins/get-coin-by-id) - Get a specific coin by ID. * [`client.Coins.GetEventsByCoinID(coinID)`](/api-reference/coins/get-coin-events-by-coin-id) - Get events for a coin. * [`client.Coins.GetExchangesByCoinID(coinID)`](/api-reference/coins/get-exchanges-by-coin-id) - Get exchanges for a coin. * [`client.Coins.GetMarketsByCoinID(coinID)`](/api-reference/coins/get-markets-by-coin-id) - Get markets for a coin. * [`client.Coins.GetTwitterByCoinID(coinID)`](/api-reference/coins/get-twitter-timeline-tweets-for-a-coin) - Get Twitter timeline for a coin. * [`client.Coins.GetOHLCVLastFullDayByCoinID(coinID)`](/api-reference/coins/get-ohlc-for-the-last-full-day) - Get OHLCV for the last full day. * [`client.Coins.GetOHLCVHistorical(coinID, options)`](/api-reference/coins/get-historical-ohlc) - Get historical OHLCV. * [`client.Coins.GetOHLCVTodayByCoinID(coinID)`](/api-reference/coins/get-today-ohlc) - Get today's OHLCV. ### People * [`client.People.GetByID(personID)`](/api-reference/people/get-person-by-id) - Get a person by ID. ### Tags * [`client.Tags.List(options)`](/api-reference/tags/list-tags) - List all tags. * [`client.Tags.GetByID(tagID, options)`](/api-reference/tags/get-tag-by-id) - Get a tag by ID. ### Tickers * [`client.Tickers.List(options)`](/api-reference/tickers/get-tickers-for-all-active-coins) - Get tickers for all coins. * [`client.Tickers.GetByCoinID(coinID, options)`](/api-reference/tickers/get-ticker-for-a-specific-coin) - Get ticker for a specific coin. * [`client.Tickers.GetHistoricalByCoinID(coinID, options)`](/api-reference/tickers/get-historical-ticks-for-a-specific-coin) - Get historical ticks. ### Exchanges * [`client.Exchanges.List(options)`](/api-reference/exchanges/list-exchanges) - List all exchanges. * [`client.Exchanges.GetByID(exchangeID)`](/api-reference/exchanges/get-exchange-by-id) - Get a specific exchange. * [`client.Exchanges.GetMarketsByExchangeID(exchangeID, options)`](/api-reference/exchanges/list-an-exchange-markets) - Get markets for an exchange. ### Tools * [`client.Tools.Search(query, options)`](/api-reference/tools/search) - Search for assets. * [`client.Tools.PriceConverter(options)`](/api-reference/tools/price-converter) - Convert between currencies. ### FAQs Initialize the client with coinpaprika.WithAPIKey("YOUR\_API\_KEY") to enable Pro features; public endpoints work without a key. Use the [Coverage Checker](/tools/coverage) to look up canonical IDs such as btc-bitcoin. Call Coins.GetHistoricalOHLCVByCoinID with start/end and quote; Pro access is required for history. Inspect errors for HTTP 429 and back off before retrying; consider adding simple retry logic. ## Examples Repository Check out practical examples in the [official repository](https://github.com/coinpaprika/coinpaprika-api-go-client/tree/main/examples). ## Requirements * Go 1.13 or higher * Internet connection for API calls ## License This library is available under the MIT license. See the [LICENSE file](https://github.com/coinpaprika/coinpaprika-api-go-client/blob/master/LICENSE.md) for more info. # JavaScript SDK Source: https://docs.coinpaprika.com/get-started/sdk-javascript Official CoinPaprika API Node.js client library # CoinPaprika JavaScript SDK The official Node.js client library for the CoinPaprika API provides convenient access to cryptocurrency market data. See also: [REST API Reference](/api-reference/rest-api/introduction), [Coverage Checker](/tools/coverage), [Historical OHLCV](/api-reference/coins/get-historical-ohlc) ## Installation Install the CoinPaprika JavaScript SDK using npm: ```bash theme={"dark"} npm install @coinpaprika/api-nodejs-client ``` ## Quick Start The following example shows how to create a client instance and fetch global market data and a list of all tickers. ### Using Promises ```javascript theme={"dark"} const CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client'); const client = new CoinpaprikaAPI(); // Get global market data client.getGlobal() .then(console.log) .catch(console.error); // Get all tickers client.getAllTickers() .then(console.log) .catch(console.error); ``` ### Using Async/Await ```javascript theme={"dark"} const CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client'); async function getMarketData() { const client = new CoinpaprikaAPI(); try { // Get global market overview const globalData = await client.getGlobal(); console.log('Global Market Data:', globalData); // Get all coins const coins = await client.getCoins(); console.log(`\nFound ${coins.length} coins`); } catch (error) { console.error('Error fetching market data:', error); } } getMarketData(); ``` ## Common Use Cases ### Getting Coin Information Fetch a list of all available coins and find a specific one by its ID. ```javascript theme={"dark"} const CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client'); const client = new CoinpaprikaAPI(); async function getCoinInfo() { try { // Get a specific coin by its ID const bitcoin = await client.getCoin('btc-bitcoin'); console.log('Bitcoin Details:', bitcoin); } catch (error) { console.error('Error fetching coin info:', error); } } getCoinInfo(); ``` ### Getting Ticker Data Fetch ticker information for all coins or for a specific coin. ```javascript theme={"dark"} const CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client'); const client = new CoinpaprikaAPI(); async function getTickerData() { try { // Get tickers for all coins, quoted in USD and BTC const allTickers = await client.getAllTickers({ quotes: ['USD', 'BTC'] }); console.log('All Tickers Count:', allTickers.length); // Get a specific ticker by coin ID const btcTicker = await client.getAllTickers({ coinId: 'btc-bitcoin' }); console.log('\nBitcoin Ticker:', btcTicker); } catch (error) { console.error('Error fetching ticker data:', error); } } getTickerData(); ``` ### Historical OHLCV Data Fetch historical Open-High-Low-Close-Volume (OHLCV) data for a specific coin. ```javascript theme={"dark"} const CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client'); const client = new CoinpaprikaAPI(); async function getHistoricalData() { try { // Get historical OHLCV data for Bitcoin for a specific date range const ohlcvData = await client.getCoinsOHLCVHistorical({ coinId: "btc-bitcoin", quote: "usd", start: "2023-01-01", end: "2023-01-07" }); console.log('Bitcoin OHLCV Data (First week of 2023):'); console.log(ohlcvData); } catch (error) { console.error('Error fetching historical data:', error); } } getHistoricalData(); ``` ### Historical Ticker Data Fetch historical ticker data for a specific coin within a date range and at a given interval. ```javascript theme={"dark"} const CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client'); const client = new CoinpaprikaAPI(); async function getHistoricalTicker() { try { // Get historical tickers for Bitcoin const historicalTickers = await client.getAllTickers({ coinId: 'btc-bitcoin', historical: { start: '2023-01-01', end: '2023-01-02', limit: 10, quote: 'usd', interval: '1h' } }); console.log(`\nHistorical tickers found:`, historicalTickers); } catch (error) { console.error('Error fetching historical tickers:', error); } } getHistoricalTicker(); ``` ## Error Handling The client returns a Promise, so you can handle errors by chaining a `.catch()` block or by using a `try...catch` block with async/await. The error object from the underlying `node-fetch` library will contain details about the failure. ```javascript theme={"dark"} const CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client'); const client = new CoinpaprikaAPI(); async function handleErrors() { try { // This will fail because the coin ID does not exist await client.getCoin('invalid-coin-id'); } catch (error) { // The API returns an error object, e.g., { error: 'id not found' } console.error('Error caught:', error); } } handleErrors(); ``` ## Available Methods ### `getGlobal()` * **Description:** [Get global market overview.](/api-reference/global/get-market-overview-data) ### `getCoins()` * **Description:** [List all coins available on Coinpaprika.](/api-reference/coins/list-coins) ### `getCoin(coinId)` * **Description:** [Get a specific coin by its ID.](/api-reference/coins/get-coin-by-id) * **`coinId`**: e.g., `'btc-bitcoin'` ### `getAllTickers(options)` * **Description:** [Get tickers for all coins or a specific coin.](/api-reference/tickers/get-tickers-for-all-active-coins) * **`options`** `(Object)`: * **`coinId`** `(String)`: ID of a specific coin. * **`quotes`** `(Array)`: Quote currencies (e.g., `['USD', 'BTC']`). ### `getAllTickers({ historical })` * **Description:** [Get historical ticker data.](/api-reference/tickers/get-historical-ticks-for-a-specific-coin) * **`historical`** `(Object)`: * **`start`** `(String)`: Required. Start date (e.g., `'2023-01-01'`). * **`end`** `(String)`: Optional. End date. * **`limit`** `(Number)`: Optional. Data points limit. * **`quote`** `(String)`: Optional. Quote currency (e.g., `'usd'`). * **`interval`** `(String)`: Optional. Time interval (e.g., `'1h'`). ### `getCoinsOHLCVHistorical(options)` * **Description:** [Get historical OHLCV data for a coin.](/api-reference/coins/get-historical-ohlc) * **`options`** \`(Object)\*\*: * **`coinId`** `(String)`: Required. ID of a specific coin. * **`quote`** `(String)`: Optional. Quote currency (defaults to `'usd'`). * **`start`** `(String)`: Required. Start date. * **`end`** `(String)`: Optional. End date. ## Requirements * Node.js 12.0 or higher ## Dependencies * `node-fetch`: For making HTTP requests. * `qs`: For query string handling. ## License This library is available under the MIT license. See the [LICENSE file](https://github.com/coinpaprika/coinpaprika-api-nodejs-client/blob/master/LICENSE) for more info. ### FAQs Create the client with your key when needed or configure HTTP headers before calls; free endpoints work without a key. Use the [Coverage Checker](/tools/coverage) to look up canonical IDs such as btc-bitcoin. Use getCoinsOHLCVHistorical(\{ coinId, start, end, quote }) with an API key. Wrap calls in try/catch (async/await) or chain .catch(), and back off on 429 Too Many Requests. # Kotlin SDK Source: https://docs.coinpaprika.com/get-started/sdk-kotlin Official CoinPaprika API Kotlin/Android client building blocks # CoinPaprika Kotlin SDK The official Kotlin library for the CoinPaprika API provides a set of Retrofit interfaces and data models to access cryptocurrency market data. This allows for easy integration into any Android or Kotlin project that uses Retrofit for networking. This library provides the building blocks, not a pre-configured client. You are responsible for creating and configuring your own `Retrofit` instance. ## Installation Add the library dependency to your module's `build.gradle` or `build.gradle.kts` file. ```groovy theme={"dark"} // build.gradle implementation 'com.coinpaprika:apiclient:0.5.3' ``` You will also need to add dependencies for Retrofit, a JSON converter like Moshi, and an HTTP client like OkHttp if you haven't already. ```groovy theme={"dark"} // build.gradle implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-moshi:2.9.0' implementation 'com.squareup.moshi:moshi-kotlin:1.12.0' implementation 'com.squareup.okhttp3:okhttp3:4.9.3' ``` Finally, ensure you have the `INTERNET` permission in your `AndroidManifest.xml`. ```xml theme={"dark"} ``` ## Quick Start ### 1. Create a Retrofit Instance First, configure and build a `Retrofit` instance. You must provide the base URL and a converter factory. ```kotlin theme={"dark"} import com.coinpaprika.apiclient.BaseUrl import com.squareup.moshi.Moshi import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import retrofit2.Retrofit import retrofit2.converter.moshi.MoshiConverterFactory object RetrofitClient { private val moshi = Moshi.Builder() .add(KotlinJsonAdapterFactory()) .build() val instance: Retrofit = Retrofit.Builder() .baseUrl(BaseUrl.API_ENDPOINT) .addConverterFactory(MoshiConverterFactory.create(moshi)) .build() } ``` ### 2. Create a Service Use your Retrofit instance to create an implementation of one of the library's service interfaces, such as `TickersService`. ```kotlin theme={"dark"} import com.coinpaprika.apiclient.TickersService val tickersService: TickersService = RetrofitClient.instance.create(TickersService::class.java) ``` ### 3. Make an API Call Now you can use the service within a coroutine to make API calls. ```kotlin theme={"dark"} import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch // In your Activity, ViewModel, or other component fun fetchTickers() { CoroutineScope(Dispatchers.IO).launch { try { // Get tickers quoted in USD val tickers = tickersService.getTickers(quotes = "USD") // Print the name and price of the first 5 tickers tickers.take(5).forEach { ticker -> val usdQuote = ticker.quotes?.get("USD") println("${ticker.name}: $${usdQuote?.price}") } } catch (e: Exception) { // Handle exceptions, e.g., network errors println("An error occurred: ${e.message}") } } } ``` ## Available Services This library provides the following Retrofit service interfaces. ### CoinsService Used to fetch coin details and history. * [`getCoins()`](/api-reference/coins/list-coins): Lists all available coins. * [`getCoin(id)`](/api-reference/coins/get-coin-by-id): Retrieves details for a specific coin ID. * [`getCoinEvents(id)`](/api-reference/coins/get-coin-events-by-coin-id): Gets events related to a coin. * [`getCoinExchanges(id)`](/api-reference/coins/get-exchanges-by-coin-id): Gets exchanges where a coin is listed. * [`getCoinMarkets(id, quotes)`](/api-reference/coins/get-markets-by-coin-id): Gets market data for a coin. * [`getCoinTweets(id)`](/api-reference/coins/get-twitter-timeline-tweets-for-a-coin): Gets the latest tweets for a coin. * [`getCoinOHLCV(id, quotes)`](/api-reference/coins/get-ohlc-for-the-last-full-day): Gets the latest OHLCV data. * [`getHistoricalCoinOHLCV(...)`](/api-reference/coins/get-historical-ohlc): Gets historical OHLCV data. ### ExchangesService Used to fetch data about exchanges. * [`getExchanges(quotes)`](/api-reference/exchanges/list-exchanges): Lists all exchanges. * [`getExchange(id, quotes)`](/api-reference/exchanges/get-exchange-by-id): Retrieves details for a specific exchange. * [`getExchangeMarkets(id, quotes)`](/api-reference/exchanges/list-an-exchange-markets): Gets all markets for a specific exchange. ### GlobalStatsService Used to get global market data. * [`getGlobalStats(quotes)`](/api-reference/global/get-market-overview-data): Retrieves global cryptocurrency market statistics. ### PeopleService Used to get information about people in the crypto space. * [`getPerson(id)`](/api-reference/people/get-person-by-id): Retrieves details for a specific person by ID. ### SearchService Used to perform searches. * [`search(...)`](/api-reference/tools/search): Searches for coins, exchanges, people, and more. ### TagsService Used to get information about tags. * [`getTags(sortBy)`](/api-reference/tags/list-tags): Lists all tags. * [`getTag(id)`](/api-reference/tags/get-tag-by-id): Retrieves details for a specific tag. ### TickersService Used to fetch ticker price and market data. * [`getTicker(id, quotes)`](/api-reference/tickers/get-ticker-for-a-specific-coin): Retrieves the ticker for a specific coin ID. * [`getTickers(quotes, page)`](/api-reference/tickers/get-tickers-for-all-active-coins): Lists tickers for all coins. ### FAQs Add an Interceptor to your OkHttp client to inject the API key header when using Pro endpoints. Use the [Coverage Checker](/tools/coverage) to discover canonical IDs (e.g., btc-bitcoin). Call the historical OHLCV service method with required parameters; Pro access is required for history. Catch HttpException for non-2xx responses (e.g., 404, 429) and IOException for network failures; apply backoff before retries. ## Error Handling When using this library, you should wrap your API calls in a `try-catch` block to handle potential exceptions, such as `HttpException` from Retrofit for non-2xx responses or `IOException` for network failures. ```kotlin theme={"dark"} import retrofit2.HttpException import java.io.IOException suspend fun fetchCoinData(coinId: String) { val coinsService = RetrofitClient.instance.create(CoinsService::class.java) try { val coin = coinsService.getCoin(coinId) println("Successfully fetched ${coin.name}") } catch (e: HttpException) { // Handle HTTP errors (e.g., 404 Not Found, 429 Too Many Requests) println("HTTP Error: ${e.code()} - ${e.message()}") } catch (e: IOException) { // Handle network errors (e.g., no internet connection) println("Network Error: ${e.message}") } catch (e: Exception) { // Handle other unexpected errors println("An unknown error occurred: ${e.message}") } } ``` ## Requirements * Kotlin-enabled project (Android or pure Kotlin) * `retrofit2` * `moshi` (or another JSON converter) * `okhttp3` ## License This library is available under the MIT license. See the [LICENSE file](https://github.com/coinpaprika/coinpaprika-api-kotlin-client/blob/master/LICENSE) for more info. # PHP SDK Source: https://docs.coinpaprika.com/get-started/sdk-php Official CoinPaprika API PHP client library # CoinPaprika PHP SDK The official PHP client library for the CoinPaprika API provides convenient access to cryptocurrency market data. It uses Guzzle for HTTP requests and the JMS/Serializer for handling API responses. See also: [REST API Reference](/api-reference/rest-api/introduction), [Coverage Checker](/tools/coverage), [Ticker endpoint](/api-reference/tickers/get-ticker-for-a-specific-coin) ## Installation Install the CoinPaprika PHP SDK via Composer: ```bash theme={"dark"} composer require coinpaprika/coinpaprika-api-php-client ``` ## Requirements * PHP >= 7.2.5 * Composer for dependency management * `guzzlehttp/guzzle`, `jms/serializer`, `symfony/yaml`, `doctrine/cache` ## Quick Start ### Basic Usage The following example shows how to initialize the client and fetch global market statistics. ```php theme={"dark"} getGlobalStats(); echo "Total market cap: $" . number_format($global->getMarketCapUsd()) . "\n"; echo "24h volume: $" . number_format($global->getVolume24hUsd()) . "\n"; echo "Bitcoin dominance: " . $global->getBitcoinDominancePercentage() . "%\n"; ``` ### Pro API with API Key To access Pro API endpoints, provide your API key directly in the constructor. ```php theme={"dark"} getHistoricalTickerByCoinId( 'btc-bitcoin', '2023-01-01', '1d' ); echo "Fetched " . count($historicalTickers) . " historical tickers for Bitcoin.\n"; ``` Get your API key at [coinpaprika.com/api](https://coinpaprika.com/api/) ## Common Use Cases ### Listing All Coins This client does not have a method to fetch a single coin by its ID. Instead, you can fetch the full list of all coins and then find the one you need. ```php theme={"dark"} getCoins(); echo "Found " . count($coins) . " coins\n\n"; // Find Ethereum from the list $ethereum = null; foreach ($coins as $coin) { if ($coin->getId() === 'eth-ethereum') { $ethereum = $coin; break; } } if ($ethereum) { echo "Ethereum Information:\n"; echo "- Name: " . $ethereum->getName() . "\n"; echo "- Symbol: " . $ethereum->getSymbol() . "\n"; echo "- Type: " . $ethereum->getType() . "\n"; } ``` ### Getting Ticker Data You can fetch a list of all tickers or get a specific ticker by a coin's ID. ```php theme={"dark"} getTickers(); echo "Fetched " . count($allTickers) . " tickers.\n"; // Get a specific ticker by coin ID $btcTicker = $client->getTickerByCoinId('btc-bitcoin'); $usdQuote = $btcTicker->getQuotes()['USD']; echo "\nBitcoin Market Data:\n"; echo "- Price: $" . number_format($usdQuote->getPrice(), 2) . "\n"; echo "- Market Cap: $" . number_format($usdQuote->getMarketCap()) . "\n"; echo "- 24h Volume: $" . number_format($usdQuote->getVolume24h()) . "\n"; ``` ### Search The client provides a search endpoint that can look for currencies, exchanges, ICOs, people, and tags. ```php theme={"dark"} search('ether', ['currencies', 'icos']); echo "Search results for 'ether':\n\n"; if (!empty($searchResults->getCurrencies())) { echo "Currencies (" . count($searchResults->getCurrencies()) . "):\n"; foreach ($searchResults->getCurrencies() as $currency) { echo "- " . $currency->getName() . " (" . $currency->getSymbol() . ")\n"; } } if (!empty($searchResults->getIcos())) { echo "\nICOs (" . count($searchResults->getIcos()) . "):\n"; foreach ($searchResults->getIcos() as $ico) { echo "- " . $ico->getName() . " (" . $ico->getSymbol() . ")\n"; } } ``` ## Error Handling The client throws specific exceptions for different types of errors. It's best to wrap your API calls in a `try-catch` block to handle these gracefully. ```php theme={"dark"} getTickerByCoinId('invalid-coin-id'); } catch (\Coinpaprika\Exception\RateLimitExceededException $e) { echo "Rate limit exceeded. Please wait before making more requests.\n"; } catch (\GuzzleHttp\Exception\ClientException $e) { // Guzzle's ClientException is thrown for 4xx errors $response = $e->getResponse(); $statusCode = $response->getStatusCode(); $body = $response->getBody()->getContents(); echo "API Error: {$statusCode} - {$body}\n"; } catch (Exception $e) { // Handle other generic errors echo "An unexpected error occurred: " . $e->getMessage() . "\n"; } ``` ## Available Methods ### Global * [`getGlobalStats()`](/api-reference/global/get-market-overview-data) - Get global market overview. ### Coins * [`getCoins()`](/api-reference/coins/list-coins) - List all active coins. * [`getTokenMeta(string $id)`](/api-reference/coins/get-coin-by-id) - Get metadata for a specific token. ### Tickers * [`getTickers()`](/api-reference/tickers/get-tickers-for-all-active-coins) - Get tickers for all coins. * [`getTickerByCoinId(string $id)`](/api-reference/tickers/get-ticker-for-a-specific-coin) - Get a specific ticker by coin ID. * [`getHistoricalTickerByCoinId(string $id, string $start, string $interval)`](/api-reference/tickers/get-historical-ticks-for-a-specific-coin) - Get historical ticker data. ### Exchanges * [`getExchanges()`](/api-reference/exchanges/list-exchanges) - List all exchanges. * [`getExchangeById(string $id)`](/api-reference/exchanges/get-exchange-by-id) - Get a specific exchange. * [`getExchangeMarkets(string $id)`](/api-reference/exchanges/list-an-exchange-markets) - Get markets for an exchange. ### Tools * [`search(string $query, array $categories = null, int $limit = null)`](/api-reference/tools/search) - Search across coins, exchanges, etc. * [`priceConverter(string $baseId, string $quoteId, float $amount)`](/api-reference/tools/price-converter) - Convert between currencies. ### Other * `getIcos(array $parameters = [])` - Get a list of ICOs. * `setApiKey(string $apiKey)` - Set the API key after client initialization. * [`getOHLCV(string $id, string $interval)`](/api-reference/coins/get-historical-ohlc) - Get the latest OHLCV data. ### FAQs Pass the API key to the client constructor: new \Coinpaprika\Client(null, null, 'YOUR\_API\_KEY') for Pro features. Look up IDs using the [Coverage Checker](/tools/coverage); e.g., btc-bitcoin. Use getHistoricalTickerByCoinId($id, $start, \$interval) with Pro access; for OHLCV see the REST endpoint. Catch RateLimitExceededException or Guzzle client errors and retry with backoff. ## Examples Repository For more detailed examples, please see the [official repository](https://github.com/coinpaprika/coinpaprika-api-php-client/tree/main/examples). ## License This library is available under the MIT license. See the [LICENSE file](https://github.com/coinpaprika/coinpaprika-api-php-client/blob/master/LICENSE.md) for more info. # Python SDK Source: https://docs.coinpaprika.com/get-started/sdk-python Official CoinPaprika API Python client library # CoinPaprika Python SDK The official Python client library for the CoinPaprika API provides convenient access to cryptocurrency market data. See also: [REST API Reference](/api-reference/rest-api/introduction), [Coverage Checker](/tools/coverage), [Historical OHLCV](/api-reference/coins/get-historical-ohlc) ## Installation Install the CoinPaprika Python SDK using pip: ```bash theme={"dark"} pip install coinpaprika-sdk ``` ## Quick Start ### Free Plan For basic usage with the free API plan: ```python theme={"dark"} from coinpaprika.client import Client # Initialize the client client = Client() # Get global market data global_data = client.global_market() print(f"Total market cap: ${global_data['market_cap_usd']:,.0f}") print(f"24h volume: ${global_data['volume_24h_usd']:,.0f}") # Get detailed coin information for Bitcoin btc_data = client.coin("btc-bitcoin") print(f"Bitcoin: {btc_data['name']} ({btc_data['symbol']})") ``` ### Pro Plan To access Pro features and higher rate limits, initialize the client with your API key. ```python theme={"dark"} from coinpaprika.client import Client # Initialize client with an API key client = Client(api_key="YOUR-API-KEY") # Now you can access Pro features, such as historical ticker data historical_tickers = client.historical( "btc-bitcoin", start="2023-01-01T00:00:00Z", end="2023-01-07T00:00:00Z" ) print(f"Retrieved {len(historical_tickers)} historical tickers for Bitcoin.") ``` Get your API key at [coinpaprika.com/api](https://coinpaprika.com/api/) ## Common Use Cases ### Getting Market Data ```python theme={"dark"} from coinpaprika.client import Client client = Client() # Get global market overview global_data = client.global_market() print(f"Total market cap: ${global_data['market_cap_usd']:,.0f}") print(f"Bitcoin dominance: {global_data['bitcoin_dominance_percentage']:.1f}%") # Get all tickers tickers = client.tickers() print("\nTop 5 cryptocurrencies:") for ticker in tickers[:5]: name = ticker.get('name', 'N/A') symbol = ticker.get('symbol', 'N/A') price = ticker.get('quotes', {}).get('USD', {}).get('price', 0) print(f"{name} ({symbol}): ${price:.2f}") ``` ### Coin Information ```python theme={"dark"} from coinpaprika.client import Client client = Client() # Get detailed coin information coin = client.coin("eth-ethereum") print(f"Name: {coin['name']}") print(f"Symbol: {coin['symbol']}") print(f"Active: {coin['is_active']}") # Get coin markets markets = client.markets("eth-ethereum", quotes="USD") print(f"Trading on {len(markets)} markets") # Get a specific coin's ticker data ticker = client.ticker("eth-ethereum") usd_quote = ticker['quotes']['USD'] print(f"Price: ${usd_quote['price']:.2f}") ``` ### Historical Data The primary method for fetching historical OHLCV data is `ohlcv()`. Using an API key is required for most historical data access. ```python theme={"dark"} from coinpaprika.client import Client from coinpaprika.exceptions import CoinpaprikaAPIException # Pro client with API key is required for historical data client = Client(api_key="YOUR-API-KEY") try: # Get historical OHLCV data historical_data = client.ohlcv( "btc-bitcoin", start="2023-01-01T00:00:00Z", end="2023-01-07T00:00:00Z" ) print("Bitcoin OHLCV Data (First week of 2023):") for day in historical_data: price = day['close'] volume = day['volume'] print(f"Date: {day['time_open'][:10]}, Close: ${price:.2f}, Volume: ${volume:,.0f}") except CoinpaprikaAPIException as e: print(f"Error fetching historical data: {e}") ``` ### Exchange Data ```python theme={"dark"} from coinpaprika.client import Client client = Client() # Get all exchanges exchanges = client.exchange_list() print(f"Found {len(exchanges)} exchanges") # Get specific exchange data binance = client.exchange("binance", quotes="USD") print(f"\nBinance:") print(f"- Name: {binance['name']}") if 'quotes' in binance and 'USD' in binance['quotes']: volume = binance['quotes']['USD']['reported_volume_24h'] print(f"- 24h Volume: ${volume:,.0f}") # Get exchange markets markets = client.exchange_markets("binance", quotes="USD") print(f"Binance has {len(markets)} trading pairs") ``` ### Search and Price Conversion ```python theme={"dark"} from coinpaprika.client import Client client = Client() # Search for cryptocurrencies, exchanges, people, and tags results = client.search( q="bitcoin", c="currencies,exchanges", limit=5 ) print("Search results for 'bitcoin':") if 'currencies' in results: for currency in results['currencies']: print(f"- {currency['name']} ({currency['symbol']})") # Convert Bitcoin to Ethereum btc_to_eth = client.price_converter( base_currency_id="btc-bitcoin", quote_currency_id="eth-ethereum", amount=1 ) print(f"\n1 BTC = {btc_to_eth['price']:.6f} ETH") ``` ### People and Tags ```python theme={"dark"} from coinpaprika.client import Client client = Client() # Get person information person = client.people("vitalik-buterin") print(f"Name: {person['name']}") # Get all tags (sorted by name) tags = client.tags(sort_by="name") print(f"Found {len(tags)} tags") # Get a specific tag blockchain_tag = client.tag("blockchain-service") print(f"Tag: {blockchain_tag['name']}") ``` ## Error Handling The client raises specific exceptions for different HTTP error codes. It is best practice to catch these specific exceptions. ```python theme={"dark"} from coinpaprika.client import Client from coinpaprika.exceptions import CoinpaprikaAPINotFoundException, CoinpaprikaAPITooManyRequestsException, CoinpaprikaAPIException client = Client() try: # This will fail because the coin ID does not exist coin = client.coin("invalid-coin-id") print(f"Coin: {coin['name']}") except CoinpaprikaAPINotFoundException as e: print(f"Coin not found: {e}") except CoinpaprikaAPITooManyRequestsException as e: print(f"Rate limit exceeded: {e}") except CoinpaprikaAPIException as e: # Handle other generic API errors print(f"API Error: {e}") ``` ## Available Methods ### Global Data * [`global_market()`](/api-reference/global/get-market-overview-data) - Get global market overview. ### Coins * [`coins()`](/api-reference/coins/list-coins) - List all coins. * [`coin(coin_id)`](/api-reference/coins/get-coin-by-id) - Get details for a specific coin. * [`twitter(coin_id)`](/api-reference/coins/get-twitter-timeline-tweets-for-a-coin) - Get a coin's Twitter timeline. * [`events(coin_id)`](/api-reference/coins/get-coin-events-by-coin-id) - Get a coin's events. * [`exchanges(coin_id)`](/api-reference/coins/get-exchanges-by-coin-id) - Get exchanges for a specific coin. * [`markets(coin_id, **params)`](/api-reference/coins/get-markets-by-coin-id) - Get market data for a specific coin. * [`candle(coin_id, **params)`](/api-reference/coins/get-ohlc-for-the-last-full-day) - Get the latest OHLCV data for a coin. * [`historical(coin_id, **params)`](/api-reference/coins/get-historical-ohlc) - Get historical OHLCV data. * [`today(coin_id)`](/api-reference/coins/get-today-ohlc) - Get today's OHLC data. ### People * [`people(person_id)`](/api-reference/people/get-person-by-id) - Get person by ID. ### Tags * [`tags(sort_by)`](/api-reference/tags/list-tags) - List tags. * [`tag(tag_id)`](/api-reference/tags/get-tag-by-id) - Get tag by ID. ### Tickers * [`tickers()`](/api-reference/tickers/get-tickers-for-all-active-coins) - Get tickers for all coins. * [`ticker(coin_id)`](/api-reference/tickers/get-ticker-for-a-specific-coin) - Get ticker for a specific coin. * [`historical_ticker(coin_id, **params)`](/api-reference/tickers/get-historical-ticks-for-a-specific-coin) - Get historical ticks. ### Exchanges * [`exchange_list()`](/api-reference/exchanges/list-exchanges) - List all exchanges. * [`exchange(exchange_id, **params)`](/api-reference/exchanges/get-exchange-by-id) - Get a specific exchange. * [`exchange_markets(exchange_id, **params)`](/api-reference/exchanges/list-an-exchange-markets) - Get exchange markets. ### Tools * [`search(q, **params)`](/api-reference/tools/search) - Search for coins, exchanges, etc. * [`price_converter(**params)`](/api-reference/tools/price-converter) - Convert between currencies. ## Requirements * Python >= 3.7 * `requests` library ## License This library is available under the Apache License 2.0. See the [LICENSE file](https://github.com/coinpaprika/coinpaprika-api-python-client/blob/main/LICENSE) for more info. ### FAQs Initialize Client(api\_key="YOUR\_API\_KEY") for Pro features and higher limits. Free usage works with Client() for public endpoints. Use the [Coverage Checker](/tools/coverage) or the REST /coins endpoint to look up canonical IDs. Use client.ohlcv(coin\_id, start=..., end=...) with an API key. See the OHLCV example above. Catch SDK exceptions (e.g., CoinpaprikaAPITooManyRequestsException) and back off before retrying. # Rust SDK Source: https://docs.coinpaprika.com/get-started/sdk-rust Official CoinPaprika API Rust client library # CoinPaprika Rust SDK The official Rust client library for the CoinPaprika API provides convenient access to cryptocurrency market data. This SDK was built by the courtesy of [Tokenomia Pro](https://tokenomia.pro). ## Installation Add the CoinPaprika Rust SDK to your `Cargo.toml`: ```toml theme={"dark"} [dependencies] coinpaprika_api = "0.1" ``` ## Quick Start ### Free Plan For basic usage with the free API plan: ```rust theme={"dark"} use coinpaprika_api::client::Client; use coinpaprika_api::global::Global; use std::error::Error; #[tokio::main] async fn main() -> Result<(), Box> { let client = Client::new(); let global: Global = client.global().send().await?; println!("global: {:#?}", global); Ok(()) } ``` ### Pro Plan To access Pro features and higher rate limits, initialize the client with your API key. ```rust theme={"dark"} use coinpaprika_api::client::Client; use coinpaprika_api::global::Global; use std::error::Error; #[tokio::main] async fn main() -> Result<(), Box> { let client = Client::with_key(""); let global: Global = client.global().send().await?; println!("global: {:#?}", global); Ok(()) } ``` Get your API key at [coinpaprika.com/api](https://coinpaprika.com/api/) ## Common Use Cases ### Getting Market Data ```rust theme={"dark"} use coinpaprika_api::client::Client; use coinpaprika_api::tickers::Tickers; use std::error::Error; #[tokio::main] async fn main() -> Result<(), Box> { let client = Client::new(); // Get all tickers let tickers: Tickers = client.tickers().send().await?; println!("\nTop 5 cryptocurrencies:"); for ticker in tickers.iter().take(5) { let name = &ticker.name; let symbol = &ticker.symbol; let price = ticker.quotes.get("USD").map_or(0.0, |q| q.price); println!("{} ({}): ${:.2}", name, symbol, price); } Ok(()) } ``` ### Coin Information ```rust theme={"dark"} use coinpaprika_api::client::Client; use coinpaprika_api::coins::{Coin, Markets}; use std::error::Error; #[tokio::main] async fn main() -> Result<(), Box> { let client = Client::new(); // Get detailed coin information let coin: Coin = client.coin("eth-ethereum").send().await?; println!("Name: {}", coin.name); println!("Symbol: {}", coin.symbol); println!("Active: {}", coin.is_active); // Get coin markets let markets: Markets = client.coin("eth-ethereum").markets().send().await?; println!("Trading on {} markets", markets.len()); Ok(()) } ``` ## Available Methods ### Key * [Get API key info](/api-reference/key/get-api-key-info) ### Global * [Get market overview data](/api-reference/global/get-market-overview-data) ### Coins * [List coins](/api-reference/coins/list-coins) * [Get coin by ID](/api-reference/coins/get-coin-by-id) * [Get Twitter timeline tweets for a coin](/api-reference/coins/get-twitter-timeline-tweets-for-a-coin) * [Get coin events by coin ID](/api-reference/coins/get-coin-events-by-coin-id) * [Get exchanges by coin ID](/api-reference/coins/get-exchanges-by-coin-id) * [Get markets by coin ID](/api-reference/coins/get-markets-by-coin-id) * [Get OHLC for the last full day](/api-reference/coins/get-ohlc-for-the-last-full-day) * [Get historical OHLC](/api-reference/coins/get-historical-ohlc) * [Get today OHLC](/api-reference/coins/get-today-ohlc) ### People * [Get person by ID](/api-reference/people/get-person-by-id) ### Tags * [List tags](/api-reference/tags/list-tags) * [Get tag by ID](/api-reference/tags/get-tag-by-id) ### Tickers * [Get tickers for all active coins](/api-reference/tickers/get-tickers-for-all-active-coins) * [Get ticker for a specific coin](/api-reference/tickers/get-ticker-for-a-specific-coin) * [Get historical ticks for a specific coin](/api-reference/tickers/get-historical-ticks-for-a-specific-coin) ### Exchanges * [List exchanges](/api-reference/exchanges/list-exchanges) * [Get exchange by ID](/api-reference/exchanges/get-exchange-by-id) * [List an exchange markets](/api-reference/exchanges/list-an-exchange-markets) ### Tools * [Search](/api-reference/tools/search) * [Price converter](/api-reference/tools/price-converter) ### Contracts * [List contracts platforms](/api-reference/contracts/list-contracts-platforms) * [Get all contract addressess for a given platform](/api-reference/contracts/get-all-contract-addressess-for-a-given-platform) ### Changelog * Get id changelog for all coins ### FAQs Construct the client with your API key using Client::with\_key("YOUR\_API\_KEY") when calling Pro endpoints. Use the [Coverage Checker](/tools/coverage) to resolve canonical IDs such as btc-bitcoin. Yes—use the REST historical endpoints via the client methods that accept start/end parameters; an API key is required. Propagate Result and map HTTP errors (e.g., 429) to retry/backoff logic in your async runtime. # Swift SDK Source: https://docs.coinpaprika.com/get-started/sdk-swift Official CoinPaprika API Swift client library # CoinPaprika Swift SDK The official Swift client library for the CoinPaprika API provides convenient, static access to cryptocurrency market data. ## Installation ### Swift Package Manager (SPM) Add the following package dependency to your `Package.swift` file or via Xcode: ``` https://github.com/coinpaprika/coinpaprika-api-swift-client ``` ### CocoaPods Add the following line to your Podfile and run `pod install`: ```ruby theme={"dark"} pod 'CoinpaprikaAPI' ``` ## Quick Start First, import the library: ```swift theme={"dark"} import Coinpaprika ``` Then, you can call any API endpoint via the static `Coinpaprika.API` object. All requests are asynchronous and return a `Result` type in a closure. ```swift theme={"dark"} // Get global market stats Coinpaprika.API.global().perform { result in switch result { case .success(let stats): print("Market Cap: $\(stats.marketCapUsd)") print("24h Volume: $\(stats.volume24hUsd)") print("Bitcoin Dominance: \(stats.bitcoinDominancePercentage)%") case .failure(let error): print("An error occurred: \(error)") } } ``` ## Using the Pro API To use the Pro API, you must manually change the base URL in the `Configuration` object before making any requests. This should be done once when your app launches. ```swift theme={"dark"} import Coinpaprika // Set the base URL to the Pro endpoint Coinpaprika.Configuration.baseUrl = URL(string: "https://api-pro.coinpaprika.com/v1/")! // Now all subsequent requests will use the Pro API Coinpaprika.API.tickers().perform { result in // Pro plan provides access to all tickers if case .success(let tickers) = result { print("Successfully fetched \(tickers.count) tickers using the Pro API.") } } ``` ## Common Use Cases ### Ticker Data for a Specific Coin ```swift theme={"dark"} import Coinpaprika Coinpaprika.API.ticker(id: "btc-bitcoin", quotes: [.usd, .btc]).perform { response in switch response { case .success(let ticker): print("Bitcoin Information:") print("Name: \(ticker.name)") print("Symbol: \(ticker.symbol)") // Access quotes using subscripting if let usdQuote = ticker[.usd] { print("USD Price: $\(usdQuote.price)") print("Market Cap: $\(usdQuote.marketCap)") } if let btcQuote = ticker[.btc] { print("BTC Price: ₿\(btcQuote.price)") } case .failure(let error): print("Error: \(error)") } } ``` ### Coin Details ```swift theme={"dark"} import Coinpaprika Coinpaprika.API.coin(id: "eth-ethereum").perform { response in switch response { case .success(let coin): print("Ethereum Details:") print("Name: \(coin.name)") print("Description: \(coin.description ?? "N/A")") print("Development Status: \(coin.developmentStatus)") case .failure(let error): print("Error: \(error)") } } ``` ### Historical Ticker Data Note: Accessing historical data requires using the Pro API. ```swift theme={"dark"} import Coinpaprika // Ensure Pro API is configured Coinpaprika.Configuration.baseUrl = URL(string: "https://api-pro.coinpaprika.com/v1/")! let sevenDaysAgo = Calendar.current.date(byAdding: .day, value: -7, to: Date())! Coinpaprika.API.historicalTicks( id: "btc-bitcoin", start: sevenDaysAgo, limit: 100, quote: .usd ).perform { response in switch response { case .success(let ticks): print("Recent Historical Ticks for Bitcoin:") ticks.forEach { tick in print("[\(tick.timestamp)] Price: $\(tick.price), Volume: \(tick.volume24h)") } case .failure(let error): print("Error fetching historical ticks: \(error)") } } ``` ### Search ```swift theme={"dark"} import Coinpaprika Coinpaprika.API.search( query: "proof-of-work", categories: [.tags] ).perform { response in switch response { case .success(let searchResults): print("Found \(searchResults.tags.count) tags for 'proof-of-work'") searchResults.tags.forEach { tag in print("- \(tag.name) (Coin count: \(tag.coinCounter))") } case .failure(let error): print("Error: \(error)") } } ``` ## Error Handling The `Result` object in the completion handler provides a detailed `RequestError` case for failures. ```swift theme={"dark"} import Coinpaprika Coinpaprika.API.coin(id: "invalid-coin-id").perform { response in if case .failure(let error) = response { switch error { case .networkError(let underlyingError): print("Network error: \(underlyingError.localizedDescription)") case .decodingError(let underlyingError): print("Decoding error: \(underlyingError)") case .httpError(let statusCode, let data): let errorBody = String(data: data, encoding: .utf8) ?? "No response body" print("HTTP error \(statusCode): \(errorBody)") case .unknown: print("An unknown error occurred.") } } } ``` ## Async/Await Support (iOS 13+ / macOS 10.15+) The SDK supports modern concurrency with `async/await`. ```swift theme={"dark"} import Coinpaprika @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) func getMarketData() async { do { let globalStats = try await Coinpaprika.API.global().async() print("Market Cap: $\(globalStats.marketCapUsd)") let tickers = try await Coinpaprika.API.tickers(quotes: [.usd]).async() print("Retrieved \(tickers.count) tickers") } catch { print("An error occurred: \(error)") } } ``` ## Available Methods ### Global Data * [`global()`](/api-reference/global/get-market-overview-data) - Get global market overview. ### Coins * [`coins(additionalFields:)`](/api-reference/coins/list-coins) - List all coins. * [`coin(id:)`](/api-reference/coins/get-coin-by-id) - Get coin by ID. * [`coinTwitter(id:)`](/api-reference/coins/get-twitter-timeline-tweets-for-a-coin) - Get a coin's Twitter timeline. * [`coinEvents(id:)`](/api-reference/coins/get-coin-events-by-coin-id) - Get coin events. * [`coinExchanges(id:)`](/api-reference/coins/get-exchanges-by-coin-id) - Get exchanges for a coin. * [`coinMarkets(id:quotes:)`](/api-reference/coins/get-markets-by-coin-id) - Get markets for a coin. ### Tickers * [`tickers(quotes:page)`](/api-reference/tickers/get-tickers-for-all-active-coins) - Get all tickers, with optional pagination. * [`ticker(id:quotes:)`](/api-reference/tickers/get-ticker-for-a-specific-coin) - Get a specific ticker. * [`historicalTicks(...)`](/api-reference/tickers/get-historical-ticks-for-a-specific-coin) - Get historical tickers. ### Exchanges * [`exchanges(quotes:)`](/api-reference/exchanges/list-exchanges) - List all exchanges. * [`exchange(id:quotes:)`](/api-reference/exchanges/get-exchange-by-id) - Get an exchange by ID. * [`exchangeMarkets(id:quotes:)`](/api-reference/exchanges/list-an-exchange-markets) - Get markets for an exchange. ### People & Tags * [`person(id:)`](/api-reference/people/get-person-by-id) - Get a person by ID. * [`tags(additionalFields:)`](/api-reference/tags/list-tags) - List all tags. * [`tag(id:additionalFields:)`](/api-reference/tags/get-tag-by-id) - Get a tag by ID. ### Search & Tools * [`search(...)`](/api-reference/tools/search) - Search across categories. * [`priceConverter(...)`](/api-reference/tools/price-converter) - Convert between currencies. ### FAQs Set Coinpaprika.Configuration.baseUrl to the Pro endpoint once at app startup; authenticate at the edge as needed. Use the [Coverage Checker](/tools/coverage) to obtain canonical IDs (e.g., btc-bitcoin). Configure the Pro base URL and call the relevant historical APIs with start/end and quote. Inspect the failure case of Result and map to app errors; for 429 responses, back off and retry. ## Requirements * iOS 10.0+ / macOS 10.12+ / watchOS 3.0+ / tvOS 10.0+ * Swift 4.2+ ## License This library is available under the MIT license. See the [LICENSE file](https://github.com/coinpaprika/coinpaprika-api-swift-client/blob/master/LICENSE) for more info. # CoinPaprika Crypto API — Price & Market Data for Developers Source: https://docs.coinpaprika.com/index Real-time cryptocurrency market data API: prices, volume, market cap, and historical data via REST & WebSocket. Build with CoinPaprika's reliable crypto API. Dive into the comprehensive API documentation and start building. View the real-time status of our API services. ## CoinPaprika crypto API quickstart — 3 steps, free, no credit card required