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

Toxnyc
  • 303
  • 1
  • 8

1 Answers1

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.

Raghav Sood
  • 16,869
  • 3
  • 21
  • 42
  • 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 02:20