Author |
Topic: multiple subscription (7 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
FGiordano538 Posts: 24 Joined: May 09, 2022 |
Hi,
my example: Dim Criterio_ = New SymbolLookupRequestBuilder Criterio_.WithResultCount(CInt(Tb_NumeroTit.Text)) Criterio_.WithSymbol(TbTitolo.Text.Trim, TextSearchMode.AnyInclusion) If gfClient.Exchanges.Get(Cb_Exchange.Text) IsNot Nothing Then Criterio_ = Criterio_.WithExpression(New ExchangeIDCriterion(gfClient.Exchanges.Get(Cb_Exchange.Text).ID)) End If Criterio_.Build() TitoliRichiesti = gfClient.Contracts.Lookup.ByCriteria(Criterio_.Build) with this example I subscribe to titles with the same base in the symbol or in the description. Is there a way to subscribe + titles, simultaneously, with distinct symbols? for example (OESM22 P4000, OESM22 P4100, OESM22 P4200) Thank you. |
||||
SRuscak Posts: 50 Joined: Aug 24, 2017 |
Hello,
The code you have posted does fetch contracts matching the criteria into the local cache. However, usually when we say 'subscribe' we refer to a price, charts, or DOM subscription on one of those contracts. This will give you periodic updates for this data. Subscription is a separate call from symbol lookup. You can see code examples here: https://gainfutures.com/GFAPI https://gainfutures.com/GFAPI/html/4e2865e8-7ac9-457e-8d5a-6d930f3408a8.htm |
||||
FGiordano538 Posts: 24 Joined: May 09, 2022 |
Of course I expressed myself badly, I meant a request for info for various symbols.
|
||||
SRuscak Posts: 50 Joined: Aug 24, 2017 |
Perhaps you are looking for a complex symbol lookup expression using 'or'? There is an example here that may be useful:
https://gainfutures.com/GFAPI/html/0522b8f0-2870-43a9-ad0a-76a4421cbac1.htm Maybe something similar to this: _requestID = client.Contracts.Lookup.ByCriteria(
|
||||
FGiordano538 Posts: 24 Joined: May 09, 2022 |
I solved, with "Client.Contracts.Lookup.BySymbol (Symbol)",
scrolling through a list and I request the data of the title individually and then I subscribe it. Same thing to unsubscribe. So I don't have the 50 limit of the "client.Contracts.Lookup.ByCriteria" command |
||||