API Support Forum
OEC API > API Support > OnPriceChanged events for denied subscriptions
Author Topic: OnPriceChanged events for denied subscriptions
(10 messages, Page 1 of 1)
Moderators: VPfau
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Mar 07, 2011 @ 11:43 AM             Msg. 1 of 10
Hello.

When I exceed max subscriptions limit this resulted to mscorlib.Exception event and I get msg "System.Exception: Your subscription limit of 5 has been reached". But OnPriceChanged events for this contract begin to rising resulting to "ERROR: -2147467261 - Object reference not set to an instance of an object." It's strange, but OnDOMChanged events not occures.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 08, 2011 @ 08:22 AM             Msg. 2 of 10
Hello,

I cannot reproduce "ERROR: -2147467261 - Object reference not set to an instance of an object." with our COM samples.

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Mar 08, 2011 @ 08:51 AM             Msg. 3 of 10
The error number is irrelevant in this case. The error is a result only. I say that there should be no quotes for the contract denied to subscription.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 08, 2011 @ 09:20 AM             Msg. 4 of 10
Could you please reproduce it with OEC samples? It would help to figure out the issue.

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Mar 08, 2011 @ 12:30 PM             Msg. 5 of 10
Sorry, I can't.
1. There is only one contract subscribed to DOM.
2. I have tried to insert 'api.SubscribeDOM contract' after Line 23 in Quotes module, but error not rised.

I think that you must to know better, when and where API reports "Your subscription limit of 5 has been reached". Try to connect mscorelib.dll and insert to your code its exepctions handler.

Please do not misunderstand me - I'm a beginner and I'm very heavily to edit your code.

If it help you, "ERROR: -2147467261 - Object reference not set to an instance of an object." rised (and handled by mscorelib OnError handler) after OnDOMChanged event for denied(!) contract and I try to get .BidLevels.Item(0)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Mar 09, 2011 @ 09:32 AM             Msg. 6 of 10
Up

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 09, 2011 @ 09:44 AM             Msg. 7 of 10
This exception happens in client code.

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Mar 09, 2011 @ 09:58 AM             Msg. 8 of 10
What are you able to help me?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 09, 2011 @ 10:00 AM             Msg. 9 of 10
I cannot help to fix client code.

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Mar 09, 2011 @ 10:07 AM             Msg. 10 of 10
I need no in my code fix. I'm needing in consultation and support. I'm a client and you denied me. Indicate please - what I can (must) do to resolve it trouble?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia