Get previous transaction Id via API commands

+2 votes
Hi,

I just started looking into multichain api and it's functionality. For a given transaction id(txid), I would to get to know about it's previous spent transaction id via api commands. I could not find appropriate commands in https://www.multichain.com/developers/json-rpc-api/

If txid1->txid2 then given txid2, I would like to get the last spent transactiond id txid1.

Thanks
asked Jan 27, 2018 by pcsx22

1 Answer

+2 votes

You should use the following:

getrawtransaction [txid] 1

Then you can see the previous transaction(s) spent within the vin array of the response.

answered Jan 28, 2018 by MultiChain
...