NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

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:

Premium members have access to live prices. Free users receive the price as of the top of the current hour, updated once per hour.

Online
(4.1)

From 2,495 users

900+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
349ms379ms422ms663ms1175ms

Didn't find what you were looking for? Suggest an improvement

4 endpoints

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.

USD quotes: symbols ending in USD (e.g. BTCUSD) are priced in US dollars: the coin's USDT price multiplied by the live USDT/USD rate, so a stablecoin trading away from $1 does not distort the price. Symbols ending in USDT (e.g. BTCUSDT) are priced in Tether.

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). The US-dollar price is converted at a live exchange rate for most major currencies and at a rate refreshed at least hourly for the rest; the response's exchange_rate_timestamp says which.

Parameters

  • symbol  required

    Cryptocurrency 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-Key  required

    API Key associated with your account.

Response

The /v1/cryptoprice endpoint returns a JSON object with the following fields, or an error if the request is unsuccessful.

  • symbol

    The symbol you requested (e.g. ETHUSDT, BTCUSD).

  • price

    The current price of the cryptocurrency pair.

  • timestamp

    The 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.

  • exchange_rate_timestamp

    Fiat quotes only (e.g. BTCEUR). The Unix timestamp (in seconds) of the exchange rate used to convert the US-dollar price. It can be older than timestamp, for example at weekends when currency markets are closed and the latest rate is from Friday.

Live Demo

Live demo · no API key required
Query parameters
symbol

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/cryptoprice?symbol=ETHUSDT
Sample response
{
"symbol": "ETHUSDT",
"price": "0.00381400",
"timestamp": 1637809196
}

Code Examples

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

  • symbol  required

    Cryptocurrency symbol (e.g. ETHUSDT, BTCUSD). Crypto-quoted and USD-quoted symbols only; other fiat quotes are not available on this endpoint.

  • interval  optional

    Time interval between data points. Valid values are: 1m, 5m, 15m, 30m, 1h, 4h, 1d. Default is 1h.

  • start  optional

    Start timestamp in Unix format (in seconds). If not provided, defaults to 24 hours ago.

  • end  optional

    End timestamp in Unix format (in seconds). If not provided, defaults to current time.

  • limit  optional

    Maximum number of data points to return. Default is 100, maximum is 1000.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v1/cryptopricehistorical endpoint returns a JSON array of objects, each with the following fields, or an error if the request is unsuccessful.

  • open

    The opening price of the cryptocurrency.

  • high

    The highest price of the cryptocurrency.

  • low

    The lowest price of the cryptocurrency.

  • close

    The closing price of the cryptocurrency.

  • volume

    The volume of the cryptocurrency traded in the time period.

  • close_time

    The timestamp of the closing price in Unix format (in milliseconds).

  • timestamp

    The timestamp of the price in Unix format (in seconds).

  • price

    The current price of the cryptocurrency pair. This is the same value as the close field.

Live Demo

Live demo
Query parameters
symbol
interval
start
end
limit

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/cryptopricehistorical?symbol=ETHUSDT&interval=1h&limit=10
Sample response
[
{
"open": "0.00381100",
"high": "0.00381100",
"low": "0.00380100",
"close": "0.00380900",
"volume": "6.41000000",
"close_time": 1637812799999,
"timestamp": 1637812799,
"price": "0.00380900"
}
]

Code Examples

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-Key  required

    API Key associated with your account.

Response

The /v1/cryptosymbols endpoint returns a JSON object with the following fields, or an error if the request is unsuccessful.

  • symbols

    An array of cryptocurrency symbol pairs.

Live Demo

Live demo

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/cryptosymbols
Sample response
{
"symbols": [
"ETHBTC",
"ETHUSDT",
"..."
]
}

Code Examples

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.

https://api.api-ninjas.com/v1/cryptotreasury

