From 766e8b544451af80d515f639d8efb12d7ba84691 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 2 Nov 2022 18:56:54 -0500 Subject: [PATCH] initial test --- test-appl.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test-appl.py diff --git a/test-appl.py b/test-appl.py new file mode 100755 index 0000000..b0dff18 --- /dev/null +++ b/test-appl.py @@ -0,0 +1,24 @@ +#!/usr/bin/python3 + +from __future__ import print_function +import time +import intrinio_sdk as intrinio +from intrinio_sdk.rest import ApiException +from pprint import pprint + +intrinio.ApiClient().configuration.api_key['api_key'] = 'OjZjZGIzZmYyNDg4NDZjYjQ4NzAzMzAyZjg0OTU5MDcz' +intrinio.ApiClient().allow_retries(True) + +security_api = intrinio.SecurityApi() + +identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) +start_date = '2022-11-01' # date | Return intraday prices starting at the specified date (optional) +end_date = '2022-11-02' # date | Return intraday prices stopping at the specified date (optional) + +try: + api_response = security_api.get_security_intraday_prices(identifier, start_date=start_date, end_date=end_date) + pprint(api_response.intraday_prices) +except ApiException as e: + print("Exception when calling SecurityApi->get_security_intraday_prices: %s\n" % e) + +# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(api_response.intraday_prices_dict)