# Bitcoin API The ultimate Bitcoin API for developers, vibe coders, and AI agents. Access real-time and historical Bitcoin market data via REST and WebSocket. ## Core Features - **Real-time Market Data**: Live prices, trades, and order book updates from major exchanges. - **Historical Klines**: OHLCV candles for backtesting and analysis. - **On-chain Data**: Real-time mempool tracking and historical block/transaction lookups. - **Developer Experience**: Intuitive REST API, strictly typed SDKs, and comprehensive documentation. - **AI-First**: Built-in MCP (Model Context Protocol) server for effortless integration with AI agents. ## Authentication By default, public endpoints are rate-limited. To increase limits, obtain an API key from your profile dashboard on the website and include it in your requests. The API supports three authentication methods: - **Header (Standard for REST)**: Pass your key in the `x-api-key` custom header. - **Bearer (Standard for REST)**: Pass your key as a Bearer token in the `Authorization` header: `Authorization: Bearer YOUR_API_KEY`. - **Query Parameter (Required for WebSockets)**: Pass your key as a query parameter `?apiKey=YOUR_API_KEY`. This method is intended primarily for WebSocket connections, as WebSockets do not support custom HTTP headers during connection initialization. ## Key Links - [Documentation](https://bitcoin-api.net/docs) - [API Reference](https://bitcoin-api.net/docs/api/get-current-price) - [Pricing](https://bitcoin-api.net/pricing) - [MCP Setup](https://bitcoin-api.net/docs/integrations/mcp) - [GitHub](https://github.com/bitcoin-api-net) ## Pricing We offer a generous Free tier for public endpoints, per-endpoint Rate Boosts for scaling, and Custom Enterprise solutions. See [pricing details](https://bitcoin-api.net/pricing.md) for machine-readable data.