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

# CoinStats Crypto API

> Best free crypto API for prices, wallet data, and DeFi. 120+ blockchains, 200+ exchanges, 10,000+ DeFi protocols, and MCP server.

export const title_0 = undefined

export const cards_0 = undefined

<Frame>
  ![The All-in-One Crypto API](https://static.coinstats.app/z/best%20crypto%20api_2.png.png)
</Frame>

The all-in-one crypto API. Market data, wallets, DeFi, portfolio analytics, and token security. Cheaper per call than specialized providers, and one key replaces your entire stack.

**CoinStats API = market data + wallets + DeFi + portfolio analytics + token security**

Most crypto projects stitch together four or five providers. An RPC node for wallet balances. A market data feed for prices. A DeFi aggregator for protocol positions. A transaction parser for history. A scanner for token risks.

CoinStats API replaces that entire stack. One key. One schema. And it costs less call by call. **Market data is cheaper than competing price APIs.** Wallet and DeFi data costs less than dedicated wallet APIs. You save twice. Once by consolidating vendors, again on every call.

Wallets are the real differentiator. Most providers give you prices OR wallet data. CoinStats gives you both, tied together in one schema. Pass any address. **Get balances, full transaction history, and DeFi positions. Across 120+ chains, through one API.**

Bitcoin support covers xpub, ypub, and zpub keys. HD wallets resolve automatically. DeFi positions across 10,000+ protocols are auto-detected per wallet. Staking, lending, LP positions, and yield. No manual setup, no protocol-by-protocol integrations.

CoinStats API is the best fit for most crypto use cases. Portfolio trackers, trading bots, tax tools, wallet explorers, AI assistants, embedded dashboards. One key, one integration. Wallet balances, transactions, DeFi positions, prices, tickers, portfolio analytics, and token risk scores. All across every major blockchain.

The platform behind this API powers the CoinStats app. Over 1M people use it every month. The same data infrastructure is available to any developer here. It also includes a dedicated [MCP Server](/mcp/connecting) for AI agents and LLM-powered applications, so your code and your AI tools query the same crypto data through one provider.

## What You Get

<CardGroup cols={2}>
  <Card title="120+ Blockchains" icon="link">
    Solana, Ethereum, all EVM chains, Bitcoin, Cosmos, and 110+ more. One endpoint, one schema.
  </Card>

  <Card title="200+ Exchanges" icon="chart-bar">
    Market data from Binance, Coinbase, Hyperliquid, and 200+ CEXs and DEXs.
  </Card>

  <Card title="10,000+ DeFi Protocols" icon="cubes">
    Staking, lending, LP positions, and yield data. Auto-detected, no manual setup.
  </Card>

  <Card title="100,000+ Coins" icon="coins">
    Real-time prices, market caps, volumes, supply data, and historical charts.
  </Card>

  <Card title="MCP Server for AI Agents" icon="microchip">
    Model Context Protocol support for Claude, Cursor, VS Code, and other AI tools.
  </Card>

  <Card title="Free Tier with Credit-Based Pricing" icon="gem">
    Start free. Scale with pricing based on endpoint complexity, not flat limits.
  </Card>
</CardGroup>

## Data You Get Through a Single Integration

Most crypto projects need data from multiple sources: an RPC node for on-chain balances, a market data provider for prices, a DeFi aggregator for protocol positions, and yet another service for transaction parsing. CoinStats API consolidates all of these into a single endpoint, which is why it fits most crypto use cases out of the box.

<CardGroup cols={2}>
  <Card title="Market Data" icon="chart-line">
    Real-time prices, market caps, volumes, and OHLCV charts for 100,000+ coins.
  </Card>

  <Card title="Wallet Balances & Transactions" icon="wallet">
    Token holdings and transaction histories for any address across 120+ blockchains.
  </Card>

  <Card title="DeFi Positions" icon="layer-group">
    Staking, lending, and LP positions across 10,000+ protocols. Auto-detected per wallet.
  </Card>

  <Card title="Exchange & Ticker Data" icon="arrow-right-arrow-left">
    Tickers and trading pairs from 200+ exchanges with consistent response formatting.
  </Card>

  <Card title="Portfolio Analytics" icon="chart-pie">
    Unified portfolio view with profit/loss, performance charts, and risk scores.
  </Card>

  <Card title="News & Market Sentiment" icon="newspaper">
    Aggregated crypto news, trending topics, and sentiment data from trusted sources.
  </Card>

  <Card title="Token Risks" icon="shield-halved">
    Smart-contract risk analysis for any token — honeypots, malicious mint/blacklist, hidden fees, upgradeable proxies. Powered by Hexens.
  </Card>
</CardGroup>

## Built for Developers and AI Agents

CoinStats API is a REST API with JSON responses, standard HTTP status codes, and API key authentication. If you've integrated any REST API before, you already know how this works.

For AI-native applications, [the CoinStats MCP Server](/mcp/connecting) exposes the same data through the Model Context Protocol, allowing LLMs and AI agents to query crypto data directly. This works with Claude, Cursor, Claude Code, VS Code (via Cline or Continue), and N8N, among other MCP clients.

<CardGroup cols={2}>
  <Card title="REST API" icon="code">
    JSON responses, API key auth, standard HTTP status codes. Works with any language.
  </Card>

  <Card title="MCP Server" icon="microchip">
    20+ crypto data tools for AI assistants via npx. Prices, wallets, DeFi, and more.
  </Card>
</CardGroup>

## Token Risks

Before a user buys or a bot routes into a token, you can screen the contract for the patterns scammers actually use. The [Token Risks endpoint](/openapi/token-risks) returns an overall risk score plus a severity-ranked list of findings with plain-English explanations for any token — queried by CoinStats `coinId` or a raw `contractAddress` + `chain`.

It surfaces the threats that drain wallets: honeypots, centralized mint/burn, blacklists and whitelists, pausable or blockable transfers, hidden fees, upgradeable (proxy) contracts, unrenounced ownership, and balance manipulation.

### How It Works

Token Risks is powered by [Hexens](https://hexens.io) and its **Glider** engine. Rather than pattern-matching bytecode, Glider reasons over the contract's functions, execution paths, and dependencies to catch logic-level threats. CoinStats maps every finding to a severity (`critical` → `minor`) and a human-readable note your UI can render directly, with coverage across EVM chains (Ethereum, BNB Chain, Polygon, Base, Arbitrum, Optimism, Avalanche, and more).

### Why It's Better Than the Alternatives

Most token scanners are heuristic flag-lists: they miss logic-level scams or bury you in false positives. Per the [Glider benchmark](https://coinstats.app/blog/risks/), Glider caught every critical threat with no false positives, while competing tools missed between 40% and 75% of the same risks. And because Token Risks runs on the same platform as prices, wallets, and portfolios, it's one API key and one integration — no separate security vendor to bolt on.

<CardGroup cols={2}>
  <Card title="Token Risks API Reference" icon="shield-halved" href="/openapi/token-risks">
    Query by coinId or contractAddress + chain. Score, severity-ranked findings, plain-English notes.
  </Card>

  <Card title="How CoinStats scores token risk" icon="arrow-up-right-from-square" href="https://coinstats.app/blog/risks/">
    The Hexens Glider approach and benchmark behind the Token Risks API.
  </Card>
</CardGroup>

## What You Can Build

CoinStats API fits a wide range of crypto applications. Below are the most common use cases developers build with it, along with the endpoints and data types involved.

### Portfolio Trackers

A portfolio tracker needs to pull holdings from multiple wallets and exchanges, calculate current values, and show profit/loss over time. With CoinStats API, you can query wallet balances across 120+ blockchains through [the Wallet endpoints](/wallet/solana), get real-time pricing for every token from the Market Data endpoints, and aggregate everything into a single portfolio view using [the Portfolio endpoints](/portfolio/portfolio-coins).

The API handles the hard parts: normalizing token balances across different chains, detecting DeFi positions automatically across 10,000+ protocols, and calculating PnL with average buy/sell prices. You get a unified response whether the user holds SOL on Solana, ETH on Arbitrum, or BTC via an xpub key.

### Trading Bots and Signal Engines

Trading systems need fast, reliable market data across multiple exchanges. CoinStats API aggregates pricing from 200+ centralized and decentralized exchanges, including Binance, Coinbase, and Hyperliquid. You can pull real-time tickers, compare prices across exchanges for arbitrage detection, and access historical OHLCV chart data for backtesting.

The credit-based pricing model works well here: basic market data calls cost 1-2 credits each, so high-frequency polling stays cost-effective. Combine price endpoints with wallet balance checks to build systems that monitor positions and execute based on market conditions.

### Tax and Accounting Tools

Crypto tax reporting requires complete transaction histories across every chain a user has touched. CoinStats API provides full transaction data for any wallet address, including token transfers, DeFi interactions, staking rewards, and LP activity. [The Bitcoin endpoint](/wallet/bitcoin) supports xpub/ypub/zpub keys to capture all derived addresses from HD wallets.

Each transaction includes timestamps, amounts, token identifiers, and USD values at the time of the transaction. This gives tax tools the raw data needed for cost-basis calculations (FIFO, LIFO, specific identification) without requiring users to manually export CSVs from each chain.

### Multi-Chain Wallet Explorers

Building a wallet explorer that works across multiple blockchains normally requires integrating a separate data source for each chain. CoinStats API gives you a single endpoint that accepts any wallet address and returns balances, token holdings, transaction history, and DeFi positions regardless of the underlying chain.

The API supports [Solana](/wallet/solana), [Ethereum and all EVM chains](/wallet/ethereum-evm) (Polygon, Arbitrum, Optimism, Base, BSC, Avalanche, Fantom, and more), [Bitcoin](/wallet/bitcoin) (including Lightning Network), and [dozens of other networks](/wallet/other-chains): Cardano, Tron, Cosmos, Polkadot, Kusama, Near, Algorand, Stellar, Ripple, Litecoin, Dogecoin, Bitcoin Cash, Hedera, VeChain, StarkNet, zkSync, Polygon zkEVM, Immutable X, Monero, Zcash, and Dash, among others. One integration covers them all.

### AI Crypto Assistants

[The CoinStats MCP Server](/mcp/connecting) lets AI agents query crypto data the same way a developer would use the REST API. Instead of writing custom API calls, your AI assistant connects to the MCP Server and gets access to 20+ tools for looking up prices, checking wallet balances, analyzing portfolios, fetching news, and more.

This works with Claude, Cursor, Claude Code, VS Code (via Cline or Continue), and N8N. Any application that supports the Model Context Protocol can connect to CoinStats data. The MCP Server is useful for building chatbots, copilot features, automated research agents, and any product where an LLM needs structured crypto data.

### Embedded Widgets and Dashboards

If you're embedding crypto data into an existing application (a fintech dashboard, a mobile wallet, a news platform), CoinStats API provides the data layer. Pull live price tickers for any coin, display portfolio summaries for connected wallets, show trending news, or build chain-specific analytics views.

The API returns clean JSON that maps directly to UI components. Market data endpoints cover 100,000+ coins with real-time prices, market caps, volumes, and historical charts. All data comes from a single API key with consistent response formatting, so you don't need to normalize data from multiple providers before rendering.

## Who Uses CoinStats API

CoinStats API is built on the same data infrastructure that powers the CoinStats app, used by over 1M people every month. Developers integrate the API into portfolio apps, trading platforms, DeFi dashboards, tax tools, research products, and AI agents. The free tier lets you start building immediately, and credit-based pricing scales with actual usage rather than locking you into a fixed plan.

Whether you're a solo developer shipping a side project, a startup building a crypto product, or an enterprise team adding crypto data to an existing platform, the API covers the same data in the same way. No separate enterprise tier, no feature gates. The data you get on the free plan is the same data available on paid plans, just with higher credit limits.

## Get Started

<CardGroup cols={3}>
  <Card title="Authentication" icon="key" href="/authentication">
    Get your API key from the dashboard and make your first request in minutes.
  </Card>

  <Card title="Plans & Pricing" icon="gem" href="https://openapi.coinstats.app/pricing">
    Free tier included. Upgrade when you need higher credit limits.
  </Card>

  <Card title="API Reference" icon="code" href="/openapi/get-coins">
    Explore every endpoint with request and response examples.
  </Card>
</CardGroup>

<Frame>
  ![Coinstats](https://static.coinstats.app/z/best%20crypto%20api_coinstats%20api_2.png)
</Frame>

## {title_0 || "Support"}

{cards_0 ? (
<CardGroup cols={2}>
<Card title="Support Documentation" icon="question" href="https://help.coinstats.app/en/articles/12002063">
  Check our comprehensive help center
</Card>

<Card title="Telegram Support" icon="telegram" href="https://t.me/+JPUMD1QAMTNmNGQy">
  Join our API support channel for real-time help
</Card>

 <Card title="Email Support" icon="telegram" href="mailto:api.support@coinstats.app">
  You can reach us directly at api.support@coinstats.app
</Card>
</CardGroup>
) : (
  <ul>
      <li><strong>Documentation</strong>: This site contains comprehensive API documentation</li>
      <li><strong>Telegram Chat</strong>: For quick help and to connect with other developers, join our <a href="https://t.me/+JPUMD1QAMTNmNGQy">API Support Telegram group</a></li>
      <li><strong>Email Support</strong>: You can reach us directly at <a href="mailto:api.support@coinstats.app"><strong><u>api.support@coinstats.app</u></strong></a> for personalized assistance.</li>
  </ul>
)}
