How to listen to an address or transaction_id continuously? I am running bitcoin core on my node. I have two questions.

1) I want to get notified whenever there a new transaction in the blockchain. 

2) If I give an address, I should get all the details about the address ( when there is a new payment to the address). 

I want to make a callback API for the deposits. Could anyone tell how to do it?

Thanks
You can use Bitcoind's ZMQ integration. It lets you get notify instantly when a transaction is made (whatever the address), you can then do the filtering yourself if you want to pinpoint a specific address.

This setup requires a bit of work to do the transaction parsing and filtering, but lets you run without relying on third parties. You won't get the balances of each deposit address too, just the deposits (but you can get the balancet from elsewhere).

Another solution (that relies on a third party) would be to use blockchain.info's service.