<p>Probably the best way is to keep track of the last ledger index you have processed. So when you process all the transactions from ledger 30,000,000, track that you next need to process ledger 30,000,001. If you rejoin the network at ledger 30,000,500, you know that you need to query ledgers 30,000,001 through 30,000,500 before you are synced back up and can continue to process live ledgers.</p>

<p>Though not quite as good, you can be a bit lazier and just keep track of which transaction you saw last. This does require you to use the <code>account_tx</code> command (or similar) to query. If you see two or more transactions and the first one is the one you last processed, the server should guarantee that there are no gaps.</p>

CC BY-SA 4.0
2018-05-23T19:32:45.630Z
2018-05-23T19:32:45.630Z
David Schwartz
<p>Currently I have setup ripple mainnet server and provide availability of XRP trading, If any user submits the transaction in his account from the external wallet, How I know which transaction performed? Currently, I have used WebSocket socket and subscribe all account to the listener, So when any transaction comes in subscribed account then it will catch the transaction. But the issue is that when my xrp server is down or listeners missed any transaction then how we fetch incoming transaction later.</p>

<ripple><ripple-api>
How to fetch incoming transaction in Ripple
Sudhakar
# How to fetch incoming transaction in Ripple

(Asked by: username_0 on 2018-05-23)

Currently I have setup ripple mainnet server and provide availability of XRP trading, If any user submits the transaction in his account from the external wallet, How I know which transaction performed? Currently, I have used WebSocket socket and subscribe all account to the listener, So when any transaction comes in subscribed account then it will catch the transaction. But the issue is that when my xrp server is down or listeners missed any transaction then how we fetch incoming transaction later.

**Tags:** ripple, ripple-api


---

## 1 answers

### Answer by username_1 on 2018-05-23. Score: 0

Probably the best way is to keep track of the last ledger index you have processed. So when you process all the transactions from ledger 30,000,000, track that you next need to process ledger 30,000,001. If you rejoin the network at ledger 30,000,500, you know that you need to query ledgers 30,000,001 through 30,000,500 before you are synced back up and can continue to process live ledgers.

Though not quite as good, you can be a bit lazier and just keep track of which transaction you saw last. This does require you to use the `account_tx` command (or similar) to query. If you see two or more transactions and the first one is the one you last processed, the server should guarantee that there are no gaps.


---

