Blockchain

Finance API · Bitcoin & crypto data · Blockchain stats · No auth

TL;DR

The Blockchain.info API provides public access to Bitcoin blockchain data — current market price, transaction volume, mempool size, block information, network hashrate, and difficulty. It's one of the oldest and most reliable free APIs for cryptocurrency data, operating since Bitcoin's early days. No authentication needed for public endpoints.

Quick start: https://blockchain.info/ticker

No API key needed — just make a request!

How to Use This API

1. Current Bitcoin Price (Multiple Currencies)

https://blockchain.info/ticker

Returns Bitcoin price in USD, EUR, GBP, JPY, CNY, and 50+ other currencies with buy/sell prices and 15-minute delayed timestamp.

2. Bitcoin Price in USD Only

https://blockchain.info/q/24hrprice

Returns the current Bitcoin price in USD as a plain number.

3. Latest Block

https://blockchain.info/latestblock

Returns the most recent block's hash, height, time, and transaction count.

4. Transaction Stats

https://blockchain.info/q/unconfirmedcount

Returns the number of unconfirmed transactions in the mempool. Other stats: q/24hrtransactioncount, q/hashrate, q/difficulty.

5. JavaScript — Bitcoin Dashboard

async function getBitcoinStats() {
  const [ticker, latestBlock] = await Promise.all([
    fetch('https://blockchain.info/ticker').then(r => r.json()),
    fetch('https://blockchain.info/latestblock').then(r => r.json())
  ]);
  
  console.log('Bitcoin Dashboard');
  console.log('===============');
  console.log(`Price: $${ticker.USD.last.toLocaleString()}`);
  console.log(`24h Low: $${ticker.USD.low.toLocaleString()}`);
  console.log(`24h High: $${ticker.USD.high.toLocaleString()}`);
  console.log(`Latest Block: #${latestBlock.height}`);
  console.log(`Block Transactions: ${latestBlock.n_tx}`);
  console.log(`Block Size: ${(latestBlock.size / 1024).toFixed(1)} KB`);
}

getBitcoinStats();
6. Python — Price Alert Checker
import requests

def check_bitcoin_price(target_price=50000):
    ticker = requests.get('https://blockchain.info/ticker').json()
    usd_price = ticker['USD']['last']
    
    print(f"Bitcoin: ${usd_price:,.2f}")
    print(f"Change since prev close: {ticker['USD']['15m'] - ticker['USD']['last']:+.2f}")
    
    if usd_price < target_price:
        print(f"ALERT: Price below ${target_price:,.0f}!")
    elif usd_price > target_price * 1.1:
        print(f"ALERT: Price above ${target_price * 1.1:,.0f}!")
    else:
        print("Price within normal range.")

check_bitcoin_price()
Try Bitcoin price: https://blockchain.info/ticker

Frequently Asked Questions

What endpoints are available?
Ticker (multi-currency price), latest block, single block by hash/height, address info, transaction info, unconfirmed count, 24hr stats, hashrate, difficulty, and more. The /q/ endpoints return simple numeric values.
How up-to-date is the price?
The price feed has approximately a 15-minute delay compared to real-time exchange prices. It's sourced from major Bitcoin exchanges.
Are there rate limits?
Blockchain.info has been running for over a decade. Public endpoints are free with no strict rate limits, but excessive requests may be throttled.
What format are responses in?
JSON for most endpoints. The /q/ endpoints return plain text/numbers. The /charts/ endpoints return historical data for charting.
Does it support other cryptocurrencies?
This API is Bitcoin-specific. For other cryptocurrencies, check CoinGecko or Coinpaprika APIs.

API Details

API URL
https://blockchain.info
Documentation
blockchain.com/explorer/api
Category
Finance
Authentication
Not Required (some endpoints offer API key for higher limits)
Geographic Coverage
Global — Bitcoin blockchain

What You Can Build