{
  "markdown": "# BTCFi API\n\n**Bitcoin Intelligence API for AI Agents**\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/version-4.3.0-blue.svg)](https://github.com/aiindigo925/btcfi-api)\n\nLive at [btcfi.aiindigo.com](https://btcfi.aiindigo.com) · Built by [AI Indigo](https://aiindigo.com) · [GitHub](https://github.com/aiindigo925/btcfi-api)\n\n---\n\nBTCFi API is an agent-native Bitcoin intelligence platform providing 80+ endpoints across Bitcoin, Ethereum, Solana, Lightning Network, Runes, and Taproot Assets. Powered by x402 micropayments — pay $0.01–$0.05 per query in USDC, no API keys or subscriptions required. CoinGecko integration provides multi-currency pricing (38 fiat currencies). AI agents discover endpoints at `/llms.txt` and integrate via MCP, SDK, or raw HTTP.\n\n## Free Tier\n\n100 calls/day per IP — no signup, no API keys, just make a request:\n\n```bash\ncurl https://btcfi.aiindigo.com/api/v1/fees\n```\n\n```json\n{\n  \"fastest\": 12,\n  \"30min\": 8,\n  \"1hr\": 5,\n  \"economy\": 3,\n  \"fastestUSD\": \"$2.40\",\n  \"recommended\": \"8 sat/vB\"\n}\n```\n\n## Quick Start\n\n**AI Agents (MCP):**\n```bash\nnpx @aiindigo/btcfi-mcp\n```\n\n**SDK:**\n```bash\nnpm install @aiindigo/btcfi\n```\n\n```typescript\nimport { BTCFi } from \"@aiindigo/btcfi\";\n\nconst btcfi = new BTCFi({ network: \"base\" });\nconst fees = await btcfi.fees();\nconst risk = await btcfi.intelligence.risk(\"bc1q...\");\n```\n\n**Raw HTTP:**\n```bash\n# Free endpoint — no auth needed\ncurl https://btcfi.aiindigo.com/api/v1/mempool\n\n# Paid endpoint — requires x402 micropayment\ncurl -X GET https://btcfi.aiindigo.com/api/v1/intelligence/whales \\\n  -H \"X-Payment: <x402-payment-proof>\"\n```\n\n**OpenAPI Spec:**\n```\nhttps://btcfi.aiindigo.com/openapi.json\n```\n\n## API Reference\n\n### Core Bitcoin Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/fees` | Fee estimates (fastest, 30min, 1hr, economy) with USD values | $0.01 |\n| `GET /api/v1/mempool` | Mempool summary, tx count, size, fee histogram | $0.01 |\n| `GET /api/v1/address/{addr}` | Address balance, tx count, funded/spent stats | $0.01 |\n| `GET /api/v1/address/{addr}/utxos` | Unspent transaction outputs | $0.01 |\n| `GET /api/v1/address/{addr}/txs` | Transaction history | $0.01 |\n| `GET /api/v1/tx/{txid}` | Full transaction details | $0.01 |\n| `GET /api/v1/tx/{txid}/status` | Confirmation status | $0.01 |\n| `POST /api/v1/tx/broadcast` | Broadcast signed transaction | $0.05 |\n| `GET /api/v1/block/latest` | Latest blocks with details | $0.01 |\n| `GET /api/v1/block/{id}` | Block by height or hash | $0.01 |\n\n### Intelligence Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/intelligence/fees` | AI fee prediction (1h, 6h, 24h windows) | $0.02 |\n| `GET /api/v1/intelligence/whales` | Large transaction detection | $0.02 |\n| `GET /api/v1/intelligence/risk/{addr}` | Address risk scoring | $0.02 |\n| `GET /api/v1/intelligence/network` | Hashrate, difficulty, congestion | $0.02 |\n| `GET /api/v1/intelligence/consolidate/{addr}` | UTXO consolidation advice | $0.02 |\n| `GET /api/v1/intelligence/mvrv` | MVRV ratio | $0.02 |\n| `GET /api/v1/intelligence/sopr` | SOPR (Spent Output Profit Ratio) | $0.02 |\n| `GET /api/v1/intelligence/nupl` | NUPL (Net Unrealized Profit/Loss) | $0.02 |\n| `GET /api/v1/intelligence/hodl-waves` | HODL wave distribution | $0.02 |\n\n### Security Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/security/threat/{addr}` | YARA-pattern threat analysis (8 patterns) | $0.02 |\n\n### ZK Proof Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `POST /api/v1/zk/balance-proof` | Prove balance ≥ threshold | $0.03 |\n| `POST /api/v1/zk/age-proof` | Prove UTXO age ≥ N blocks | $0.03 |\n| `POST /api/v1/zk/membership` | Prove set membership | $0.03 |\n| `POST /api/v1/zk/verify` | Verify any ZK proof | $0.01 |\n\n### Solv Protocol Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/solv/reserves` | SolvBTC supply, backing ratio, TVL | $0.02 |\n| `GET /api/v1/solv/yield` | xSolvBTC APY, yield strategies | $0.02 |\n| `GET /api/v1/solv/liquidity` | Cross-chain SolvBTC distribution | $0.02 |\n| `GET /api/v1/solv/risk` | Multi-factor risk assessment | $0.02 |\n\n### Cross-Chain Endpoints\n\n**Ethereum ($0.01):**\n| Endpoint | Description |\n|----------|-------------|\n| `GET /api/v1/eth/gas` | ETH gas prices |\n| `GET /api/v1/eth/address/{addr}` | ETH address balance |\n| `GET /api/v1/eth/tx/{hash}` | ETH transaction details |\n\n**Solana ($0.01):**\n| Endpoint | Description |\n|----------|-------------|\n| `GET /api/v1/sol/fees` | SOL priority fees |\n| `GET /api/v1/sol/address/{addr}` | SOL address balance |\n\n### Runes Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/runes` | List all Bitcoin Runes tokens | $0.02 |\n| `GET /api/v1/runes/trending` | Trending Runes by 24h activity | $0.02 |\n| `GET /api/v1/runes/{ticker}` | Runes token details | $0.02 |\n| `GET /api/v1/runes/{ticker}/holders` | Holder distribution | $0.02 |\n| `GET /api/v1/runes/{ticker}/transfers` | Recent transfers | $0.02 |\n\n### Taproot Assets Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/taproot/assets/{addr}` | Taproot Assets held by address | $0.02 |\n| `GET /api/v1/taproot/assets/{addr}/{assetId}` | Taproot Asset details | $0.02 |\n\n### Lightning Network Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/lightning/node/{pubkey}` | Lightning node info | $0.02 |\n| `GET /api/v1/lightning/channels/{chanId}` | Channel details | $0.02 |\n| `GET /api/v1/lightning/routing-fee` | Routing fee estimate | $0.02 |\n| `GET /api/v1/intelligence/lightning` | Lightning network intelligence | $0.02 |\n\n### Portfolio Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/portfolio` | List portfolios | $0.01 |\n| `GET /api/v1/portfolio/{userId}` | Get user portfolio | $0.01 |\n| `GET /api/v1/portfolio/{userId}/analytics` | Portfolio analytics | $0.02 |\n| `GET /api/v1/intelligence/portfolio/{addr}` | Address portfolio analysis | $0.02 |\n\n### Alerts Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/alerts` | List alert rules | Free |\n| `GET /api/v1/alerts/rules` | Manage alert rules | Free |\n| `DELETE /api/v1/alerts/rules/{id}` | Delete alert rule | Free |\n| `GET /api/v1/alerts/history` | Alert trigger history | Free |\n| `POST /api/v1/alerts/evaluate` | Evaluate alert conditions | Free |\n\n### Price Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/price` | BTC price (CoinGecko: 38 fiat currencies) | Free |\n\n### Real-Time Streams\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/v1/stream` | SSE: new blocks, fee changes, mempool surges | $0.01 |\n| `GET /api/v1/stream/whales` | SSE: whale transaction alerts (`?min=100` BTC) | $0.01 |\n\n### Agent Integration\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/mcp` | MCP server info and tools | Free |\n| `GET /llms.txt` | AI agent discovery file | Free |\n| `GET /api/v1/agent-skills` | Agent skill registry | Free |\n\n### System Endpoints\n\n| Endpoint | Description | Price |\n|----------|-------------|-------|\n| `GET /api/health` | System health check | Free |\n| `GET /api/v1/staking/status` | Staking tier and rate limit status | Free |\n\n## Pricing\n\n| Category | Price (USDC) |\n|----------|-------------|\n| Core Bitcoin (fees, mempool, address, tx, block) | $0.01 |\n| Intelligence (whales, risk, MVRV, SOPR, NUPL, HODL waves, cluster, graph) | $0.02 |\n| Security (threat analysis) | $0.02 |\n| Solv Protocol (reserves, yield, liquidity, risk) | $0.02 |\n| Runes (tokens, holders, transfers, trending) | $0.02 |\n| Taproot Assets (asset list, asset details) | $0.02 |\n| Lightning Network (nodes, channels, routing fees) | $0.02 |\n| Portfolio (addresses, analytics) | $0.01–$0.02 |\n| ZK Proofs (balance, age, membership) | $0.03 |\n| Transaction broadcast | $0.05 |\n| Ethereum / Solana | $0.01 |\n| Streams (SSE) | $0.01 |\n| Price (CoinGecko multi-currency) | Free |\n| Alerts (rules, history, evaluate) | Free |\n| System (health, status) | Free |\n| Agent Discovery (/llms.txt, /api/mcp) | Free |\n\n**Free Tier:** 100 calls/day per IP, no signup required.\n\n## Authentication\n\nBTCFi API uses **x402 micropayments** — no API keys, no OAuth, no subscriptions.\n\n1. **Free endpoints** — No authentication. Just make a request.\n2. **Paid endpoints** — Include an `X-Payment` header with a USDC micropayment proof.\n3. **Payment networks:**\n   - **Base** (EVM L2) — Coinbase facilitator, zero fees, ERC-3009\n   - **Solana** — NLx402 by PCEF (nonprofit), zero fees\n\n**Request signing** (optional, for higher rate limits):\n- Wallet-based signing with Ed25519 (Solana) or secp256k1 (EVM)\n- Headers: `X-Signature`, `X-Nonce`, `X-Signer`, `X-Timestamp`\n\n## Free for Humans\n\n**Completely free — no signup, no API keys, no secrets.** This is a PUBLIC repository. Just open Telegram:\n- **[@BTC_Fi_Bot](https://t.me/BTC_Fi_Bot)** — 38 commands + inline mode:\n  `/start` `/help` `/price` `/whale` `/fear` `/hash` `/mempool` `/halving` `/etf` `/funding` `/dominance` `/mining` `/lightning` `/signal` `/l2` `/block` `/mvrv` `/sopr` `/nupl` `/entity` `/portfolio` `/staking` `/threat` `/eth_addr` `/sol_addr` `/digest` `/alerts` `/watch` `/unwatch` `/watchlist` `/runes` `/ordinals` `/taproot` `/cluster` `/graph` `/batch` `/webhooks` `/premium`\n- **[@BTCFi_Whales](https://t.me/BTCFi_Whales)** — Real-time whale transaction alerts, auto-posted every 15 min\n- **[Web Dashboard](https://btcfi.aiindigo.com/dashboard)** — Live BTC price, fees, mempool, address lookup, whale watch\n\n## Security\n\n- Wallet-based request signing (Ed25519 + secp256k1)\n- Encrypted responses (Curve25519 + XSalsa20-Poly1305)\n- Zero-knowledge proofs (Groth16)\n- 8 YARA-style threat detection patterns\n- Nonce replay protection\n- PEAC Protocol cryptographic receipts\n- Tiered rate limiting (free: 100/min, signed: 500/min, paid: unlimited)\n\nReport vulnerabilities: **security@aiindigo.com**\n\n## Self-Hosted\n\nRun the API locally for development or private deployment:\n\n```bash\ngit clone https://github.com/aiindigo925/btcfi-api.git\ncd btcfi-api\nnpm install\ncp .env.example .env    # Configure environment variables\nnpm run dev              # Start on port 3001\n```\n\nRequired environment variables:\n- `UPSTASH_REDIS_REST_URL` — Redis connection for caching\n- `UPSTASH_REDIS_REST_TOKEN` — Redis auth token\n- `X402_NETWORK` — Payment network (base or solana)\n- `X402_FACILITATOR_URL` — x402 facilitator endpoint\n\n## Documentation\n\n| Doc | Description |\n|-----|-------------|\n| [docs/ROADMAP.md](docs/ROADMAP.md) | Project history and future plans |\n| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | System design and endpoint reference |\n| [docs/SECURITY.md](docs/SECURITY.md) | Security model and features |\n| [docs/CHANGELOG.md](docs/CHANGELOG.md) | Version history |\n\n## Packages & Distribution\n\n| Package | Description |\n|---------|-------------|\n| [`@aiindigo/btcfi`](https://www.npmjs.com/package/@aiindigo/btcfi) | TypeScript SDK — 28 methods |\n| [`@aiindigo/btcfi-mcp`](https://www.npmjs.com/package/@aiindigo/btcfi-mcp) | MCP Server — 45 tools for Claude, ChatGPT, Gemini |\n| [MCP Registry](https://registry.modelcontextprotocol.io) | `io.github.aiindigo925/btcfi` |\n| [Glama](https://glama.ai/mcp/servers) | Indexed — searchable MCP directory |\n| [@BTC_Fi_Bot](https://t.me/BTC_Fi_Bot) | Telegram bot — 28 commands + inline mode |\n\n## Contributing\n\nWe welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\n[MIT](LICENSE) — Copyright © 2026 [AI Indigo](https://aiindigo.com)\n\n---\n\n*No token. No API keys. Just Bitcoin data. Ship > talk.* 🚀\n",
  "bytes": 11965,
  "sha": "aecbf3856bb8e6bcdcaa763a8934df94d2f2a291b21bf42d31efdf386755c1de",
  "repo_slug": "aiindigo925/btcfi-api",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_aiindigo925_btcfi_51b2962d/readme"
}