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 //}); }
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 //}); }
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); }