Returns crypto positions that companies, funds and private filers report 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, so this is a record of SEC-reported positions rather than a complete list of every company holding crypto. Holders listed only outside the US are not included, and some US-listed holders are missing. These are quarterly balance-sheet figures, not a live feed: each result carries a period_end, and filings usually arrive one to three months after it. SEC filings are public domain, so you may store, redistribute and display these results commercially.

Parameters

  • ticker  optional

    Stock ticker of the filer (e.g. MSTR). Private filers have no ticker — use cik.

  • cik  optional

    SEC Central Index Key of the filer, with or without leading zeros.

  • name  optional

    Case-insensitive substring match on the filer name. Requires a Business or Professional subscription.

  • asset  optional

    Restrict to one asset: BITCOIN, ETHEREUM, SOLANA, XRP, LITECOIN, DOGECOIN, CARDANO, INJECTIVE, CANTON, STABLECOIN or UNKNOWN.

  • entity_type  optional

    OPERATING for a company holding crypto on its balance sheet, ETP for an exchange-traded product whose holdings are the fund itself, or PRIVATE for a filer with no listed ticker.

  • period  optional

    Reporting period end as YYYY-MM-DD, or latest. Defaults to the most recent period. How far back you may query depends on your subscription tier.

  • include_unverified  optional

    Include 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.

  • limit  optional

    Maximum results to return. Capped at 5 on Free, 50 on Developer, and 250 on Business and Professional.

  • offset  optional

    Number of results to skip, for pagination. Default is 0, maximum is 10000.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v1/cryptotreasury endpoint returns a JSON object with the following fields, or an error if the request is unsuccessful.

  • results

    Matching treasury positions.

  • entity_name

    Filer name as it appears in EDGAR.

  • ticker

    Stock ticker.

  • cik

    SEC Central Index Key, zero-padded to 10 digits.

  • entity_type

    OPERATING, ETP or PRIVATE.

  • asset

    Canonical asset name, for example BITCOIN.

  • units

    Coins held at the period end. Fractional holdings are returned as filed.

  • fair_value_usd

    Value of this asset position.

  • cost_usd

    Cost basis as reported.

  • entity_total_crypto_fair_value_usd

    The filer's total crypto fair value across all assets.

  • entity_holds_multiple_assets

    True when the filer reported more than one crypto asset for this period.

  • period_end

    Reporting period end as YYYY-MM-DD.

  • calendar_year

    Calendar year of the reporting period. Not the filer's fiscal year.

  • calendar_quarter

    Calendar quarter, Q1 to Q4. Not the filer's fiscal quarter.

  • accession

    SEC accession number of the source filing.

  • sec_filing_url

    Link to the source filing on EDGAR.

  • attribution

    How 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_usd and market_price_at_period_end_usd.

  • disclosure

    Data source, your redistribution rights, and a not-investment-advice notice.

Live Demo

Live demo · no API key required
Query parameters
asset
limit

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/cryptotreasury?asset=BITCOIN&limit=5
Sample response
{
"results": [
{
"entity_name": "STRATEGY INC",
"ticker": "MSTR",
"cik": "0001050446",
"entity_type": "OPERATING",
"asset": "BITCOIN",
"units": 846000,
"fair_value_usd": 49672080000,
"cost_usd": 63939306000,
"entity_total_crypto_fair_value_usd": 49672080000,
"entity_holds_multiple_assets": false,
"period_end": "2026-06-30",
"calendar_year": 2026,
"calendar_quarter": "Q2",
"accession": "0001050446-26-000044",
"sec_filing_url": "https://www.sec.gov/Archives/edgar/data/1050446/000105044626000044/0001050446-26-000044-index.htm",
"attribution": {
"asset_source": "unit_string",
"units_basis": "single_fact",
"units_facts_reconciled": 1,
"recovered_from_instance_document": false,
"quality": "consistent",
"implied_unit_price_usd": 58714.04,
"market_price_at_period_end_usd": 58632.52
}
},
{
"entity_name": "iShares Bitcoin Trust ETF",
"ticker": "IBIT",
"cik": "0001980994",
"entity_type": "ETP",
"asset": "BITCOIN",
"units": 734261,
"fair_value_usd": 43395920710,
"cost_usd": 61003144500,
"entity_total_crypto_fair_value_usd": 43395920710,
"entity_holds_multiple_assets": false,
"period_end": "2026-06-30",
"calendar_year": 2026,
"calendar_quarter": "Q2",
"accession": "0001437749-26-026004",
"sec_filing_url": "https://www.sec.gov/Archives/edgar/data/1980994/000143774926026004/0001437749-26-026004-index.htm",
"attribution": {
"asset_source": "valuation_inference",
"units_basis": "single_fact",
"units_facts_reconciled": 1,
"recovered_from_instance_document": false,
"quality": "consistent",
"implied_unit_price_usd": 59101.49,
"market_price_at_period_end_usd": 58632.52
}
}
],
"count": 2,
"disclosure": {
"source": "U.S. Securities and Exchange Commission XBRL company facts and filing instance documents (ASU 2023-08 crypto asset disclosures).",
"license": "SEC filing data is a U.S. Government work in the public domain (17 U.S.C. 105). API Ninjas grants you the right to store, redistribute and display this data, including in commercial products.",
"not_advice": "Positions are as of the filer's reported period end and may be materially stale. Not investment advice."
},
"data_last_refreshed": 1790589675,
"note": "Filings whose unit count does not reconcile with their own reported fair value are excluded. Pass include_unverified=true to see them, labelled.",
"upgrade_hint": "Free returns the 5 largest current positions. Developer adds 50 results and 8 quarters of history; Business adds full history and company-name search. https://api-ninjas.com/pricing"
}

Code Examples

curl -X GET "https://api.api-ninjas.com/v1/cryptotreasury?asset=BITCOIN&limit=5" \ -H "X-Api-Key: YOUR_API_KEY"

Frequently Asked Questions

  • 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.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • 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.
  • 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.
  • Yes — /v1/cryptotreasury returns crypto positions that companies, funds and private filers report to the SEC: units held, cost basis where reported, and a link to the source filing. Filter with asset for BITCOIN, ETHEREUM, SOLANA, XRP and others, or with entity_type to separate operating companies from exchange-traded products. Results are ranked by dollar value, since unit counts are only comparable within a single asset. Coverage is limited to SEC filers, so companies listed only outside the US are not included, and each position is as of the filer's latest quarterly report.
  • The SEC tag CryptoAssetFairValue is 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 return fair_value_usd as null and set entity_holds_multiple_assets to true, with the company-wide figure in entity_total_crypto_fair_value_usd. Repeating the entity total on each asset row would multiply the same money several times over.
  • It shows how each number was derived so you can audit it. asset_source says whether the filing named the coin or it was identified by matching the implied unit price to the period-end market close. units_basis says how overlapping unit facts were collapsed — some filers report a total alongside its components, and summing them would double-count. quality says whether the unit count reconciles with the filer's own reported fair value; filings that fail are excluded unless you pass include_unverified=true.
  • Premium subscribers can quote any cryptocurrency in a supported fiat currency by appending the three-letter fiat code to the crypto symbol in the symbol parameter (e.g. BTCEUR, ETHJPY, TRXGBP); free users are limited to crypto-quoted pairs such as ETHBTC. See pricing for fiat-quote access.
  • The current-price endpoint returns the price along with a timestamp in 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 same timestamp. Compare plan-level data access on the pricing page.
  • The premium-only /v1/cryptopricehistorical endpoint returns historical candles in OHLCV format with open, high, low, close, and volume fields; you can control granularity with the interval parameter (1m through 1d) and return up to 1000 points via limit. Historical data access requires a premium plan.
  • Use the premium-only /v1/cryptosymbols endpoint, which returns a symbols array of every available trading pair that you can then pass to the symbol parameter. For single-coin data you can also try the dedicated Bitcoin API.