示例#1
0
 /// <summary>
 /// Queries the specified trading account for all open positions and active orders. This URI is intended to support a grid in a UI. One usage pattern is to subscribe to streaming orders, call this for the initial data to display in the grid, and call the HTTP service [GetOpenPosition](http://labs.cityindex.com/docs/Content/HTTP%20Services/GetOpenPosition.htm) when you get updates on the order stream to get the updated data in this format. **Notes on Parameters** >**ClientAccountId** - this can be passed in order to retrieve all information on all trading accounts for which it is the parent. >**TradingAccountId** - this can be passed to retrieve information specific to a certain trading account *(the child of ClientAccount)*.  If *neither* ClientAccountId nor TradingAccountId is passed, then the information returned by default from the API is ClientAccount.
 /// </summary>
 /// <param name="requestDTO">Contains the request for a ListActiveOrders query.</param>
 /// <param name="callback"></param>
 /// <param name="state"></param>
 public virtual void BeginListActiveOrders(ListActiveOrdersRequestDTO requestDTO, ReliableAsyncCallback callback, object state)
 {
     string uriTemplate = "/activeorders";
     _client.BeginRequest(RequestMethod.POST, "order", uriTemplate , 
     new Dictionary<string, object>
     {
         { "requestDTO", requestDTO}
     },ContentType.JSON,ContentType.JSON, TimeSpan.FromMilliseconds(0), 30000,0 ,callback, state);
 }
示例#2
0
        // ***********************************
        // ListActiveOrders
        // ***********************************


        /// <summary>
        /// Queries the specified trading account for all open positions and active orders. This URI is intended to support a grid in a UI. One usage pattern is to subscribe to streaming orders, call this for the initial data to display in the grid, and call the HTTP service [GetOpenPosition](http://labs.cityindex.com/docs/Content/HTTP%20Services/GetOpenPosition.htm) when you get updates on the order stream to get the updated data in this format. **Notes on Parameters** >**ClientAccountId** - this can be passed in order to retrieve all information on all trading accounts for which it is the parent. >**TradingAccountId** - this can be passed to retrieve information specific to a certain trading account *(the child of ClientAccount)*.  If *neither* ClientAccountId nor TradingAccountId is passed, then the information returned by default from the API is ClientAccount.
        /// </summary>
        /// <param name="requestDTO">Contains the request for a ListActiveOrders query.</param>
        public virtual ListActiveOrdersResponseDTO ListActiveOrders(ListActiveOrdersRequestDTO requestDTO)
        {
            string uriTemplate = "/activeorders";
            return _client.Request<ListActiveOrdersResponseDTO>(RequestMethod.POST,"order", uriTemplate ,
            new Dictionary<string, object>
            {
                { "requestDTO", requestDTO}
            },ContentType.JSON,ContentType.JSON, TimeSpan.FromMilliseconds(0),30000,0 );
        }