Author |
Topic: ID function (3 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
FGiordano538 Posts: 24 Joined: May 09, 2022 |
there is a function that returns the contracts.id through the symbol.
without going through the SymbolLookupEventArgs event? |
||||
SPikalov Posts: 25 Joined: |
You can use:
var client = GFApi.CreateClient(); …. var contractID = client.Contracts.Get("ESZ22")?.ID; But it can return null if the contract is not loaded from a server For guaranteed results, you still need to use: client.Contracts.Lookup.BySymbol("ESZ22"); and “SymbolLookupEventArgs event” |
||||
FGiordano538 Posts: 24 Joined: May 09, 2022 |
thank you
|
||||