> ## Documentation Index
> Fetch the complete documentation index at: https://coinstats.app/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](/docs/authentication) to generate one. Responses are JSON. Errors follow a shared shape documented in [Error Codes](/docs/errors).

## Sections

<CardGroup cols={2}>
  <Card title="Market Data" icon="coins" href="/docs/openapi/get-coins">
    Coin prices, charts, tickers, exchange rates, and fiat currencies. Plus market
    insights, news, NFT collections, and token risk scores.
  </Card>

  <Card title="Wallets & Portfolios" icon="wallet" href="/docs/openapi/get-blockchains">
    Balances, transactions, P/L, and DeFi positions for any address across 120+
    chains. Exchange connections and user portfolio analytics.
  </Card>

  <Card title="Prediction Markets" icon="chart-line" href="/docs/openapi/list-markets">
    Polymarket markets, events, order books, price history, and trader analytics.
  </Card>

  <Card title="Account" icon="gauge" href="/docs/openapi/get-credit-usage">
    Your remaining credits and the current API status.
  </Card>
</CardGroup>

## Before you start

<CardGroup cols={3}>
  <Card title="Authentication" icon="key" href="/docs/authentication">
    Generate a key and send it on every request.
  </Card>

  <Card title="Rate Limits" icon="gauge-high" href="/docs/rate-limits">
    Per-plan request ceilings and what a `429` means.
  </Card>

  <Card title="Credit Multipliers" icon="calculator" href="/docs/multipliers">
    How much each endpoint costs against your quota.
  </Card>
</CardGroup>

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