# 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/` | | **Ultimate** | `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](/api-reference/rest-api/introduction)** | 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** ❌ ✅ ✅ ✅ ✅ ✅
**Historical circulating supply**\ ([historical tickers](/api-reference/tickers/get-historical-ticks-for-a-specific-coin), [OHLCV](/api-reference/coins/get-historical-ohlc)) ❌ ❌ ❌ ✅ ✅ ✅
**[OHLCV historical data](/api-reference/coins/get-historical-ohlc)** 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](/api-reference/coins/api-id-mappings)** ❌ ❌ ❌ ✅ ✅ ✅
### 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.)
**CoinPaprika Ads free** ❌ ✅ ✅ ✅ ✅ ✅
### Get Access > **[View Full Pricing & Get Access](https://coinpaprika.com/api/pricing/)** > > 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 Coin ID changes made by CoinPaprika, so you can update stored IDs. Paid plans only. # API ID mappings Source: https://docs.coinpaprika.com/api-reference/coins/api-id-mappings /api-reference/rest-api/openapi.yml get /coins/mappings Map coin IDs from CoinMarketCap, CoinGecko, CryptoCompare, ISIN and DTI to CoinPaprika IDs. Business, Ultimate and Enterprise plans. # 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} Descriptive data for one coin: description, links, team, tags and whitepaper. No prices; use the ticker endpoints for those. # 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 Events for a coin, such as conferences and releases, with dates, descriptions and links. # 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 Exchanges where a coin is traded. # 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 Open, high, low, close, volume and market cap for a coin over a date range, in USD or BTC. History depth depends on the plan. # 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 Every market where a coin trades, with exchange, pair, price, volume and share of volume. # 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 Open, high, low, close, volume and market cap for a coin's last full day, in USD or BTC. # 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 Open, high, low, close, volume and market cap for the current day so far, in USD or BTC. # 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 Deprecated and due for removal. Tweets from a coin's Twitter timeline. # List coins Source: https://docs.coinpaprika.com/api-reference/coins/list-coins /api-reference/rest-api/openapi.yml get /coins Every cryptocurrency on CoinPaprika with its ID, name, symbol, rank, type and active status. # 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} Every token contract address CoinPaprika tracks on one platform, with its coin ID. # List contracts platforms Source: https://docs.coinpaprika.com/api-reference/contracts/list-contracts-platforms /api-reference/rest-api/openapi.yml get /contracts Smart contract platforms, such as eth-ethereum, that you can look up contract addresses on. # 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 Redirects a contract address to the historical ticks of its coin. # 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} Redirects a contract address to the current ticker of its coin. # 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} One exchange: description, links, rank, volume, number of markets and confidence score. # 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 Every market on one exchange, with pair, price, volume and share of the exchange's volume. # List exchanges Source: https://docs.coinpaprika.com/api-reference/exchanges/list-exchanges /api-reference/rest-api/openapi.yml get /exchanges Exchanges tracked by CoinPaprika with rank, volume, number of markets and confidence score. # Get market overview data Source: https://docs.coinpaprika.com/api-reference/global/get-market-overview-data /api-reference/rest-api/openapi.yml get /global Crypto market overview: total market cap, 24h volume, Bitcoin dominance, all-time highs and the number of tracked cryptocurrencies. # 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 Your API key's plan and current usage. Paid plans only, on api-pro.coinpaprika.com. # 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} A person in crypto: name, links and the projects and positions linked to them. # CoinPaprika API reference: crypto prices, market & OHLCV data Source: https://docs.coinpaprika.com/api-reference/rest-api/introduction REST API reference for crypto market data: real-time prices, market cap, volume, historical OHLCV and exchange data for 12,000+ cryptocurrencies. Free tier, no API key to start. The CoinPaprika API provides extensive and reliable data for over 12,000 cryptocurrencies, tracking them across more than 350 exchanges. Below are some of the most popular endpoints to get you started. > [!TIP] > > See also: [Coverage Checker](/tools/coverage), [API Plans](/api-plans), [Streaming API](/api-reference/streaming-api/streaming-introduction) > **[Tickers](/api-reference/tickers/get-tickers-for-all-active-coins)** > > Get the latest price, volume, and market cap data for any coin. > **[Coins](/api-reference/coins/list-coins)** > > Access detailed information about any coin, including social links and whitepapers. > **[Exchanges](/api-reference/exchanges/list-exchanges)** > > 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. > [!NOTE] > > Authentication may be required for certain endpoints in the future as we expand our services. To authenticate, pass your API key in the `Authorization` header: ```bash theme={"dark"} curl -H "Authorization: YOUR_API_KEY" "https://api-pro.coinpaprika.com/v1/key/info" ``` A successful response returns JSON with your plan, status, and remaining monthly quota. > [!WARNING] > > The key is the entire header value. There is no `Bearer` prefix, and no other > scheme word: `Authorization: Bearer YOUR_API_KEY` does not reach the API. Most > APIs expect the opposite, so if your HTTP client has a "bearer token" field, > set a raw header instead. > [!WARNING] > > The URL for the paid plans is different from the free plan. Check out our [pricing page](/api-plans) for specific details. > [!TIP] > > 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). ## How the numbers are calculated Prices in this API are a volume-weighted average across the markets we track, not a quote copied from a single exchange. Our [price calculation methodology](https://coinpaprika.com/methodology/) documents the whole pipeline: which markets are included, how outliers are detected and removed, how exchange confidence scores adjust reported volume, and how circulating supply, market cap and all-time highs are derived. Read it if you need to reconcile a `price`, `volume_24h`, `circulating_supply` or `market_cap` value with another source, or if you have to explain to a reviewer where a number came from. ## SDKs We offer several SDKs to help you integrate with our API more easily: > **[Go](https://github.com/coinpaprika/coinpaprika-api-go-client)** > > Official Go client for the CoinPaprika API. > **[PHP](https://github.com/coinpaprika/coinpaprika-api-php-client)** > > Official PHP client for the CoinPaprika API. > **[Python](https://github.com/coinpaprika/coinpaprika-api-python-client)** > > Official Python client for the CoinPaprika API. > **[TypeScript](https://github.com/coinpaprika/coinpaprika-api-nodejs-client)** > > Official TypeScript/JavaScript client for the CoinPaprika API. > **[Swift](https://github.com/coinpaprika/coinpaprika-api-swift-client)** > > Official Swift client for iOS and macOS. > **[Kotlin](https://github.com/coinpaprika/coinpaprika-api-kotlin-client)** > > Official Kotlin/Android 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. 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 on the Enterprise plan**: WebSocket streaming is part of the Enterprise plan, so a Free, Starter, Pro, Business or Ultimate key will not open a connection. See [API Plans](/api-plans) for the comparison, or [contact us](https://coinpaprika.com/contact/) to talk about Enterprise. Existing Enterprise customers can get the key from the [CoinPaprika API panel](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 > **What is the quickest way to test the crypto streaming API?** > > Use the Node.js snippet in this guide. Replace `YOUR_API_KEY` and run `node index.js`. > **Where do I find coin IDs for subscriptions?** > > Use the REST API `GET /coins` or the [Coverage Checker](/tools/coverage) to look up canonical IDs (e.g., `btc-bitcoin`). > **How do I switch quote currencies?** > > Change the `quotes` array in the subscribe payload (e.g., \`\['USD', 'BTC']). > **How should I handle reconnections?** > > Implement a heartbeat and reconnect with exponential backoff. See the sample code’s heartbeat logic. > **Is streaming data included in paid plans?** > > 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 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. > [!NOTE] > > WebSocket streaming is part of the Enterprise plan. Keys issued on the Free, Starter, Pro, > Business and Ultimate plans do not open a streaming connection. See [API Plans](/api-plans) > for the full comparison, or [contact us](https://coinpaprika.com/contact/) about Enterprise. ### 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 > **What is a crypto price WebSocket API?** > > 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. > **Do I need an API key for the streaming API?** > > Yes. Pass your key in the `Authorization` header when establishing the WebSocket connection. > **How often are tick updates sent?** > > Ticks are pushed as markets change. There is no fixed interval; frequency depends on market activity. > **Can I subscribe to multiple coins and quotes?** > > 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). > **What’s the message format for prices and market cap?** > > 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} One coin category (tag) with its description and, optionally, the coins in it. # List tags Source: https://docs.coinpaprika.com/api-reference/tags/list-tags /api-reference/rest-api/openapi.yml get /tags Coin categories (tags), optionally with the coins in each. # 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 Historical price, 24h volume and market cap for a coin, in USD or BTC, at intervals from 5 minutes to 365 days depending on the plan. # Get simplified ticker data for all coins Source: https://docs.coinpaprika.com/api-reference/tickers/get-simplified-ticker-data-for-all-coins /api-reference/rest-api/openapi.yml get /tickers/simple Id, name, symbol, rank and price for every active coin, refreshed every minute. Paid plans only. # 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} Deprecated and due for removal. Use the tickers endpoints 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} Current price, volume, market cap and price changes for one coin, in up to 3 quote currencies. # 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 Deprecated and due for removal. Use the tickers endpoints 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 Current price, volume, market cap and price changes for every active coin, in up to 3 quote currencies. # Price converter Source: https://docs.coinpaprika.com/api-reference/tools/price-converter /api-reference/rest-api/openapi.yml get /price-converter Convert an amount of one currency into another at current prices. # Search Source: https://docs.coinpaprika.com/api-reference/tools/search /api-reference/rest-api/openapi.yml get /search Search coins, exchanges, ICOs, people and tags by name or symbol. # /ticks Source: https://docs.coinpaprika.com/api-reference/websockets/ticks # Changelog Source: https://docs.coinpaprika.com/changelog ## 1.7.13 - 2026.10.15 * Added `circulating_supply` to `/tickers/{coin_id}/historical` and `/coins/{coin_id}/ohlcv/historical`, `/ohlcv/latest`, `/ohlcv/today`, available on Business, Ultimate and Enterprise (derived as market cap / price, an approximation) ## 1.7.12 - 2026.03.27 * Added new `/tickers/simple` endpoint: lightweight ticker data (id, name, symbol, rank, price), available on Starter, Pro, Business and Enterprise * Updated ticker update interval from 3 minutes to 1 minute for Starter, Pro, Business, Enterprise plans ## 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 ## 1.7.6 - 2023.04.12 * New intervals for OHLCV endpoint ## 1.7.5 - 2022.12.07 * Removed documentation for /beta/ endpoints ## 1.7.4 - 2022.09.19 * Key info endpoint * Coin logo image URL ## 1.7.3 - 2022.09.08 * Plans update ## 1.7.2 - 2022.07.22 * Changelog endpoint documentation ## 1.7.1 - 2022.07.14 * Beta endpoints documentation ## 1.7.0 - 2022.05.06 * API-Pro documentation ## 1.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 ## 1.6.0 - 2020.10.27 * Added contracts section /contracts, /contracts/, /contracts// # CoinPaprika Claude Code plugin Source: https://docs.coinpaprika.com/claude-code-plugin Install the CoinPaprika Claude Code plugin with two commands. Access real-time crypto prices, market data, and exchange information directly in Claude Code. ## What is the CoinPaprika Claude Code plugin? The CoinPaprika plugin is a native Claude Code plugin that gives you instant access to real-time cryptocurrency market data -- prices, volumes, market caps, exchange data, historical OHLCV, and more -- covering 12,000+ coins and 350+ exchanges. > [!NOTE] > > Two commands. Zero configuration. The plugin bundles a built-in MCP server, so no separate MCP setup is needed. ![Claude Code terminal showing CoinPaprika plugin with available crypto data tools listed](https://mintcdn.com/coinpaprika-f4fde1b0/4cPK-VhIuZpV4H9s/images/tutorials/plugin/terminal.png?fit=max\&auto=format\&n=4cPK-VhIuZpV4H9s\&q=85\&s=044d0ba1cec5f5fece98b4488b317201) *** ## Install **1. Add the CoinPaprika marketplace** ```bash theme={"dark"} /plugin marketplace add coinpaprika/claude-marketplace ``` This registers the CoinPaprika marketplace where the plugin is hosted. **2. Install the CoinPaprika plugin** ```bash theme={"dark"} /plugin install coinpaprika ``` Select **"Install now"** when prompted. ![Terminal output showing /plugin install coinpaprika completing successfully in Claude Code](https://mintcdn.com/coinpaprika-f4fde1b0/4cPK-VhIuZpV4H9s/images/tutorials/plugin/plugininstall.png?fit=max\&auto=format\&n=4cPK-VhIuZpV4H9s\&q=85\&s=fed5b4a09c27f3c20da22974b4410300) **3. Start querying** That's it. No config files, no environment setup, no API keys needed for the free tier. Ask Claude about crypto data and it uses the plugin automatically. ![Claude Code answering What is the price of Bitcoin using the CoinPaprika plugin, showing live price data](https://mintcdn.com/coinpaprika-f4fde1b0/4cPK-VhIuZpV4H9s/images/tutorials/plugin/answer.png?fit=max\&auto=format\&n=4cPK-VhIuZpV4H9s\&q=85\&s=e830d9a0752adebde1be9dfaa1453d95) *** ## What you get The CoinPaprika plugin includes: | Component | What it does | | - | - | | **31 MCP tools** | Live data access: tickers, coins, exchanges, OHLCV, contracts, tags, search, conversion | | **@crypto-analyst agent** | Specialized agent for market analysis and portfolio queries | | **Agent skills** | API reference files that give Claude deeper knowledge of CoinPaprika endpoints | *** ## Example queries Once installed, ask Claude about crypto data naturally: ### Prices and tickers ``` What's the current price of Bitcoin and Ethereum? ``` ``` Show me the top 10 coins by market cap with their 24h price change ``` ### Exchange data ``` Which exchanges list Solana? Sort by volume. ``` ``` What are the trading pairs available for ETH on Binance? ``` ### Historical data ``` Get Bitcoin's OHLCV data for the last 30 days ``` ``` How has Ethereum's price changed over the past year? ``` ### Search and discovery ``` Search for DeFi tokens ``` ``` What coins are tagged as stablecoins? ``` ### Using the @crypto-analyst agent ``` @crypto-analyst Analyze the current state of the top 5 cryptocurrencies ``` ``` @crypto-analyst Compare Bitcoin and Ethereum market performance this month ``` *** ## Manage the plugin ### View installed plugins ``` /plugin ``` Select "Manage Plugins" to see all installed plugins and their status. ### Enable/disable ```bash theme={"dark"} # Disable (keeps installed, reduces context usage) /plugin disable coinpaprika@coinpaprika # Re-enable /plugin enable coinpaprika@coinpaprika ``` ### Update ```bash theme={"dark"} /plugin marketplace update coinpaprika/claude-marketplace ``` ### Uninstall ```bash theme={"dark"} /plugin uninstall coinpaprika@coinpaprika ``` *** ## Plugin vs MCP server vs skills | | Claude Code Plugin | Hosted MCP Server | Agent Skills | | - | - | - | - | | **Install** | `/plugin install` | Add URL to config | `npx skills add` | | **What you get** | MCP tools + agent + skills (all bundled) | 31 MCP tools | API knowledge (endpoints, CLI, workflows) | | **Works with** | Claude Code only | Claude Desktop, Cursor, VS Code | Claude Code, Cursor, Cline, and more | | **Best for** | Claude Code users who want everything in one install | Other AI IDEs | Any agent that makes HTTP calls directly | > [!TIP] > > If you use Claude Code, the plugin is the easiest path -- it bundles everything. For Claude Desktop or Cursor, use the [hosted MCP server](/mcp-connect-claude-cursor) instead. *** ## Integration with DexPaprika The same marketplace also hosts the **DexPaprika plugin** for on-chain DEX data. Install both for complete crypto coverage: ```bash theme={"dark"} /plugin install coinpaprika /plugin install dexpaprika ``` * **CoinPaprika** -- CEX data: 12,000+ coins, 350+ exchanges, market caps, OHLCV * **DexPaprika** -- DEX data: 36 blockchains, 36M+ pools, on-chain token prices, streaming *** ## Troubleshooting > **Plugin not showing up after install** > > 1. Run `/plugin marketplace update coinpaprika/claude-marketplace` > 2. Restart Claude Code > 3. Run `/plugin install coinpaprika` again > **Claude not using the plugin** > > Be specific: "Using CoinPaprika, show me..." or phrase questions about coins, prices, and exchanges. Claude automatically recognizes plugin-relevant queries, but explicit mentions help. > **/plugin commands not recognized** > > Make sure you're running commands inside Claude Code (not a regular terminal). Check that you're using the correct syntax: `/plugin install coinpaprika`. > **No data returned** > > Check that the coin ID format is correct (`btc-bitcoin`, not `bitcoin` or `BTC`). Use "search for \[coin name]" to find the right ID. For free tier limitations (2,000 assets), some smaller coins may not be available. *** ## What's next? > **[MCP Server](/mcp-introduction)** > > Connect Claude Desktop or Cursor to CoinPaprika data > **[Agent Skills](/skills)** > > Install CoinPaprika skills for any AI agent > **[REST API Reference](/api-reference/rest-api/introduction)** > > Complete endpoint documentation with interactive playground > **[CLI](/cli)** > > Query crypto data from the terminal *** ## Need help? > **[Join Our Discord](https://discord.gg/DhJge5TUGM)** > > Connect with our community for real-time support and discussions > **[Direct Support](mailto:support@coinpaprika.com)** > > Contact our team for technical assistance and custom integrations ### FAQs > **Do I need an API key?** > > Not for the free tier. The plugin uses the free CoinPaprika API (20,000 calls/month, 2,000 assets) by default. No key, no registration. > **Does the plugin work in Cursor or Claude Desktop?** > > The plugin is Claude Code only. For Cursor or Claude Desktop, use the [hosted MCP server](/mcp-connect-claude-cursor) instead -- same data, different integration method. > **What's the difference between the plugin and the MCP server?** > > The plugin bundles the MCP server plus extras (agents, skills). If you use Claude Code, the plugin is the easiest path. The standalone MCP server works with more tools (Claude Desktop, Cursor, VS Code). > **Can I use CoinPaprika and DexPaprika plugins together?** > > Yes. Install both from the same marketplace. CoinPaprika covers centralized exchange data; DexPaprika covers on-chain DEX data. # CoinPaprika CLI -- crypto data from your terminal Source: https://docs.coinpaprika.com/cli Install the CoinPaprika CLI with one command. Query coin prices, market data, OHLCV history, exchanges, and more from your terminal. Supports macOS, Linux, and Windows. ## What is the CoinPaprika CLI? A command-line tool for querying cryptocurrency market data. Covers the entire CoinPaprika API -- tickers, coins, exchanges, OHLCV, search, contracts, tags, and currency conversion. Free tier included, no API key needed to start. **Source:** [github.com/coinpaprika/coinpaprika-cli](https://github.com/coinpaprika/coinpaprika-cli) *** ## Install ### One-line install (macOS, Linux) ```bash theme={"dark"} curl -sSL https://raw.githubusercontent.com/coinpaprika/coinpaprika-cli/main/install.sh | sh ``` ![Terminal output showing coinpaprika-cli install script completing successfully](https://mintcdn.com/coinpaprika-f4fde1b0/4cPK-VhIuZpV4H9s/images/tutorials/cli/clisuccess.png?fit=max\&auto=format\&n=4cPK-VhIuZpV4H9s\&q=85\&s=2928c0f3eace0955912f732639681924) ### Verify installation ```bash theme={"dark"} coinpaprika-cli status ``` You should see a health check response confirming the API is reachable. ### Quick start wizard ```bash theme={"dark"} coinpaprika-cli onboard ``` Walks you through first commands, API key setup (optional), and configuration. *** ## Commands Every CoinPaprika REST API endpoint has a matching CLI command: | Command | What it does | Example | | - | - | - | | `global` | Market overview (cap, volume, BTC dominance) | `coinpaprika-cli global` | | `coins` | List all coins | `coinpaprika-cli coins --limit 10` | | `coin` | Coin details | `coinpaprika-cli coin btc-bitcoin` | | `coin-events` | Coin events | `coinpaprika-cli coin-events btc-bitcoin` | | `coin-exchanges` | Exchanges listing a coin | `coinpaprika-cli coin-exchanges btc-bitcoin` | | `coin-markets` | Trading pairs for a coin | `coinpaprika-cli coin-markets btc-bitcoin` | | `tickers` | All tickers (real-time prices) | `coinpaprika-cli tickers --limit 20` | | `ticker` | Single coin ticker | `coinpaprika-cli ticker btc-bitcoin` | | `ticker-history` | Historical tickers \[Starter+] | `coinpaprika-cli ticker-history btc-bitcoin --start 2024-01-01` | | `ohlcv` | Historical OHLCV \[Starter+] | `coinpaprika-cli ohlcv btc-bitcoin --start 2024-01-01` | | `ohlcv-latest` | Last full day OHLCV | `coinpaprika-cli ohlcv-latest btc-bitcoin` | | `ohlcv-today` | Today's OHLCV (partial) | `coinpaprika-cli ohlcv-today btc-bitcoin` | | `exchanges` | List exchanges | `coinpaprika-cli exchanges --limit 10` | | `exchange` | Exchange details | `coinpaprika-cli exchange binance` | | `exchange-markets` | Markets on an exchange | `coinpaprika-cli exchange-markets binance` | | `tags` | List tags/categories | `coinpaprika-cli tags` | | `tag` | Tag details | `coinpaprika-cli tag defi` | | `person` | Person details | `coinpaprika-cli person vitalik-buterin` | | `search` | Search coins, exchanges, people, tags | `coinpaprika-cli search bitcoin` | | `convert` | Currency conversion | `coinpaprika-cli convert btc-bitcoin usd-us-dollars` | | `platforms` | List contract platforms | `coinpaprika-cli platforms` | | `contracts` | Contracts on a platform | `coinpaprika-cli contracts eth-ethereum` | | `contract-ticker` | Ticker by contract address | `coinpaprika-cli contract-ticker eth-ethereum 0xdac...` | | `contract-history` | Contract history \[Starter+] | `coinpaprika-cli contract-history eth-ethereum 0xdac... --start 2024-01-01` | | `key-info` | API key info \[Paid] | `coinpaprika-cli key-info` | | `mappings` | ID mappings \[Business+] | `coinpaprika-cli mappings` | | `changelog` | Coin ID changelog \[Starter+] | `coinpaprika-cli changelog` | | `config show` | Show config | `coinpaprika-cli config show` | | `config set-key` | Set API key | `coinpaprika-cli config set-key ` | | `config reset` | Delete config | `coinpaprika-cli config reset` | | `shell` | Interactive REPL | `coinpaprika-cli shell` | | `onboard` | Setup wizard | `coinpaprika-cli onboard` | | `status` | API health check | `coinpaprika-cli status` | | `plans` | Free tier details and paid overview | `coinpaprika-cli plans` | | `attribution` | Attribution snippets | `coinpaprika-cli attribution` | *** ## Output formats The CLI outputs tables by default. Switch to JSON for scripting and piping: ```bash theme={"dark"} # Table output (default, human-readable) coinpaprika-cli ticker btc-bitcoin # JSON with metadata wrapper coinpaprika-cli --output json ticker btc-bitcoin # Raw JSON (no _meta wrapper, for piping to jq) coinpaprika-cli --output json --raw ticker btc-bitcoin ``` Pipe raw JSON into `jq` for filtering: ```bash theme={"dark"} coinpaprika-cli --output json --raw ticker btc-bitcoin | jq '.quotes.USD.price' ``` *** ## Examples ### Get the Bitcoin price ```bash theme={"dark"} coinpaprika-cli ticker btc-bitcoin ``` ### Top 10 coins by market cap ```bash theme={"dark"} coinpaprika-cli tickers --limit 10 ``` ### Search for a coin ```bash theme={"dark"} coinpaprika-cli search solana ``` ### Global market overview ```bash theme={"dark"} coinpaprika-cli global ``` ### Historical OHLCV (requires Starter plan or above) ```bash theme={"dark"} coinpaprika-cli ohlcv btc-bitcoin --start 2025-01-01 ``` ### Convert between currencies ```bash theme={"dark"} coinpaprika-cli convert btc-bitcoin usd-us-dollars ``` ### Look up a token by contract address ```bash theme={"dark"} coinpaprika-cli contract-ticker eth-ethereum 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 ``` ### Interactive REPL ```bash theme={"dark"} coinpaprika-cli shell ``` Opens an interactive session where you can run commands without typing `coinpaprika-cli` each time. *** ## API key setup The free tier works without a key (20,000 calls/month, 2,000 assets). For paid tiers: ```bash theme={"dark"} # Interactive setup (recommended) coinpaprika-cli onboard # Or set directly coinpaprika-cli config set-key YOUR_API_KEY # Or use an environment variable export COINPAPRIKA_API_KEY=your-key # Or pass per-command coinpaprika-cli --api-key your-key ticker btc-bitcoin ``` Priority: CLI flag > environment variable > config file. Check your key and usage: ```bash theme={"dark"} coinpaprika-cli key-info ``` *** ## Coin ID format CoinPaprika coin IDs follow the pattern `{symbol}-{name}` (lowercase, hyphens for spaces): `btc-bitcoin`, `eth-ethereum`, `usdt-tether`, `sol-solana`, `ada-cardano`, `doge-dogecoin`, `avax-avalanche`, `matic-polygon` Use `coinpaprika-cli search {query}` to find the correct ID for any coin. *** ## Use with AI agents AI agents running in terminals (Claude Code, Aider, etc.) can install and use the CLI as a tool. The one-liner install works in any shell: ```bash theme={"dark"} curl -sSL https://raw.githubusercontent.com/coinpaprika/coinpaprika-cli/main/install.sh | sh ``` Once installed, agents can call `coinpaprika-cli` directly with `--output json --raw` for machine-readable output. This is useful when: * The agent doesn't have MCP support * You want the agent to script data pipelines * You need to pipe output into other tools (`jq`, scripts) * You're running headless or in CI/CD *** ## Troubleshooting > **Command not found after install** > > The installer puts the binary in `~/.local/bin`. If that's not in your PATH, add it: > > ```bash theme={"dark"} > export PATH="$HOME/.local/bin:$PATH" > ``` > > Add that line to your `~/.bashrc`, `~/.zshrc`, or `~/.profile` to make it permanent. > **Permission denied during install** > > The installer tries `~/.local/bin` first (no sudo needed). You can also set a custom directory: > > ```bash theme={"dark"} > COINPAPRIKA_INSTALL_DIR=~/bin curl -sSL https://raw.githubusercontent.com/coinpaprika/coinpaprika-cli/main/install.sh | sh > ``` > **No data returned for a coin** > > Check the coin ID format. Use `coinpaprika-cli search ` to find the correct ID. Coin IDs are lowercase: `btc-bitcoin`, not `Bitcoin` or `BTC`. > **OHLCV or historical data returns an error** > > Ticker history and contract history work without a key. `/v1/tickers/{coin_id}/historical` returns a rolling year of daily ticks on the free tier, and `/v1/contracts/{platform}/{address}/historical` redirects to the same data. Ask for an earlier `start` and you get HTTP 402 naming the cutoff. > > OHLCV is the one that is gated. `/v1/coins/{coin_id}/ohlcv/latest` works without a key, but `/v1/coins/{coin_id}/ohlcv/historical` returns HTTP 402 for anything before the last full day, so a real OHLCV backfill needs a Starter plan (\$99/mo) or above. Run `coinpaprika-cli plans` to see what's available on the free tier. *** ## What's next? > **[REST API Reference](/api-reference/rest-api/introduction)** > > Complete endpoint documentation with interactive playground > **[MCP Server](/mcp-introduction)** > > Connect Claude Desktop or Cursor to CoinPaprika data > **[Agent Skills](/skills)** > > Install CoinPaprika skills for any AI agent > **[Python SDK](/get-started/sdk-python)** > > Official Python client for the CoinPaprika API *** ## Need help? > **[Join Our Discord](https://discord.gg/DhJge5TUGM)** > > Connect with our community for real-time support and discussions > **[Direct Support](mailto:support@coinpaprika.com)** > > Contact our team for technical assistance and custom integrations ### FAQs > **Do I need an API key?** > > Not for the free tier. 20,000 calls/month, 2,000 assets, no key required. Paid plans (Starter \$99/mo and up) unlock all assets and historical endpoints. > **What are the rate limits?** > > 10 requests per second per IP, across all plans. Each CLI command makes one API call. > **Can AI agents use the CLI?** > > Yes. AI agents can install it with one command and use `--output json --raw` for machine-readable output. The CLI covers every REST API endpoint. > **Does the CLI work on Windows?** > > Pre-built binaries are available on the [GitHub releases page](https://github.com/coinpaprika/coinpaprika-cli/releases). The install script works on macOS and Linux only. # 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**. > **[Visit DexPaprika documentation](https://docs.dexpaprika.com/)** > > 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 > **[Latest pool data](https://docs.dexpaprika.com/api-reference/pools/get-a-pool-on-a-network)** > > Access up-to-the-second information on liquidity pools from major DEXes. > **[Token analytics](https://docs.dexpaprika.com/api-reference/tokens/get-a-tokens-latest-data-on-a-network)** > > Track token performance, trading volume, and price movements within the DeFi space. > **[Swap & transaction data](https://docs.dexpaprika.com/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)** > > Analyze individual swaps and transactions to understand market flow. > **[Multi-chain support](https://docs.dexpaprika.com/api-reference/networks/get-a-list-of-available-blockchain-networks)** > > 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 > **[Explore DexPaprika API](https://docs.dexpaprika.com/api-reference/introduction)** > > Dive into the full API reference and start building with on-chain data. > **[Back to CoinPaprika API](/api-reference/rest-api/introduction)** > > Continue exploring the features of the CoinPaprika API. # CoinPaprika API FAQ: rate limits, free tier & coverage Source: https://docs.coinpaprika.com/faq Answers about the CoinPaprika API: rate limits, free-tier scope, historical data depth, asset and exchange coverage, and commercial use. ## General > [!TIP] > > See also: [REST API Reference](/api-reference/rest-api/introduction), [API Plans](/api-plans), [Coverage Checker](/tools/coverage) > **How many assets and exchanges are in your API?** > > * We have more than 60,000 assets in our database, of which over 11,000 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. > **What kind of data can I retrieve from the API?** > > * 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). > **How do you calculate prices, volumes and market cap?** > > A price is a volume-weighted average across the markets we track rather than a single exchange's quote, which is why it can differ slightly from any one venue you compare it against. > > Our [price calculation methodology](https://coinpaprika.com/methodology/) documents the pipeline end to end: data sources and scope, the four stages of outlier detection, how exchange confidence scores feed estimated real volume, how circulating supply is established for proof-of-work coins and for smart-contract tokens, and how market cap and all-time highs are derived from those inputs. It also states our listing criteria and how commercial relationships are handled. > **Are there API clients or SDKs?** > > Yes, we have SDKs for popular programming languages such as Python, PHP, Go, JS/TS, Swift, and Kotlin. You can see the full list in our [Getting Started guide](/api-reference/rest-api/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 > **How often do prices refresh?** > > 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. > **Do you have WebSocket support?** > > Yes, the WebSocket protocol is included in the Enterprise plan. Please contact us for details. > **Are there any rate limits?** > > 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/rest-api/introduction#rate-limits). > **Where can I check my 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. > **Can I use your API data commercially?** > > 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. > **Do you provide SLA guarantees?** > > Yes, in the **Enterprise** package, we guarantee 99.9% availability of our API. ## Account & billing > **What are my payment options? Do you have a refund policy?** > > 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. > **How can I upgrade, downgrade or cancel my package?** > > 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. > **How can I change credit/debit card details for payments?** > > 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. > **Can I purchase a plan for my company and get an invoice?** > > 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). > **How do I manage my data in Stripe?** > > You can use the [Stripe Customer Portal](https://billing.stripe.com/p/login/14kcNig8a1xr6Ri4gg) to manage your billing information. ## Support > **What is the email to contact/comment?** > > For SaaS customers, please use the contact form on our website. For Enterprise customers, dedicated email/Slack and phone support are available. > **Do you have real-time support?** > > For Enterprise clients with the highest stability and security requirements, we provide a shared Slack channel and emergency phone support 24/7. > **Where can I find the Terms of Service?** > > 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 > [!TIP] > > 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) > **[Launch full REST API reference](/api-reference/rest-api/introduction)** > > **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 12,000 cryptocurrencies 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 /tickers](/api-reference/tickers/get-tickers-for-all-active-coins)** > > Get ticker data for all active coins > **[GET /tickers/\{id}](/api-reference/tickers/get-ticker-for-a-specific-coin)** > > Get ticker data for a specific coin > **[GET /coins](/api-reference/coins/list-coins)** > > List all available coins > **[GET /exchanges](/api-reference/exchanges/list-exchanges)** > > List all supported exchanges > **[GET /coins/\{id}/ohlcv](/api-reference/coins/get-historical-ohlc)** > > Get historical OHLCV data > **[GET /global](/api-reference/global/get-market-overview-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, pass your API key in the `Authorization` header: ```bash theme={"dark"} curl -H "Authorization: YOUR_API_KEY" "https://api-pro.coinpaprika.com/v1/key/info" ``` A successful response returns JSON with your plan, status, and remaining monthly quota. > [!TIP] > > **Pro tip:** Start with our free tier - no credit card required. It gives you 20,000 calls per month across 2,000 assets 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 > **[API Playground](/api-reference/rest-api/introduction)** > > Test endpoints directly in your browser with our interactive playground. > **[SDK Libraries](/get-started/sdk-python)** > > Use our official SDKs for Python, JavaScript, PHP, and more. > [!NOTE] > > **Ready to go professional?** Explore our [API plans](/api-plans) for higher rate limits, dedicated support, and advanced features. ### FAQs > **What is a crypto price API?** > > 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. > **Is the CoinPaprika crypto API free?** > > Yes, there’s a free tier with generous limits. Paid plans unlock higher limits and more data history. > **How do I get historical cryptocurrency data?** > > Use `GET /coins/{id}/ohlcv/historical` and specify `start`, optional `end`, and `interval`. > **What rate limits apply?** > > Limits vary by plan; see the Rate Limits section or the Pricing page. When exceeded, the API returns HTTP `429`/`402`. > **Do you provide WebSocket data too?** > > 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 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)) } ``` > [!NOTE] > > 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-deprecated) - 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 > **How do I authenticate with the Go SDK?** > > Initialize the client with `coinpaprika.WithAPIKey("YOUR_API_KEY")` to enable Pro features; public endpoints work without a key. > **How do I find a coin\_id for methods like GetByID or Tickers.GetByCoinID?** > > Use the [Coverage Checker](/tools/coverage) to look up canonical IDs such as `btc-bitcoin`. > **How to fetch historical OHLCV in Go?** > > Call `Coins.GetHistoricalOHLCVByCoinID` with start/end and quote; Pro access is required for history. > **How should I handle rate limits?** > > 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/master/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 The official Node.js client library for the CoinPaprika API provides convenient access to cryptocurrency market data. > [!TIP] > > 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(); ``` ## Authenticating with a paid plan If you have a paid plan (Starter, Pro, Business, Ultimate), pass your API key when constructing the client. The SDK switches to `https://api-pro.coinpaprika.com` automatically when `pro: true` is set. ```javascript theme={"dark"} const CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client'); // Paid plan: pass apiKey + pro:true const client = new CoinpaprikaAPI({ apiKey: process.env.COINPAPRIKA_API_KEY, pro: true }); // Now all calls go through api-pro and include the auth header. const keyInfo = await client.getKeyInfo(); console.log(keyInfo); // { plan, plan_status, usage: { current_month: { ... } } } ``` > [!TIP] > > Use `/key/info` from your monitoring stack to self-throttle. It returns your plan, status, requests made this month, and requests remaining. Hit it once a day and alert at 80%. Requires `@coinpaprika/api-nodejs-client@3.0.0` or newer. Earlier versions do not support the `apiKey` option. ## 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 > **How do I authenticate with the JS SDK?** > > Create the client with your key when needed or configure HTTP headers before calls; free endpoints work without a key. > **How do I find a coin\_id for methods like getCoin or getAllTickers?** > > Use the [Coverage Checker](/tools/coverage) to look up canonical IDs such as `btc-bitcoin`. > **How do I get historical OHLCV data?** > > Use `getCoinsOHLCVHistorical({ coinId, start, end, quote })` with an API key. > **What’s the recommended error handling pattern?** > > 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 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.COINPAPRIKA_BASE_URL 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(COINPAPRIKA_BASE_URL) .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}") } } } ``` ## Authenticating with a paid plan Paid plans (Starter / Pro / Business / Ultimate / Enterprise) live on a separate hostname, `https://api-pro.coinpaprika.com/v1/`, and require an API key in the `Authorization` header. The library doesn't provide a Pro-aware base URL constant; configure it on your `Retrofit` builder along with an OkHttp `Interceptor` that injects the key on every request. ```kotlin theme={"dark"} import okhttp3.Interceptor import okhttp3.OkHttpClient import com.squareup.moshi.Moshi import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import retrofit2.Retrofit import retrofit2.converter.moshi.MoshiConverterFactory object ProRetrofitClient { // CoinPaprika expects the bare API key, with no `Bearer ` prefix. private val authInterceptor = Interceptor { chain -> val key = System.getenv("COINPAPRIKA_API_KEY") ?: error("COINPAPRIKA_API_KEY is not set") val request = chain.request().newBuilder() .addHeader("Authorization", key) .build() chain.proceed(request) } private val httpClient = OkHttpClient.Builder() .addInterceptor(authInterceptor) .build() private val moshi = Moshi.Builder() .add(KotlinJsonAdapterFactory()) .build() val instance: Retrofit = Retrofit.Builder() .baseUrl("https://api-pro.coinpaprika.com/v1/") .client(httpClient) .addConverterFactory(MoshiConverterFactory.create(moshi)) .build() } ``` Free-tier callers don't need any of this. Keep the `RetrofitClient` from Quick Start pointed at `COINPAPRIKA_BASE_URL` without an interceptor. ## 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-deprecated): 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 > **How do I authenticate with Retrofit?** > > Add an OkHttp `Interceptor` that adds the `Authorization` header (bare key, no `Bearer` prefix) and point your `Retrofit` builder at `https://api-pro.coinpaprika.com/v1/`. See the "Authenticating with a paid plan" section above. > **Where do I find coin IDs for service methods?** > > Use the [Coverage Checker](/tools/coverage) to discover canonical IDs (e.g., `btc-bitcoin`). > **How do I request historical OHLCV?** > > Historical OHLCV requires a paid plan. Use the `ProRetrofitClient` from the Pro authentication section, then call `CoinsService.getHistoricalCoinOHLCV(...)` with `start`/`end` in ISO date format and a `quote` like `"usd"`. > **What’s the recommended error handling?** > > 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 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. > [!TIP] > > 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"; ``` > [!NOTE] > > 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 > **How do I authenticate with the PHP SDK?** > > Pass the API key to the client constructor: `new \Coinpaprika\Client(null, null, 'YOUR_API_KEY')` for Pro features. > **Where can I get a coin\_id for methods like getTickerByCoinId?** > > Look up IDs using the [Coverage Checker](/tools/coverage); e.g., `btc-bitcoin`. > **How do I fetch historical data?** > > Use `getHistoricalTickerByCoinId(start, $interval)` with Pro access; for OHLCV see the REST endpoint. > **How to handle 429 Too Many Requests?** > > 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/master/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) for more info. # Python SDK Source: https://docs.coinpaprika.com/get-started/sdk-python Official CoinPaprika API Python client library The official Python client library for the CoinPaprika API provides convenient access to cryptocurrency market data. > [!TIP] > > 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.") ``` > [!NOTE] > > 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-deprecated) - 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 > **How do I authenticate with the Python SDK?** > > Initialize `Client(api_key="YOUR_API_KEY")` for Pro features and higher limits. Free usage works with `Client()` for public endpoints. > **Where do I find the coin\_id (e.g., btc-bitcoin)?** > > Use the [Coverage Checker](/tools/coverage) or the REST `/coins` endpoint to look up canonical IDs. > **How do I fetch historical OHLCV?** > > Use `client.ohlcv(coin_id, start=..., end=...)` with an API key. See the OHLCV example above. > **How should I handle rate limits and errors?** > > Catch SDK exceptions (e.g., `CoinpaprikaAPITooManyRequestsException`) and back off before retrying. # Rust SDK Source: https://docs.coinpaprika.com/get-started/sdk-rust Community-maintained CoinPaprika API Rust client library A community-maintained Rust client library for the CoinPaprika API provides convenient access to cryptocurrency market data. > [!NOTE] > > This is a community client built by [Tokenomia Pro](https://tokenomia.pro), not maintained by CoinPaprika. The [`coinpaprika_api`](https://docs.rs/coinpaprika-api) crate is published independently, so CoinPaprika support does not cover it. For officially maintained clients, see the Python, PHP, or Go SDKs. ## 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(()) } ``` > [!NOTE] > > 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-deprecated) * [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 > **How do I authenticate with the Rust SDK?** > > Construct the client with your API key using `Client::with_key("YOUR_API_KEY")` when calling Pro endpoints. > **How do I find the correct coin\_id?** > > Use the [Coverage Checker](/tools/coverage) to resolve canonical IDs such as `btc-bitcoin`. > **Can I get historical data in Rust?** > > Yes. Use the REST historical endpoints via the client methods that accept `start`/`end` parameters. The free tier reaches back one year of daily ticks; an API key is required for anything deeper and for OHLCV history beyond the last full day. > **What’s the error handling approach?** > > 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 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)") } } ``` ## Authenticating with a paid plan Paid plans (Starter / Pro / Business / Ultimate / Enterprise) live on a separate hostname, `https://api-pro.coinpaprika.com/v1/`, and require an API key in the `Authorization` header. Send the bare key, because a `Bearer ` prefix is rejected by the WAF. The high-level `Coinpaprika.API` static methods don't currently accept a key. To call paid endpoints, drop down to the `CoinpaprikaNetworking` `Request` constructor with `.bearer(token:)` and point it at the Pro base URL. The package exposes `CoinpaprikaNetworking` as a separate library product, so add it to your target's dependencies alongside `Coinpaprika`. ```swift theme={"dark"} import CoinpaprikaNetworking import Foundation struct KeyInfo: Codable { let plan: String let plan_status: String } let key = ProcessInfo.processInfo.environment["COINPAPRIKA_API_KEY"]! let request = Request( baseUrl: URL(string: "https://api-pro.coinpaprika.com/v1/")!, method: .get, path: "key/info", params: nil, userAgent: "my-app/1.0", authorisation: .bearer(token: key) ) request.perform { result in switch result { case .success(let info): print("Plan: \(info.plan), status: \(info.plan_status)") case .failure(let error): print("Error: \(error)") } } ``` For free-tier endpoints that don't need a key (most of `Coinpaprika.API`), keep using the high-level static API against the default base URL. ## 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 Historical endpoints require a paid plan. The high-level `Coinpaprika.API.historicalTicks(...)` shape is shown below for the request structure; to actually authenticate, build a `Request` against the Pro base URL using the `.bearer(token:)` pattern from "Authenticating with a paid plan". ```swift theme={"dark"} import CoinpaprikaNetworking import Foundation struct Tick: Codable { let timestamp: String let price: Double let volume24h: Double enum CodingKeys: String, CodingKey { case timestamp, price case volume24h = "volume_24h" } } let key = ProcessInfo.processInfo.environment["COINPAPRIKA_API_KEY"]! let sevenDaysAgo = Calendar.current.date(byAdding: .day, value: -7, to: Date())! let isoStart = ISO8601DateFormatter().string(from: sevenDaysAgo) let request = Request<[Tick]>( baseUrl: URL(string: "https://api-pro.coinpaprika.com/v1/")!, method: .get, path: "tickers/btc-bitcoin/historical", params: ["start": isoStart, "limit": 100, "quote": "usd"], userAgent: "my-app/1.0", authorisation: .bearer(token: key) ) request.perform { result in switch result { case .success(let ticks): ticks.forEach { print("[\($0.timestamp)] $\($0.price)") } 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-deprecated) - 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 > **How do I use the Pro API in Swift?** > > The high-level `Coinpaprika.API` static methods don't currently accept a key. Use `CoinpaprikaNetworking`'s `Request` constructor with `.bearer(token:)` and the `https://api-pro.coinpaprika.com/v1/` base URL. See the "Authenticating with a paid plan" section above. > **Where can I find coin IDs for methods like ticker(id:)?** > > Use the [Coverage Checker](/tools/coverage) to obtain canonical IDs (e.g., `btc-bitcoin`). > **How do I fetch historical ticks/ohlcv?** > > Historical endpoints require a paid plan. Build a `Request` against the Pro base URL with `.bearer(token:)` auth (see the "Authenticating with a paid plan" section), pointing at `tickers//historical` or `coins//ohlcv/historical` with `start`/`end`/`quote` parameters. > **What is the recommended error handling?** > > 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 and 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. > **[Full API reference](/api-reference/rest-api/introduction)** > > Dive into the comprehensive API documentation and start building. > **[Check API status](https://status.coinpaprika.com/)** > > View the real-time status of our API services. ## CoinPaprika crypto API quickstart: 3 steps, free, no credit card required [Get latest Bitcoin price in under 2 minutes, free API, no signup | CoinPaprika](https://www.youtube.com/embed/qtt-jJGZz2o?si=Ia5Ajlar4FLLy_Wx) > [!TIP] > > You can also make requests directly in our API Playground. Visit [GET Ticker by ID](/api-reference/tickers/get-ticker-for-a-specific-coin) to try it out. In the next steps, we will make a GET request to the [Ticker](/api-reference/tickers/get-ticker-for-a-specific-coin) endpoint to get the latest price of Bitcoin (BTC). All you need is the Coin ID. * Coin ID: `btc-bitcoin` **1. Make a GET request** Simply make a GET request to the following endpoint to fetch the latest ticker data for any coin. We'll use the Bitcoin ID to populate the endpoint in the format `https://api.coinpaprika.com/v1/tickers/{coin_id}`. ```bash bash theme={"dark"} curl -X GET "https://api.coinpaprika.com/v1/tickers/btc-bitcoin" ``` ```python python theme={"dark"} import requests response = requests.get("https://api.coinpaprika.com/v1/tickers/btc-bitcoin") print(response.json()) ``` ```javascript javascript theme={"dark"} fetch("https://api.coinpaprika.com/v1/tickers/btc-bitcoin") .then(response => response.json()) .then(data => console.log(data)); ``` **2. Get latest data for Bitcoin (BTC)** This will return a detailed response with the latest data for Bitcoin (BTC), which will look similar to this. In the next step, we will extract just the price of BTC in USD. ```json Response [expandable] theme={"dark"} { "id": "btc-bitcoin", "name": "Bitcoin", "symbol": "BTC", "rank": 1, "total_supply": 19883231, "max_supply": 21000000, "beta_value": 0.879448, "first_data_at": "2010-07-17T00:00:00Z", "last_updated": "2025-06-25T10:47:48Z", "quotes": { "USD": { "price": 107077.69661924685, "volume_24h": 23175936198.924427, "volume_24h_change_24h": -44.15, "market_cap": 2129051326372, "market_cap_change_24h": 1.74, "percent_change_15m": 0.04, "percent_change_30m": 0.08, "percent_change_1h": 0.37, "percent_change_6h": 0.78, "percent_change_12h": 0.92, "percent_change_24h": 1.74, "percent_change_7d": 2.27, "percent_change_30d": -2.88, "percent_change_1y": 73.78, "ath_price": 111923.79452175781, "ath_date": "2025-05-22T18:42:03Z", "percent_from_price_ath": -4.33 } } } ``` **3. Extract the price** The response contains rich data. You can extract the USD price by navigating to the `quotes.USD.price` field. Here is how you can modify the request to get just the price: ```bash bash theme={"dark"} curl -s "https://api.coinpaprika.com/v1/tickers/btc-bitcoin" | jq '.quotes.USD.price' ``` ```python python theme={"dark"} import requests response = requests.get("https://api.coinpaprika.com/v1/tickers/btc-bitcoin") price = response.json()["quotes"]["USD"]["price"] print(price) ``` ```javascript javascript theme={"dark"} fetch("https://api.coinpaprika.com/v1/tickers/btc-bitcoin") .then(response => response.json()) .then(data => { const price = data.quotes.USD.price; console.log(price); }); ``` And as a result, you will get the price of BTC in USD: ```json quotes.USD.price theme={"dark"} 107077.69661924685 ``` Congratulations! You've successfully retrieved the latest price of Bitcoin! > **Ready to go professional? Explore our API plans for higher rate limits and advanced features.** > > [Open](/api-plans) ## CoinPaprika Crypto API use cases > **[Portfolio Tracking](/api-reference/tickers/get-tickers-for-all-active-coins)** > > Build apps to monitor the value of cryptocurrency portfolios. > **[Market Analysis](/api-reference/coins/get-historical-ohlc)** > > Analyze market trends with historical and latest data. > **[Trading Bots](/api-reference/exchanges/list-an-exchange-markets)** > > Develop automated trading strategies using our reliable data feed. > **[Crypto Research](/api-reference/coins/list-coins)** > > Access detailed information on thousands of coins and assets. ## Explore on-chain & DeFi data > **[Looking for DEX & on-chain data?](https://docs.dexpaprika.com/)** > > For latest data from Decentralized Exchanges (DEXes), including liquidity pools, swaps, and on-chain analytics, check out our sister project, **DexPaprika**. ## CoinPaprika API support We're here to help you build with CoinPaprika. > **[Join Discord](https://discord.gg/DhJge5TUGM)** > > Connect with our community for support and collaboration. > **[Give feedback](< https://coinpaprika.com/contact/>)** > > Have suggestions? We'd love to hear from you. > [!NOTE] > > **Need more?** We offer enterprise plans with dedicated support, higher rate limits, and custom solutions. > [Contact our team](https://coinpaprika.com/contact/) to learn more. # Connect Claude Desktop or Cursor Source: https://docs.coinpaprika.com/mcp-connect-claude-cursor Step-by-step guide to connect your AI development environment to the CoinPaprika MCP Server for real-time cryptocurrency data access ## What you'll learn This tutorial shows you how to connect Claude Desktop or Cursor to the CoinPaprika MCP Server to access real-time cryptocurrency data. By the end, you'll have live crypto market information available directly in your AI conversations. ## Prerequisites Before connecting to the CoinPaprika MCP server, ensure you have: * [Claude Desktop](https://claude.ai/desktop) or [Cursor](https://cursor.sh/) installed on your system * Basic familiarity with configuration files * Stable internet connection *** ## Quick Configuration ### Claude Desktop **1. Locate your configuration file** Find your Claude Desktop configuration file: * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` * **Windows**: `%AppData%/Claude/claude_desktop_config.json` * **Linux**: `~/.config/Claude/claude_desktop_config.json` **2. Add the MCP server configuration** If the file doesn't exist, create it with this content: ```json theme={"dark"} { "mcpServers": { "coinpaprika": { "command": "npx", "args": ["mcp-remote@latest", "https://mcp.coinpaprika.com/sse"] } } } ``` If the file already exists, add our server to the existing `mcpServers` object: ```json theme={"dark"} "coinpaprika": { "command": "npx", "args": ["mcp-remote@latest", "https://mcp.coinpaprika.com/sse"] } ``` ![Screenshot showing the configuration file open in a text editor with the MCP server config added](https://mintcdn.com/coinpaprika-f4fde1b0/QVXX6rgt0imxcKJy/images/Claude1.png?fit=max\&auto=format\&n=QVXX6rgt0imxcKJy\&q=85\&s=4920c8f9d39449d63d69e9cca97187b7) **3. Restart Claude Desktop** Save the file and restart Claude Desktop for the changes to take effect. ### Cursor **1. Open Cursor settings** 1. In Cursor, go to **Settings** (Cmd/Ctrl + ,) 2. Navigate to **Tools & Integrations** in the left sidebar 3. Click **New MCP server** ![Screenshot showing Cursor settings panel open](https://mintcdn.com/coinpaprika-f4fde1b0/QVXX6rgt0imxcKJy/images/Cursor2.png?fit=max\&auto=format\&n=QVXX6rgt0imxcKJy\&q=85\&s=efcde4a3c2a98595675049791dedb97f) **2. Configure MCP Server** 1. In the MCP server configuration dialog, enter: * **Server name**: `coinpaprika` * **Type**: `url` (select from dropdown) * **URL**: `https://mcp.coinpaprika.com/sse` 2. Click **Install** to complete the setup 3. Restart Cursor if prompted ![Screenshot showing the MCP server configuration form filled out](https://mintcdn.com/coinpaprika-f4fde1b0/QVXX6rgt0imxcKJy/images/Cursor1.png?fit=max\&auto=format\&n=QVXX6rgt0imxcKJy\&q=85\&s=6bbf8aeda426c1ac4a8de635c8e91520) > [!TIP] > > **Alternative method**: You can also configure Cursor to use any MCP servers configured in Claude Desktop by enabling the Claude Desktop integration in Cursor's settings. ## Verification After restarting, you should see: * **CoinPaprika tools** available in your AI assistant * **Cryptocurrency data access** through natural language queries * **Real-time market information** at your fingertips ![Screenshot showing the AI assistant interface with CoinPaprika tools visible in the tools list](https://mintcdn.com/coinpaprika-f4fde1b0/QVXX6rgt0imxcKJy/images/Claude2.png?fit=max\&auto=format\&n=QVXX6rgt0imxcKJy\&q=85\&s=079105031c48e4c07e64278f2439f0bb) ## Example Usage Once connected, you can ask questions like: ### Basic market data * "What's the current price of Bitcoin?" * "Show me the top 10 cryptocurrencies by market cap" * "What's the 24-hour volume for Ethereum?" ### Advanced queries * "Search for tokens related to DeFi" * "Compare the market caps of Bitcoin and Ethereum" * "What are the biggest gainers in the last 24 hours?" ### Portfolio analysis * "How has my portfolio performed today?" * "What's the total market cap of all cryptocurrencies?" * "Show me the correlation between Bitcoin and altcoins" ## Troubleshooting > **Tools not appearing** > > **Symptoms**: CoinPaprika tools don't show up in your AI assistant. > > **Solutions**: > > 1. Ensure you've restarted the application after configuration > 2. Check that the configuration file syntax is valid JSON > 3. Verify the `mcp-remote` package is available via npx > 4. Try removing and re-adding the MCP server configuration > **Connection errors** > > **Symptoms**: Getting connection timeouts or errors. > > **Solutions**: > > 1. Check your internet connection is stable > 2. Verify the MCP server is operational at [status.coinpaprika.com](https://status.coinpaprika.com/) > 3. Ensure no firewall is blocking the connection > 4. Try using the JSON-RPC endpoint instead: `https://mcp.coinpaprika.com/json-rpc` > **Configuration file not found** > > **Symptoms**: Can't locate the configuration file. > > **Solutions**: > > 1. Create the directory structure if it doesn't exist: > * **macOS**: `mkdir -p ~/Library/Application\ Support/Claude/` > * **Windows**: Create the `Claude` folder in your `%APPDATA%` directory > 2. Create the configuration file manually > 3. Ensure proper JSON syntax *** ## What's Next? Now that you're connected: > **[Learn JSON-RPC Usage](/mcp-json-rpc-usage)** > > Make direct API calls to our MCP server with practical examples > **[Explore Available Tools](/api-reference/rest-api/introduction)** > > Discover all the cryptocurrency data tools at your disposal *** ## Need Help? > **[Join Our Discord](https://discord.gg/DhJge5TUGM)** > > Connect with our community for real-time support and discussions > **[Direct Support](mailto:support@coinpaprika.com)** > > Contact our team for technical assistance and custom integrations > [!NOTE] > > **Building something amazing?** Share your CoinPaprika MCP integrations with our community! We love seeing what developers build with our tools. [Reach out](mailto:support@coinpaprika.com) to showcase your work. # CoinPaprika Crypto MCP Server Source: https://docs.coinpaprika.com/mcp-introduction Access real-time cryptocurrency data in Claude, Cursor, and other MCP-compatible tools through our hosted MCP server ## What is MCP? Model Context Protocol (MCP) is an [open standard](https://modelcontextprotocol.io/introduction) that enables AI systems to connect to external data sources and tools. It provides a consistent interface for AI models to access real-time information, perform calculations, and interact with external services. The CoinPaprika MCP server leverages this protocol to provide AI assistants like Claude with access to real-time cryptocurrency market data, enabling advanced conversations about crypto prices, market caps, trading volumes, and comprehensive token information across the entire cryptocurrency ecosystem. ## Why use our hosted MCP server? Skip the installation hassle and get instant access to comprehensive cryptocurrency data. Our hosted MCP server eliminates setup complexity while providing enterprise-grade reliability and performance. **What you get instantly:** * **Zero setup required** - just add the URL to your config * **Multiple transport options** - SSE and JSON-RPC support * **Always up-to-date** - we handle updates and maintenance * **Enterprise reliability** - High availability and performance * **Real-time data** - live prices, volumes, and market information * **Comprehensive coverage** - Access to our full cryptocurrency database > [!NOTE] > > Visit [mcp.coinpaprika.com](https://mcp.coinpaprika.com) to explore our hosted MCP server interface and see the available data before integrating. ## Connection Methods There are two ways to connect to the CoinPaprika MCP server: > **Server-Sent Events (SSE) - Recommended for pre-configured tools like Claude Desktop and Cursor** > > **Endpoint:** `https://mcp.coinpaprika.com/sse` > > **Best for:** Claude Desktop, Cursor, and most MCP clients\ > **Benefits:** Latest data updates, excellent browser compatibility, automatic reconnection\ > **Use cases:** Live price monitoring, real-time market data feeds, continuous cryptocurrency updates > > This is the recommended option for most users as it provides the smoothest experience with popular AI tools. > **JSON-RPC over HTTP - Perfect for AI agent integrations and custom applications** > > **Endpoint:** `https://mcp.coinpaprika.com/json-rpc` > > **Best for:** AI agent integrations, custom applications, server-to-server communication\ > **Benefits:** Reliable data access, consistent response format, easy integration with existing systems\ > **Use cases:** AI agent data fetching, custom trading bots, automated portfolio monitoring, integration with existing applications > > Ideal for developers building AI agents or applications that need reliable, on-demand access to cryptocurrency data. > [!TIP] > > **Getting started?** Use the SSE endpoint (`https://mcp.coinpaprika.com/sse`) for the best experience with Claude Desktop and Cursor. Check out our [Claude & Cursor integration guide](/mcp-connect-claude-cursor) for step-by-step instructions. For custom AI agents and applications, the JSON-RPC endpoint provides reliable data access with consistent response formats. *** ## Use Cases The CoinPaprika MCP server is perfect for: * **AI Assistants** - Provide latest crypto information and market analysis * **AI Trading Bots** - Access market data for decision making and portfolio management * **Analytics Dashboards** - Display live cryptocurrency metrics and trends * **Educational Applications** - Teach cryptocurrency concepts with live, up-to-date data * **Portfolio Trackers** - Monitor cryptocurrency holdings with latest price updates ## Getting Started Ready to integrate? Choose your path: > **[Connect Claude Desktop or Cursor](/mcp-connect-claude-cursor)** > > Set up MCP in your AI development environment with step-by-step instructions > **[Use JSON-RPC Directly](/mcp-json-rpc-usage)** > > Make direct API calls to our MCP server with practical examples *** ## Need Help? > **[Join Our Discord](https://discord.gg/DhJge5TUGM)** > > Connect with our community for real-time support and discussions > **[Direct Support](mailto:support@coinpaprika.com)** > > Contact our team for technical assistance and custom integrations > [!NOTE] > > **Building something amazing?** Share your CoinPaprika MCP integrations with our community! We love seeing what developers build with our tools. [Reach out](mailto:support@coinpaprika.com) to showcase your work. # JSON-RPC Usage Guide Source: https://docs.coinpaprika.com/mcp-json-rpc-usage Quick guide to make direct API calls to the CoinPaprika MCP Server using JSON-RPC ## Quick Start The JSON-RPC endpoint provides reliable access to cryptocurrency data for AI agents and custom applications. **Endpoint:** `https://mcp.coinpaprika.com/json-rpc` ## Basic Usage ### Search for cryptocurrencies ```bash theme={"dark"} curl -X POST 'https://mcp.coinpaprika.com/json-rpc' \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "search", "arguments": { "q": "bitcoin", "limit": 5 } } }' ``` *** ## Response Format Results are returned in `result.content[0].text` as stringified JSON: ```json theme={"dark"} { "jsonrpc": "2.0", "id": 1, "result": { "content": [ { "type": "text", "text": "{\"data\": \"...\"}" } ] } } ``` *** ## Error Handling The MCP server returns standard JSON-RPC error codes. Upstream HTTP statuses may map to messages like `400/402/403/429`. Inspect the JSON-RPC `error.message` field for specific error details. ## Best Practices * **Implement caching** to reduce redundant requests * **Use reasonable retry policies** with jitter for network resilience * **Handle errors gracefully** with proper fallback mechanisms * **Consider batching** multiple requests when possible *** ## Available Tools To discover all available tools, use the `tools/list` method: ```bash theme={"dark"} curl -X POST 'https://mcp.coinpaprika.com/json-rpc' \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {} }' ``` ### Tool Call Structure All tools follow this structure: | Field | Description | Example | | - | - | - | | `name` | Tool name | `"search"` | | `arguments` | Tool-specific parameters | `{"q": "bitcoin", "limit": 5}` | ### Available Tools | Tool | Description | Arguments | Example | | - | - | - | - | | getGlobal | Market overview | none | `{}` | | getCoins | List coins | limit: number (50) | `{"limit": 25}` | | getCoinById | Coin details | **coinId**: string | `{"coinId": "btc-bitcoin"}` | | getCoinEvents | Events for a coin | **coinId**: string; limit: number (50) | `{"coinId": "btc-bitcoin", "limit": 10}` | | getCoinExchanges | Exchanges for a coin | **coinId**: string; limit: number (50) | `{"coinId": "btc-bitcoin", "limit": 10}` | | getCoinMarkets | Markets for a coin | **coinId**: string; quotes: string; limit: number (50) | `{"coinId": "btc-bitcoin", "quotes": "usd,btc", "limit": 10}` | | getTickers | All tickers | quotes: string; limit: number (50) | `{"quotes": "usd", "limit": 10}` | | getTickersById | Ticker for coin | **coinId**: string; quotes: string | `{"coinId": "btc-bitcoin", "quotes": "usd"}` | | getPeopleById | Person details | **personId**: string | `{"personId": "satoshi-nakamoto"}` | | getTags | List tags | additionalFields: string; limit: number (50) | `{"additionalFields": "id,name", "limit": 10}` | | getTagById | Tag details | **tagId**: string; additionalFields: string | `{"tagId": "defi"}` | | getExchanges | List exchanges | quotes: string; limit: number (50) | `{"quotes": "usd", "limit": 10}` | | getExchangeByID | Exchange details | **exchangeId**: string; quotes: string | `{"exchangeId": "binance", "quotes": "usd"}` | | getExchangeMarkets | Markets on exchange | **exchangeId**: string; quotes: string; limit: number (50) | `{"exchangeId": "binance", "quotes": "usd", "limit": 10}` | | getPlatforms | List contract platforms | limit: number (50) | `{"limit": 10}` | | getContracts | Contracts for a platform | **platformId**: string; limit: number (50) | `{"platformId": "eth-ethereum", "limit": 10}` | | getTickerByContract | Ticker by contract address | **platformId**: string; **contractAddress**: string | `{"platformId": "eth-ethereum", "contractAddress": "0x..."}` | | priceConverter | Convert base to quote | **baseCurrencyId**: string; **quoteCurrencyId**: string; amount: number (0) | `{"baseCurrencyId": "btc-bitcoin", "quoteCurrencyId": "usd", "amount": 1}` | | search | Search currencies, exchanges, icos, people, tags | **q**: string; categories: string; modifier: string; limit: number (50) | `{"q": "btc", "categories": "currencies,exchanges", "modifier": "symbol", "limit": 5}` | | status | API health check | none | `{}` | | getCapabilities | Agent onboarding notes for this server | none | `{}` | | resolveId | Resolve a name or symbol to a canonical ID | **type**: string; **query**: string; limit: number | `{"type": "coin", "query": "bitcoin", "limit": 5}` | | getCoinOHLCVLatest | OHLCV for the last full day | **coinId**: string; quote: string | `{"coinId": "btc-bitcoin", "quote": "usd"}` | | getCoinOHLCVToday | OHLCV for the current day | **coinId**: string; quote: string | `{"coinId": "btc-bitcoin", "quote": "usd"}` | | getCoinOHLCVHistorical | Historical OHLCV | **coinId**: string; **start**: string; end: string; limit: number; interval: string; quote: string | `{"coinId": "btc-bitcoin", "start": "2026-07-01", "interval": "24h"}` | | getTickersHistoricalById | Historical ticks for a coin | **coinId**: string; **start**: string; end: string; limit: number; quote: string; interval: string | `{"coinId": "btc-bitcoin", "start": "2026-07-01", "interval": "1d"}` | | getHistoricalTickerByContract | Historical ticks by contract address | **platformId**: string; **contractAddress**: string; **start**: string; end: string; limit: number; quote: string; interval: string | `{"platformId": "eth-ethereum", "contractAddress": "0x...", "start": "2026-07-01"}` | | keyInfo | API key plan and monthly usage | none | `{}` | | getMappings | Map other providers' IDs to CoinPaprika IDs | coinpaprika: string; coinmarketcap: string; coingecko: string; cryptocompare: string; isin: string; dti: string | `{"coingecko": "bitcoin"}` | | getChangelogIDs | Coin ID changes made by moderators | page: number; limit: number | `{"page": 1, "limit": 50}` | | submitFeedback | Report a gap or problem with this server | **goal**: string; attempted\_tools: string; blocked\_at: string; expected: string; observed: string; severity: string | `{"goal": "Fetch hourly OHLCV", "observed": "402 returned"}` | > [!NOTE] > > This table is the full set of 31 tools the server exposes. To confirm it against the running > server at any time, call `tools/list` as shown above. ### Call Pattern Template ```bash theme={"dark"} curl -sS -X POST 'https://mcp.coinpaprika.com/json-rpc' \ -H 'content-type: application/json' \ --data '{ "jsonrpc":"2.0", "id":1, "method":"tools/call", "params":{"name":"","arguments":{ /* see table */ }} }' ``` *** ## What's Next? > **[Connect Claude Desktop or Cursor](/mcp-connect-claude-cursor)** > > Set up AI-powered access to cryptocurrency data > **[Explore Available Tools](/api-reference/rest-api/introduction)** > > Discover all the cryptocurrency data tools available ## Need Help? > **[Join Our Discord](https://discord.gg/DhJge5TUGM)** > > Connect with our community for real-time support > **[Direct Support](mailto:support@coinpaprika.com)** > > Contact our team for technical assistance # Install CoinPaprika agent skills Source: https://docs.coinpaprika.com/skills Add the CoinPaprika skill to Claude Code, Cursor, or any compatible AI agent with one command. Gives your agent full knowledge of the CoinPaprika REST API, CLI, and SDKs. ## What are agent skills? Agent skills are reusable instruction files that teach AI agents how to use a specific API. When you install the CoinPaprika skill, your AI agent gets a complete reference of every endpoint, CLI command, response format, and common workflow -- so it can make correct API calls without guessing. > [!NOTE] > > Skills work with Claude Code, Cursor, Cline, OpenCode, and [many other AI agents](https://github.com/vercel-labs/skills). One install command. No API key needed for the free tier. *** ## What's included The CoinPaprika skill installs the following files into your project: | File | What it provides | | - | - | | `SKILL.md` | Full API reference: all REST endpoints (tickers, coins, exchanges, OHLCV, contracts, tags, search, conversion), CLI commands, MCP setup, SDK links, common workflows, coin IDs, rate limits | | `references/openapi.yml` | Complete OpenAPI 3.1 specification with all schemas, parameters, and response types | | `references/cli-reference.md` | Every `coinpaprika-cli` command with flags, examples, and output formats | Your AI agent reads `SKILL.md` automatically. The reference files are loaded on demand when the agent needs deeper detail. *** ## Install **1. Run the install command** ```bash theme={"dark"} npx skills add github.com/coinpaprika/skills/ --skill coinpaprika-api ``` This copies the skill files into `.claude/skills/coinpaprika-api/` in your current project. ![Terminal output showing npx skills add github.com/coinpaprika/skills/ --skill coinpaprika-api completing successfully](https://mintcdn.com/coinpaprika-f4fde1b0/4cPK-VhIuZpV4H9s/images/tutorials/skills/npxskills.png?fit=max\&auto=format\&n=4cPK-VhIuZpV4H9s\&q=85\&s=0d1cc0bc5dabbd57562fa3d340febd18) > [!TIP] > > To install both CoinPaprika and DexPaprika skills at once, drop the `--skill` flag: > > ```bash theme={"dark"} > npx skills add github.com/coinpaprika/skills/ > ``` **2. Check the installed files** Your project directory should now contain: ``` .claude/skills/ coinpaprika-api/ SKILL.md references/ openapi.yml cli-reference.md ``` ![File tree showing .claude/skills/coinpaprika-api/ directory containing SKILL.md and references folder with openapi.yml and cli-reference.md](https://mintcdn.com/coinpaprika-f4fde1b0/4cPK-VhIuZpV4H9s/images/tutorials/skills/tree.png?fit=max\&auto=format\&n=4cPK-VhIuZpV4H9s\&q=85\&s=676a9015f3b2b18d778d06f020ec826c) **3. Restart your agent** Restart Claude Code (or your AI tool) so it picks up the new skill files. Skills are discovered at startup. *** ## Verify it works After restarting, ask your AI agent a CoinPaprika question: ``` What's the current price of Bitcoin? ``` The agent should call `https://api.coinpaprika.com/v1/tickers/btc-bitcoin` and return the price. If it does, the skill is loaded and working. Try a more specific query: ``` Get the top 10 coins by market cap using the CoinPaprika API ``` ![Claude Code answering a CoinPaprika query about Bitcoin price after skill installation, showing live API data](https://mintcdn.com/coinpaprika-f4fde1b0/4cPK-VhIuZpV4H9s/images/tutorials/skills/answer.png?fit=max\&auto=format\&n=4cPK-VhIuZpV4H9s\&q=85\&s=02527d1dadd6391caa6f6d8de2e5a98f) *** ## Example queries Once the skill is loaded, your agent knows the full CoinPaprika API. Here are things you can ask: ### Price and market data ``` What's the price, market cap, and 24h volume for Ethereum? ``` ``` Show me the top 20 coins by market cap with their 7-day price change ``` ### Historical data ``` Get 30-day OHLCV history for Bitcoin ``` ``` Show Bitcoin's price history for January 2025 ``` ### Search and discovery ``` Search for DeFi tokens on CoinPaprika ``` ``` Which exchanges list Solana? Sort by volume. ``` ### CLI commands The skill teaches your agent to use `coinpaprika-cli` if it's installed: ``` Use coinpaprika-cli to get the Bitcoin ticker ``` ``` Run coinpaprika-cli to search for stablecoin tokens ``` ### Currency conversion ``` Convert 1 BTC to USD using CoinPaprika's price converter ``` *** ## Skills vs MCP server vs Claude Code plugin | | Agent Skills | Hosted MCP Server | Claude Code Plugin | | - | - | - | - | | **Install** | `npx skills add` | Add URL to config | `/plugin install` | | **What it gives the agent** | Full API knowledge (endpoints, CLI, common workflows) | Live tool calls (29 MCP tools) | MCP tools + agent + skills | | **Agent makes API calls** | Yes, directly via REST or CLI | No, MCP server handles calls | MCP server handles calls | | **Works offline** | Yes (skill files are local) | No (needs mcp.coinpaprika.com) | No (needs MCP server) | | **Works with** | Claude Code (default), Cursor, Cline, and more via `--agent` flag | Claude Desktop, Cursor, VS Code | Claude Code only | | **Best for** | Any agent that can make HTTP calls or run CLI commands | Quick AI IDE setup with managed tools | Claude Code users who want everything bundled | > [!NOTE] > > You can combine approaches. Install the skill for API knowledge **and** connect the [MCP server](/mcp-introduction) for tool-based access. They complement each other. *** ## Manage skills ```bash theme={"dark"} # List installed skills npx skills list # Remove the skill npx skills remove coinpaprika-api # Update to latest version npx skills update ``` *** ## Troubleshooting > **Skill not loading after install** > > Restart your AI agent (Claude Code, Cursor, etc.). Skills are discovered at startup. If it still doesn't load, verify the files are in the right location: > > ```bash theme={"dark"} > ls .claude/skills/coinpaprika-api/ > ``` > > You should see `SKILL.md` and a `references/` directory. > **npx skills command not found** > > The `skills` CLI requires Node.js 16+. Check your version: > > ```bash theme={"dark"} > node --version > ``` > > If Node.js is installed and it still fails, try: > > ```bash theme={"dark"} > npx --yes skills add github.com/coinpaprika/skills/ --skill coinpaprika-api > ``` > **Agent not using CoinPaprika for queries** > > Be specific in your prompt. Instead of "What's the price of Bitcoin?", try "Using the CoinPaprika API, get the ticker for btc-bitcoin." The agent should recognize the skill context and use the correct endpoints. > **Wrong directory structure** > > Skills must be direct children of `.claude/skills/`. If the files ended up nested differently (e.g., `.claude/skills/skills/coinpaprika-api/`), move the `coinpaprika-api` folder so it sits directly inside `.claude/skills/`. *** ## What's next? > **[MCP Server](/mcp-introduction)** > > Add managed MCP tools to Claude Desktop, Cursor, or VS Code > **[Claude Code Plugin](/claude-code-plugin)** > > Get the full plugin bundle with MCP tools, agents, and skills > **[CLI](/cli)** > > Query crypto data from the terminal with coinpaprika-cli > **[REST API Reference](/api-reference/rest-api/introduction)** > > Complete endpoint documentation with interactive playground *** ## Need help? > **[Join Our Discord](https://discord.gg/DhJge5TUGM)** > > Connect with our community for real-time support and discussions > **[Direct Support](mailto:support@coinpaprika.com)** > > Contact our team for technical assistance and custom integrations ### FAQs > **Do I need an API key?** > > Not for the free tier. The free CoinPaprika API provides 20,000 calls/month and covers 2,000 assets with no key required. For paid plans (Starter \$99/mo and up), you'll need an API key -- the skill includes instructions for both. > **What's the difference between skills and MCP?** > > Skills give your agent knowledge (API docs, CLI commands, common patterns). MCP gives your agent tools (callable functions that return live data). Skills make your agent smarter about the API; MCP does the calling for it. > **Which AI agents support skills?** > > Claude Code, Cursor, Cline, OpenCode, Aider, and many others. The `skills` CLI auto-detects your agent, or you can target one explicitly with the `--agent` flag. See the [full list of supported agents](https://github.com/vercel-labs/skills). > **Can I use skills and MCP together?** > > Yes. Install the skill for deep API knowledge and connect the MCP server for tool-based access. They complement each other well. # Coverage checker - Check if an asset exists in CoinPaprika's dataset Source: https://docs.coinpaprika.com/tools/coverage Use this tool to quickly verify whether an asset exists in CoinPaprika's dataset. Enter a contract address, token name, or ticker symbol; we’ll search our coverage and show the closest matches.