API Support Forum
OEC API > API Support > Request Daily Historical Data
Author Topic: Request Daily Historical Data
(2 messages, Page 1 of 1)
Moderators: VPfau
MFrasson3344
Posts: 45
Joined: Nov 09, 2015


Posted: Jan 28, 2020 @ 11:05 AM             Msg. 1 of 2
I am subscribing to daily historical data using this function:

client.Subscriptions.Bars.Subscribe(contract.ID, client.Subscriptions.Bars.Duration.Create(StartingDate, EndingDate, GF.Api.Subscriptions.Continuity.OneTime), client.Subscriptions.Bars.Description.CreateDays(1))

The callback occurs both on BarsReceived and on DayBarsReceived. Which one should I consider? Is my solution the best way to request daily historical data?

Thanks
Mauro frasson
VPfau
Moderator
Posts: 154
Joined:


Posted: Jan 31, 2020 @ 02:11 PM             Msg. 2 of 2
Hello Mauro Frasson,

>Which one should I consider?
BarsReceived raised for all bars coming to your client. DayBarsReceived raised only for day bars. In 3.5 client DayBarsReceived use to be OnHistoryReceived event.

> Is my solution the best way to request daily historical data?
yes, it is.
Vitaliy Pfau