canonical: https://jentic.com/apis/coinapi.io/coinapi

# CoinAPI Market Data REST API

Jentic publishes the only available OpenAPI specification for CoinAPI Market Data REST API, keeping it validated and agent-ready. CoinAPI aggregates real-time and historical cryptocurrency market data from hundreds of exchanges into a single normalized REST interface. It exposes assets, exchanges, symbols, OHLCV candles, trades, quotes, order books, and exchange-rate conversions across spot and derivative markets. Quants, trading bots, and analytics platforms use it to access uniform market data without integrating each exchange separately.

## For AI agents

Query unified cryptocurrency market data - assets, exchanges, OHLCV, trades, quotes, and conversion rates - across hundreds of crypto venues from a single API.

## Scope

Does not handle order placement, wallet management, or on-chain transactions - use for cryptocurrency market data retrieval only.

## Capabilities

- Convert any base asset to any quote asset using current or historical exchange rates
- Retrieve OHLCV candles for crypto pairs across multiple time periods and date ranges
- List supported exchanges and inspect trading symbols across spot and derivative markets
- Pull recent trades and order book snapshots for a chosen symbol on a specific exchange
- Browse aggregated metrics across assets, exchanges, and symbols
- Look up asset metadata and icons for cryptocurrencies and fiat currencies

## Use cases

### Unified Crypto Market Data Feed

Pull normalized real-time and historical data from hundreds of cryptocurrency exchanges through a single REST interface. CoinAPI standardizes asset identifiers, exchange ids, and symbol formats so trading systems and analytics dashboards do not need per-exchange adapters. Integration takes a few hours instead of weeks of per-exchange work.

Example prompt: Call GET /v1/exchangerate/BTC/USD and return the current rate, timestamp, and source

### Backtesting Crypto Trading Strategies

Retrieve historical OHLCV candles and exchange-rate history to backtest algorithmic trading strategies. The history endpoints support multiple time periods and date ranges, returning consistently formatted data across exchanges. Useful for quant researchers and trading firms validating models before deploying capital.

Example prompt: Fetch hourly OHLCV history for ETH-USD between two given timestamps via GET /v1/exchangerate/ETH/USD/history and return the candle series

### Portfolio Valuation in Fiat

Convert holdings of arbitrary crypto assets into a chosen fiat currency using current exchange rates. The exchangerate endpoints accept any base and quote pair and return a normalized rate sourced from aggregated venues. Suitable for portfolio trackers, accounting systems, and tax reporting tools.

Example prompt: For each holding in a portfolio, call GET /v1/exchangerate/{asset_id_base}/USD and sum the converted values to compute total portfolio value in USD

### AI Trading Agent via Jentic

Build an AI trading agent that retrieves live crypto prices, historical context, and order book depth through Jentic. The agent expresses intents in natural language; Jentic resolves the right CoinAPI endpoint and executes the call with stored credentials. Decisions and analysis stay in the agent layer; data retrieval is one hop.

Example prompt: Through Jentic, fetch the latest BTC-USD rate and the last 24 hourly candles, then summarise the short-term trend

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v1/assets | List all supported assets |
| GET | /v1/exchanges | List supported cryptocurrency exchanges |
| GET | /v1/exchangerate/{asset_id_base}/{asset_id_quote} | Get current exchange rate between two assets |
| GET | /v1/exchangerate/{asset_id_base}/{asset_id_quote}/history | Retrieve historical exchange rates between two assets |
| GET | /v1/metrics/asset/listing | List metrics available for assets |

## Key resources

- **Assets** — List and look up cryptocurrency and fiat assets with metadata and icons
- **Exchanges** — List and inspect supported cryptocurrency exchanges
- **Symbols** — Discover trading symbols across exchanges, spot and derivatives
- **Exchange Rates** — Get current and historical conversion rates between any two assets
- **OHLCV** — Retrieve candle data across multiple time periods
- **Trades** — Access historical and latest executed trades for a symbol
- **Quotes and Order Books** — Retrieve top-of-book quotes and full order book snapshots
- **Metrics** — Browse aggregated metrics across assets, exchanges, and symbols

## Why Jentic

- **Setup:** Wiring CoinAPI by hand means managing its X-CoinAPI-Key header auth against the rest.coinapi.io host and handling rate limits and pagination across fifty market-data endpoints yourself. Through Jentic you install once, import CoinAPI from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** CoinAPI market data is read-only, so you scope by choosing the operations the agent may call: limit it to what it needs, such as fetching an exchange rate or listing assets, and heavier calls like full history pulls are not included unless you add them.
- **Credential handling:** Your CoinAPI key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get the current BTC to USD rate' or 'list supported exchanges', and Jentic returns the matching CoinAPI operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **CoinGecko API** — Free crypto market data with broader coverage of altcoins and DeFi tokens
- **CoinMarketCap API** — Crypto market cap, rankings, and listings across thousands of assets
- **CoinCap API** — Free real-time crypto pricing data with simpler endpoint surface

## FAQ

### Why is there no official OpenAPI spec for CoinAPI Market Data REST API?

CoinAPI does not publish an OpenAPI specification on its own developer portal. Jentic generates and maintains this spec so that AI agents and developers can call CoinAPI Market Data REST API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the CoinAPI Market Data REST API use?

CoinAPI uses an API key sent in the X-CoinAPI-Key header (a JWT alternative is also supported). When called through Jentic, the key is stored in your encrypted Jentic One instance and the agent receives a scoped execution token rather than the raw secret.

### Can I retrieve historical OHLCV candles with this API?

Yes. Use GET /v1/exchangerate/{asset_id_base}/{asset_id_quote}/history with period_id and time_start/time_end parameters to retrieve historical candles for any supported pair. Period definitions are listed at GET /v1/exchangerate/history/periods.

### What are the rate limits for the CoinAPI Market Data REST API?

CoinAPI enforces request and credit limits per subscription tier - free, startup, streamer, and enterprise. Limits are headers-driven (x-ratelimit-remaining and x-ratelimit-reset) and the OpenAPI spec does not declare them; check the tier attached to your API key for exact thresholds.

### How do I get a current crypto exchange rate through Jentic?

Install the SDK with pip install jentic, then search Jentic for get current crypto exchange rate, load the schema for GET /v1/exchangerate/{asset_id_base}/{asset_id_quote}, and execute the call with your asset pair (for example BTC and USD).

### Does CoinAPI support derivative and spot markets in the same endpoint set?

Yes. Symbols, trades, quotes, and OHLCV endpoints all expose spot and derivative instruments - symbol metadata indicates the type. Filter by symbol_id_filter or exchange_id to scope queries to the markets you care about.

### Can I limit what my agent is allowed to do with the CoinAPI Market Data REST API?

Yes. Because you run Jentic One yourself, your own rules decide which CoinAPI operations and credentials the agent may use. Since CoinAPI market data is read-only, you scope by choosing the specific calls the agent can make, such as fetching an exchange rate through GET /v1/exchangerate/{asset_id_base}/{asset_id_quote} or listing assets and exchanges, while leaving heavier operations like full OHLCV history pulls out unless you deliberately add them. Your API key stays in your Jentic One instance and is injected only for the operations you permit.
