コード例 #1
0
 def test_get_balance_multi(self):
     api = Account(address=MULTI_ACCOUNT, api_key=API_KEY)
     self.assertEqual(api.get_balance_multiple(), MULTI_BALANCE)
コード例 #2
0
from bscscan.accounts import Account
import json

with open('../../api_key.json', mode='r') as key_file:
    key = json.loads(key_file.read())['key']

address = '0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a'

api = Account(address=address, api_key=key)
transactions = api.get_transaction_page(page=1,
                                        offset=10000,
                                        sort='des',
                                        erc20=True)
print(transactions)
コード例 #3
0
 def test_get_balance(self):
     api = Account(address=SINGLE_ACCOUNT, api_key=API_KEY)
     self.assertEqual(api.get_balance(), SINGLE_BALANCE)
コード例 #4
0
from bscscan.accounts import Account
import json

with open('../../api_key.json', mode='r') as key_file:
    key = json.loads(key_file.read())['key']

address = '0x043d9b3af52b623e54a3dF92F1682757eb29F912'

api = Account(address=address, api_key=key)
balance = api.get_balance()
print(balance)
コード例 #5
0
from bscscan.accounts import Account
import json

with open('../../api_key.json', mode='r') as key_file:
    key = json.loads(key_file.read())['key']

address = '0x2a65aca4d5fc5b5c859090a6c34d164135398226'

api = Account(address=address, api_key=key)
blocks = api.get_all_blocks_mined(offset=10000, blocktype='uncles')
print(blocks)
コード例 #6
0
from bscscan.accounts import Account
import json

with open('../../api_key.json', mode='r') as key_file:
    key = json.loads(key_file.read())['key']

address = [
    '0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a',
    '0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a'
]

api = Account(address=address, api_key=key)
balances = api.get_balance_multiple()
print(balances)
コード例 #7
0
from bscscan.accounts import Account
import json

with open('../../api_key.json', mode='r') as key_file:
    key = json.loads(key_file.read())['key']

address = '0x043d9b3af52b623e54a3dF92F1682757eb29F912'

api = Account(address=address, api_key=key)
transactions = api.get_all_transactions(offset=100, sort='asc', internal=False)

print(transactions[0])