Skip to main content

๐ŸŽฏTokens API Endpoints

Notes

Endpoints with ๐Ÿ…ฟ๐Ÿ†๐Ÿ…พ are under the API Pro subscription. To upgrade your API plan, browse through the BscScan APIs page.

//imports
using BscScan.NetCore.Contracts;

//inject
private readonly IBscScanTokensService _bscScanTokensService;

๐Ÿ’ฐGet BEP-20 Token TotalSupply by ContractAddressโ€‹

Returns the total supply of a BEP-20 token.โ€‹

//Sample Request ๐ŸŽ
var bep20TokenTotalSupply =
await _bscScanTokensService.GetBep20TokenTotalSupplyByContractAddressAsync("0xe9e7cea3dedca5984780bafc599bd69add087d56");

๐Ÿ’ฐGet BEP-20 Token CirculatingSupply by ContractAddressโ€‹

Returns the current circulating supply of a BEP-20 token.โ€‹

//Sample Request ๐ŸŽ
var bep20TokenCirculatingSupply =
await _bscScanTokensService
.GetBep20TokenCirculatingSupplyByContractAddressAsync("0xe9e7cea3dedca5984780bafc599bd69add087d56");

๐Ÿ’ฐGet BEP-20 Token Account Balance by ContractAddressโ€‹

Returns the current balance of a BEP-20 token of an address.โ€‹

//Sample Request ๐ŸŽ
var bep20TokenAccountBalance =
await _bscScanTokensService
.GetBep20TokenAccountBalanceByContractAddressAsync(contractAddress:"0xe9e7cea3dedca5984780bafc599bd69add087d56",
address:"0x89e73303049ee32919903c09e8de5629b84f59eb");

๐Ÿ’ฐGet Token Holder List by Contract Address๐Ÿ…ฟ๐Ÿ†๐Ÿ…พโ€‹

Return the current token holders and number of tokens held.โ€‹

//Sample Request ๐ŸŽ
var parameters = new TokenHolderListRequest
{
ContractAddress = "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
Page = 1,
OffSet = 10
};
var tokenHolderList = await _bscScanTokensService.GetTokenHolderListByContractAddressAsync(parameters);

๐Ÿ’ฐGet Historical BEP-20 Token TotalSupply by ContractAddress & BlockNo๐Ÿ…ฟ๐Ÿ†๐Ÿ…พโ€‹

Returns the historical amount of a BEP-20 token in circulation at a certain block height.โ€‹

//Sample Request ๐ŸŽ
var historicalBep20TokenTotalSupply =
await _bscScanTokensService
.GetHistoricalBep20TokenTotalSupplyByContractAddressAndBlockNoAsync
(contractAddress:"0xc9849e6fdb743d08faee3e34dd2d1bc69ea11a51",
blockNo:4000000);

๐Ÿ’ฐGet Historical BEP-20 Token Account Balance by ContractAddress & BlockNo๐Ÿ…ฟ๐Ÿ†๐Ÿ…พโ€‹

Returns the balance of a BEP-20 token of an address at a certain block height.โ€‹

//Sample Request ๐ŸŽ
var parameters = new HistoricalBep20TokenAccountBalanceRequest
{
ContractAddress = "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
Address ="0x7bb89460599dbf32ee3aa50798bbceae2a5f7f6a",
BlockNo = 4000000
};
var historicalBep20AccountBalance =
await _bscScanTokensService
.GetHistoricalBep20TokenAccountBalanceByContractAddressAndBlockNoAsync(parameters);

๐Ÿ’ฐGet Token Info by ContractAddress๐Ÿ…ฟ๐Ÿ†๐Ÿ…พโ€‹

//Sample Request ๐ŸŽ
var tokenInfo = await _bscScanTokensService
.GetTokenInfoByContractAddressAsync("0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82");

๐Ÿ’ฐGet Address BEP20 Token Holding๐Ÿ…ฟ๐Ÿ†๐Ÿ…พโ€‹

Returns the BEP-20 tokens and amount held by an address.โ€‹

//Sample Request ๐ŸŽ
var parameters = new AddressBep20TokenHoldingRequest
{
Address ="0x99817ce62abf5b17f58e71071e590cf958e5a1bf",
Page = 1,
OffSet = 100
};
var tokenHolding = await _bscScanTokensService.GetAddressBep20TokenHoldingAsync(parameters);

๐Ÿ’ฐGet Address BEP721 Token Holding๐Ÿ…ฟ๐Ÿ†๐Ÿ…พโ€‹

Returns the BEP-721 tokens and amount held by an address.โ€‹

//Sample Request ๐ŸŽ
var parameters = new AddressBep721TokenHoldingRequest
{
Address ="0x99817ce62abf5b17f58e71071e590cf958e5a1bf",
Page = 1,
OffSet = 100
};
var tokenHolding =await _bscScanTokensService.GetAddressBep721TokenHoldingAsync(parameters);

๐Ÿ’ฐGet Address BEP721 Token Inventory By Contract Address๐Ÿ…ฟ๐Ÿ†๐Ÿ…พโ€‹

Returns the BEP-721 token inventory of an address, filtered by contract address.โ€‹

//Sample Request ๐ŸŽ
var parameters = new AddressBep721TokenInventoryRequest
{
Address ="0x99817ce62abf5b17f58e71071e590cf958e5a1bf",
ContractAddress = "0x5e74094cd416f55179dbd0e45b1a8ed030e396a1",
Page = 1,
OffSet = 100
};
var tokenInventory =
await _bscScanTokensService
.GetAddressBep721TokenInventoryByContractAddressAsync(parameters);