API Support Forum
OEC API > API Support > Contracts Lookup
Author Topic: Contracts Lookup
(3 messages, Page 1 of 1)
Moderators: VPfau
DKnapp3857
Posts: 7
Joined: Jul 05, 2022


Posted: Jul 10, 2022 @ 07:00 PM             Msg. 1 of 3
This is the code in the example:

_frontEsSymbolLookupRequestID = client.Contracts.Lookup.ByCriteria(
new SymbolLookupRequestBuilder()
.WithResultCount(1)
.WithSymbol("ES", TextSearchMode.StartsWith)
.Build());

if " .WithResultCount(1)" is removed, it will return 1 contract.

if " .WithResultCount(1)" is set to high it will generate a "software error.

How do I get all of the futures contracts for a base symbol?
SPikalov
Posts: 21
Joined:


Posted: Jul 13, 2022 @ 05:32 AM             Msg. 2 of 3
"How do I get all of the futures contracts for a base symbol?"
Please see:
https://bitbucket.org/GainFuturesDev/workspace/snippets/8Eqk9b/gfapipagedloadcontractsbybasesymbol
SPikalov
Posts: 21
Joined:


Posted: Jul 13, 2022 @ 06:00 AM             Msg. 3 of 3
"“if " .WithResultCount(1)" is set to high it will generate a "software error.”

Maximum possible value 50