BitcoinAverage
CryptocurrencyWorking with BitcoinAverage API
Are you looking for a reliable and easy-to-use API to fetch real-time Bitcoin prices? Look no further than BitcoinAverage's public API!
Getting Started
First, head over to https://apiv2.bitcoinaverage.com/ and create an account. Once you have verified your account, you'll be able to access the API endpoints.
API Endpoints
Ticker
This endpoint returns the current price of Bitcoin.
fetch('https://apiv2.bitcoinaverage.com/ticker/bitcoin_usd')
.then(response => response.json())
.then(data => console.log(data.last))
Global Ticker
This endpoint returns the global cryptocurrency market data.
fetch('https://apiv2.bitcoinaverage.com/global/ticker/all')
.then(response => response.json())
.then(data => console.log(data['BTC'].last))
OHLC
This endpoint returns the Open, High, Low, and Close price data for Bitcoin.
fetch('https://apiv2.bitcoinaverage.com/indices/global/history/BTCUSD?period=daily&format=json')
.then(response => response.json())
.then(data => console.log(data))
Conclusion
And that's it! With just a few lines of code, you can easily access real-time Bitcoin prices and other market data using BitcoinAverage's public API. Happy coding!