API Support Forum
User Profile

Viewing User Profile for: JGagnon


About

Apr 11, 2011 10:08 AM

Jul 10, 2014 11:25 PM

Jul 10, 2014 11:25 PM



Post Statistics
JGagnon has contributed to 95 posts out of 5245 total posts (1.81%) in 3937 days (0.00 posts per day).

20 most recent posts:

API Support » Volume Data for YM on test server Jul 10, 2014 @ 11:25 PM (Total replies: 6)

I have commented out this "if" statement and the subscription appears to be working properly. Not sure if this will cause other unintended problems, this is code from the samples.

John Gagnon

API Support » Volume Data for YM on test server Jul 10, 2014 @ 11:12 PM (Total replies: 6)

I did some more digging, if you look at the code above where it states:

if (setContract.CurrentPrice == null)
{
:
:

This variable is set to null for everything except for contract: YMU4 which instead of null contains this value:

OEC.API.Price

This causes the if statement to fail and is not subscribed to.

Do you know why this would happen?


John Gagnon
Edited by JGagnon on Jul 10, 2014 at 23:12:49

API Support » Volume Data for YM on test server Jul 10, 2014 @ 03:44 PM (Total replies: 6)

Hi Chris -

We are still experiencing this problem, all other securities are working fine, but YMU4 is still stale on DEMO, here is our code and at the end are the contracts we are subscribing to and the latest date for data received. Please advise on how to check for any error reporting that we have exceeded our limit. Also since YMU4 is the fourth contract requested I do not think that is the issue. I have even changed the subscription request to only request the first 4 contracts but there was no change in behavior.

Thank you,
-John

private void oecClient1_OnSymbolLookupReceived(OEC.API.SymbolLookupCriteria SymbolLookup, OEC.API.ContractList Contracts)
{
Console.WriteLine(String.Format("OnSymbolLookupReceived: {0} : {1} contracts", SymbolLookup.SearchText, Contracts.Count));

OEC.API.Subscription BarSubscription = null;

ContractList.AddRange(Contracts);

foreach (OEC.API.Contract setContract in Contracts)
{
var tempContract = setContract;
var workingContract = WorkingContracts.Where(i => i.Name == tempContract.Symbol);
if (workingContract.Any())
{
if (setContract != null)
{
if (setContract.CurrentPrice == null)
{
OEC.Data.SubscriptionType subType = OEC.Data.SubscriptionType.VolumeBar;
DateTime dtStart = workingContract.FirstOrDefault().LastRunTime.ToUniversalTime();
OECClient.Global.RequestBars(setContract, dtStart, DateTime.UtcNow, subType, 100);

BarSubscription = OEC.API.OECClient.Global.SubscribeBars(setContract, dtStart, subType, 100);

}

DateTime.UtcNow.AddMinutes(-10));
BarSubscriptions.Add(BarSubscription);
}
}
}
}


--------------------------------

2014-07-10 15:33:17.120 6EU4
2014-07-10 15:34:04.227 ESU4
2014-07-10 15:34:03.733 NQU4
2014-07-08 18:47:42.903 YMU4
2014-07-10 15:25:38.137 6AU4
2014-07-10 15:29:05.280 6BU4
2014-07-10 15:21:54.470 6CU4
2014-07-10 15:24:05.717 6JU4
2014-07-10 15:22:05.713 6SU4
2014-07-10 15:21:48.290 6MU4
2014-07-10 15:21:38.870 6NU4
2014-07-10 15:23:26.033 DX-MU4

John Gagnon

API Support » Volume Data for YM on test server Jul 10, 2014 @ 10:05 AM (Total replies: 6)

Actually this is on the DEMO server, not test, sorry about that.

John Gagnon

API Support » Volume Data for YM on test server Jul 10, 2014 @ 07:22 AM (Total replies: 6)

Specifically:

YMU4

John Gagnon

API Support » Volume Data for YM on test server Jul 10, 2014 @ 07:15 AM (Total replies: 6)

It appears we have stopped receiving YM subscription volume data. We are receiving data for 6E, ES, and NQ without problem it is only YM. The last data we received was dated:

