I am using Matlab to connect to the Datascope API (TRTH). When I try to pull a year's worth of timeseries, intraday data using the below code, I get back two days of data rather than the requested year's worth. I am not specifying an interval in order to get back unaggregated results. I have tried putting in two digits on month and day instead of one (e.g. 06/01/2023) where I had used one prior without any changes to the results. I have added an interval to see if that is required, which did not change the results.
Below is the code I am using:
username = '*username*';
password = '*password*';
c = trth(username,password);
% Importing table with RICs, start dates, and end dates
T = readtable("../input/HistoricalSearchResults_ric.csv");
ric_labels = T.RIC;
ric_start = T.FirstDate;
ric_end = T.LastDate;
% Pulling all RICs
for let_num = 1:length(ric_labels)
security = ric_labels(let_num);
disp(security);
sec = [security,"Ric"];
fields = ["Trade - Price";"Trade - Volume";"Trade - Market VWAP";"Trade - Bid Price";...
"Trade - Bid Size";"Trade - Ask Price";"Trade - Ask Size";"Trade - Qualifiers";...
"Trade - Sequence Number";"Trade - Exchange Time";"Trade - Date";"Trade - Tick Direction";...
"Trade - Open";"Trade - High";"Trade - Low";"Trade - Accumulated Volume";"Trade - Percent Change";...
"Trade - Unique Trade Identification";"Trade - Aggressive Order Condition";"Trade - Net Change"];
startdate = datetime(ric_start(let_num),'InputFormat','MM/dd/yyyy');
enddate = datetime(ric_end(let_num),'InputFormat','MM/dd/yyyy');
d1 = timeseries(c,sec,fields,startdate,enddate);
path = strcat("../output/",security,".csv");
writetimetable(d1,path);