user90299: If they use transaction/wallet listener, how do they detect deposit transactions when their services are not running, do they fetch blocks at every height to scan for deposits to avoid any missing?
Thanks,

user90504: There are several ways to accomplish this. First as chytrik stated above, not running your own node is dangerous, but in my opinion only if you plan on submitting transactions. When it comes to watching wallets, there are 2 ways. 

Active scanning. This method involves asking nodes/services what transactions exist for a particular address.
Passive triggering. This is usually accomplished by asking a third party to inform you that a deposit has been detected. 

In the case of 1, it can be costly to scan every address ever used especially when creating a new address for each transaction or scaling to a large user or wallet count. 
In the case of 2, relying only on a third party can be tricky.
The most cost effective way to handle this is to do both. Use a third party for primary notifications. If you expect a transaction during a window of say 10 minutes, you can have your system process the request once the third party triggers, and you can perform a "manual check" from the node directly by asking for all transactions and parsing the results looking for the expected transaction. This will give you the fastest response and the lowest delay. You could even only make the node request once at the end of 10 minutes as a fall back "final check" before invalidating the transaction (common with bitcoin payment services). 
If you're doing something longer term, then you can once again rely on a third party to trigger an immediate update. As a fall back scan once an hour/day/week depending on what the use case is. If it's an end user application allow them to trigger the scan (of course within reason so you don't get DoS'd by your own clients clicking 'rescan'). 
This is the entire "trust but verify". No third party will have your keys. If you're an exchange you'll likely be scanning, but for a better user experience depending on the size of your customer base, scanning millions of wallets every 5 seconds just isn't feasible. You can also use multiple third parties as well. For an exchange these services won't be that expensive. 
If intent on being the third party in these examples, then parse every block that arrives from the blockchain. Do what you need to do when you detect a deposit on one of your addresses. 
Note: I formed this as a "large scale" response to the concept of exchanges. There are other things that can be done at small scale eg: a personal wallet and setting a node to watch an address. 

user59146: They're running full-node implementation. 

how do they detect deposit transactions when their services are not
  running?

It's blockchain, all data available for anyone, they able to fetch data from blockchain anytime.

do they fetch blocks at every height to scan for deposits to avoid any
  missing?

There is a couple ways to get address deposits:

You can check the balance of particular address every N seconds.
You can parse a block and check if there are transactions related to particular address.


90299: <p>If they use transaction/wallet listener, how do they detect deposit transactions when their services are not running, do they fetch blocks at every height to scan for deposits to avoid any missing?
Thanks,</p>
 90504: <p>There are several ways to accomplish this. First as chytrik stated above, not running your own node is dangerous, but in my opinion only if you plan on submitting transactions. When it comes to watching wallets, there are 2 ways. </p>

<ol>
<li>Active scanning. This method involves asking nodes/services what transactions exist for a particular address.</li>
<li>Passive triggering. This is usually accomplished by asking a third party to inform you that a deposit has been detected. </li>
</ol>

<p>In the case of 1, it can be costly to scan every address ever used especially when creating a new address for each transaction or scaling to a large user or wallet count. </p>

<p>In the case of 2, relying only on a third party can be tricky.</p>

<p>The most cost effective way to handle this is to do both. Use a third party for primary notifications. If you expect a transaction during a window of say 10 minutes, you can have your system process the request once the third party triggers, and you can perform a "manual check" from the node directly by asking for all transactions and parsing the results looking for the expected transaction. This will give you the fastest response and the lowest delay. You could even only make the node request once at the end of 10 minutes as a fall back "final check" before invalidating the transaction (common with bitcoin payment services). </p>

<p>If you're doing something longer term, then you can once again rely on a third party to trigger an immediate update. As a fall back scan once an hour/day/week depending on what the use case is. If it's an end user application allow them to trigger the scan (of course within reason so you don't get DoS'd by your own clients clicking 'rescan'). </p>

<p>This is the entire "trust but verify". No third party will have your keys. If you're an exchange you'll likely be scanning, but for a better user experience depending on the size of your customer base, scanning millions of wallets every 5 seconds just isn't feasible. You can also use multiple third parties as well. For an exchange these services won't be that expensive. </p>

<p>If intent on being the third party in these examples, then parse every block that arrives from the blockchain. Do what you need to do when you detect a deposit on one of your addresses. </p>

<p>Note: I formed this as a "large scale" response to the concept of exchanges. There are other things that can be done at small scale eg: a personal wallet and setting a node to watch an address. </p>
 59146: <p>They're running full-node implementation. </p>

<blockquote>
  <p>how do they detect deposit transactions when their services are not
  running?</p>
</blockquote>

<p>It's blockchain, all data available for anyone, they able to fetch data from blockchain anytime.</p>

<blockquote>
  <p>do they fetch blocks at every height to scan for deposits to avoid any
  missing?</p>
</blockquote>

<p>There is a couple ways to get address deposits:</p>

<ol>
<li>You can check the balance of particular address every N seconds.</li>
<li>You can parse a block and check if there are transactions related to particular address.</li>
</ol>
