Jump to content
Sign in to follow this  
Vincent

Streaming Data > Orders - C# code

Recommended Posts

Hi,

 

In relate to this topic: http://faq.labs.cityindex.com/index.php?/topic/975-streaming-data-orders/

 

In the attachment is my code (C#, VS2013) and screenshots.

 

As shown in the screenshot, my code only recevie one order update after placing a trade with limit and stop on CI web platform.

 

Thanks.

post-3673-0-82090700-1422345105_thumb.png

post-3673-0-87058000-1422345112_thumb.png

Edited by Physicsman
Downloaded and removed your code file.

Share this post


Link to post

Hi Physicsman,

 

Could you ask your development team to provide some code used in City Index Advantage Web platform that is relate to subscription of order stream?

 

Maybe I can use it as reference to spot the problem in my code.

 

Thanks.

Share this post


Link to post

Hi Vincent,

 

I have something even better! The Dev team replied late last night and have found the issue and fixed it! 

 

The OrdersStream was set to MERGE mode, which was causing the problem. It just needs to be set into RAW mode and then it works. The Dev team tested your code and it now returns the 3 data packets as expected.

 

Now that the Dev team have mentioned it, I remember writing a note about this several years ago in the API documentation. You can find it at: Orders Stream Mode.

 

Inside buildTableInfo method in OrdersApi.cs class, use the following:

WqzUtGL.png

 

OrderStreamTest solution: 

==============================================

519757065

400616115

400279510

400404943

6

 

1

false

\/Date(1422563369000)\/

10809.8

\/Date(1422563369000)\/

2

1

2

Trade

Open

1

==============================================

==============================================

519757067

400616115

400279510

400404943

6

 

2

false

\/Date(1422563369000)\/

0

\/Date(1422563369000)\/

2

1

2

Stop

Accepted

1

==============================================

==============================================

519757066

400616115

400279510

400404943

6

 

2

false

\/Date(1422563369000)\/

0

\/Date(1422563369000)\/

2

1

2

Limit

Accepted

1

==============================================

 

:)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×