'Im trying to fetch all transactions of a certain tron address

i couldnt find a way to get the history of transactions a certain Tron address is involved in

i tried the tronweb API : https://api.trongrid.io/v1/accounts/TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh/transactions/trc20?limit=100&contract_address=TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t

yet this didnt do anything. so has anyone managed to find a way to do this ?



Solution 1:[1]

I had success by hitting this endpoint: (docs here)

https://api.trongrid.io/v1/contracts/${contractAddress}/events?block_number=${blockNumber}&only_confirmed=true

It looks like another option is to use TronWeb's getEvents() endpoint:

How to get TRC20 transactions to an address

There is also this, which seems kind of similar:

https://developers.tron.network/reference/geteventresult

Solution 2:[2]

It's quiet simple just make a GET request to the following url:

https://api.trongrid.io/v1/accounts/{wallet-address}/transactions/{standard}?&contract_address={contract-address}

Replace {wallet-address} with your desired tron wallet address.

Replace {standard} with the standard of token that you want e.g. trc20.

Replace {contract_address} with the address of the contract of your target token e.g. TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t (USD Tether).

Here are all possible parameters :

  • only_confirmed (boolean) : true | false. If false, it returns both confirmed and unconfirmed transactions. If no param is specified, it returns both confirmed and unconfirmed transactions. Cannot be used at the same time with only_unconfirmed param.

  • only_unconfirmed (boolean) : true | false. If false, it returns both confirmed and unconfirmed transactions. If no param is specified, it returns both confirmed and unconfirmed transactions. Cannot be used at the same time with only_confirmed param.

  • limit (int32) : number of transactions per page, default 20, max 200

  • fingerprint (string) : fingerprint of the last transaction returned by the previous page; when using it, the other parameters and filters should remain the same

  • order_by (string) : block_timestamp,asc | block_timestamp,desc (default)

  • min_timestamp (date-time) : minimum block_timestamp, default 0

  • max_timestamp (date-time) : maximum block_timestamp, default now

  • contract_address (string) : contract address in base58 or hex

  • only_to (boolean) : true | false. If true, only transactions to this address, default: false

  • only_from (boolean) true | false. If true, only transactions from this address, default: false

Solution 3:[3]

yes, it happened nothing, we can't get anything either.

Solution 4:[4]

You can download it in a CSV format from the tronscan.org

but keep in mind that only the first 10,000 transactions are available. enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 joeytwiddle
Solution 2 Hooman
Solution 3 anyTrue-protocol
Solution 4 Biganashvili