API Support Forum
User Profile

Viewing User Profile for: LCarter2


About

Jun 13, 2013 11:44 AM

Sep 09, 2013 09:35 AM

Sep 09, 2013 09:52 AM



Post Statistics
LCarter2 has contributed to 20 posts out of 5593 total posts (0.36%) in 3962 days (0.00 posts per day).

20 most recent posts:

API Support » Equities, Equity Options and FOREX support Sep 09, 2013 @ 09:35 AM (Total replies: 1)

Are Equities, Stock Options or FOREX supported?
According to the Contract class there are properties for:

IsEquityAsset
IsForex

I tried searching for Forex and Equities, but could not find any.

Is there a list of all supported instrument types?

Leigh Carter

API Support » Options Price Updates: Implied Volatility, Delta, Gamma, Theta, Vega Sep 06, 2013 @ 01:15 PM (Total replies: 1)

When subscribing to options price updates, I have noticed that the values are always 0 for the following properties:

Implied Volatility, Delta, Gamma, Theta, Vega

Is this to be expected?

Leigh Carter

Order Execution » Attaching orders to an existing order Sep 02, 2013 @ 02:14 PM (Total replies: 1)

I am aware that I can place an OSO order where the linked orders are attached as an OCO group and are submitted when the parent order is executed (using SendLinkedOrders(parent, oco_orders[]).

Can I attach orders to an existing order?

For example, lets say I place a limit order and then later I want to attach a stop and limit order to this limit order (as a stop/profit target).

Can I do this or do I have to cancel the original limit order and recreate it?

Leigh Carter

Order Execution » OCO and OSU "Action not supported for instrument status" Sep 02, 2013 @ 02:10 PM (Total replies: 1)

I am attempting to submit an OCO and OSO order, but I am getting the following rejection code:
"Action not supported for instrument status"

It is labor day and after hours. Is this expected?

Leigh Carter

API Support » Options Support Aug 30, 2013 @ 03:20 PM (Total replies: 1)

From the API documentation it looks like I can get access to options for a particular contract from the OEC::API::Contract::Options field.

I attempted to access the options for ESU3. The HasOptions field is set to true, but there are options (ie Options field has a count of 0).

Is there something that I need to do to have the Options field populated?

I tried using the OECClient::RequestContracts method, but this still did not populate the Options field.

Leigh Carter

Order Execution » Trailing Stop Orders Aug 30, 2013 @ 11:04 AM (Total replies: 1)

I am having trouble submitting a trailing stop order.
I looked at the conversation in the following thread:

http://www.openecry.com/cfbb/index.cfm?page=topic&topicID=532

I have tried following the example above, but I cannot get it to work. I am using YMU3 in this case and the current price is: 14776

draft->Type = OEC::Data::OrderType::TrailingStopLoss;
draft->Price = 10;
draft->SetTSData(14776, 0);

I get a confirmation that the order is accepted, but immediately after the order is rejected with the message "Invalid absolute offset"

Is there something that I am doing wrong? Did I mis-interpret this thread?

Leigh Carter

Order Execution » Iceberg Order Issue Aug 30, 2013 @ 10:18 AM (Total replies: 2)

I tried placing an iceberg order through the API on ESU3 yesterday (08/29/2013). It was accepted fine, but now I cannot modify or cancel the order. I get an error "Another command is in execution".

I even tried cancelling it using the sample application and it just won't go away. To make matters worse I now cannot place any other orders for this symbol.

Is this a bug? If so, could somebody fix my account and remove this order? (its LCarter2FIX)

I suspect I did something wrong when submitting the original order. Is there an example of how iceberg orders work?

Leigh Carter

API Support » RequestBars two OnBarsReceived events Aug 22, 2013 @ 02:48 PM (Total replies: 5)

OK, I am still not getting it.
I have not made any calls to SubscribeBars. From the API I don't see any way to specify realtime updates.

Am I missing something obvious here?

Leigh Carter

API Support » Historical Trades Aug 22, 2013 @ 02:28 PM (Total replies: 0)

Is there a way to get a list of historical trades?

Leigh Carter

API Support » RequestBars two OnBarsReceived events Aug 22, 2013 @ 02:14 PM (Total replies: 5)

How do I make sure that I am not subscribed to realtime updates?
Does this affect the Level 1 and Level 2 data if I am not subscribed?

Leigh Carter

API Support » RequestBars two OnBarsReceived events Aug 22, 2013 @ 01:42 PM (Total replies: 5)

I have noticed with the RequestBars method, there appear to be 2 calls to the OnBarsReceived event. This first call has data and the second does not have any data.

Is this expected?

Leigh Carter

API Support » Server TimeStamp Aug 22, 2013 @ 01:41 PM (Total replies: 1)

Is there a way to get the current time on the server?

Leigh Carter

API Support » C++ Example for .Net Aug 15, 2013 @ 12:08 PM (Total replies: 14)

OK, I just sent it...

Leigh Carter

API Support » C++ Example for .Net Aug 15, 2013 @ 12:01 PM (Total replies: 14)

There does not appear to be a way to attach a file. Could I email it to you?

Leigh Carter

API Support » C++ Example for .Net Aug 15, 2013 @ 11:55 AM (Total replies: 14)

The sample you are providing is not of much use to me.

I am creating a command line application, so I have created a separate event thread that processes messages with its own windows message loop.

The main thread accepts commands and posts events to the message loop. All of the calls to the OECClient are made through the event thread. For some reason when the parameters are passed to the OECEvents handler, the memory is deallocated.

I am sure it has something to do with the way memory is managed in .Net. The solution is probably very simple, but I can't find any information online that indicates what needs to be done (or declared).

I have implemented COM based applications in the same way without any issues...
Unfortunately, I am stuck at this point.

Leigh Carter

API Support » C++ Example for .Net Aug 15, 2013 @ 11:34 AM (Total replies: 14)

Unfortunately, this still does not work for me.
I tried putting the Symbol Lookup in the onLoginComplete and it still does not work :(

Leigh Carter

API Support » C++ Example for .Net Jul 29, 2013 @ 10:15 AM (Total replies: 14)

Thanks Victor,

I was able to setup a windows event loop to workaround this.

Now I am having a problem accessing parameters from events. It looks like the memory is being deallocated prior to calling my event.

For example, the OnSymbolLookupReceived() event, the ContractList parameter gives an access violation as soon as I try to access the Count field (ie contracts->Count).

I had this issue on prior projects with COM programming in C++. In that case I had to initialize the COM module properly and ensure that all COM calls were made from a single thread that was initialized with CoInitialize() method.

Is there something similar that needs to be done for .Net?

Leigh Carter

API Support » C++ Example for .Net Jul 25, 2013 @ 02:28 PM (Total replies: 14)

Unfortunately, it never gets into my sample code.

I don't get any callback to onLoginComplete() or onLoginFailed(FailReason reason)

I only noticed the IOException in the output window.

Here is the source code:

#include "stdafx.h"
#include <sstream>
#include <iostream>
#include <string>

#using <System.dll>

using namespace System;

using namespace OEC::API;
using namespace OEC::Data;
using namespace std;

void onLoginComplete()
{
cerr << "Login Complete!" << endl;
}

void onLoginFailed(FailReason reason)
{
cerr << "Login Failed!" << endl; //reason.ToString() << endl;
}

void onDisconnected(bool unexpected)
{
cerr << "Disconnected! " << endl;
}

int _tmain(int argc, _TCHAR* argv[])
{
cerr << "INITIALIZING" << endl;

OECClient client;
client.UUID = "9e61a8bc-0a31-4542-ad85-33ebab0e4e86";

cerr << "CONNECTING" << endl;
client.Connect("api.openecry.com", 9200, "vic", "vic", true);
client.OnLoginComplete += gcnew OnLoginCompleteEvent(&onLoginComplete);
client.OnLoginFailed += gcnew OnLoginFailedEvent(&onLoginFailed);
client.OnDisconnected += gcnew OnDisconnectedEvent(&onDisconnected);

cerr << "Waiting for input" << endl;

string input = "";
getline(cin, input);
cerr << "Exiting" << endl;

return 0;
}

Leigh Carter

API Support » C++ Example for .Net Jul 25, 2013 @ 01:57 PM (Total replies: 14)

Hi Victor,

I tried creating a simple test program (based on the C# connection example), but I am getting a System.IO.IOException occurring in the CommLib.dll

See the debug output below.

I am sure it is something simple, but since this error is occurring int the CommLib.dll, it is very difficult for me to trouble shoot.

Maybe you could point me in the right direction?

'OEC.exe': Loaded 'C:\dev\OEC\Debug\OEC.exe', Symbols loaded.
'OEC.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\mscoree.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\msvcp110d.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\msvcr110d.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\msvcr110_clr0400.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\bf2ecabcd96ec8238dc385b0a3ffa084\mscorlib.ni.dll', No native symbols in symbol file.
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Symbols loaded.
'OEC.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Symbols loaded.
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\dev\OEC\Debug\OEC.exe', Symbols loaded.
'OEC.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System\9c7c3cd390aa067130df3a89c0d3b6e4\System.ni.dll', No native symbols in symbol file.
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Symbols loaded.
'OEC.exe': Loaded 'ImageAtBase0x100b0000', Loading disabled by Include/Exclude setting.
'OEC.exe': Loaded 'ImageAtBase0xb60000', Loading disabled by Include/Exclude setting.
'OEC.exe': Unloaded 'ImageAtBase0x100b0000'
'OEC.exe': Loaded 'C:\Windows\SysWOW64\cryptsp.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\rsaenh.dll', Symbols loaded (source information stripped).
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\dev\OEC\Debug\API.dll'
'OEC.exe': Loaded 'ImageAtBase0xfcf0000', Loading disabled by Include/Exclude setting.
'OEC.exe': Loaded 'ImageAtBase0xc50000', Loading disabled by Include/Exclude setting.
'OEC.exe': Unloaded 'ImageAtBase0xfcf0000'
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\dev\OEC\Debug\CommLib.dll'
'OEC.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Drawing\9cab1291edbd51be678afdaf86c643c4\System.Drawing.ni.dll', No native symbols in symbol file.
'OEC.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\94fc97289ba0902a9237cdbfc19cdcc1\System.Windows.Forms.ni.dll', No native symbols in symbol file.
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Symbols loaded.
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Symbols loaded.
'OEC.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Program Files (x86)\DigitalPersona\Bin\DpOFeedb.dll', Cannot find or open the PDB file.
'OEC.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Program Files (x86)\DigitalPersona\Bin\DpOSet.dll', Cannot find or open the PDB file.
'OEC.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\nlssorting.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\winnsi.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\dnsapi.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\dhcpcsvc.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\dhcpcsvc6.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Management\1a5cea3827896983ebf576ca86090cc3\System.Management.ni.dll', No native symbols in symbol file.
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll', Symbols loaded.
'OEC.exe': Loaded 'C:\Windows\SysWOW64\RpcRtRemote.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\WMINet_Utils.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\wbem\wmiutils.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\wbemcomn.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\wbem\wbemprox.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\wbem\wbemsvc.dll', Symbols loaded (source information stripped).
The thread 'Win32 Thread' (0x1c6c) has exited with code 0 (0x0).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\wbem\fastprox.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\ntdsapi.dll', Symbols loaded (source information stripped).
The thread 'Win32 Thread' (0x18f8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2b9c) has exited with code 0 (0x0).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\bcrypt.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\d87de4bbcefb0a67eaae225f35964a4f\System.Configuration.ni.dll', No native symbols in symbol file.
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Symbols loaded.
'OEC.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Xml\858e88af3a72319bdce4f6e1f9492f46\System.Xml.ni.dll', No native symbols in symbol file.
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Symbols loaded.
'OEC.exe': Loaded 'C:\Windows\SysWOW64\mswsock.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\WSHTCPIP.DLL', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\wship6.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\Windows Live\WLIDNSP.DLL', Cannot find or open the PDB file.
'OEC.exe': Loaded 'C:\Windows\SysWOW64\rasadhlp.dll', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'C:\Windows\SysWOW64\FWPUCLNT.DLL', Symbols loaded (source information stripped).
'OEC.exe': Loaded 'ImageAtBase0xf160000', Loading disabled by Include/Exclude setting.
'OEC.exe': Loaded 'ImageAtBase0x47b0000', Loading disabled by Include/Exclude setting.
'OEC.exe': Unloaded 'ImageAtBase0xf160000'
'OEC.exe' (Managed (v4.0.30319)): Loaded 'C:\dev\OEC\Debug\ProtoSharp.Core.dll'
A first chance exception of type 'System.IO.IOException' occurred in CommLib.dll
A first chance exception of type 'System.IO.IOException' occurred in CommLib.dll
The thread 'Reader Price' (0xf44) has exited with code 0 (0x0).
The thread 'Reader Order' (0x1a84) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xf44) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1a84) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2bfc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x27f4) has exited with code 0 (0x0).
The thread '<No Name>' (0x2838) has exited with code 0 (0x0).
The thread '<No Name>' (0x1394) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2838) has exited with code 0 (0x0).
The thread '<No Name>' (0x2370) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1394) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1130) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2370) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2038) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1f88) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1548) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1710) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0xcc8) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0x2528) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0xe98) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0x208c) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0xbf8) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0x224c) has exited with code -1073741510 (0xc000013a).
The program '[10528] OEC.exe: Native' has exited with code -1073741510 (0xc000013a).
The program '[10528] OEC.exe: Managed (v4.0.30319)' has exited with code -1073741510 (0xc000013a).

Leigh Carter

API Support » C++ Example for .Net Jul 25, 2013 @ 01:45 PM (Total replies: 14)

Are there any examples for C++ using the .Net solution (as opposed to the COM solution)?

Leigh Carter