Notebook

get_pricing data example

In [1]:
# make a list of the securities one wishes to get pricing for
my_securities = symbols(['AAPL'])

# set the start and stop date-time.
# note that times/dates are specified in UTC 
start_date = '2017-12-10'
end_date = '2017-12-15'
In [5]:
# run the get_pricing method to pull in actual data
# the result is a Pandas dataframe
my_prices = get_pricing(symbols=my_securities, 
                        start_date=start_date, 
                        end_date=end_date, 
                        frequency='minute', 
                        fields=['close_price', 'volume'])
In [7]:
# display the resulting dataframe
my_prices.xsclose_price
Out[7]:
Equity(24 [AAPL])
2017-12-11 14:31:00+00:00 169.040
2017-12-11 14:32:00+00:00 169.490
2017-12-11 14:33:00+00:00 169.350
2017-12-11 14:34:00+00:00 169.440
2017-12-11 14:35:00+00:00 169.280
2017-12-11 14:36:00+00:00 169.543
2017-12-11 14:37:00+00:00 169.800
2017-12-11 14:38:00+00:00 170.120
2017-12-11 14:39:00+00:00 170.040
2017-12-11 14:40:00+00:00 170.020
2017-12-11 14:41:00+00:00 169.750
2017-12-11 14:42:00+00:00 169.900
2017-12-11 14:43:00+00:00 169.920
2017-12-11 14:44:00+00:00 169.830
2017-12-11 14:45:00+00:00 169.680
2017-12-11 14:46:00+00:00 169.590
2017-12-11 14:47:00+00:00 169.601
2017-12-11 14:48:00+00:00 169.745
2017-12-11 14:49:00+00:00 169.670
2017-12-11 14:50:00+00:00 169.650
2017-12-11 14:51:00+00:00 169.630
2017-12-11 14:52:00+00:00 169.542
2017-12-11 14:53:00+00:00 169.738
2017-12-11 14:54:00+00:00 169.780
2017-12-11 14:55:00+00:00 169.650
2017-12-11 14:56:00+00:00 169.644
2017-12-11 14:57:00+00:00 169.690
2017-12-11 14:58:00+00:00 169.670
2017-12-11 14:59:00+00:00 169.860
2017-12-11 15:00:00+00:00 169.840
... ...
2017-12-15 20:31:00+00:00 174.080
2017-12-15 20:32:00+00:00 174.030
2017-12-15 20:33:00+00:00 174.023
2017-12-15 20:34:00+00:00 174.000
2017-12-15 20:35:00+00:00 173.940
2017-12-15 20:36:00+00:00 173.858
2017-12-15 20:37:00+00:00 173.870
2017-12-15 20:38:00+00:00 173.836
2017-12-15 20:39:00+00:00 173.820
2017-12-15 20:40:00+00:00 173.800
2017-12-15 20:41:00+00:00 173.800
2017-12-15 20:42:00+00:00 173.815
2017-12-15 20:43:00+00:00 173.840
2017-12-15 20:44:00+00:00 173.847
2017-12-15 20:45:00+00:00 173.817
2017-12-15 20:46:00+00:00 173.640
2017-12-15 20:47:00+00:00 173.670
2017-12-15 20:48:00+00:00 173.580
2017-12-15 20:49:00+00:00 173.600
2017-12-15 20:50:00+00:00 173.580
2017-12-15 20:51:00+00:00 173.970
2017-12-15 20:52:00+00:00 173.935
2017-12-15 20:53:00+00:00 173.925
2017-12-15 20:54:00+00:00 173.805
2017-12-15 20:55:00+00:00 173.863
2017-12-15 20:56:00+00:00 173.805
2017-12-15 20:57:00+00:00 173.710
2017-12-15 20:58:00+00:00 173.654
2017-12-15 20:59:00+00:00 173.755
2017-12-15 21:00:00+00:00 173.880

1950 rows × 1 columns

In [4]:
# can easily plot this data too
my_prices.close_price.plot()
Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f6bad20e910>