intrinio-jcarr/all-stock-exchanges.py

23 lines
742 B
Python
Executable File

#!/usr/bin/python3
from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException
intrinio.ApiClient().set_api_key('OjZjZGIzZmYyNDg4NDZjYjQ4NzAzMzAyZjg0OTU5MDcz')
intrinio.ApiClient().allow_retries(True)
city = 'New York'
country = 'UNITED STATES OF AMERICA'
country_code = 'US'
page_size = 1000
# response = intrinio.StockExchangeApi().get_all_stock_exchanges(city=city, country=country, country_code=country_code, page_size=page_size)
# everything in the US:
# response = intrinio.StockExchangeApi().get_all_stock_exchanges(country_code=country_code, page_size=page_size)
response = intrinio.StockExchangeApi().get_all_stock_exchanges(page_size=page_size)
print(response)