Skip to content

Optional query parameters work like required #18

Closed as not planned
Closed as not planned
@cinarizasyon

Description

@cinarizasyon

When I am using the rest api, i can send request without using endblock parameter:
https://api.etherscan.io/api?module=account&action=tokentx&address=0x4e83362442b8d1bec281594cea3050c8eb01311c&startblock=12328953&sort=asc&apikey=YourApiKeyToken

But the library doesn't allow to do this:

In [5]: eth.get_erc20_token_transfer_events_by_address(address='0x4e83362442b8d1bec281594cea3050c8eb01311c', startblock=12328953)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-e4416848c949> in <module>
----> 1 eth.get_erc20_token_transfer_events_by_address(address='0x4e83362442b8d1bec281594cea3050c8eb01311c', startblock=12328953)

/usr/local/lib/python3.8/dist-packages/etherscan/etherscan.py in wrapper(*args, **kwargs)
     25         def wrapper(*args, **kwargs):
     26             url = (
---> 27                 f"{fields.PREFIX.format(net.lower()).replace('-main','')}"
     28                 f"{func(*args, **kwargs)}"
     29                 f"{fields.API_KEY}"

TypeError: get_erc20_token_transfer_events_by_address() missing 2 required positional arguments: 'endblock' and 'sort'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions