1

How do I determine if the current transaction is an outgoing or an incoming transaction from looking at the following API response?

https://blockstream.info/api/address/1A6HUTtraLwTg48AwpQxPwLmTnDGSSJteG/txs

enter image description here

1

If an address appears in the vout list, it is incoming for that address.

If the address is in the vin list, it is an outgoing transaction for that address.

Addresses may appear in both the vin and the vout.

| improve this answer | |
  • 1
    If they appeared in both, is there a way for me to differentiate them? – Toxnyc Dec 12 '19 at 22:21
  • If they appear in both, the address is both sending and receiving at least some of the coins in the entire transaction. The coins it is sending will be in the vin array, and the coins it is receiving will be in the vout. – Raghav Sood Dec 14 '19 at 2:20

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.