Jump to content
Sign in to follow this  
jason ho

How do I find a list of MarketName, MarketCodes?

Recommended Posts

Example:

 var ctx = new CIAPI.Rpc.Client(RPC_URI);
        ctx.LogIn(USERNAME, PASSWORD);
        string searchByMarketName = "";
        string searchByMarketCode = "";
        int clientAccountId = 0;
        int maxResults = 200;
        ListCfdMarketsResponseDTO cfdMarkets = ctx.ListCfdMarkets(searchByMarketName, searchByMarketCode,clientAccountId, maxResults);
        ctx.LogOut();

Share this post


Link to post

Your technique is correct, however, due to this bug:http://faq.labs.cityindex.com/questions/how-do-i-find-my-clientaccountid you can’t currently get your clientAccountId; thus cannot make a marketsearch call.

In the short term, try markets:

MarketId: 71442 Name: UK100 CFD

MarketId: 154297 Name: GBP/USD (per 0.0001) CFD

Are these the only two working right now? in particular with reference to 154297 is there any more currency pair CFDs we can use in testing?

Share this post


Link to post
Guest mrdavidlaing

Your technique is correct, however, due to this bug:http://faq.labs.cityindex.com/questions/how-do-i-find-my-clientaccountid you can’t currently get your clientAccountId; thus cannot make a marketsearch call.

In the short term, try markets:

MarketId: 71442 Name: UK100 CFD

MarketId: 154297 Name: GBP/USD (per 0.0001) CFD

@jason ho – all 20,000 markets are in the system; although a lot of them price very slowly. Here are some more currency pair CFDs:

{“Markets”:[{“MarketId”:400481147,“Name”:“USD\/CAD”},{“MarketId”:400156134,“Name”:“USD\/CAD (per 0.0001) CFD”},{“MarketId”:154301,“Name”:“USD\/CAD (per 0.0001) CFD”},{“MarketId”:400438588,“Name”:“USD\/CAD (per 0.0001) Mar 11 CFD”},{“MarketId”:400481148,“Name”:“USD\/CHF”},{“MarketId”:400156136,“Name”:“USD\/CHF (per 0.0001) CFD”},{“MarketId”:154302,“Name”:“USD\/CHF (per 0.0001) CFD”},{“MarketId”:400438585,“Name”:“USD\/CHF (per 0.0001) Mar 11 CFD”},{“MarketId”:400481149,“Name”:“USD\/CZK”},{“MarketId”:400481150,“Name”:“USD\/DKK”},{“MarketId”:400237066,“Name”:“USD\/DKK (per 0.0001) CFD”},{“MarketId”:400201917,“Name”:“USD\/DKK (per 0.0001) CFD”},{“MarketId”:400481151,“Name”:“USD\/HKD”},{“MarketId”:400481152,“Name”:“USD\/HUF”},{“MarketId”:400481153,“Name”:“USD\/JPY”},{“MarketId”:400156138,“Name”:“USD\/JPY (per 0.01) CFD”},{“MarketId”:154303,“Name”:“USD\/JPY (per 0.01) CFD”},{“MarketId”:400434477,“Name”:“USD\/JPY (per 0.01) Mar 11 CFD”},{“MarketId”:400481154,“Name”:“USD\/MXN”},{“MarketId”:400237067,“Name”:“USD\/MXN (per 0.0001) CFD”}]}

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  
×