Jump to content
Sign in to follow this  
rlarz

are there any tutorials for using api in c#?

Recommended Posts

Are there any tutorials for using the api in c#? I've tried using the c# examples but have not been able to even login. I have received login info from ci and it works with AdvantageTrader but not with any of the examples.

Share this post


Link to post

Hi!

 

Are you using one of the C# libraries for the CIAPI as opposed to coding in the API natively? 

 

In answer to your question, for C# there are no examples as yet. There are backlog items to add examples and tutorials to complete a software development kit (SDK) for the API natively, which is JSON. We'll probably do something for C# too. However, this task has not yet been queued for implementation. Therefore, I cannot give you a time as to when this material will be available.

Share this post


Link to post

Thank you for the information. It is very disappointing. I guess I'll have to learn to work with JSON since CIAPI doesn't really work with C#.

 

Just out of curiosity, why do those C# projects on GitHub even exist if they don't work properly? I understand that they are no longer supported but I mistakenly believed they were working examples that just hadn't been updated in a while.

Share this post


Link to post

Hi,

 

There is one thing I need to check that may explain why you're not able to use the API right now. Did you get an App Key from our Partnerships team when you signed the API Terms & Conditions? You need to use that App Key in your calls to the API. 

 

The Partnerships team should have sent you the key once they received your signed T&C form. If you don't have an App Key at the moment:

 

Go to the front page of the API documentation at http://docs.labs.cityindex.com/. On this front page there is a link to the Terms and Conditions form. Also given on this page is the email address for our Partnerships team so you can contact them about getting access to the API and App Key.

 

 

Share this post


Link to post

I've spoken with the development team lead that created the C# library. The C# libraries were created for specific purposes in the past and they did work at that time.

 

As you know, they are no longer supported and haven't been updated in a long time. The underlying native API has changed since then, which is probably why the C# libraries are no longer fully functioning. 

 

For now, you will have to work with the API natively and in effect create your own client library suitable for your purposes.

 

We're going to remove the links to the libraries from the API documentation so that users will no longer try using them.

Share this post


Link to post

Certainly disappointing, but those are the breaks. Thanks for checking into it for me.

It would make a great deal of sense to remove the GitHub software since it doesn't work. That way, no one else has to waste their time trying. I was aware that the GitHub code was no longer supported but I had no idea that it didn't work.

Share this post


Link to post

Hello rlarz,

 

Your understanding and reasonable ness is much appreciated - thank you!

I've sent your suggestion about removing the libraries from GitHub to the development team lead responsible for them. 

 

Much obliged!

------------

 

Edited to add: I haved a response from the team. 

 

The client libraries were migrated to the CityIndex-Attic github organisation a few months ago - https://github.com/cityindex-attic/CIAPI.CS.

 

Given that they are opensource, I don't feel we should attempt to "unpublish" them.  However, I think that putting them in a CityIndex-Attic account should send the right message.

Edited by Physicsman
Added response from the team.

Share this post


Link to post

Not to put too fine a point on it Team, but... Being in the attic makes it look unsupported; it does not give the impression that it is unusable. Btw, there are a lot of unsupported but usable open source programs available on line  When I was a child, I found a saddle in the attic of a house we were renting. It was old and needed a bit of oiling, but it was quite usable.

 

I'd suggest writing on the first line of the code's main page: This software does not work.

 

I've had my say and will go away now.

Share this post


Link to post

Hi,

 

I've been using the c# CIAPI for a couple of years now quite successfully but am disappointed that it's been retired as I was hoping for a fix to getting historic tick data that I've been having (to be more correct have had since I started with using the API).

 

Is there another API I should be using - I see mention of JSON and FIX but very little here on the forum to indicate that it's active.

 

Where do I go for more info on what to do to work with CI or do I now have to find another platform to use?

 

I need API/code for real time tick data and the ability to automatically open and close trades.  I also require ability to get historic tick data (without it sometimes dropping hours worth of ticks).

 

Regards

David

Share this post


Link to post

Hello David,

 

I'm not sure if there may be some communication confusion here. The CIAPI is *NOT* being retired. In the conversation with rlarz, we were discussing the additional C# libraries (downloaded from Github) that bolt on top of the CIAPI.

 

It is the C# libraries that are no longer supported (and haven't been for about a year) - the CIAPI is still being developed and worked on. 

 

I assume you have coded and written your own programs in C# that interface with the CIAPI? Essentially, you have written your own C# client library?

 

Using the CIAPI, you are able to automatically open and close trades as long as the logic is coded in your trading algorithm. The CIAPI is just the method used to communicate with our back end servers. I've just checked the CIAPI documentation (http://docs.labs.cityindex.com/) and it is stated that all order types that you can enter through our front end platforms are supported through the CIAPI.

 

The documentation does state that there is a throttle and rate limitation to the data requests, which may be where you are encountering errors when requesting back fill of historical tick data. Streaming live prices are unaffected. 

 

I would suggest that you contact our partnerships team (partnershipServices[at]cityindex.com - replacing the [at] with @) in the first instance, so you can explain what it is you are trying to do and the requirements needed etc. They can then direct any technical queries appropriately within our engineering and technology teams to let you know if what you are attempting is possible/feasible.

 

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  
×