I am trying to find the best solution for catching deposits to the subaccounts. I couldn’t manage to find any webhook for that. So far, there is a WebSocket that finance push deposits on it, but there is no trxId for them, and on the other hand, a history API exists that has a rate limit and also sounds storage to me calling an API as a routine call to get all the changes.
Also, the socket will be disconnected automatically and we need to reconnect it every minute.
So long story short, what is the best practice of getting deposits information include TRXID?
So long story short, what is the best practice of getting deposits information include TRXID?
Whenever you receive a websocket update that the user has received a deposit, query the API for the deposit history. This method in theory is not likely to break the rate limit. With that said, there is no other method, apart from constantly polling the deposit history endpoint, to solve your issue.
Also, the socket will be disconnected automatically and we need to reconnect it every minute.
If you are not observing the ping/pong framework, your connection will be disconnected.