Binance Streaming exchange complains about multiple connections #357
Labels
No labels
blocked
breaking
bug
dependencies
duplicate
enhancement
good first issue
help wanted
question
tech debt
testing
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
scion/arbitrader#357
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
thisiscam on Discord is having trouble with staying connected to the Binance websocket. They upgraded XChange to 5.0.6 but otherwise are on the main branch.
One possibility is the fact that we don't explicitly disconnect subscriptions. In
StreamingTickerStrategy#getTickers()we connect and add the subscription(s) to a List, but if we ever got in there a second time we just throw away the old ones and replace them instead of actually callingdispose()on them first. I'm not sure how we'd do it twice since we don't ever remove anything from thetickersMap.Another possibility is that we're putting the wrong
CurrencyPairs in theProductSubscriptioninStreamingTickerStrategy#getTickers()due to thehomeCurrencysetting. The code in theBinanceStreamingMarketDataServicechecks to see if the ticker you're asking for is in the original list created when the connection was first connected. If, for example, we put "BTC/USD" in at that point and "BTC/USDT" in later, or the reverse, that could cause this problem too.