Пример #1
0
                                                       index=index)
transaction = api.get_transaction_by_hash(tx_hash=TX_HASH)
count = api.get_transaction_count(address)
receipt = api.get_transaction_receipt(TX_HASH)
uncles = api.get_uncle_by_blocknumber_index(block_number=block_numb,
                                            index=index)

# Stats

api = Stats(api_key=key)

last_price = api.get_ether_last_price()
supply = api.get_total_ether_supply()

# Tokens

address = '0xe04f27eb70e025b78871a2ad7eabe85e61212761'
contract_address = '0x57d90b64a1a57749b0f932f1a3395792e12e7055'
api = Tokens(contract_address=contract_address, api_key=key)

balance = api.get_token_balance(address=address)
supply = api.get_total_supply()

# Transactions

TX_HASH = '0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a'
api = Transactions(api_key=key)

status = api.get_status(tx_hash=TX_HASH)
receipt_status = api.get_tx_receipt_status(tx_hash=TX_HASH)
Пример #2
0
formatted_lp['ethbtc_timestamp'] = pd.to_datetime(formatted_lp['ethbtc_timestamp'], unit='s')
formatted_lp['ethusd_timestamp'] = pd.to_datetime(formatted_lp['ethusd_timestamp'], unit='s')
print(formatted_lp)
### get total ether supply
tot_ether = api.get_total_ether_supply()
print(tot_ether)

# Tokens
contract_address = '0x57d90b64a1a57749b0f932f1a3395792e12e7055'
api = Tokens(contract_address=contract_address, api_key=key)
### get token balance of an address
address = '0xe04f27eb70e025b78871a2ad7eabe85e61212761'
token_bal = api.get_token_balance(address=address)
print(token_bal)
# get total supply of tokens
token_supp = api.get_total_supply()
print(token_supp)

# Transactions
TX_HASH = '0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a'
api = Transactions(api_key=key)
### get status
status = api.get_status(tx_hash=TX_HASH)
print(status)
### get receipt status
TX_HASH = '0x513c1ba0bebf66436b5fed86ab668452b7805593c05073eb2d51d3a52f480a76'
api = Transactions(api_key=key)
receipt_status = api.get_tx_receipt_status(tx_hash=TX_HASH)
print(receipt_status)