API Support Forum
OEC API > API Support > EventBatchInterval
Author Topic: EventBatchInterval
(12 messages, Page 1 of 1)
Moderators: VPfau
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Jun 30, 2010 @ 10:35 AM             Msg. 1 of 12
Hello.

There is a very interesting property of OECClient in API:

OECClient.EventBatchInterval Property - Interval for accumulating events to batch, in ms

and two events related with it

OECClient.OnBeginEvents Event - Signaling start of events batch
OECClient.OnEndEvents Event - Signaling end of events batch

Would you please explain this property more detailed?
Is it a built-in buffer?
For which events it can be applyed?
Please share its practical implementation and examples if it's possible.
.

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


Posted: Jun 30, 2010 @ 11:11 AM             Msg. 2 of 12
OnBeginEvents and OnEndEvents are not used at all for now.

EventBatchInterval - how often to update contract quotes.

You can increase its default value to throttle quotes.

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


Posted: Jun 30, 2010 @ 02:10 PM             Msg. 3 of 12
I see a discrepancy between the documentation and your answer.

I use chm-file downloaded from http://www.openecry.com/api/apichm.zip
I use following online doc:
http://www.openecry.com/api/api/OEC.API.OECClient.EventBatchInterval.html
http://www.openecry.com/api/api/OEC.API.OECClient.OnBeginEvents.html
http://www.openecry.com/api/api/OEC.API.OECClient.OnEndEvents.html

Copyright 2010 by OEC, LLC. All right reserved
Generated from assembly API [3.5.0.0]

And all three parameters are present in VBA ObjectBrowser.

1. What mean "not used at all for now"?
2. Did I use old version of doc?
3. Did I use old version of API?

You talk about "increase its value to throttle quotes".
4. In other words - to shape them, to get less quotes than are realy in datafeed?

I have by default EventBatchInterval = 0
5. What'll be happend if it'll be increased to 50 for example?
6. In what units you measure this value?
7. What is the physical meaning you put to this value?

In same time the documentation talk about "accumulating events to batch". Accumulate to batch, measured in ms, I understand.
8. Is it right?

And last.
9. For which events this parameter can be applyed?
For qoutes events OnTicksReceived, OnDOMChanged, OnPriceChanged, etc.? For other events?

Unfortunally, the situation is not clear, but got confused even more after your response.
You are very terse. It's usual for you. I think that my numbered questions will help you do not miss some of them, sorry.

I ask you again about detailed explanation of actual designation and usage of mentioned API elements.

Thank you.
.


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

Edited by CChen15 on Jun 30, 2010 at 14:11:30
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2010 @ 02:47 PM             Msg. 4 of 12
1. Yes, you can see it in the documenation, but it is not used. Trust me. These events are still there for some reasons.
2. No.
3. No.
4. To get accumalated quotes (one packet updates bid/ask of quote, another updates only last price: you can get two updates or one just accumalated with both updates inside depends on this value)
5. You will throttle more price updates
6. Milliseconds, as it mentioned in the documentation
7. I didn't understand the question
8. Please include some meanings to your question.
9. OnPriceChanged

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


Posted: Jun 30, 2010 @ 03:16 PM             Msg. 5 of 12
> 1. Yes, you can see it in the documenation, but it is not used. Trust me. These events are still there for some reasons.

OK. I don't trust for myself and my bad English :) Sorry.

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


Posted: Jun 30, 2010 @ 03:23 PM             Msg. 6 of 12
> 4. To get accumalated quotes (one packet updates bid/ask of quote, another updates only last price: you can get two updates or one just accumalated with both updates inside depends on this value)

OK. 1 packet instead 2. However, you operate by packets, by pieces, by quantifying in this case. How it correlate with msec measuring?
.

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


Posted: Jun 30, 2010 @ 03:25 PM             Msg. 7 of 12
>> 5. What'll be happend if it'll be increased to 50 for example?
> 5. You will throttle more price updates

How much price updates I'll trottle for this 50 unknown units?
.

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


Posted: Jun 30, 2010 @ 03:29 PM             Msg. 8 of 12
OECAPI received the first packet with Bid/Ask changes at 00:00:00, the second one with Last Price - at 00:00:00.100. If this property is less than 100 msec, you will get two events. If it is greater than 100 msec, you will get just one event that will include both changes (bid/ask and last).

Victor Vins
Software Developer
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2010 @ 03:29 PM             Msg. 9 of 12
5. why unknown?

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


Posted: Jun 30, 2010 @ 03:34 PM             Msg. 10 of 12
Quote: OECAPI received the first packet with Bid/Ask changes at 00:00:00, the second one with Last Price - at 00:00:00.100. If this property is less than 100 msec, you will get two events. If it is greater than 100 msec, you will get just one event that will include both changes (bid/ask and last).

--- Original message by VictorV on Jun 30, 2010 03:29 PM
OK. And if I set it to 300 I'll get all of events in this interval in one packet independent of their quantity (on Asian session less and in USA more)?

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


Posted: Jun 30, 2010 @ 03:37 PM             Msg. 11 of 12
Quote: 5. why unknown?

--- Original message by VictorV on Jun 30, 2010 03:29 PM
:)
I could not just relate millisecond and number of packets. Sorry. Now all is clear.

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


Posted: Jun 30, 2010 @ 03:39 PM             Msg. 12 of 12
> 9. OnPriceChanged
OnPriceChanged only?
Not for OnDOMChanged?
.

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