API Support Forum
OEC API > API Support > can't get GCLK3 and GNGJ3 through API
Author Topic: can't get GCLK3 and GNGJ3 through API
(7 messages, Page 1 of 1)
Moderators: VPfau
PFranchetti
Posts: 17
Joined: Sep 26, 2012


Posted: Mar 24, 2013 @ 09:13 PM             Msg. 1 of 7
A query with basecontract GCL and GNG on NYM returns:

GCLF4
GCLG4
GCLF5
GCLG5
GCLF6
GCLG6
GCLF7
GCLG7
GCLF8
GCLG8

GNGF4
GNGF5
GNGF6
GNGF7
GNGF8
GNGF9
GNGF0
GNGG0
GNGF1
GNGG1

but no 2013 contract

Paolo Franchetti
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Mar 25, 2013 @ 09:42 AM             Msg. 2 of 7
Hello,

We just checked this and everything seems to be working fine.

Could you please check again and confirm that this is still an issue?

Also, please provide your username and time frame when requests were performed.

Ruslan Kartokhin
Software Developer
PFranchetti
Posts: 17
Joined: Sep 26, 2012


Posted: Mar 26, 2013 @ 05:10 PM             Msg. 3 of 7
It's still an issue,tried all day long (last time 5 minutes ago) with user PFranchetti654
Using oecapicom, object SymbolLookupCriteria set as follows:
searchtext=GCL/GNG
basecontract=GCL/GNG
exchange=NYM
contractkinds=ContractKind_Future
mode=SymbolLookupMode_SymbolStartsWith
bybasecontractonly=true

if this can be of any help,please note that these queries often return results even when exchange is wrong (and they should return nothing)



Paolo Franchetti
Edited by PFranchetti on Mar 26, 2013 at 17:17:23
Edited by PFranchetti on Mar 26, 2013 at 17:17:57
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Mar 27, 2013 @ 09:23 AM             Msg. 4 of 7
Please try to change DesiredResultCount to something more than default 10.

Ruslan Kartokhin
Software Developer
PFranchetti
Posts: 17
Joined: Sep 26, 2012


Posted: Mar 27, 2013 @ 10:31 AM             Msg. 5 of 7
thanks,that was the problem.but I found nowhere in the docs that there is a default value of 10;I would expect not setting that property would return all contracts.It seems strange that limiting results to 10 returns a 2021 contract and not current one:I would expect nearest first.

Paolo Franchetti
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Mar 27, 2013 @ 10:51 AM             Msg. 6 of 7
Contracts in result set are sorted alphabetically.

So, "F" and "G" months from future years go before current year "K".

Edited by RuslanK on Mar 27, 2013 at 11:24:42
PFranchetti
Posts: 17
Joined: Sep 26, 2012


Posted: Aug 16, 2013 @ 02:57 AM             Msg. 7 of 7
Good morning,
still can't get current GNG contract, which is GNGU3. This is due to these facts:
- even if you set DesiredResultCount to high values,OEC server returns a maximum of 50 items;
- contracts definitions for GNG reach at least year 2021 (why?),so I get a lot of distant contracts (2017,2018...) but not current ones

Thank you

Paolo Franchetti