maic0L
maic0L

Reputation: 45

Retrieve transaction details as shown on bscscan

I am trying to retrieve info about bsc transations using Bscscan api but it appears to be very limited.

endpoint = "https://api.bscscan.com/api"\
   "?module=account"\
   "&action=txlistinternal"\
   "&txhash={}"\
   "&apikey={}"

After sending a GET request, this is what i get:

{'status': '1', 'message': 'OK', 'result': [{'blockNumber': '19952739', 'timeStamp': '1659033895', 'from': '0x0000000000000000000000000000000000001000', 'to': '0x000000000000000000000000000000000000dead', 'value': '7802270354745452', 'contractAddress': '', 'input': '', 'type': 'call', 'gas': '2300', 'gasUsed': '0', 'isError': '0', 'errCode': ''}]}

however, on bscscan there is so much more information and already decoded, so is there a way to retrieve information as shown as bscscan?

Upvotes: -2

Views: 1172

Answers (1)

Thomas Holland
Thomas Holland

Reputation: 1

https://api.bscscan.com/api?module=account&action=txlist&address=YOUR_ADDRESS&startblock=0&endblock=99999999&page=0&offset=1&sort=asc&apikey=API_KEY

In the url above, replace YOUR_ADDRESS with your bsc address example 0xaE........ Replace API_KEY with your api key. Then copy and paste the url in your web browser. You will get the list of all transactions on that address

Upvotes: 0

Related Questions