API Support Forum
OEC API > API Support > GFApi Equivalent to OECAPI::RequestContracts
Author Topic: GFApi Equivalent to OECAPI::RequestContracts
(3 messages, Page 1 of 1)
Moderators: VPfau
RWare2020
Posts: 205
Joined: Feb 11, 2020


Posted: Sep 24, 2020 @ 06:07 PM             Msg. 1 of 3
What is the equivalent to the OECAPI call RequestContracts that will give us all of the available contracts for the base contract?

I know there is the Expression Builder and ContractLoadRequestBuilder but with the ContractLoadRequestBuilder you need to specify a result count, how do I just request the max amount of contracts available for the base symbol like what was available in the OECAPI?

Thanks
JSmith5611
Posts: 187
Joined:


Posted: Sep 30, 2020 @ 08:50 AM             Msg. 2 of 3
ContractLoadRequest is what you want to use here.
The max you can request at at time is 1000. If you don't have all the contracts you need after that, you can use SkipCount to skip the number of contracts you've already received.

I.e, if you for a given set of Expressions, the first request would have result count of 1000, skip count of 0, then the next would have a result count of 1000, skip count of 1000, etc.

When the actual # of contracts received would be less than 1000 for a given expression set, you know you're done.
Jason Smith

Edited by JSmith5611 on Sep 30, 2020 08:53 AM
RWare2020
Posts: 205
Joined: Feb 11, 2020


Posted: Oct 01, 2020 @ 05:39 PM             Msg. 3 of 3
Okay thank you for the info. I will implement it this way then.

Thanks!