pcko1 / etherscan-python

A minimal, yet complete, python API for Etherscan.io.
MIT License
408 stars 111 forks source link

Using get_erc721_token_transfer_events_by_address #25

Open NeoSephiroth opened 2 years ago

NeoSephiroth commented 2 years ago

hi!

I'm new to this package...

from etherscan import Etherscan
eth = Etherscan('MY API KEY') # key in quotation marks

block_number_start=eth.get_block_number_by_timestamp(timestamp="1609490044", closest="before")
block_number_end=eth.get_block_number_by_timestamp(timestamp="1637224444", closest="before")

erc_20_transactions = eth.get_erc20_token_transfer_events_by_address(address='0xd8Fa365f358729Af1D62206BdDaD84cBb2BEFB7d',startblock=block_number_start,endblock=block_number_end,sort='asc')
erc_721_transactions = eth.get_erc721_token_transfer_events_by_address(address='0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a',startblock=block_number_start,endblock=block_number_end,sort='asc')

print(block_number_start)
print(block_number_end)
print(erc_20_transactions)
print(erc_721_transactions)

This is a fragment of code I'm using by I keep getting errors....can anyone help me?

github-actions[bot] commented 2 years ago

Thanks for reporting this issue, we are on it :)

c-git commented 2 years ago

Did you guys get your issue sorted? If not can you share the error message?