API Support Forum
User Profile

Viewing User Profile for: ACunningham


About

Feb 02, 2011 11:59 AM

Jun 30, 2011 01:10 PM

Jul 06, 2011 10:50 AM



Post Statistics
ACunningham has contributed to 3 posts out of 5593 total posts (0.05%) in 4840 days (0.00 posts per day).

20 most recent posts:

API Support » PriceStream disconnected Jun 30, 2011 @ 01:10 PM (Total replies: 3)

Perfect Victor

it works fine now.

Thank you very much !

Perhaps one question. You mentioned a OS limitation. Which OS do you mean ? On a production erver or on my side ?

Alastair Cunningham

API Support » PriceStream disconnected Jun 29, 2011 @ 08:53 AM (Total replies: 3)

Hello,

I have the following problem: We use the production environment (with the dll-files from your emaple applications) with a correct login credentials (we can use them in the official platform and everything works fine). In our system a connection to OEC API can be established (for example we can seen the states of our accounts), but we can not get any DOM data.We use the standard way like the following:

oecClient.SubscribeDOM(oecClient.Contracts[mnemonic]);

I guess that it is OK. But there is a stragne error in the OEC API log. Here are the first lines of it (next lines are the same because of a repetition of the mentioned ones):

21:25:32.564 Dbg Reader Price PLogin to OEC Server 4.0.0.0
21:25:32.564 Dbg Reader Order Login to OEC Server 4.0.0.0
21:25:32.666 Err Reader Price 74.201.3.43:9201 Error processing message System.Security.Cryptography.CryptographicException: Bad Length. at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) at System.Security.Cryptography.RSACryptoServiceProvider.EncryptKey(SafeKeyHandle pKeyContext, Byte[] pbKey, Int32 cbKey, Boolean fOAEP, ObjectHandleOnStack ohRetEncryptedKey) at System.Security.Cryptography.RSACryptoServiceProvider.Encrypt(Byte[] rgb, Boolean fOAEP) at OEC.API.Connection.ProcessChallenge2(ProtoClient`2 client, AuthChallenge authChallenge) at OEC.API.Connection.m_stream2_OnNewMessage(ProtoClient`2 client, ClientResponse item) at OEC.CommLib.ProtoClient`2.ReadLoop() : <ClientResponse > <Challenge ServerVersion=OEC Server 4.0.0.0 PublicKeyM=System.Byte[128] PublicKeyE=System.Byte[3] /> </ClientResponse>

What could happen ? Could you please help me ?
Thanks a lot

Alastair Cunningham

Order Execution » Order state Sent May 05, 2011 @ 03:47 AM (Total replies: 1)

Imagine the following initialization and trading:

oecClient.OnOrderStateChanged += new OnOrderStateChangedEvent(oecClient_OnOrderStateChanged);

...
later
...

order = oecClient.SendOrder(orderDraft)


After sending an order the event OnOrderStateChanged is fired more times with the state Sent. The first time it occures before oecClient.SendOrder(orderDraft) returns an order (this time the order's ID is not set) and then there is thesecond occurence. This looks reasonably. But there are also another occurences of the fired event with the state Sent.


From the documentation for the OrderState Enumeration we can see the following:

Basic state diagram for order lifetime.

Sent -> [Held] -> Working -> Completed.
\-> Rejected. \-> Cancelled.


I would expect that Sent stat will occur only once (perhaps twice). Whay are there multiple occurences ? Additionaly, the Sent state is marked as obsolete. Which state is intended to be used instead of Sent in the future ?

Alastair Cunningham