Is there any way to find out latest bitcoin transaction of a particular address in bit-cli, without knowing the txid? I would like to find out the immediate last transaction of addressA.

But so far, I can only do this, bit-li gettransaction &lt;txid&gt; then bit-cli decoderawtransaction &lt;hex&gt;

But I want to do something like this:

bit-cli lasttransactionto &lt;addressA&gt;

How can I do that, without knowing the tx id??
Bitcoind doesn't index by address, but you can scan the uxto set for outpoints which are spent to the address of interest: 


See scanutxoset in the documentation:
https://bitcoincore.org/en/doc/0.17.0/rpc/blockchain/scantxoutset/
However, it is not clear to how it will be supported in the future: https://bitcoincore.org/en/meetings/2018/05/24/
Also note, that the utxo set may not return any result for your address, if the last transaction output associated with that address has been spent (not member of the uxto set anymore).


Alternatively, Libbitcoin-server indexes all transactions by address per default:


See the CLI command bx fetch-history &lt;address&gt;: https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-fetch-history
Which makes fetch_history server request: https://github.com/libbitcoin/libbitcoin-server/wiki/Query-Service#blockchainfetch_history3
Above commands/requests will return ALL transactions in order of confirmation height related to any standard address and indicate whether the outpoint was spent or not.