2014-07-08 18:23:27.320

John Gagnon

API Support » OnTicksReceivedEvent not firing on DEMO server Nov 13, 2013 @ 10:27 PM (Total replies: 9)

Ok, I guess this code which gets executed is for price update subscription or something?

oecClient1.Subscribe( c );

John Gagnon

API Support » OnTicksReceivedEvent not firing on DEMO server Nov 13, 2013 @ 09:55 PM (Total replies: 9)

Quote: We had no release in SIM over weekend. UUID code was in place for over a year, just not everybody was checked.

I followed your instructions and successfully got ticks in Advanced Example and quote updates in Basic without changes in code, OEC Trader uses the same OECAPI and gets both ticks and quotes. So, my username works fine. I will try to find out what usernames do you use to check server logs.

--- Original message by VictorV on Nov 13, 2013 08:30 PM
Hi Victor -

Yes Quote updates works in basic example, this is because it is using the oecClient1_OnPriceChanged event to update the price.

HOWEVER, the output window should be showing whenever there is a new tick and it is not. You can set a breakpoint on function: oecClient1_OnTicksReceived and it will never fire until you make the code change I mentioned in my previous post.

I'm curious why my test app stopped working on DEMO until I added the UUID if no code has changed on the backend.

Regards,
-jg

John Gagnon

API Support » OnTicksReceivedEvent not firing on DEMO server Nov 13, 2013 @ 07:12 PM (Total replies: 9)

Hi Victor -

I don't think it should be isolated to a particular login, you can look up our login for our company Old House Landing Company - we were able to access tick data prior to the code change that was released to start requiring UUID in the code, so it looks like the bug was introduced with that code release. After the UUID change was made on the server our code that collected tick data stopped working.

It seems to be a bug on the server side. If you download your sample OEC Example (the simple one, not the advanced). Then if you run it, and enter a buy at market for 1 contract for ESZ3, if you look in Visual Studio in the Output window you will notice that no events are firing for Tick Received (no lines are written to console, you can set a breakpoint as well and it will not get trapped). The price change data events are being captured and changing in the status bar of the sample application. To get it to work you cancomment out this line:

oecClient1.Subscribe( c );

and uncomment the line below that follows in the code snippet below, and it will work. I figured this out by testing your advanced example and it seems to work using this code syntax.



/// <summary>
/// When user selects a contract, it displays current price or subscribe for it.
/// </summary>
private void cbContract_SelectionChangeCommitted( object sender, EventArgs e )
{
OEC.API.Subscription TickSubscription = null;
OEC.API.Contract c = cbContract.SelectedItem as OEC.API.Contract;
if( c != null )
{
if( c.CurrentPrice == null )
oecClient1.Subscribe( c );
// TickSubscription = OEC.API.OECClient.Global.SubscribeTicks(c, DateTime.UtcNow.AddMinutes(-10));
else
UpdatePrice( c );
}
}


The problem I am having is in our test application that connects to our DB etc... we are using the code that was originally commented out above and it is still not working.

So it looks like I need to recode the application from scratch using the simple OEC example I mentioned above. If you guys spot a bug on your side and think you have a fix just post a reply here and I can test it again.

John Gagnon

API Support » OnTicksReceivedEvent not firing on DEMO server Nov 11, 2013 @ 10:48 AM (Total replies: 9)

Thanks Chris -

We realized we did not have UUID properly set. The UUID change in the code was made a week ago and we are able to login and stay logged.

The problem we have now however is no tick subscription data on DEMO is being received via the event in my first post.

Thanks,
-jg

John Gagnon

API Support » OnTicksReceivedEvent not firing on DEMO server Nov 11, 2013 @ 01:04 AM (Total replies: 9)

