API Support Forum
OEC API > Market Data > unsubscribe doesnt remove the listener
Author Topic: unsubscribe doesnt remove the listener
(4 messages, Page 1 of 1)
Moderators: VPfau
RPaganini2
Posts: 68
Joined: Jul 20, 2011


Posted: Aug 22, 2011 @ 03:35 PM             Msg. 1 of 4
Hi,

I'm just using oecClient.Unsubscribe(MyWatchedContract) and it continue sending ticks for me.

What more can I do for stop watching ticks from the api?

Thanks

Rufo André Paganini
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Aug 22, 2011 @ 03:48 PM             Msg. 2 of 4
Hello,

you need to use CancelSubscription to cancel a tick subscription. Unsubscribe method is intended to unsubscribe from quote updates.

Victor Vins
Lead Software Developer
RPaganini2
Posts: 68
Joined: Jul 20, 2011


Posted: Aug 22, 2011 @ 04:23 PM             Msg. 3 of 4
Thanks VictorV,

In my case, I'm using the oecClient.SymbolLookup and we don't have access for the subscription directly. How can I do that?

Rufo André Paganini
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Aug 22, 2011 @ 04:46 PM             Msg. 4 of 4
In this case, I think you mentioned quote updates in original questions, not ticks. You cannot unsubscribe quote updates for contracts that have a position.

Victor Vins
Lead Software Developer