LogoLogo
HomeTwitterKnowledge BaseAPI PRO
BaseScan
BaseScan
  • Introduction
  • ✨Getting Started
    • Creating an Account
    • Getting an API key
    • Endpoint URLs
  • 🎯API Endpoints
    • Accounts
    • Contracts
    • Transactions
    • Blocks
    • Logs
    • Geth/Parity Proxy
    • Tokens
    • Stats
  • 🏆API PRO
    • BaseScan API PRO
    • API PRO Endpoints
  • 🤝Support
    • FAQ
    • Rate Limits
    • Common Error Messages
    • Common Verification Errors
    • Getting Help
  • Visit BaseScan.org
Powered by GitBook
On this page
  • Get ERC20-Token TotalSupply by ContractAddress
  • Get ERC20-Token Account Balance for TokenContractAddress
  • Get Historical ERC-20 Token TotalSupply by ContractAddress & BlockNo
  • Get Historical ERC-20 Token Account Balance by ContractAddress & BlockNo
  • Get Address ERC-20 Token Holdings
  • Get Address ERC-721 Token Holding
  • Get Address ERC721 Token Inventory By Contract Address
  • Get Token Holder List by Contract Address
  • Get Token Info by ContractAddress
  1. API Endpoints

Tokens

PreviousGeth/Parity ProxyNextStats

Last updated 1 year ago

Get ERC20-Token TotalSupply by ContractAddress

Returns the current amount of an ERC-20 token in circulation.

https://api.basescan.org/api
   ?module=stats
   &action=tokensupply
   &contractaddress=0xa3044b2a9ae8073ecc4e277f6246b3b00fc93553
   &apikey=YourApiKeyToken

Try this endpoint in your

Query Parameters

Parameter
Description

contractaddress

the contract address of the ERC-20 token

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":"1000000000000000000000000000000000"
}

Tip : The result is returned in the token's smallest decimal representation.

Eg. a token with a balance of 215.241526476136819398 and 18 decimal places will be returned as 215241526476136819398

Get ERC20-Token Account Balance for TokenContractAddress

Returns the current balance of an ERC-20 token of an address.

https://api.basescan.org/api
   ?module=account
   &action=tokenbalance
   &contractaddress=0xa3044b2a9ae8073ecc4e277f6246b3b00fc93553
   &address=0x171f87d13c5819a819702637f2120db793f7bcca
   &tag=latest&apikey=YourApiKeyToken

Returns the historical amount of a ERC-20 token in circulation at a certain block height.

https://api.basescan.org/api
   ?module=stats
   &action=tokensupplyhistory
   &contractaddress=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
   &blockno=10000000
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

contractaddress

the contract address of the ERC-20 token

blockno

the integer block number to check total supply for eg. 4000000

Sample Response

{
   "status":"1",
   "message":"OK",
   "result":"205971585207240"
}

Eg. a token with a balance of 215.241526476136819398 and 18 decimal places will be returned as 215241526476136819398

Returns the balance of a ERC-20 token of an address at a certain block height.

https://api.basescan.org/api
   ?module=account
   &action=tokenbalancehistory
   &contractaddress=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
   &address=0x1d147c866182f072c821eb1fa9817e87b9547861
   &blockno=11801569
   &apikey=YourApiKeyToken
Parameter
Description

contractaddress

the contract address of the ERC-20 token

blockno

the integer block number to check total supply for eg. 4000000

Address

Target address

Return the current ERC20 token holders and number of tokens held.

https://api.basescan.org/api
    ?module=account
    &action=addresstokenbalance
    &address=0xFd92F4e91d54B9EF91cc3f97C011a6aF0C2a7eDa
    &page=1
    &offset=2
    &apikey=YourApikeyToken

Query Parameters

Parameter

Description

address

the string representing the address to check for Token Holdings

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

Sample Response

{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "TokenAddress": "0xc088797eaee27e0b1b80cd0ccc02b5792182ba6d",
      "TokenName": "BASELOL",
      "TokenSymbol": "BASELOL",
      "TokenQuantity": "4000000000000000000000",
      "TokenDivisor": "18"
    },
    {
      "TokenAddress": "0x599005e69d937c2e30603d3571347f1f705ebf3a",
      "TokenName": "Ether Pulse",
      "TokenSymbol": "ETPS",
      "TokenQuantity": "66870216684000000000",
      "TokenDivisor": "12"
    }
  ]
}

