Author |
Topic: OEC API DOM events less frequent than OEC Trader software (4 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
ORad821 Posts: 5 Joined: Aug 20, 2012 |
Hi, when I subscribe to DOM changes in OEC API, I see that the OnDOMChanged event is invoked much less frequently than the DOM updates in OEC Trader. On high volumes the API OnDOMChanged event is called about 3 times less frequently than the DOM in OEC Trader. The following code can somehow demonstrate this on high volumes. Listening at the beeps on each OnDOMChanged event and looking at the OEC Trader DOM you can clearly see that.
So is my observation correct or is there any way I achieve the same frequency as OEC Trader in the API? Thanks, ORad821
Edited by ORad821 on Aug 30, 2012 at 03:27:33 Edited by ORad821 on Aug 30, 2012 at 03:38:11 |
||||
RuslanK Posts: 69 Joined: Jun 02, 2010 |
Hello
If your application connects to the same environment (api.openecry.com) as OEC Trader does then frequency should be the same. Otherwise it might be different. Also, please take into consideration that DOM window in OEC Trader also subscribes for contract's quote, so user sees updates of DOM and quote. Ruslan Kartokhin Software Developer |
||||
ORad821 Posts: 5 Joined: Aug 20, 2012 |
Hi,
How can I subscribe to contract's quote? The closest thing I can find is OECClient.SubscribeDealQuote method which gives me an "Invalid subscription" exception. What should I use in the API to subscribe to contract's quote and what event is triggered? Thanks Omid Rad |
||||
RuslanK Posts: 69 Joined: Jun 02, 2010 |
It's pretty simple.
You need to use Subscribe method to subscribe http://www.openecry.com/api/api/OEC.API.OECClient.Subscribe.html and then handle OnPriceChanged event http://www.openecry.com/api/api/OEC.API.OECClient.OnPriceChanged.html Ruslan Kartokhin Software Developer |
||||