Why does deleting a key trigger a listenKeyExpired for all connections on the account? even those who use a different api key.
This is just hell! I just tried it, created a connection on my account using one key.
Everything is fine, then I made DELETE /fapi/v1/listenKey using the second api key. All active connections received listenKeyExpired.
This is such nonsense. If a person uses two connections, they will conflict in 100% of cases. How to separate multiple websocket connections? I can’t control how other apps working with webscoket sadly, its binance part
One exchange account.
2 api keys.
Open websocket connection using 2 different api keys.
Send DELETE /fapi/v1/listenKey using first api key.
Receive listenKeyExpired on both connections.
Both connections will never receive anything from binance again.
Only after full reconnect with new listenKey
Expected result:
Only the api key which send DELETE will recieve listenKeyExpired.
Other connection should stay connected
I have already received confirmation from the binance support that this is not a bug but a feature =)
Unfortunately, so far there is no reasonable possibility to keep two completely disconnected connections to one exchange account, even if 2 api keys are used.
I consider this to be basic functionality and would really like to see the ability to create multiple listen keys on one account.
The solution at the end just forget to all what binance saying on API docs page and do reconnect every XX minutes. They want us to do it the bad way, no problem)
P.S. its the only solution for good websocket connection, trust me.
First of all. I have over 15k api keys. So its not what I’m some kinda noob. Trust me. 6 servers working on this task and it works when you are doing it for your self. But on scale it does not at all, users using many terminals and services all of them trying to connect and disconnect to same account and all this mess just simple do not work stable enough
Try not to delete unnecessary ListenKey - they disconect by themselves after 60 minutes. By the way, the fact that you are working with 2 ListenKeys is strange, after a sometime one of the instances should stop receiving information …
You are asking for help and evading an answer.
I don’t trust you. No matter doing i it for myself or not - important how i do it and how it works. I have only one server that means i kinda noob?
I ask because cannot imagine a task requiring a solution to your problem, even on an enterprise scale. The answer could give an idea.