API Support » Streaming Issues: Sep 09, 2010 @ 03:12 PM (Total replies: 2) | |||||
Still need help on 2 and 3, however, my bad on #1 which was due to a basic error in program timing.. Thomas Ketcheson |
|||||
API Support » Streaming Issues: Sep 09, 2010 @ 12:38 PM (Total replies: 2) | |||||
I'm streaming tiks from api.openecry.com on a single subscribed contract using VB6. 1. Contract Subscription stops streaming 1 minute before the hour consistently 2. Trying to subscribe to Bar information on the contract: The following statment returns as object: Set testbars = api.RequestBars(Contract, 40427, 40426, SubscriptionType_Bar, 60) However, compiler doesn't like this within the class: Private Sub c_OnBarsReceived(ByVal subscription As OECAPICOM.subscription, ByRef bars() As OECAPICOM.Bar) It gives me this error message: “Function or interface marked as restricted, or the function uses an Automation type not supported in visual basic” Any other ways to get to the bar information or other work around? 3. By the way: Still can't get C# advanced example to work with firewalls of any sort disabled. Any other ideas on the matter from me on Sep 1? Thanks, Thomas Ketcheson |
|||||
API Support » Quotes Tab on Advanced Example Sep 01, 2010 @ 03:03 PM (Total replies: 3) | |||||
Incidentally, I' using the C# code from "OEC API Adv Example.csproj" and all of its components from your web site. Thanks, Thomas Ketcheson |
|||||
API Support » Quotes Tab on Advanced Example Aug 31, 2010 @ 06:56 PM (Total replies: 3) | |||||
Disabled anything that I know of that calls itself a firewall including windows firewall and another antivirus program. This didn't work on either of 2 computers. Not a cmputer jock, so don't know if this mimics what you suuggest. Is there a different thng I need to do? Thanks Thomas Ketcheson |
|||||
API Support » Quotes Tab on Advanced Example Aug 31, 2010 @ 11:49 AM (Total replies: 3) | |||||
the 'OEC API Advanced Example.exe' in the bin/debug file works fine for quotes, charts everything else. C sharp example is a different story. Doesn't seem to subscribe or give me info in Quotes, DOM, Chart. My attempt in CS was: server: api.openecry.com TThomas65 ZNZ0 10 yr US T-Note ( other contracts also don't work) Attempted again just now Connection, orders, positions/balance, symbol lookup works quotes, charts don't Thanks Thomas Ketcheson |
|||||
API Support » More VB6 and COM questions Aug 20, 2010 @ 01:44 AM (Total replies: 0) | |||||
Trying to implement VB6 code for RequestBars and SubscribeBars using OECAPICOM. I'm rusty and tired. Can anyone point me to code snippets to help with this. Thanks, Thomas Ketcheson |
|||||
API Support » VB6 anyone? Aug 19, 2010 @ 02:14 PM (Total replies: 5) | |||||
Thanks Victor. Guess I was just examining things too soon. The entire code seems to work now. Thanks for your help Tom Thomas Ketcheson |
|||||
API Support » VB6 anyone? Aug 18, 2010 @ 11:43 AM (Total replies: 5) | |||||
Interfaces? .. Interesting. I've not used these before but see the use of them now. Thanks for shedding light on the issue. Code: IN the VB project I have a form called 'frmLogin' with textboxes 'tbConnectStatus' and 'tbContract' and a connect and disconnect butten Here's the code after 'login' has proved sucessful. IN the OECClass 'Declarations Public WithEvents c As oecApicom.OECClient . . . Private Sub c_OnLoginComplete() frmLogin.tbConnectStatus.Text = "Connected" frmLogin.tbContract.Text = "ZNU0" 'this can change.. Quotes.SubscribeAll c, True End Sub IN module Quotes: ' Declarations: Private SubscribedContracts(100) As oecApicom.Contract Private api As oecApicom.IOECClient --- Public Sub SubscribeAll(oecApi As oecApicom.IOECClient, lookup As Boolean) Set api = oecApi Dim i As Integer ' For i = 1 To 100 '**TK Don't bother with loop i = 1 '**TK Dim Name As String Name = frmLogin.tbContract.Text '**TK [Name = Range("A" & (i + 2)).value] 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 frmLogin.tbContract.Text = Contract.Symbol '**TK [ Range("A" & (i + 2)).value = contract.Symbol ] ElseIf Len(Name) > 1 Then If lookup Then LookupRequest Name 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 '**TK Don't bother with loop End Sub ' Note : LookupRequest is unchanged from Excel example 'updateContract has been changed in line 3 to ' "For I=a to 1 'instead of 100 'UpdatePrices has been changed as follows: Private Sub UpdatePrices(Contract As oecApicom.Contract, row As Integer) On Error GoTo Err Dim Price As oecApicom.IPrice Set Price = Contract.CurrentPrice If Not (Price Is Nothing) Then frmLogin.TbPrice = Price.LastPrice '**TK End If Exit Sub Err: End Sub Thomas Ketcheson |
|||||
API Support » VB6 anyone? Aug 17, 2010 @ 03:23 PM (Total replies: 5) | |||||
Have successfully used the -Sample Com Book.xls- excel workbook and am now attempting to implement a portion of it in VB6--- mostly interested in quotes. I Developed a simple form to connect and show a single contract with price. Code from the Quotes SubscribeAll sub was put into a module. Minor code changes were made to address the interface with a VB form instead of an excel workbook. Problem 1. The connection works as does the pass-off of variable c, an OECClient, to the SubscribeAll subroutine. However the contract always ends up as nothing. I’ve tried it with various symbols that worked in the spreadsheet. Problem 2. I don’t understand the OECAPICOM objects that begin with an “I”. For instance .Icontract . IOECClient, .IPrice , other things beginning in I. They don’t appear in the object browser, yet the compiler has no complaints: What are these??? Thomas Ketcheson |