Is there a way to request the date of last transaction via API? I run a request to see balance of my addresses and need to request the date of the last transaction, how would I do that?
-
Hey, I assume that you are using the blockchain.info api, and thus edited the question accordingly.– Murch ♦Jan 11, 2017 at 14:28
2 Answers
This is an ambiguous question as we don't know what your environment is.
If you are using bitcoind, a call to gettransaction
will give you a time field which is when the transaction has been seen.
Perhaps if you elaborate a bit more we would be able to answer the question more specifically.
If you call the address API i.e.
https://blockchain.info/address/$hash_160?format=json
you will get a list of transactions.
They all have a time attribute which is the time in unix format. https://en.wikipedia.org/wiki/Unix_time