Exemplo n.º 1
0
        public void AuthenticationTest0001()
        {
            var personalSettings = JsonConvert.DeserializeObject <PersonalSettings>(File.ReadAllText("personalSettings.json"));
            var client           = IgClientHelper.GetIgRestApiClient(personalSettings);
            var response         = client.Authenticate();

            Assert.IsNotNull(response.XSecurityToken);
        }
        public void WatchListTest0001()
        {
            var personalSettings = JsonConvert.DeserializeObject <PersonalSettings>(File.ReadAllText("personalSettings.json"));
            var restClient       = IgClientHelper.GetIgRestApiClient(personalSettings);
            var response         = restClient.Authenticate();

            var watchLists = restClient.GetWatchLists();
            var watchList  = restClient.GetInstrumentsByWatchlistId(watchLists.Watchlists[0].Id);
        }
Exemplo n.º 3
0
        public void GetMarketDetails0002()
        {
            var personalSettings = JsonConvert.DeserializeObject <PersonalSettings>(File.ReadAllText("personalSettings.json"));
            var restClient       = IgClientHelper.GetIgRestApiClient(personalSettings);
            var response         = restClient.Authenticate();

            Assert.IsNotNull(response.XSecurityToken);

            var details = restClient.GetMarketDetails("IX.D.SAF.DAILY.IP");

            Assert.IsNotNull(details);
        }
Exemplo n.º 4
0
        public void SearchMarketTest0001()
        {
            var personalSettings = JsonConvert.DeserializeObject <PersonalSettings>(File.ReadAllText("personalSettings.json"));
            var restClient       = IgClientHelper.GetIgRestApiClient(personalSettings);
            var response         = restClient.Authenticate();

            Assert.IsNotNull(response.XSecurityToken);

            var markets = restClient.SearchMarkets("South Africa");

            Assert.IsNotNull(markets);
        }