binance-exchange / binance-java-api

binance-java-api is a lightweight Java library for the Binance API, supporting synchronous and asynchronous requests, as well as event streaming using WebSockets.
MIT License
831 stars 628 forks source link

Balances are not updated #372

Closed LexProfi closed 3 years ago

LexProfi commented 3 years ago

Good day! Prompt - I use the following code in the program:

actory = BinanceApiClientFactory.newInstance(apiKey, apiSecret);
restClient = factory.newRestClient();
webSocketClient = factory.newWebSocketClient();
listenKey = restClient.startUserDataStream();
account = restClient.getAccount();

Then I run the following code at regular intervals:

assetBalances = account.getBalances();
prices = restClient.getAllPrices();

After a while, the balance data stops updating. When executing the code, no error occurs, just the values are old. For example, an order was made for the BTC, but these BTC still remain on the balance sheet. What could be the reason for this behavior?