Crypto Price API
The Crypto Price API provides access to live market prices for several hundred different cryptocurrencies, quoted in either another cryptocurrency or in a fiat currency (e.g. BTCEUR, ETHJPY).
Available endpoints:
- /v1/cryptoprice - Get the current price for any cryptocurrency symbol, quoted in another cryptocurrency or in a fiat currency (premium only for fiat quotes)
- /v1/cryptopricehistorical - Get historical price data for any cryptocurrency symbol
- /v1/cryptosymbols - Get a list of all available cryptocurrency ticker symbols
Premium members have access to live prices. Free users receive the price as of the top of the current hour, updated once per hour.
From 2,495 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 349ms | 379ms | 422ms | 663ms | 1175ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
https://api.api-ninjas.com/v1/cryptoprice
Returns the current price and current time (in UNIX timestamp in seconds) for any cryptocurrency symbol. Premium members have access to live prices. Free users receive the price as of the top of the current hour, updated once per hour. For historical price data, see /v1/cryptopricehistorical.
Fiat quotes: Premium subscribers can quote any cryptocurrency in a supported fiat currency by appending the three-letter fiat code to the crypto symbol (e.g. BTCEUR, ETHJPY, TRXGBP).
Parameters
symbolrequiredCryptocurrency symbol (e.g.
ETHUSDT). To get the full list of available crypto-quoted symbols, use the Crypto Symbols API. Premium subscribers can also quote any cryptocurrency in a supported fiat currency (e.g.BTCEUR,ETHJPY).
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields or an error if the request is unsuccessful.
symbolThe cryptocurrency trading pair symbol (e.g. ETHUSDT).
priceThe current price of the cryptocurrency pair.
timestampThe timestamp of the price in Unix format (in seconds). On paid plans this is the moment the price was read. On the free plan it is the top of the current hour — the price is the close of the last completed hour, so every request within the same hour returns the same price and the same timestamp.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/cryptoprice?symbol=ETHUSDTHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/cryptoprice?symbol=BTCUSD" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
Premium only
https://api.api-ninjas.com/v1/cryptopricehistorical
Returns historical price data for any cryptocurrency pair in OHLCV (Open, High, Low, Close, Volume) format. The data is returned in ascending order (oldest first).
Parameters
symbolrequiredCryptocurrency symbol (e.g.
ETHUSDT). Use the same values as the symbol parameter in /v1/cryptoprice.intervaloptionalTime interval between data points. Valid values are:
1m,5m,15m,30m,1h,4h,1d. Default is1h.startoptionalStart timestamp in Unix format (in seconds). If not provided, defaults to 24 hours ago.
endoptionalEnd timestamp in Unix format (in seconds). If not provided, defaults to current time.
limitoptionalMaximum number of data points to return. Default is 100, maximum is 1000.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields or an error if the request is unsuccessful.
openThe opening price of the cryptocurrency.
highThe highest price of the cryptocurrency.
lowThe lowest price of the cryptocurrency.
closeThe closing price of the cryptocurrency.
volumeThe volume of the cryptocurrency traded in the time period.
close_timeThe timestamp of the closing price in Unix format (in milliseconds).
timestampThe timestamp of the price in Unix format (in seconds).
priceThe current price of the cryptocurrency pair. This is the same value as the
closefield.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/cryptopricehistorical?symbol=ETHUSDT&interval=1h&limit=10Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/cryptopricehistorical?symbol=ETHUSDT&interval=1h&limit=10" \
-H "X-Api-Key: YOUR_API_KEY"Premium only
https://api.api-ninjas.com/v1/cryptosymbols
The Crypto Symbols API provides a list of all available cryptocurrency ticker symbols. It can be used in conjunction with the Crypto Price API to retrieve price data.
Returns a list of available cryptocurrency symbols that have pricing information.
Parameters
None
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields or an error if the request is unsuccessful.
symbolsarrayAn array of cryptocurrency symbol pairs.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/cryptosymbolsHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/cryptosymbols" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
New
https://api.api-ninjas.com/v1/cryptotreasury
Returns crypto holdings that companies, funds and private filers disclose to the SEC. Covers bitcoin, ethereum, solana, XRP and others; filter with asset. Results are ranked by dollar value, because unit counts are only comparable within a single asset. For bitcoin only, including the spot bitcoin ETFs, see /v1/bitcointreasury.
Positions come from SEC XBRL crypto-asset disclosures filed under ASU 2023-08. These are quarterly balance-sheet figures, not a live feed: each result carries a period_end and can be several months old. SEC filings are public domain, so you may store, redistribute and display these results commercially.
Parameters
tickeroptionalStock ticker of the filer (e.g.
MSTR). Private filers have no ticker — usecik.cikoptionalSEC Central Index Key of the filer, with or without leading zeros.
nameoptionalCase-insensitive substring match on the filer name. Requires a Business or Professional subscription.
assetoptionalRestrict to one asset:
BITCOIN,ETHEREUM,SOLANA,XRP,LITECOIN,DOGECOIN,CARDANO,INJECTIVE,CANTON,STABLECOINorUNKNOWN.entity_typeoptionalOPERATINGfor a company holding crypto on its balance sheet,ETPfor an exchange-traded product whose holdings are the fund itself, orPRIVATEfor a filer with no listed ticker.periodoptionalReporting period end as
YYYY-MM-DD, orlatest. Defaults to the most recent period. How far back you may query depends on your subscription tier.include_unverifiedoptionalInclude filings whose unit count does not reconcile with their own reported fair value. Excluded by default; when included they are reproduced exactly as filed and carry a warning.
limitoptionalMaximum results to return. Capped at 5 on Free, 50 on Developer, and 250 on Business and Professional.
offsetoptionalNumber of results to skip, for pagination. Default is
0, maximum is10000.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields or an error if the request is unsuccessful.
resultsarrayMatching treasury positions.
entity_namestringFiler name as it appears in EDGAR.
tickerstringStock ticker, or
nullfor private filers.cikstringSEC Central Index Key, zero-padded to 10 digits.
entity_typestringOPERATING,ETPorPRIVATE.assetstringCanonical asset name, for example
BITCOIN.unitsnumberCoins held at the period end. Fractional holdings are returned as filed.
fair_value_usdnumberValue of this asset position.
nullwhen the filer holds several assets and did not break the value out per asset — useentity_total_crypto_fair_value_usdinstead.cost_usdnumberCost basis as reported, or
nullwhere the filer did not disclose it.entity_total_crypto_fair_value_usdnumberThe filer's total crypto fair value across all assets.
entity_holds_multiple_assetsbooleanTrue when the filer reported more than one crypto asset for this period.
period_endstringReporting period end as
YYYY-MM-DD.calendar_yearintegerCalendar year of the reporting period. Not the filer's fiscal year.
calendar_quarterstringCalendar quarter,
Q1toQ4. Not the filer's fiscal quarter.accessionstringSEC accession number of the source filing.
sec_filing_urlstringLink to the source filing on EDGAR.
attributionobjectHow the figure was derived, so you can audit it. Contains
asset_source,units_basis,units_facts_reconciled,recovered_from_instance_document,quality,implied_unit_price_usdandmarket_price_at_period_end_usd.disclosureobjectData source, your redistribution rights, and a not-investment-advice notice.
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/cryptotreasury?asset=BITCOIN&limit=5" \
-H "X-Api-Key: YOUR_API_KEY"Frequently Asked Questions
Can I use the Crypto Price API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Crypto Price API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Crypto Price API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Crypto Price API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.Can I see which public companies hold crypto?
Yes —/v1/cryptotreasuryreturns crypto holdings that companies, funds and private filers disclose to the SEC: units held, cost basis where reported, and a link to the source filing. Filter withassetfor BITCOIN, ETHEREUM, SOLANA, XRP and others, or withentity_typeto separate operating companies from exchange-traded products. Results are ranked by dollar value, since unit counts are only comparable within a single asset.Why do some treasury results have a null fair_value_usd?
The SEC tagCryptoAssetFairValueis an entity-level total across all crypto a filer holds, not a per-asset figure. When a filer holds several assets and did not break the value out per asset, we returnfair_value_usdas null and setentity_holds_multiple_assetsto true, with the company-wide figure inentity_total_crypto_fair_value_usd. Repeating the entity total on each asset row would multiply the same money several times over.What does the attribution object tell me?
It shows how each number was derived so you can audit it.asset_sourcesays whether the filing named the coin or it was identified by matching the implied unit price to the period-end market close.units_basissays how overlapping unit facts were collapsed — some filers report a total alongside its components, and summing them would double-count.qualitysays whether the unit count reconciles with the filer's own reported fair value; filings that fail are excluded unless you passinclude_unverified=true.How do I quote a cryptocurrency in a fiat currency like USD or EUR?
Premium subscribers can quote any cryptocurrency in a supported fiat currency by appending the three-letter fiat code to the crypto symbol in thesymbolparameter (e.g.BTCEUR,ETHJPY,TRXGBP); free users are limited to crypto-quoted pairs such asETHBTC. See pricing for fiat-quote access.How fresh is the price data, and how does it differ between free and premium accounts?
The current-price endpoint returns the price along with atimestampin Unix seconds. Premium members receive live prices; free users receive the price as of the top of the current hour, which updates once per hour, so every request within the same hour returns the same price and the sametimestamp. Compare plan-level data access on the pricing page.How can I get historical OHLCV candles instead of just the current price?
The premium-only/v1/cryptopricehistoricalendpoint returns historical candles in OHLCV format withopen,high,low,close, andvolumefields; you can control granularity with theintervalparameter (1mthrough1d) and return up to 1000 points vialimit. Historical data access requires a premium plan.How do I find which cryptocurrency symbols are supported?
Use the premium-only/v1/cryptosymbolsendpoint, which returns asymbolsarray of every available trading pair that you can then pass to thesymbolparameter. For single-coin data you can also try the dedicated Bitcoin API.