example output that actually worked

This commit is contained in:
Jeff Carr 2022-11-02 19:04:26 -05:00
parent d650483b3a
commit 3ae4d46ccc
1 changed files with 37 additions and 2 deletions

39
AAPL.py
View File

@ -9,11 +9,46 @@ intrinio.ApiClient().set_api_key('OjZjZGIzZmYyNDg4NDZjYjQ4NzAzMzAyZjg0OTU5MDcz')
intrinio.ApiClient().allow_retries(True) intrinio.ApiClient().allow_retries(True)
identifier = 'AAPL' identifier = 'AAPL'
start_date = '2018-01-01' start_date = '2022-11-01'
end_date = '2019-01-01' end_date = '2022-11-01'
frequency = 'daily' frequency = 'daily'
page_size = 100 page_size = 100
next_page = '' next_page = ''
response = intrinio.SecurityApi().get_security_stock_prices(identifier, start_date=start_date, end_date=end_date, frequency=frequency, page_size=page_size, next_page=next_page) response = intrinio.SecurityApi().get_security_stock_prices(identifier, start_date=start_date, end_date=end_date, frequency=frequency, page_size=page_size, next_page=next_page)
print(response) print(response)
# output from 2022-11-02:
# jcarr@hpdevone:~/tmp/intrinio/test$ ./AAPL.py
# {'next_page': None,
# 'security': {'code': 'EQS',
# 'company_id': 'com_NX6GzO',
# 'composite_figi': 'BBG000B9XRY4',
# 'composite_ticker': 'AAPL:US',
# 'currency': 'USD',
# 'figi': 'BBG000B9Y5X2',
# 'id': 'sec_agjrgj',
# 'name': 'Apple Inc',
# 'primary_listing': True,
# 'share_class_figi': 'BBG001S5N8V8',
# 'ticker': 'AAPL'},
# 'stock_prices': [{'adj_close': 150.65,
# 'adj_high': 155.45,
# 'adj_low': 149.13,
# 'adj_open': 155.08,
# 'adj_volume': 80379345.0,
# 'change': -2.69,
# 'close': 150.65,
# 'date': datetime.date(2022, 11, 1),
# 'dividend': 0.0,
# 'factor': 1.0,
# 'fifty_two_week_high': 182.19,
# 'fifty_two_week_low': 128.86,
# 'frequency': 'daily',
# 'high': 155.45,
# 'intraperiod': False,
# 'low': 149.13,
# 'open': 155.08,
# 'percent_change': -0.0175,
# 'split_ratio': 1.0,
# 'volume': 80379345.0}]}