intrinio-jcarr/get-all-etfs.py

17 lines
439 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)
exchange = 'XNAS'
page_size = 100
next_page = ''
response = intrinio.ETFsApi().get_all_etfs(exchange=exchange, page_size=page_size, next_page=next_page)
print(response)