Im trying to fetch all transactions of a certain tron address

8.2k views Asked by At

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 ?

4

There are 4 answers

1
Hooman Limouee On BEST ANSWER

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

0
Biganashvili On

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

1
joeytwiddle On

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

2
Olamigoke Philip On

The tron GET endpoint you're looking for is: "api.trongrid.io/v1/accounts/{address}/transactions"

Replace {address} with your tron wallet address. Cheers!