API Support Forum
User Profile

Viewing User Profile for: RKhan61


About

Feb 02, 2015 06:49 PM

Apr 04, 2016 12:52 PM

Apr 25, 2016 12:52 PM



Post Statistics
RKhan61 has contributed to 2 posts out of 5677 total posts (0.04%) in 3579 days (0.00 posts per day).

20 most recent posts:

API Support » RequestTicks gets no response after auto-reconnect Apr 04, 2016 @ 12:52 PM (Total replies: 1)

Hi Everyone,

The problem I'm seeing is that if I Tick Request for a certain contract, and certain time period when the "OnLoginComplete" returns after connecting to OEC/GAIN, it returns the ticks asked for using the event handler "OnTicksReceived".

public void oecClient_OnLoginComplete()
{
OEC.API.Contract c = oecClient.Contracts.First();
OEC.API.Subscription sub = oecClient.RequestTicks(c, DateTime.UtcNow.AddHours(-2), DateTime.UtcNow);
}


If the connection is broken and it auto-reconnects, then again the "OnLoginComplete" is called, which calls for the tick data the exact same as before, however, this time no ticks return and the handler "OnTicksReceived" is never called.

This does not happen if I disconnect and reconnect manually, it only happens after auto-reconnect.

Is anyone else experiencing the same issue?

*PS... I'm programming in C#.
Reza Khan


Market Data » Historical Tick Data May 26, 2015 @ 03:13 PM (Total replies: 1)

Hello,

I am writing a program that gets the last 3 days (OEC server limit) of tick data for a series of contracts, i find that the RequestTicks function:

oecapi.RequestTicks(contracts.First, DateTime.UtcNow.AddDays(-1), DateTime.UtcNow );

Usually reaches the max 65553 limit for ticks for such contracts as the ES or NQ, before it gets all the ticks for the day.... what's the best practice for calling for these ticks so that I can get all the ticks for the past 3 days without having to write complicated middle functions.

Thanks much,
Reza

Reza Khan