API Support Forum
OEC API > API Support > GF.Api.Subscriptions.Ticks issue - Duration.Create(DateTime, Int32)
Author Topic: GF.Api.Subscriptions.Ticks issue - Duration.Create(DateTime, Int32)
(5 messages, Page 1 of 1)
Moderators: VPfau
GRiscaio4932
Posts: 4
Joined: May 04, 2017


Posted: Jan 10, 2020 @ 04:47 AM             Msg. 1 of 5
I don't get any data when i try to subscribe Ticks data to retrive a specified amount of data using Duration.Create(DateTime, Int32)
i.e.:
_tickSubscription = _gfClient.Subscriptions.Ticks.Subscribe(cbSymbol.SelectedContract.ID,
_gfClient.Subscriptions.Ticks.Duration.Create(endData.ToUniversalTime(), 65536));

The other 3 methods Create(DateTime), Create(Int32), Create(DateTime, DateTime) work flawlessly

Can you check and/or send me any solutions.
AMartzke
Posts: 13
Joined:


Posted: Jan 14, 2020 @ 09:45 AM             Msg. 2 of 5
Could I see your working code using the other overloads for ITickDurationFactory.Create? Also, what DateTime are you using in your tick subscription request?
GRiscaio4932
Posts: 4
Joined: May 04, 2017


Posted: Jan 14, 2020 @ 09:54 AM             Msg. 3 of 5
This for example, request ticks data from beginning of the day (if ticks are less than 65536) and subscribe:

_tickSubscription = _gfClient.Subscriptions.Ticks.Subscribe(cbSymbol.SelectedContract.ID,
_gfClient.Subscriptions.Ticks.Duration.Create(DateTime.Today.ToUniversalTime()));
AMartzke
Posts: 13
Joined:


Posted: Jan 14, 2020 @ 12:18 PM             Msg. 4 of 5
I have confirmed the behavior of the API that you are seeing. This appears to be caused by a bug in GFAPI. A fix for this bug will be released this Friday.
GRiscaio4932
Posts: 4
Joined: May 04, 2017


Posted: Jan 16, 2020 @ 12:47 AM             Msg. 5 of 5
Ok, Thanks