API Support Forum
OEC API > API Support > BaseContracts.FindBySymbol problem
Author Topic: BaseContracts.FindBySymbol problem
(9 messages, Page 1 of 1)
Moderators: VPfau
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Sep 28, 2010 @ 12:00 AM             Msg. 1 of 9
Hello.
I discover following problem:

Using "Sample COM Book.xls"

Glob.c.BaseContracts.FindBySymbol("ESH9") rise error:
ERROR 91 - Object variable or With block variable not set

It rise at api.openecry.com server, non at sim or prod.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Sep 28, 2010 @ 08:21 AM             Msg. 2 of 9
Hello,

could you please connect with OEC Trader Developer and check if you have any Futures account?

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Sep 28, 2010 @ 11:05 AM             Msg. 3 of 9
Hm...
Glob.c.Accounts.Count = 0

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Sep 28, 2010 @ 11:27 AM             Msg. 4 of 9
You need to contact Customer Service to open Futures account that will grant you access to futures contracts.

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Sep 28, 2010 @ 11:45 AM             Msg. 5 of 9
Why do they not have done it once, when given a lgn-pwd? They mock me? I have lgn-pwd w/o account... Nice. Good. Can you subscribe me to futures?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Sep 28, 2010 @ 11:55 AM             Msg. 6 of 9
No, I can't. I forwarded your request to manager.

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Sep 28, 2010 @ 12:04 PM             Msg. 7 of 9
OK. I contacted with Chris. He give me access. All are working now. OK. Thank you.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Sep 28, 2010 @ 12:10 PM             Msg. 8 of 9
Few words. It is not right logic, when contract request proceeds before account validating, I think...

File 'Sample COM Book.xls', sheet 'Config'

'...
Glob.c.RequestContracts Glob.c.BaseContracts.FindBySymbol("ESH9")
cmbAccounts.Clear
Dim i As Integer
i = 0
For i = 0 To Glob.c.Accounts.Count - 1
cmbAccounts.AddItem Glob.c.Accounts.ItemByIndex(i).Spec
Next
'...



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia

Edited by CChen15 on Sep 28, 2010 at 12:10:55
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Sep 28, 2010 @ 12:19 PM             Msg. 9 of 9
The sample is supposed for users with futures accounts.

Victor Vins
Software Developer