MercadoBitcoin API

⭐ Beginner's Pick Cryptocurrency / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

MercadoBitcoin is Brazil's largest cryptocurrency exchange and offers a public API for retrieving real-time and historical market data for Bitcoin, Ethereum, Litecoin, and other coins traded on the platform. It exposes order book data, trade history, and ticker information without requiring any authentication. All prices are denominated in Brazilian Real (BRL).

💡

Beginner Tip

No API key is needed for public market data. Start with the ticker endpoint to get the current bid, ask, and last-trade price for any supported coin — the response is small, well-structured, and easy to parse in any language.

Available Data

coin price in USD/EUR
market capitalization
24h price change
trading volume
circulating supply

Example Response

JSON Response
{
  "id": "bitcoin",
  "symbol": "btc",
  "current_price": 65432.1,
  "market_cap": 1280000000000,
  "price_change_24h": 1250.5,
  "price_change_percentage_24h": 1.95,
  "total_volume": 28500000000
}

Field Reference

ticker.high Highest trade price for the coin in the last 24 hours, denominated in BRL
ticker.low Lowest trade price in the last 24 hours, in BRL
ticker.last Price of the most recent trade executed on the exchange, in BRL
ticker.buy Current best buy (bid) price available in the order book, in BRL
ticker.sell Current best sell (ask) price available in the order book, in BRL
ticker.date Unix timestamp indicating when the ticker data was last updated

Implementation Example

const url = "https://www.mercadobitcoin.com.br/api-doc/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

404 Not Found Invalid coin symbol in the URL path
Use the exact identifiers from the API docs such as BTC, ETH, LTC, XRP — not BITCOIN or full names.
Stale data despite frequent polling Ticker data is cached on the server at 15-second intervals
For real-time applications, poll no faster than every 15 seconds to match the actual data refresh rate.
CORS error in the browser The API does not set permissive CORS headers for all browser origins
Fetch market data from a backend service and forward it to your frontend rather than calling MercadoBitcoin directly from JavaScript.

Matrix Score Breakdown

🌐 Reachability 0/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 40ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →