Main Content
Retrieve Bloomberg Intraday Tick Data Using Bloomberg Desktop C++ Interface
This example shows how to retrieve intraday tick data from Bloomberg®.
Connect to Bloomberg
Create the Bloomberg connection using the Bloomberg Desktop C++ interface.
c = bloomberg;
Validate the Bloomberg connection.
v = isconnection(c)
v = 1
v
returns true
showing that the Bloomberg connection is valid.
Retrieve Intraday Tick Data
Retrieve the trade tick series for the past 50 days for the IBM® security aggregated into 5-minute intervals.
d = timeseries(c,'IBM US Equity',{floor(now)-50,floor(now)},5,'Trade')
ans = Columns 1 through 7 735487.40 187.20 187.60 187.02 187.08 207683.00 560.00 735487.40 187.03 187.13 186.65 186.78 46990.00 349.00 735487.40 186.78 186.78 186.40 186.47 51589.00 399.00 ... Column 8 38902968.00 8779374.00 9626896.00 ...
The columns in d
contain the following:
Numeric representation of date and time
Open price
High price
Low price
Closing price
Volume of ticks
Number of ticks
Total tick value in the bar
The first row of data shows prices and tick data for the current date. The next row shows tick data for 5 minutes later.
Close Bloomberg Connection
close(c)