I am trying to get the recent IN transaction of the account while i try


This returns account transactions count.

I refer web3 documentation and refer net i found the script getTransactionsByAccount Common useful JavaScript snippets for geth

Is any another way to find IN transaction of the account using web3.js . Lastest last IN transaction is enough .


I think it would be easier and faster to use Amberdata.io. If you get a free api key then you can do the following to get the latest IN transaction.

It would look something like this:

curl \
  -X GET \
  -H "accept: application/json" \
  -H "x-amberdata-api-key: UAK5e4cae75f484a9c8e3cd19a41b3fa977" \
  -H "x-amberdata-blockchain-id: 1c9c969065fcd1cf" \

The transactions are returned ordered by timestep. The to filters by a to address. In this case we want all transactions where the to address is the address we are querying and we want the first one so I put size=1. Although if you remove that you'll get every IN transaction.

Hope that helps! 😊

  • Thank you @foba . is amberdata api free of use ? – Sammu Sundar Dec 5 '18 at 5:34
  • is any API for getting blocks between timestamp/date ? – Sammu Sundar Dec 5 '18 at 5:51
  • 1
    Yup it is free to use! It's free and easy to get an api key. – foba Dec 5 '18 at 15:37
  • i am not able to find the limit of amberdata API . what is the limit for this API perday/perminute/persecond ? – Sammu Sundar Dec 6 '18 at 12:57
  • 1
    As far I know there's currently no rate limit. Is it working for you? – foba Dec 6 '18 at 13:04

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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