Public docs
WebsiteTAAL PlatformWhatsOnChain
  • Welcome
  • Introduction
    • Get an API Key
  • Core Products
    • WhatsOnChain
      • Health
      • Chain Info
      • Block
      • Transaction
      • Mempool
      • (Un)Spent Transaction Outputs
      • Address
      • Script
      • Exchange Rate
      • Search
      • WoC Widgets
      • WoC Plugins
      • On-Chain Data
      • Output Tags
      • Stats
      • WebSockets
        • WoC Sockets V1 (Deprecated)
        • WoC Sockets V2 (Beta)
      • Tokens
        • 1Sat Ordinals (Beta)
        • BSV-21 (Beta)
        • STAS Tokens (Beta)
      • Change Log
      • Community Libraries
    • Transaction Processing
      • ARC Endpoints
      • Transaction format and fee rate
    • TAAL Wallet
      • Introduction
      • Architecture
      • Terminology
      • UI Elements
      • Tutorial
    • 1Sat Ordinals tokens API
      • Introduction
      • Terminology
      • Flow Diagram
      • Basic Tutorial - Node
      • Basic Tutorial - Postman
      • API
  • Resources
    • FAQ
    • Support
    • Glossary
    • Acronyms and Abbreviations
Powered by GitBook
On this page
  • Get Exchange Rate
  • Get Historical Exchange Rate

Was this helpful?

Export as PDF
  1. Core Products
  2. WhatsOnChain

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.

PreviousScriptNextSearch

Last updated 6 months ago

Was this helpful?