Merchants
GET
/priceFetch cryptocurrency price
Returns the current price of 1 unit of the specified cryptocurrency in a given fiat currency. All supported fiat currencies are listed here.
Query Parameters
cryptostring enumdefault: "BTC"Cryptocurrency code for which the price is returned per 1 unit.
"BTC""USDT""BCH""ETH""SOL""XRP""MATIC""LTC"currencystring enumrequireddefault: "USD"Fiat currency code to return the price in.
Responses
cryptoquery · stringCryptocurrency code for which the price is returned per 1 unit.
currencyquery · stringrequiredFiat currency code to return the price in.
Response will appear here
Request
curl -X GET \
"https://www.blockonomics.co/api/price?crypto=BTC¤cy=USD"const response = await fetch('https://www.blockonomics.co/api/price?crypto=BTC¤cy=USD', {
method: 'GET',
headers: {
}
})
const data = await response.json()
console.log(data)import requests
headers = {}
response = requests.get(
"https://www.blockonomics.co/api/price?crypto=BTC¤cy=USD",
headers=headers
)
print(response.json())Response
{
"price": 127866.85
}