> ## Documentation Index
> Fetch the complete documentation index at: https://coinstats.app/api-docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Every CoinStats API endpoint, grouped by what it does. Base URL, authentication, and where to find each section.

Every endpoint lives under a single base URL and one API key. Pick a section below, or expand a folder in the sidebar to browse endpoints directly.

```bash theme={null}
curl "https://api.coinstats.app/v1/coins?limit=5" \
  -H "X-API-KEY: YOUR_API_KEY"
```

Every request needs an `X-API-KEY` header — see [Authentication](https://coinstats.app/api-docs/api-docs/authentication.md) to generate one. Responses are JSON. Errors follow a shared shape documented in [Error Codes](https://coinstats.app/api-docs/api-docs/errors.md).

## Sections

> **[Market Data](https://coinstats.app/api-docs/api-docs/openapi/get-coins.md)**
>
> Coin prices, charts, tickers, exchange rates, and fiat currencies. Plus market
> insights, news, NFT collections, and token risk scores.

> **[Wallets & Portfolios](https://coinstats.app/api-docs/api-docs/openapi/get-blockchains.md)**
>
> Balances, transactions, P/L, and DeFi positions for any address across 120+
> chains. Exchange connections and user portfolio analytics.

> **[Prediction Markets](https://coinstats.app/api-docs/api-docs/openapi/list-markets.md)**
>
> Polymarket markets, events, order books, price history, and trader analytics.

> **[Account](https://coinstats.app/api-docs/api-docs/openapi/get-credit-usage.md)**
>
> Your remaining credits and the current API status.

## Before you start

> **[Authentication](https://coinstats.app/api-docs/api-docs/authentication.md)**
>
> Generate a key and send it on every request.

> **[Rate Limits](https://coinstats.app/api-docs/api-docs/rate-limits.md)**
>
> Per-plan request ceilings and what a `429` means.

> **[Credit Multipliers](https://coinstats.app/api-docs/api-docs/multipliers.md)**
>
> How much each endpoint costs against your quota.

> [!TIP]
>
> Building an AI agent? The [MCP server](https://coinstats.app/api-docs/api-docs/mcp/connecting.md) exposes this same data as
> tools, and [x402](https://coinstats.app/api-docs/api-docs/ai-agents/x402.md) lets you pay per request with no account at all.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.