API Support Forum
OEC API > Market Data > Initial Data
Author Topic: Initial Data
(4 messages, Page 1 of 1)
Moderators: VPfau
SierraChart
Posts: 111
Joined: Jul 17, 2007


Posted: Jul 20, 2007 @ 04:09 PM             Msg. 1 of 4
When I subscribe to a contract, I would like to get all the initial data I can for that contract, particularly the pricing data. The CurrentPrice member of the Contract class is null right after I subscribe, so I assume I have to wait for data to be available. However, waiting for the first OnPriceTick event can take a while if there isn't much activity. Is there any event I can use to know when the CurrentPrice data is available, or is there another way I can get initial data?
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jul 20, 2007 @ 04:26 PM             Msg. 2 of 4
first OnPriceChanged/OnPriceTick event is called as soon as the initial information is available.
SierraChart
Posts: 111
Joined: Jul 17, 2007


Posted: Jul 20, 2007 @ 05:52 PM             Msg. 3 of 4
So should I receive at least OnPriceTick event for each contract I subscribe to even if there is no trading going on at the time?

I subscribed to five different contracts, and a ten minutes later I haven't received any OnPriceTick events. I'm not expecting there to be any trading going on right now, but I know these contracts should at least have current data. Am I missing the events for initial data somehow?
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jul 23, 2007 @ 05:21 PM             Msg. 4 of 4
Sorry, OnPriceTick is not called for initial data. Please use OnPriceChanged event.