Return the current ERC20 token holders and number of tokens held.

https://api.basescan.org/api
    ?module=account
    &action=addresstokennftbalance
    &address=0x64baeb02876aa58078aa25c1c43b7a5492873559
    &page=1
    &offset=2
    &apikey=YourApiKeyToken

Query Parameters

Parameter

Description

address

the string representing the address to check for Token Holdings

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

Sample Response

{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenName": "Degen Haberdashers",
      "TokenSymbol": "DGNHTS",
      "TokenQuantity": "8"
    },
    {
      "TokenAddress": "0x10e65619e75214cc6e8c2522a83acf8636ce9dfd",
      "TokenName": "Degens",
      "TokenSymbol": "DEGEN",
      "TokenQuantity": "100"
    }
  ]
}
https://api.basescan.org/api
    ?module=account
    &action=addresstokennftinventory
    &address=0x64baeb02876aa58078aa25c1c43b7a5492873559
    &contractaddress=0x85e7df5708902be39891d59abef8e21ede91e8bf
    &page=1
    &offset=20
    &apikey=YourApiKeyToken

Query Parameters

Parameter

Description

address

the string representing the address to check for inventory

contractaddress

the contract address of the ERC-721 token

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

Sample Response

{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenId": "454"
    },
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenId": "355"
    },
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenId": "486"
    },
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenId": "588"
    },
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenId": "338"
    },
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenId": "103"
    },
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenId": "405"
    },
    {
      "TokenAddress": "0x85e7df5708902be39891d59abef8e21ede91e8bf",
      "TokenId": "683"
    }
  ]
}

Return the current ERC20 token holders and number of tokens held.

https://api.basescan.org/api
   ?module=token
   &action=tokenholderlist
   &contractaddress=0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb&
   &page=1
   &offset=10
   &apikey=YourApiKeyToken 

Query Parameters

Parameter

Description

contractaddress

the contract address of the ERC-20 token

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page

Sample Response

{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "TokenHolderAddress": "0xba12222222228d8ba445958a75a0704d566bf2c8",
      "TokenHolderQuantity": "4573970636171019544227"
    },
    {
      "TokenHolderAddress": "0x1ded454abc7e02119adf09860954144847c9f619",
      "TokenHolderQuantity": "10000000000000000"
    }
  ]
}

Returns project information and social media links of an ERC-20/ERC-721 token.

https://api.basescan.org/api
   ?module=token
   &action=tokeninfo
   &contractaddress=0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

contractaddress

the contract address of the ERC-20/ERC-721 token to retrieve token info

Sample Response

{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "contractAddress": "0x50c5725949a6f0c72e6c4a641f24049a917db0cb",
      "tokenName": "Dai Stablecoin",
      "symbol": "DAI",
      "divisor": "18",
      "tokenType": "ERC20",
      "totalSupply": "2921565106401030186792291",
      "blueCheckmark": "true",
      "description": "",
      "website": "https://makerdao.com/",
      "email": "integrations@makerdao.com",
      "blog": "https://blog.makerdao.com/",
      "reddit": "https://www.reddit.com/r/MakerDAO/",
      "slack": "https://chat.makerdao.com/",
      "facebook": "",
      "twitter": "https://twitter.com/MakerDAO",
      "bitcointalk": "",
      "github": "",
      "telegram": "https://t.me/makerdaoOfficial",
      "wechat": "",
      "linkedin": "",
      "discord": "https://discord.com/invite/RBRumCpEDH",
      "whitepaper": "http://docs.makerdao.com/",
      "tokenPriceUSD": "0.9999334003"
    }
  ]
}

Try this endpoint in your

Get Historical ERC-20 Token TotalSupply by ContractAddress & BlockNo

Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.

Try this endpoint in your

Tip : The result is returned in the token's smallest decimal representation.

Get Historical ERC-20 Token Account Balance by ContractAddress & BlockNo

Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.

Get Address ERC-20 Token Holdings

Try this endpoint in your

Get Address ERC-721 Token Holding

Try this endpoint in your

Get Address ERC721 Token Inventory By Contract Address

Try this endpoint in your

Get Token Holder List by Contract Address

Try this endpoint in your

Get Token Info by ContractAddress

Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.

Try this endpoint in your

🎯
📝
📈
📝
📝
🔗
📈
browser
🔗
browser
🔗
browser
🔗
browser
🔗
browser
🔗
browser
🔗
browser
🔗
browser