Author |
Topic: Pagination of symbols - ByCriteria (3 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
JKovalcin926 Posts: 9 Joined: Jan 24, 2022 |
hi, we want to get the list of all futures symbols, we already make the request but we have the maximum limit of 50 results.
Could you help me with indications or examples of how to paginate to obtain them all? I attach the code fragment of the request and the list obtained Thanks for advanced *************************************************************************************** List listaTipo = new List(); listaTipo.Add(ContractKind.Future); IReadOnlyList listaOnlyRead = listaTipo; var _esRequestID = client.Contracts.Lookup.ByCriteria( new SymbolLookupRequestBuilder() .WithResultCount(50) .WithSymbol("", TextSearchMode.AnyInclusion) .WithExpression(new ContractKindsCriterion(GetSelectedContractKinds().ToList().AsReadOnly())).Build()); *************************************************************************************** private static void GFClient_OnSymbolLookupReceived(IGFClient client, SymbolLookupEventArgs e) { foreach (var contract in e.Contracts) { Console.WriteLine("received:" + contract.Symbol); } } *************************************************************************************** |
||||
VPfau Moderator Posts: 164 Joined: |
Hello,
Please see similar topic: https://apisupport.gainfutures.com/Topic/Index/1453 There is a code snipped with example how you can organize a paginated requests: https://bitbucket.org/GainFuturesDev/workspace/snippets/8Eqk9b/gfapi-paged-load-contracts-by-basesymbol Also see these functions of ContractLoadRequestBuilder: WithSkipCount, WithResultCount Vitaliy Pfau
|
||||
JKovalcin926 Posts: 9 Joined: Jan 24, 2022 |
Thanks a lot
|
||||