Unable to "remove" event listener

Hello There,

First of all, I asked a question here and I was told that I will receive update for 4 instruments. But it seems as I don't get for even a single one.

I really have to subscribe for all instruments and then use 5-10 which I use for my trading. Such a waster of bandwidth. Please help.

Second, Is there anyway I can remove an an event listener. For example -

ticker.on( "connect", method1);
ticker.on( "connect", method2);

It calls both method1 and method2 after connection. Is there any way to remove "method1" when I register for "method2" ?

  • sujith
    You need to subscribe for instruments after the connection is successful.
    We use this approach on all our platforms.
    You can change callback anytime but isn't it easy to combine both write a wrapper as in write a method and give that as callback but your method1 is called from there if logged in or else call method2.
Sign In or Register to comment.