question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SubscribeToUserStream - Not receiving Trade Notifications

See original GitHub issue
var successAccount = socketClient.SubscribeToUserStream(listenKey, data =>
{
	// Custom Code
},
data =>
{
	// Custom Code
});

In the above code, delegate in Custom code is not called in some 50% of the time when a new trade happens. Any idea on this issue? Once I unsubscribe and close the app and restart it works. Will it be a good idea to periodically

  1. Check if the Subscription still exists?
  2. If not, periodically unsubscribe and resubscribe to UserStream.

Anyone faced this scenarios before?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:25 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
JKorfcommented, Jul 23, 2018

That’s the one you need. You use the Rest client BinanceClient to open the stream and get a listenkey. That listenkey is then used to connect to the user stream in the BinanceSocketClient. You then have to use the rest client again to send a KeepAliveUserStream every 30 minutes as suggested by Binance. Let me know if you have any issues.

0reactions
iZakaroNcommented, Feb 1, 2022

For me the problem was that second instance of the application is reusing and disposing the user stream key on application exit. Commenting the following code looks that have fixed the problem: //Do not stop UserStreamKey as multiple applications to same api dispose other application events //if (_userStreamListenKey != null) // await HttpClient.Spot.UserStream.StopUserStreamAsync(_userStreamListenKey).UnWrap();

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not getting trade notifications : r/YahooFantasy
Why am I not receiving trade notifications like offers, counters, accepted, pending and rejections like I used to? This is quite cumbersome ...
Read more >
Why am I not receiving trade notification emails anymore?
There, look to make sure that the Trade Notifications email subscription box is checked. If it is not, check the box and this...
Read more >
Steam App not poping out my code or trade offer
Anyone know how to fix it? Try to exit from Steam app with home button instead of back button. Then try to log...
Read more >
Setting up email and push notifications
To receive order fill notifications via email, open the desktop trading platform and go to the Settings menu by clicking the gear. Once...
Read more >
Not receiving push notifications in browser
If you are not receiving push notifications in your browser and your browser supports push notifications, check to ensure that notifications are not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found