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:

  • /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, while free users only have access to 15-minute delayed data.

(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


/v1/cryptoprice GET

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, while free users only have access to 15-minute delayed data. 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

  • symbol  required

    Cryptocurrency symbol (e.g. LTCBTC). 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

A JSON object with the following fields or an error if the request is unsuccessful.

  • symbol

    The cryptocurrency trading pair symbol (e.g. LTCBTC).

  • price

    The current price of the cryptocurrency pair.

  • timestamp

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

Sample Request Live Demo!

symbol

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=LTCBTC

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    symbol:"LTCBTC",
    price:"0.00381400",
    timestamp:1637809196
}

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.


/v1/cryptopricehistorical GET 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 descending order (most recent first).


Parameters

  • symbol  required

    Cryptocurrency symbol (e.g. LTCBTC). Use the same values as the symbol parameter in /v1/cryptoprice.

  • interval  optional

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

  • 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

A JSON object 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.

Sample Request Live Demo!

symbol
interval
start
end
limit

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=LTCBTC&interval=1h&limit=10

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      open:"0.00381100",
      high:"0.00381100",
      low:"0.00380100",
      close:"0.00380900",
      volume:"6.41000000",
      close_time:1637812799999,
      timestamp:1637812799,
      price:"0.00380900"
    }
]

/v1/cryptosymbols GET 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

A JSON object with the following fields or an error if the request is unsuccessful.

  • symbols  array

    An 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/cryptosymbols

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    symbols:[
      "ETHBTC",
      "LTCBTC",
      "..."
    ]
}

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.

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.
  • 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 LTCBTC. See pricing for fiat-quote access.
  • The current-price endpoint returns the price along with a timestamp in Unix seconds, but premium members receive live prices while free users get 15-minute delayed data. 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.