Exchange Rate

Get Exchange Rate

This endpoint provides the current exchange rate for BSV.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/exchangerate
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/exchangerate"
Response
{
    "currency": "USD",
    "rate": "229.31633333333335",
    "time": 1660176000
}

URL Parameters

Parameter
Description

network

The selected network: main.

Get Historical Exchange Rate

This endpoint provides the historical exchange rate data for BSV. Exchange rate data goes back to 2018/11/19.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/main/exchangerate/historical?from=<unixtimestamp>&to=<unixtimestamp>
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/exchangerate/historical?from=1660139745&to=1660312545"
Response
[
  {
    "rate": 60.3905,
    "time": 1660089600
  },
  {
    "rate": 62.661,
    "time": 1660176000
  },
  ...
]

URL Parameters

Parameter
Description

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?