diff --git a/etherscan/accounts.py b/etherscan/accounts.py index 2bf7177..7ce317c 100755 --- a/etherscan/accounts.py +++ b/etherscan/accounts.py @@ -76,7 +76,7 @@ def get_transaction_page(self, page=1, offset=10000, sort='asc', return req['result'] def get_all_transactions(self, offset=10000, sort='asc', - internal=False) -> list: + internal=False, page_limit=None) -> list: if internal: self.url_dict[self.ACTION] = 'txlistinternal' else: @@ -102,6 +102,9 @@ def get_all_transactions(self, offset=10000, sort='asc', self.url_dict[self.PAGE]) print("page {} added".format(page_number[0])) self.url_dict[self.PAGE] = str(int(page_number[0]) + 1) + if page_limit: + if int(self.url_dict[self.PAGE]) > page_limit: + return trans_list def get_blocks_mined_page(self, blocktype='blocks', page=1, offset=10000) -> list: