RapidAPI logo

Bitcoin B-WAP

FREEMIUM
By BraveNewCoin
Updated 4 months ago
Finance
-/10
Popularity Score
-
Latency
-
Success Rate

Bitcoin B-WAP API Documentation

The B-WAP returns a USD price for Bitcoin for the time period any particular block in the blockchain based on BNC's Bitcoin Liquid Index.

View API Details
GETBWAP by Block Height
GETBWAP by Timestamp
GETBWAP by Transaction
GETBWAP by Block Height

BWAP by block height. The first block where a USD price has been established in the Bitcoin Liquid Index is 68774 (2010-07-17 23:14:35 UTC). Data is refreshed every 10 minutes with any new blocks confirmed outside of the last 2 hours.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
fromNUMBER
REQUIREDThe start block height for a range of results. A maximum of 1000 results will be returned for each request.
Optional Parameters
toNUMBER
OPTIONALThe ending block height for a range of results
Code Snippet
unirest.get("https://bravenewcoin-bwap-v1.p.rapidapi.com/bwap-blocks")
.header("X-RapidAPI-Host", "bravenewcoin-bwap-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://bravenewcoin-bwap-v1.p.rapidapi.com/bwap-blocks
Request Method: GET
Response Headers
Response Body
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://bravenewcoin-bwap-v1.p.rapidapi.com/bwap-blocks")
.header("X-RapidAPI-Host", "bravenewcoin-bwap-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication