Author |
Topic: OECClient.Contracts is empty? (4 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
MMartinovic306 Posts: 2 Joined: Oct 11, 2012 |
I am trying to connect to api servers, the connection seems to be established fine, but when I try to pick a contract, it fails, because OECClient.Contracts contains no items (it's not null, just zero-length list.)
I am using following code:
and then in oclient_OnLoginComplete i try to retrieve the contract:
which fails on the first line as oclient.Contracts.Count is zero. What am I doing wrong? (I've been snooping around other oclient variables, and for example oclient.BaseContracts populates just fine, but all the items in it seem to have their Contracts list/property zero-length as well. All the other properties (Accounts, Channels, Currencies, everything) seem to be initialized fine, it seems to me just as if server was consistently trying to convince me there are no contracts available to subscribe to...) Miroslav Martinovic |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
You need to load a contract first. Please check SymbolLookup method.
Victor Vins Lead Software Developer |
||||
MMartinovic306 Posts: 2 Joined: Oct 11, 2012 |
Thank you, that solved it.
As a sidenote, having a sample app more informative than the documentation iteslf is generally not an ideal state of things, that's just for your consideration. Nevertheless, thank you very much. Miroslav Martinovic |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
We've updated our API Documentation. Hopefully new version can clarify some issues http://www.openecry.com/cfbb/index.cfm?page=topic&topicID=766
Victor Vins Lead Software Developer |
||||