API Support Forum
OEC API > API Support > m_Client_OnSymbolLookupReceived's Contracts returns nothing for m_Client.SymbolLookup ESM9
Author Topic: m_Client_OnSymbolLookupReceived's Contracts returns nothing for m_Client.SymbolLookup ESM9
(8 messages, Page 1 of 1)
Moderators: VPfau
TLau471
Posts: 25
Joined: Aug 27, 2013


Posted: Mar 17, 2019 @ 11:16 PM             Msg. 1 of 8
Hi,

m_Client_OnSymbolLookupReceived's Contracts use to return the contract when doing a m_Client.SymbolLookup for ESM9.
It now returns nothing. Any idea why?
TLau
VPfau
Moderator
Posts: 100
Joined: Oct 26, 2011


Posted: Mar 18, 2019 @ 07:50 AM             Msg. 2 of 8
Hello,

Please provide a code example and environment you are working on (API, SIM, PROD)

Thank you
Vitaliy Pfau
TLau471
Posts: 25
Joined: Aug 27, 2013


Posted: Mar 18, 2019 @ 11:46 AM             Msg. 3 of 8
SIM

m_Client.SymbolLookup("ESM9")

...


Private Sub m_Client_OnSymbolLookupReceived(ByVal SymbolLookup As OEC.API.SymbolLookupCriteria, ByVal Contracts As OEC.API.ContractList) Handles m_Client.OnSymbolLookupReceived

Dim ctx As OEC.API.Contract = Nothing
ctx = m_Client.Contracts(Contracts.First.Symbol) 'Contracts.First is Nothing

End Sub
TLau
CMicciche902
Posts: 229
Joined:


Posted: Mar 19, 2019 @ 03:44 PM             Msg. 4 of 8
This issue has been resolved and released. Please check again.
Chris M
TLau471
Posts: 25
Joined: Aug 27, 2013


Posted: Mar 20, 2019 @ 03:53 AM             Msg. 5 of 8
Thanks Chris.
TLau
TLau471
Posts: 25
Joined: Aug 27, 2013


Posted: Mar 25, 2019 @ 01:03 AM             Msg. 6 of 8
Chris, I just checked, this is still not working.

m_Client.SymbolLookup("ESM9") returns "No contracts found"

Private Sub m_Client_OnSymbolLookupReceived(ByVal SymbolLookup As OEC.API.SymbolLookupCriteria, ByVal Contracts As OEC.API.ContractList) Handles m_Client.OnSymbolLookupReceived
if Contracts.First is Nothing then
msgbox ("No contracts found!")
end if
End Sub
TLau
CMicciche902
Posts: 229
Joined:


Posted: Mar 26, 2019 @ 03:43 PM             Msg. 7 of 8
TLau,

We sent customers notice about two-digit year. If you updated the DLL of the API, it now requires two-digit year, whereas older API version you used to build application can still use single-digit year for symbol.

Nuget has older API which supports single-digit year - https://www.nuget.org/packages/OECAPI/3.5.14.41

Symbol format to require two-digit year

Dear Valued Customers

Effective October 20, 2018, the GAIN Futures trading platform will prompt
for a software update. We recommend that you perform this update.

The symbol format will change to the following:
Base Symbol + Month Code + Two-digit year

For example, the e-mini S&P format would change from ESU8 to ESU18.

If you are using third-party software, this change may not take place
until the software vendor updates to our latest API version.

If you have any questions, please contact your Introducing Broker.

Sincerely,

GAIN Futures Client Services
Chris M
CMicciche902
Posts: 229
Joined:


Posted: Mar 26, 2019 @ 03:45 PM             Msg. 8 of 8
This was sent to live customers (including your personal email address) on 18-Oct-2018.
Chris M