API Support Forum
OEC API > API Support > Issue with Symbol LookUp
Author Topic: Issue with Symbol LookUp
(2 messages, Page 1 of 1)
Moderators: VPfau
BGoyal9136
Posts: 27
Joined: Sep 21, 2017


Posted: Jun 03, 2020 @ 11:14 PM             Msg. 1 of 2
Hi Team,

we are using below code for look up symbol :



_gfClient.Contracts.Lookup.ByCriteria(
new SymbolLookupRequestBuilder()
.WithBaseSymbol(symbol, TextSearchMode.StartsWith)
.Build());



symbol is base symbol : YM,MES



but in GlobalSymbolLookupReceived we are getting only one contract in contract list.ideally all the contracts should come in contractList. noe YM i am getting only YMM20 and for MES , we are getting only MESM20 contract over here.


public void GlobalSymbolLookupReceived(IGFClient client, SymbolLookupEventArgs e)
{

var contractList = new List(e.Contracts);
}

in contractList i am getting only one contract, not more then one.

example :
if i am request symbolLookup for MES symbol so ideally MESM20,MESU20 .... etc. should come but still i am getting only one contract MESM20 in contractList


Could you please check the issue and let us know.

Thanks
Kapil Goyal
JSmith5611
Posts: 187
Joined:


Posted: Jun 04, 2020 @ 08:15 AM             Msg. 2 of 2
add a .WithResultCount(int resultCount) to your SymbolLookupRequestBuilder. The default is 1.
Jason Smith