API Support Forum
OEC API > Market Data > bid/ask change notifications
Author Topic: bid/ask change notifications
(7 messages, Page 1 of 1)
Moderators: VPfau
ENissan
Posts: 11
Joined: Mar 07, 2014


Posted: Mar 10, 2014 @ 02:53 PM             Msg. 1 of 7
How can I get an update whenever the bid/ask changes? I only see a way to get notified when there is a new trade.

Thanks,
Eric

Eric Nissan
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 10, 2014 @ 02:57 PM             Msg. 2 of 7
You need to subscribe to quotes.

Victor Vins
Lead Software Developer
ENissan
Posts: 11
Joined: Mar 07, 2014


Posted: Mar 10, 2014 @ 03:00 PM             Msg. 3 of 7
how do I do that? I only see:
oecapi.OnDealQuoteUpdated

is that what I want for the ES?

Thanks.

Eric Nissan
ENissan
Posts: 11
Joined: Mar 07, 2014


Posted: Mar 10, 2014 @ 03:04 PM             Msg. 4 of 7
oh wait I see it is onPriceChanged (quotes) vs onPriceTick (trades), right?

Eric Nissan
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 10, 2014 @ 03:10 PM             Msg. 5 of 7
You can find some explanations here: http://www.openecry.com/api/api/html/4e2865e8-7ac9-457e-8d5a-6d930f3408a8.htm

Victor Vins
Lead Software Developer
ENissan
Posts: 11
Joined: Mar 07, 2014


Posted: Mar 10, 2014 @ 03:17 PM             Msg. 6 of 7
that's the page I am looking at. it is not 100% clear to me.

the documentation has:

oecapi.OnPriceTick += new OEC.API.OnPriceChangedEvent(oecapi_OnPriceTick);
oecapi.OnTicksReceived += new OEC.API.OnTicksReceivedEvent(oecapi_OnTicksReceived);


but there is also
oecapi.OnPriceChanged. It is not clear from the docs why they are using
oecapi.OnPriceTick += new OEC.API.OnPriceChangedEvent(oecapi_OnPriceTick);
(mixing prices and tick events).

what is the difference between OnTickReceived and OnPriceTick?
why in the first example to they overload OnPriceTick with a PriceChanged Event? shouldn't that overload OnPriceChanged?

Thanks.

Eric Nissan
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 10, 2014 @ 04:31 PM             Msg. 7 of 7
Both OnPriceTick, OnPriceChanged relate to quotes. But unlike to OnPriceTick, OnPriceChanged can skip some price updates, if they come too often.

OnTickReceived is related to tick subscription, not to quotes.

Victor Vins
Lead Software Developer