Exchange Rate
Get Exchange Rate
This endpoint provides the current exchange rate for the specified blockchain.
GET https://api.whatsonchain.com/v1/<chain>/<network>/exchangerateExample Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/exchangerate"curl --location --request GET "https://api.whatsonchain.com/v1/btc/main/exchangerate"Example Response
{
"rate": 27.055,
"time": 1752257180,
"currency": "USD"
}{
"rate": 117581.6,
"time": 1752257200,
"currency": "USD"
}URL Parameters
Parameter
Description
chain
Desired blockchain: bsv or btc.
network
Selected network: main or test.
Get Historical Exchange Rate
This endpoint provides the historical exchange rate data for the specified blockchain.
Exchange rate data goes back to:
2018/11/19for BSV.2010/07/18for BTC.
Example Request
Example Response
URL Parameters
Parameter
Description
chain
Desired blockchain: bsv or btc.
from
The starting date (unixtimestamp) to retrieve the exchange rate data.
to
The end date (unixtimestamp) to retrieve the exchange rate data.
Last updated
Was this helpful?