Exemplo n.º 1
0
        public async Task <API_Response <AccountSummary> > GetAccountSummary()
        {
            ParamDate paramDate = new ParamDate();

            paramDate.userMKF = this.User;
            paramDate.DateTo  = DateTime.Now;
            API_Response <AccountSummary> response = await MarketFlowLibrary.MarketFlowService.GetAccountSummary(paramDate);

            return(response);
        }
Exemplo n.º 2
0
        public async Task <List <ClosedOperations> > GetRealisedProfits(ParamDate paramDate)
        {
            List <ClosedOperations>         response     = new List <ClosedOperations>();
            API_Response <ClosedOperations> api_response = new API_Response <ClosedOperations>();

            api_response = await MarketFlowLibrary.MarketFlowService.GetRealisedProfit(paramDate);

            if (api_response.Success == true)
            {
                response = api_response.Content;
            }
            return(response);
        }
Exemplo n.º 3
0
        public async Task <List <TRNS> > GetStatement(ParamDate paramDate)
        {
            List <TRNS>         response     = new List <TRNS>();
            API_Response <TRNS> api_response = new API_Response <TRNS>();

            api_response = await MarketFlowLibrary.MarketFlowService.GetStatement(paramDate);

            if (api_response.Success == true)
            {
                response = api_response.Content;
            }
            return(response);
        }
Exemplo n.º 4
0
        public async static Task <API_Response <Operations> > GetOperations(ParamDate paramDate)
        {
            API_Response <Operations> result = new API_Response <Operations>();
            HttpClient client     = new HttpClient();
            string     serviceURL = string.Format("{0}{1}", serviceBaseURI, getOperationsAction);
            string     json       = Newtonsoft.Json.JsonConvert.SerializeObject(paramDate);

            var stringContent            = new StringContent(json, UnicodeEncoding.UTF8, "application/json");
            HttpResponseMessage response = await client.PostAsync(serviceURL, stringContent);

            if (response.IsSuccessStatusCode)
            {
                result = Newtonsoft.Json.JsonConvert.DeserializeObject <API_Response <Operations> >(response.Content.ReadAsStringAsync().Result);
            }

            return(result);
        }