How to Get Bitcoin Price Data with the Vortex API
Introduction
Bitcoin's CMC ID is 1. It has been id=1 since Vortex launched and will not change, which makes fetching Bitcoin price data the simplest and most reliable call in the API. This guide shows how to fetch it, walks through every field in the response, and covers the caching pattern that keeps credit usage efficient.
Because Bitcoin uses the same quotes endpoint as every other asset, the pattern here applies to fetching the price of anything on Vortex.
The Endpoint
Use GET /v3/cryptocurrency/quotes/latest when you know which asset you want and need its current market data. This endpoint returns price, market cap, volume, percentage changes, and supply figures.
| Parameter | Type | Description |
|---|---|---|
| id | string | CMC cryptocurrency ID. Use 1 for Bitcoin. |
| convert | string | Currency symbol(s) for price conversion, e.g. USD or USD,EUR,GBP. |
| X-CMC_PRO_API_KEY | header | Your API key, passed as a request header. |
Get your API key — Create a free Vortex account to obtain a key and start making calls immediately. Get API Key
Making the Request
All three examples below call the same endpoint with the same parameters. Replace YOUR_API_KEY with your actual key or read it from an environment variable.
cURL
Python
Node.js
The Response
The /v3 endpoint returns data as an array and quote as an array of currency objects — unlike the older /v2 endpoint where both were dictionaries. Bitcoin is always the first (and only) element when you query by id=1.
| Field | Description |
|---|---|
| id | Permanent CMC ID. Bitcoin is always 1. |
| cmc_rank | Current market-cap rank. Bitcoin is rank 1. |
| circulating_supply | Number of BTC currently in circulation. |
| max_supply | Hard cap of 21 million BTC. |
| num_market_pairs | Active trading pairs across all tracked exchanges. |
| quote[].price | Current price in the requested conversion currency. |
| quote[].volume_24h | 24-hour trading volume in the conversion currency. |
| quote[].percent_change_24h | Price change over the last 24 hours, as a percentage. |
| quote[].market_cap | Circulating supply × price. |
| quote[].fully_diluted_market_cap | Max supply × price. |
| status.credit_count | API credits consumed by this call. |
| status.elapsed | Server processing time in milliseconds. |
Extracting the Price
In /v3, quote is an array, not a dictionary. You cannot access the USD quote with quote["USD"] — use next() in Python or find() in Node.js to locate the matching currency object.
Python
Node.js
Note: Always provide a fallback (the empty object {} in Python, a null check in Node.js) in case the conversion currency is absent from the response — for example when an unsupported symbol is passed to convert.
Converting to Other Currencies
Pass a comma-separated list to the convert parameter to receive prices in multiple currencies in a single call. Each additional currency beyond the first costs 1 extra credit.
The quote array in the response will contain one object per requested currency. Iterate over it to print all prices:
Caching and Polling
Bitcoin price data updates every 60 seconds on Vortex. Calling the API more frequently than that returns cached data without updating the values — and still consumes credits. Cache the response locally and refresh on a 60-second schedule.
The function returns the cached value on every call within the 60-second window and only hits the network once the TTL expires. This pattern reduces credit consumption proportionally to how frequently your application reads the price.
Why id=1 and Not symbol=BTC
Using symbol=BTC works, but it is fragile. When multiple tokens share the same symbol, Vortex returns the highest-ranked match — which today is Bitcoin, but this behaviour depends on ranking staying stable. Using id=1 always returns exactly Bitcoin, regardless of any other tokens that may use similar symbols in the future.
The ID is permanent. Vortex has never reassigned IDs, and Bitcoin's ID of 1 will remain unchanged.
Common Mistakes
- Parsing quote as a dictionary: In /v3, quote is an array. Accessing quote["USD"] raises a TypeError in Python and returns undefined in JavaScript. Use next() or find() to locate the correct currency object.
- Polling faster than 60 seconds: Data refreshes once per minute. Calls within that window return the same cached values and consume credits without returning newer data. Implement local caching with a 60-second TTL.
- Using symbol=BTC in production: Symbol-based lookups return the highest-ranked match when there is ambiguity. Use id=1; it is unambiguous and permanent.



