Skip to content

Commit aaca516

Browse files
committed
added Query transaction's count
1 parent b15da63 commit aaca516

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tronapi/trx.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,19 @@ def get_block(self, block: Any = None):
7070
})
7171
return response
7272

73+
def get_transaction_count_by_blocknum(self, num: int):
74+
"""Query transaction's count on a specified block by height
75+
76+
Args:
77+
num (int): block number
78+
"""
79+
if not is_integer(num) or num < 0:
80+
raise ValueError('Invalid num provider')
81+
82+
return self.tron.manager.request('/wallet/gettransactioncountbyblocknum', {
83+
'num': num
84+
})
85+
7386
def get_block_transaction_count(self, block: Any):
7487
"""Total number of transactions in a block
7588

0 commit comments

Comments
 (0)