Comments (6)
I had the same issue...
from binance-java-api.
Same issue here..
from binance-java-api.
@gizmochief7 this happened when placing a new order?
from binance-java-api.
@joaopsilva Yes, but not every time I placed a new order. It would happen after several hours of successful buying and selling transactions. I added in a temp hack that sorta helped by clearing the interceptors list when createService
method was called in the BinanceApiServiceGenerator
class. The reason I did this hack (and by no means am I saying this was the fix), I found in a okhttp3
form that it was suggested to clear the list. I also added some debugging to the interceptor that just counted how many times it was called. I found that every interceptor that was in the list was called ever time a new interceptor was added which grew at a factorial rate which eventually lead to the stackoverFlow
. The error went away but it would then just stop receiving web socket events a few hours later as @lange88 commented on @datalorax PR 3 days ago "after ~16 hours of streaming the web sockets are no longer receiving any data (no exceptions are thrown, the data just stops)" I decided to just stop using it until the web socket connection was stable. So I've been checking in every couple days to see if you had merged @datalorax pull request Error handling and shutdown improvements. I'm hoping these fixes make it stable. However, I did a quick test using his and where i expected to receive an error to happen so that i could clean up the connection, close the socket and reopen it but I found that it didn't throw an error and quietly wasn't working. Hopefully when @datalorax pull request is merged, this will fix the issues. As a side note, I would love to see an example of setting up the websocket with restart fail-over in place so has been shown to last a couple days. The same would be nice for User data stream. I see the same problem the @octn brought up in User data stream premature closing
from binance-java-api.
@gizmochief7 I've raised the above PR to fix this issue.
Note: while the above PR fixes this issue, the fact you are seeing this issue suggests that your application is frequently creating new Binance clients, (rest or ws), rather than creating a client once and re-using. You should probably also look to create the client once!
from binance-java-api.
Indeed @gizmochief7 , you should re-use the client.
from binance-java-api.
Related Issues (20)
- Using multi thread to stream OneSymbol in each thread or using one thread to stream many symbols
- No trading fees when on tesent
- InvalidFormatException when using getQuotePrecision
- Deprecated API Endpoints HOT 2
- Binance API suddenly stops working HOT 2
- Can I use Ipv6 for my API key ?
- Average price absent
- Timestamp for this request was 1000ms ahead of the server's time. HOT 1
- issue getting mixed candlestick
- NewOCO execution failed HOT 2
- 🚨 Looking for maintainers HOT 7
- TRAILING_DELTA missing in FilterType HOT 9
- Not a margin account HOT 1
- Gradle: Could not find com.github.binance-exchange:binance-java-api:master-SNAPSHOT. HOT 2
- Question: how to close the websocket connection? HOT 1
- Be able to change the base url
- onCandlestickEvent timeout after 3-4 days
- getAllAssets() not working
- I don't receive any response bei webSocketClient onUserDataUpdateEvent!!
- Is this library not beeing updated anymore?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binance-java-api.