Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binance: Retry keep alive. #2958

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

JoeGruffins
Copy link
Member

@JoeGruffins JoeGruffins commented Sep 6, 2024

Untested. Attempting to solve a problem with stuck books.

@JoeGruffins JoeGruffins force-pushed the binancewatchlistenkey branch 3 times, most recently from f436428 to 7b64763 Compare September 6, 2024 08:11
Copy link
Member

@buck54321 buck54321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do something like this so that we can test.

Also, please look into the LIST_SUBSCRIPTIONS websocket message to see if we can leverage that in a periodic check to catch discrepancies.

@JoeGruffins
Copy link
Member Author

Looking into querying the subscriptions.

@JoeGruffins
Copy link
Member Author

Sorry I have not tested this on testnet/mainnet yet, but I should be able to use on testnet correct?

@buck54321
Copy link
Member

Sorry I have not tested this on testnet/mainnet yet, but I should be able to use on testnet correct?

Maybe? I haven't found testing mm on testnet very useful.

Copy link
Contributor

@martonp martonp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a better technique would be if an orderbook has not received an update within a certain period, maybe 30 seconds, then resync the orderbook. Currently we will only know that an orderbook is stale every time checkSubs is run, so it could remain stale for 30 mins.

@buck54321
Copy link
Member

Maybe a better technique would be if an orderbook has not received an update within a certain period, maybe 30 seconds, then resync the orderbook. Currently we will only know that an orderbook is stale every time checkSubs is run, so it could remain stale for 30 mins.

This would result in tons of unnecessary reloads on low-volume markets. checkSubs interval can be much shorter though.

Copy link
Contributor

@martonp martonp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using this diff to test on mainnet. I've turned off my internet connection for 20 mins, then turned it back on, and the orderbooks immediately resync without hitting the new code here. The code looks good otherwise and works fine with the simnet test. Would be nice to be able to reproduce the issue though.

client/mm/libxc/binance.go Outdated Show resolved Hide resolved
client/mm/libxc/binance.go Outdated Show resolved Hide resolved
@JoeGruffins
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants