Datafeed Toolbox: Retrieving tick data for a specific time range from Bloomberg
Show older comments
Hi all,
I am trying to retrieve tick data for a specific ticker for a specific time range from Bloomberg. In the documentation for the 'timeseries' function I found an example:
However, when running the sample code, also by opening the example itself in MATLAB using the command
openExample('datafeed/RetrieveTimeSeriesTickDataForDateTimeRangeWithFieldExample')
I get the following error:
Error using blp/timeseries (line 463)
Java exception occurred:
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
at java.util.Vector.elementAt(Unknown Source)
Error in deleteme (line 9)
d = timeseries(c,s,{startdate:enddate,starttime,endtime},interval,field);
Is anyone familiar with this error and a possible fix? Or is there a workaround available?
Thanks in advance for your response(s)!
1 Comment
Steve Schaefer
on 15 Nov 2018
You should be able to get the desired data without any error when using the following command:
d = timeseries(c,s,{datetime("11/13/2018 01:01:00","InputFormat","MM/dd/yyyy HH:mm:SS") datetime("11/13/2018 23:59:59","InputFormat","MM/dd/yyyy HH:mm:SS")},interval,field)
Please note that the 4 input syntax is only used when the user wants to get data for a range of data for the same block of times over a range of days.
As for your case, you are making a request for a contiguous data request which only needs two date inputs.
Answers (0)
Categories
Find more on Bloomberg Desktop in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!