Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.3 KB

README.md

File metadata and controls

41 lines (28 loc) · 1.3 KB

Node.js BscScan API

version minzipped size downloads Tweet

Node.js package to interact with official BscScan API powered by TypeScript.

Documentation

API reference

Installation

$ yarn add bsc-scan

Usage

import bscscan, { account } from 'bsc-scan'

bscscan.setUrl('https://testnet.bscscan.com')
bscscan.setApiKey('YourApiKeyToken')

const start = async () => {
  try {
    const balance = await account.getBnbBalance('0x765090aB712984081aeE059eA7025C48a4198183')

    console.log(`Your balance is: ${balance}`)
  } catch (err) {
    console.log(err)
  }
}

start()