0

I need to get the incoming transaction before the date currently i use

https://web3api.io/api/v1/addresses/0xaD4b04Df17f2d35F81771Fa124dBD94E33587F4c/transactions?to=0xaD4b04Df17f2d35F81771Fa124dBD94E33587F4c&size=1

The above API returns recent incoming transaction .I want incoming transaction of account before 3 Nov. In that case how do i get that incoming transaction.

  • Check out the Graph protocol which will allow you to do this: thegraph.com. – Peteris Dec 10 '18 at 8:32
1

You can list the transactions as you are doing and then filter the results by timestamp. november 3 of 2018 is 1520809200, so search in the transactions results for all the transactions with timestamp < 1520809200

You can get the list of transactions of a particular address using etherscan API. The method is: Get a list of 'Normal' Transactions By Address

This will remove the need to loop across blocks. You will just need to get the key timestamp of the list of json objects returned by the api.

This should be fast.

Hope this helps.

  • @jamine it is helpful . Already i did like this. It is time consuming . so i search for APIs – Sammu Sundar Dec 10 '18 at 10:28
  • Can you tell me what tool are you using for this, if this is one in a particular address it should not be an issue for an average laptop using python – Jaime Dec 10 '18 at 10:52
  • for this now i am using web3 . it takes much time . i take blocks then loop and check timestamp and "to address" – Sammu Sundar Dec 10 '18 at 11:05
  • I just updated the answer, take a look. etherscan allows you to get a list of the transaction by address then you just look for the timestamp, so you do not need to check in every single block. – Jaime Dec 10 '18 at 11:26
  • Thank you @jaime , it provide result .. it is possible to get the single call without condition and loop. – Sammu Sundar Dec 10 '18 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.