w3spi5/php-bscscan-api

PHP client for the Bscscan API

0.9.0 2022-02-18 19:53 UTC

This package is auto-updated.

Last update: 2024-10-19 16:39:12 UTC


README

PHP wrapper for the Bscscan API

License: MIT

Official API Documentation

Create API Key (optional)

Requirements

The minimum requirement by Bscscan API is that your Web server supports PHP 5.6.

Installation

To install Bscscan PHP API package you can run command:

composer require w3spi5/php-bscscan-api:dev-master

Usage

Mainnet

$client = new \Bscscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V');
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');

For testnet usage

Supported:

  • Testnet
$client = new \Bscscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', BscscanAPIConf::TESTNET);
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');

Pull requests are welcome

This package was adapted from Maslakou Ihar's excellent package called php-etherscan-api (that I contributed to). Despite all the care taken, it is possible that there are errors due to the copy of the code. Feel free to submit a pull request if needed.