Comments (4)
The value is in 'wei' ( or its BNB equivalent ) whereby 1 BNB = 10^18 wei .
Use this website to confirm your balance : https://bscscan.com/unitconverter .
In python, one way to do it is this :
from bscscan import BscScan
from decimal import Decimal
APIKEY=""
bsc = BscScan(APIKEY)
address = "0x0000000000000000000000000000000000001004"
value = bsc.get_bnb_balance(address=address)
balance = Decimal(value) / (10**18)
print(value)
print(balance)
from bscscan-python.
The value is in 'wei' ( or its BNB equivalent ) whereby 1 BNB = 10^18 wei .
Use this website to confirm your balance : https://bscscan.com/unitconverter .
In python, one way to do it is this :
from bscscan import BscScan
from decimal import DecimalAPIKEY=""
bsc = BscScan(APIKEY)address = "0x0000000000000000000000000000000000001004"
value = bsc.get_bnb_balance(address=address)
balance = Decimal(value) / (10**18)print(value)
print(balance)
I really appreciate this, thank you so so so much!
from bscscan-python.
yw . please close this issue ( click on the 'Close issue' button ) :)
from bscscan-python.
yw . please close this issue ( click on the 'Close issue' button ) :)
yeser!
from bscscan-python.
Related Issues (20)
- Option to pass api endpoint explicitly (to support other chains) HOT 1
- [FEATURE] HOT 2
- get_bep20_token_transfer_events_by_address don't get last blocks [BUG] HOT 4
- [FEATURE] Any way to add token holders information? Thank you HOT 2
- Getting nested transactions [BUG] HOT 1
- [FEATURE] HOT 1
- [BUG] HOT 2
- eth_sendRawTransaction HOT 1
- [BUG] ImportError: cannot import name 'resources' HOT 1
- aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host api.bscscan.com:443 ssl HOT 2
- AttributeError: 'AsyncClient' object has no attribute 'get_bnb_balance' HOT 10
- [FEATURE]get_bep20_token_transfer_events_by_contract_address_paginated better suport startblock HOT 1
- Through API, real-time data cannot be obtained, such as the latest transaction data HOT 1
- [FEATURE]/questioin
- [FEATURE]/quesiton (help) HOT 1
- How to get the function called HOT 1
- Add Contract Address to get_bep20_token_transfer_events_by_address HOT 1
- module methods such as `get_normal_txs_by_address` not working HOT 1
- get_logs() Doesn't return all of the possible transaction and stops mid-way. HOT 1
- SyncClient is owning NO attributes[BUG] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bscscan-python.