PrioThery all states in the BSC
Insurance
Ethereum is a deentalized platform that allows you to proclaim, expand and manage the inteling counters in your blockchain network. The basis on this concept, Binance Smart Chain (BSC) became a privilen alternative for many policers from his more low transaction and more of the bolts. In this state, we dissatisfied, how to get the contractual addresses all BSC.
Method 1: Using the API Binance API
Oficial API Binance imposes the access to the access to the Ethereum and BSC. You can use the library Etherscan-API
B JavaScript to load the data for all contraction, but, to the soot, it does not present the simple in the exports of the exports.
Method 2: Using the Biblioe Bitkveri
Bitquery – This is a Python library, which allows you to subjugate and enhance the data from different source. One of its function is the opportunity to load the data on the Ethereum and BSC records, the contract balance.
If you want to use Bitquer, you have to install it with your help pip:
`Bash
PIP Install Bitquery
`
Here’s a source of the source code that shows how to load all the states for the concrete counteract on BSC:
`Python
Import Bitkvia as BQ
Def Get_Contract_Holders (Contract_address, Networks = 'BSC'):
Data = bq.get_data (
"Ethercan-API",
'Contract_balance',
key
Contract_address,
Net = Web,
Format = 'CSV'
)
Return Data.to_csv (index = False)
Replace your own address and BSC Network
contract_address = '0x ... your_contract_address ...'
Network = 'BSC' '
HOLDERS_DATA = Get_Contract_Holders (Contract_address, Network)
Pack (Crackets_data)
This is the CSV output code, the content of all the states for the indicated counteract in the BSC network.
Method 3: Using Access to the Site of Site
The second lining is the use of the scrapins of the internet for the existence of the data. In Python you can use the libraries in the quality of “Beautifulsoup” and “PRESS” in Python, to attach the need for information from Ethereum and BSC.
Obraty, however, that this method can not lead for use of production from the potential risks of the immortality and the decoration of the data.
Conclusion
The contracting of all states all the states in the BSC network can be a few, but there are several methods. Oficial API from Binance provides the simple interface of the data, in the case, as a bitquery is a power biblothek, which allows you to comprise the son -in -law and to go on the different saints. In fact, access to the site of the site is stripped and can not be brought up for the production.
Export data in CSV formate
For the exports of the CSV data, you can easily relying out the erection of the code or to use other libraries in the cure of the “panda” for analysis, the exciting bitquery.
I hope that this one will help you start reaching all BSC states!
Continue Reading