コード例 #1
0
        public string GetDataRaw(
            string instrument,
            string field,
            Dictionary <string, string> parameters = null)
        {
            //Return it as DataTable;


            DataGridRequest request = new DataGridRequest {
                instruments = new List <string> {
                    instrument
                }
            };

            request.parameters = MergeParameters(parameters);


            request.fields = new List <TRField>();

            request.fields.Add(TRField(field));

            var response = SerializeAndSendRequest <DataGridRequest>(request);

            return(response);

            //return JsonConvert.DeserializeObject<DataResponse>(response, new JsonSerializerSettings
            //{
            //    Error = HandleDeserializationError
            //});
        }
コード例 #2
0
        public string GetDataRaw(
            IEnumerable <string> instruments,
            IEnumerable <string> fields,
            Dictionary <string, string> parameters = null)
        {
            DataGridRequest request = new DataGridRequest {
                instruments = instruments.ToList()
            };

            request.parameters = MergeParameters(parameters);

            request.fields = new List <TRField>();
            foreach (var field in fields)
            {
                request.fields.Add(TRField(field));
            }
            var response = SerializeAndSendRequest <DataGridRequest>(request);

            return(response);


            //return JsonConvert.DeserializeObject<DataResponse>(response, new JsonSerializerSettings
            //{
            //    Error = HandleDeserializationError
            //});
        }
コード例 #3
0
        public string GetDataRaw(
            string instrument,
            IEnumerable <TRField> fields,
            Dictionary <string, string> parameters = null)
        {
            DataGridRequest request = new DataGridRequest {
                instruments = new List <string> {
                    instrument
                }, fields = fields.ToList()
            };

            request.parameters = MergeParameters(parameters);
            var response = SerializeAndSendRequest <DataGridRequest>(request);

            return(response);
        }