andelf / tronpy

TRON Python Client Library.
MIT License
204 stars 96 forks source link

How do I get my trx20 balance and all transactions for an account #75

Closed MaGua-Bishop closed 1 year ago

MaGua-Bishop commented 1 year ago

I want to know, how can I get the balance of trx20 tokens of an address and get the list of transactions of a certain address, which bothered me for 2 months, I'm sorry I didn't find them from the source code and documentation

MrNaif2018 commented 1 year ago

Hi! You can use the balanceOf and decimals contract functions to get balance of an account in any contract As for the transactions, I think you need an indexer or to track transactions in live mode, they are not provided by full node directly. But if you have a block range you can scan it for transactions to your address

MrNaif2018 commented 1 year ago

If you have any further questions, feel free to re-open the issue