예제 #1
0
파일: Trade.cs 프로젝트: jchiver/HFT
        public async void DeleteWorkingOrder()
        {
            RestCommands.Post Post = new RestCommands.Post();
            RestCommands.IGResponse <Model.WorkingOrder.DeleteWorkingOrderResponse> Response = await Post.Execute <Model.WorkingOrder.DeleteWorkingOrderResponse>(this.Session.BaseURL + "/workingorders/otc" + "/" + IGWorkingOrderData.DealId, Session, RestCommands.Post.CommandType.Delete, "2");

            Console.WriteLine("Delete WO status code: " + Response.StatusCode);
        }
예제 #2
0
파일: Trade.cs 프로젝트: jchiver/HFT
        public async void SendWorkingOrderRequest()
        {
            RestCommands.Post Post = new RestCommands.Post();
            RestCommands.IGResponse <Model.WorkingOrder.CreateWorkingOrderResponse> Response = await Post.Execute <Model.WorkingOrder.CreateWorkingOrderResponse>(this.Session.BaseURL + "/workingorders/otc", Session, RestCommands.Post.CommandType.Post, "2", GetWorkingOrderRequestContent());

            DealReference = Response.Response.DealReference;
            Console.WriteLine("Creation of WO Deal Ref: " + DealReference);
        }
예제 #3
0
파일: Trade.cs 프로젝트: jchiver/HFT
        public async void GetTradeConfirm()
        {
            RestCommands.Post Post = new RestCommands.Post();
            RestCommands.IGResponse <Model.Trading.TradeConfirmResponse> Response = await Post.Execute <Model.Trading.TradeConfirmResponse>(this.Session.BaseURL + "/confirms" + "/" + DealReference, Session, RestCommands.Post.CommandType.Get, "1");

            if (Response.Response != null)
            {
                IGWorkingOrderData = Response.Response;
            }

            Console.WriteLine("Confirm WO Trade Status code: " + Response.Response.DealStatus);
            Console.WriteLine("DealID: " + Response.Response.DealId);
        }