API Support Forum
OEC API > Market Data > Symbol List with Months available
Author Topic: Symbol List with Months available
(6 messages, Page 1 of 1)
Moderators: VPfau
WBetts
Posts: 19
Joined: May 29, 2008


Posted: Jun 05, 2008 @ 12:11 AM             Msg. 1 of 6
Do you have a text file, excel spreadsheet, csv file or any other type of file that contains all of the markets you support with symbol, exchange and contract months available for each market. I can copy / paste symbols from your site pretty easily, however I can't find the contract months without going to the Exchange sites.

Thanks very much for any help.
-TraderBetts
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jun 05, 2008 @ 10:12 AM             Msg. 2 of 6
Please see http://www.openecry.com/traderstoolbox/contract.cfm page for contracts and their available months.
WBetts
Posts: 19
Joined: May 29, 2008


Posted: Jun 05, 2008 @ 10:23 AM             Msg. 3 of 6
Perfect. Thanks Serge!
ASykes69
Posts: 5
Joined: Aug 25, 2008


Posted: Aug 25, 2008 @ 08:49 AM             Msg. 4 of 6
We're logging in to the api.openecry.com database, and trying to subscribe
to GCLV8, but the system cannot find the contract, nor the base contract.
It appears to only be able to find contracts with 4 characters in the name.

Can you please let me know whether or not we should be finding this
contract?

Many Thanks,

The code that I'm using is shown below:

Public Sub SubscribeAll(oecApi As OECAPICOM.IOECClient)
Set api = oecApi
Dim i As Integer
For i = 1 To UBound(aryCommodities())
Dim Name As String
Name = aryCommodities(i - 1).Contract
Dim Contract As OECAPICOM.IContract
Set Contract = api.Contracts.Item(Name)
If Contract Is Nothing Then
Set Contract = Glob.FindNearest(Name)
If Not (Contract Is Nothing) Then
'MsgBox Contract.symbol
ElseIf Len(Name) > 3 Then
Name = Left(Name, Len(Name) - 2)
Dim bc As OECAPICOM.IBaseContract
Set bc = api.BaseContracts.FindBySymbol(Name)
If Not (bc Is Nothing) Then
api.RequestContracts bc
End If
End If
End If

If Not (Contract Is Nothing) Then
api.Subscribe Contract
Set SubscribedContracts(i) = Contract
Else
Set SubscribedContracts(i) = Nothing
End If

Next

End Sub
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Aug 25, 2008 @ 09:00 AM             Msg. 5 of 6
FindBySymbol method requires full contract name.

You can either use either BaseContract.Item("ES") or BaseContract.FindBySybol("ESZ9").
ASykes69
Posts: 5
Joined: Aug 25, 2008


Posted: Aug 25, 2008 @ 10:09 AM             Msg. 6 of 6
Thank you.

How do we get a second or sub-account setup on the API database for test purposes....Our uer name is NLlc and API1000380 is the account we have now