API Support Forum
OEC API > API Support > CONTRACT PROBLEM
Author Topic: CONTRACT PROBLEM
(2 messages, Page 1 of 1)
Moderators: VPfau
MConcas
Posts: 12
Joined: Sep 15, 2020


Posted: Sep 18, 2020 @ 04:46 AM             Msg. 1 of 2
Hi.

I’m trying to follow your guide on GF API integration on send order (as follow link show https://gainfutures.com/GFAPI/)

I’m encountering problem when I’m trying to retrive the Contract Detail (it is need by the send Order method ).

I can retrive a list of BaseContract ( it has 522 items) .. but when I try to retrive the CONTRACTS INSIDE A SPECIFIC ONE (the IContract object) it give me 0 items (no matter which symbol I choose (ES , ESH18) ..no one of the 522 items has contracts inside itself)
VPfau
Moderator
Posts: 154
Joined:


Posted: Sep 18, 2020 @ 07:47 AM             Msg. 2 of 2
MConcas,

By default we load only contracts which required by client side ei for which you have order or position. In all other cases you need lookup contract before use it.

See the file https://bitbucket.org/GainFuturesDev/basicexample/src/master/GF.BasicExample/Processors/ContractsProcessor.cs from our basic example repository
https://bitbucket.org/GainFuturesDev/basicexample/src/master/
Vitaliy Pfau