We were able to subscribe for tick/volume data on DEMO server up until last Sunday and then we started receiving an error similar to Unsupported Software (I don't remember the error exactly). We were able to properly set our UUID and our program ran on DEMO server without any problems. However the OnTicksReceivedEvent stopped firing for the contracts we subscribed to. Can someone take a look at this please and let me know when this issue has been fixed?

We are subscribing for multiple contracts using the code below.

private void oecClient1_OnSymbolLookupReceived(OEC.API.SymbolLookupCriteria SymbolLookup, OEC.API.ContractList Contracts)
{
try
{
Global.ContractList.AddRange(Contracts);

foreach(var contract in Contracts)
{
var tempContract = contract;
var workingContract = Global.WorkingContracts.Where(i => i.Name == tempContract.Symbol);
if(workingContract.Any())
{

TickSubscription = OECClient.Global.SubscribeTicks(contract, workingContract.FirstOrDefault().LastRunTIme);

Global.TickSubscriptions.Add(TickSubscription);
}

}
}
catch (Exception ex)
{
string mySubject = "Data Feed";
string myBody = "oecClient1_OnSymbolLookupReceived [" + ex.Message + "]";
int SMS = 0;

DatabaseWrapper.OHLCSendMail(mySubject, myBody, SMS);
}
}

and we creating our stub to receive the ticks using the code below:

new OEC.API.OnTicksReceivedEvent(this.oecClient1_OnTicksReceived);

However when we debug the code, the above event is never trapped by a breakpoint.

John Gagnon

API Support » Trade was rejected MaxQty=100 Jul 08, 2013 @ 08:20 AM (Total replies: 3)

Username: JGagnon370

the trade was for 471 contracts, maybe increase the limit to 1000 just for this week?

John Gagnon

API Support » Trade was rejected MaxQty=100 Jul 08, 2013 @ 07:41 AM (Total replies: 3)

We are doing some scaling testing this week to ensure our partial fills are working on large trade sizes. We reset our balance to be a million dollars.

Should we test this on the demo server or will we face the same limitation?

Is there any way to lift this requirement for us this week while we continue testing?

John Gagnon

API Support » Staging has been down since 9:25 AM Jun 27, 2013 @ 07:53 AM (Total replies: 2)

just to clarify, since 9:30 AM yesterday

John Gagnon

API Support » Staging has been down since 9:25 AM Jun 27, 2013 @ 07:53 AM (Total replies: 2)

All of these have been down since 9:30AM please look into this and restore price change service:

6EU3
ESU3
NQU3
YMU3
6AU3
6BU3
6CU3
6JU3
6SU3
6MU3
6NU3
DX-MU3

John Gagnon

API Support » Staging has been down since 9:25 AM Jun 26, 2013 @ 10:59 AM (Total replies: 2)

Many disconnects, now it is connected but receiving no price change data for:

6E, ES, NQ, YM

John Gagnon

API Support » 6EU3 No Price Change Data Jun 10, 2013 @ 12:32 PM (Total replies: 3)

Hi Chris,

There is no price change data coming through for any of the 5 symbols you listed.

I want to emphasize we are collecting price change data and not tick data using the event:

OEC.API.OnPriceChangedEvent(this.oecClient1_OnPriceChanged);

We are receiving price change data for:

ESM3
NQM3
YMM3

so I don't think it is our implementation that is faulty. I have not verified this with the sample OEC applications, if I launch that it would interrupt our flow of the 3 symbols above.

John Gagnon

API Support » 6EU3 No Price Change Data Jun 10, 2013 @ 08:33 AM (Total replies: 3)

Not receiving any price change data for all of the following:

    6EU3
    6AU3
    6BU3
    6CU3
    6JU3
    6SU3
    6MU3
    6NU3
    DX-MU3


This is the event being captured:
OEC.API.OnPriceChangedEvent(this.oecClient1_OnPriceChanged);

Our code should be sound since we are still receiving price change notifications for the following:

    ESM3
    NQM3
    YMM3


John Gagnon

API Support » 6EU3 No Price Change Data Jun 09, 2013 @ 06:28 PM (Total replies: 3)

I believe 6EU3 should have become the front month tonight.

We are not receiving any price change data for 6EU3 so far.

Can someone respond as to what is going on please?

John Gagnon

API Support » No 6E Price Change Data since 4:59PM Jun 07, 2013 @ 12:03 PM (Total replies: 6)

Still no Price Change data since close of trading day Monday:

6EM3
6CM3
6MM3
6NM3

John Gagnon