Skip to content

Latest commit

 

History

History
804 lines (470 loc) · 20.5 KB

File metadata and controls

804 lines (470 loc) · 20.5 KB

intrinio_sdk.ETFsApi

All URIs are relative to https://api-v2.intrinio.com

Method HTTP request Description
get_all_etfs GET /etfs All ETFs
get_etf GET /etfs/{identifier} Lookup ETF
get_etf_analytics GET /etfs/{identifier}/analytics ETF Analytics
get_etf_historical_nav_flows GET /etfs/{identifier}/nav_flows/historical Exchange Traded Fund (ETF) Historical NAV Flows
get_etf_historical_stats GET /etfs/{identifier}/historical_stats Exchange Traded Fund (ETF) Historical Stats
get_etf_holdings GET /etfs/{identifier}/holdings ETF Holdings
get_etf_nav_flows GET /etfs/{identifier}/nav_flows Exchange Traded Fund (ETF) NAV Flows
get_etf_stats GET /etfs/{identifier}/stats Exchange Traded Fund (ETF) Stats
get_etfs_nav_flows GET /etfs/nav_flows Exchange Traded Funds (ETFs) Latest NAV Flows
search_etfs GET /etfs/search Search ETFs

get_all_etfs

View Intrinio API Documentation

ApiResponseETFs get_all_etfs(exchange=exchange, page_size=page_size, next_page=next_page)

All ETFs

Returns a list of all currently listed ETFs, with relevant identification information including the ETF Name, Ticker, FIGI Ticker, and Exchange MIC for further usage with our ETF Metadata, Holdings, Stats, and Analytics offerings.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
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)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
exchange str [optional]  
page_size int The number of results to return [optional] [default to 100]  
next_page str Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseETFs

get_etf

View Intrinio API Documentation

ETF get_etf(identifier)

Lookup ETF

Returns classifications and reference data which consists of ~90 columns that give detailed information about an ETF. These granular details include asset class, expense ratio, index name, index weighting scheme, smart beta type and specific investment objectives.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPY'

response = intrinio.ETFsApi().get_etf(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An ETF identifier (Ticker, Figi Ticker, ISIN, RIC, Intrinio ID)  

Return type

ETF

get_etf_analytics

View Intrinio API Documentation

ETFAnalytics get_etf_analytics(identifier)

ETF Analytics

Returns latest market analytics for a specified US ETF, including volume, trailing volume, market cap, 52 week high, and 52 week low.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPY'

response = intrinio.ETFsApi().get_etf_analytics(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An ETF identifier (Ticker, Figi Ticker, ISIN, RIC, Intrinio ID)  

Return type

ETFAnalytics

get_etf_historical_nav_flows

View Intrinio API Documentation

ETFNavFlowsHistorical get_etf_historical_nav_flows(identifier, start_date=start_date, end_date=end_date, page_size=page_size, next_page=next_page)

Exchange Traded Fund (ETF) Historical NAV Flows

Returns a list of historical NAV (Net Asset Value) and flows data for Exchange Traded Funds. Includes NAV returns, NAV values, net flows data, share outstanding counts, and total net assets across multiple dates with pagination support.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPY'
start_date = '2013-10-20'
end_date = '2013-10-20'
page_size = 100
next_page = 'next_page_example'

response = intrinio.ETFsApi().get_etf_historical_nav_flows(identifier, start_date=start_date, end_date=end_date, page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An ETF identifier (Ticker, Figi Ticker, ISIN, RIC, Intrinio ID)  
start_date date Return NAV flows on or after this date [optional]  
end_date date Return NAV flows on or before this date [optional]  
page_size int The number of results to return [optional] [default to 100]  
next_page str Gets the next page of data from a previous API call [optional]  

Return type

ETFNavFlowsHistorical

get_etf_historical_stats

View Intrinio API Documentation

ETFHistoricalStats get_etf_historical_stats(identifier, start_date=start_date, end_date=end_date, page_size=page_size)

Exchange Traded Fund (ETF) Historical Stats

Returns comprehensive key US ETF historical performance statistics, including prices, NAVs, flows, returns, and much more for both trailing and calendar year periods.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPY'
start_date = '2020-01-01'
end_date = '2020-12-31'
page_size = 100

response = intrinio.ETFsApi().get_etf_historical_stats(identifier, start_date=start_date, end_date=end_date, page_size=page_size)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An ETF identifier (Ticker, Figi Ticker, ISIN, RIC, Intrinio ID)  
start_date date The start date for the historical stats data in YYYY-MM-DD format. [optional]  
end_date date The end date for the historical stats data in YYYY-MM-DD format. [optional]  
page_size int The maximum number of results to return per page. [optional] [default to 100]  

Return type

ETFHistoricalStats

get_etf_holdings

View Intrinio API Documentation

ApiResponseETFHoldings get_etf_holdings(identifier, page_size=page_size, next_page=next_page)

ETF Holdings

Returns holdings data that details all the constituent securities in each ETF with names, identifiers, and the weights for each security providing granular level transparency.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPY'
page_size = 100
next_page = ''

response = intrinio.ETFsApi().get_etf_holdings(identifier, page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An ETF identifier (Ticker, Figi Ticker, ISIN, RIC, Intrinio ID)  
page_size int The number of results to return [optional] [default to 100]  
next_page str Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseETFHoldings

get_etf_nav_flows

View Intrinio API Documentation

ETFNavFlows get_etf_nav_flows(identifier, start_date=start_date, end_date=end_date, page_size=page_size, next_page=next_page)

Exchange Traded Fund (ETF) NAV Flows

Returns NAV (Net Asset Value) and flows data for Exchange Traded Funds. Includes NAV returns (daily, monthly, quarterly, yearly, annualized), NAV values (unadjusted and adjusted for splits/dividends), net flows data, share outstanding counts, and total net assets.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPY'
start_date = '2013-10-20'
end_date = '2013-10-20'
page_size = 100
next_page = 'next_page_example'

response = intrinio.ETFsApi().get_etf_nav_flows(identifier, start_date=start_date, end_date=end_date, page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An ETF identifier (Ticker, Figi Ticker, ISIN, RIC, Intrinio ID)  
start_date date Return NAV flows on or after this date [optional]  
end_date date Return NAV flows on or before this date [optional]  
page_size int The number of results to return [optional] [default to 100]  
next_page str Gets the next page of data from a previous API call [optional]  

Return type

ETFNavFlows

get_etf_stats

View Intrinio API Documentation

ETFStats get_etf_stats(identifier)

Exchange Traded Fund (ETF) Stats

Returns comprehensive key US ETF performance statistics, including prices, NAVs, flows, returns, and much more for both trailing and calendar year periods.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

identifier = 'SPY'

response = intrinio.ETFsApi().get_etf_stats(identifier)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
identifier str An ETF identifier (Ticker, Figi Ticker, ISIN, RIC, Intrinio ID)  

Return type

ETFStats

get_etfs_nav_flows

View Intrinio API Documentation

ETFNavFlowsAll get_etfs_nav_flows(country_code=country_code, page_size=page_size, next_page=next_page)

Exchange Traded Funds (ETFs) Latest NAV Flows

Returns the latest NAV (Net Asset Value) and flows data for all Exchange Traded Funds in the specified country, sorted by month-end assets in descending order. Each ETF appears only once with its most recent NAV flows data.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

country_code = 'US'
page_size = 100
next_page = 'next_page_example'

response = intrinio.ETFsApi().get_etfs_nav_flows(country_code=country_code, page_size=page_size, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
country_code str The ISO country code to filter ETFs by (e.g., US, CA, GB). Defaults to US. [optional] [default to US]  
page_size int The number of results to return [optional] [default to 100]  
next_page str Gets the next page of data from a previous API call [optional]  

Return type

ETFNavFlowsAll

search_etfs

View Intrinio API Documentation

ApiResponseETFs search_etfs(query, mode=mode)

Search ETFs

Accepts a string of keyword combinations, and searches across the ETF name and ticker and returns a list of ETFs with related keywords.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

query = 'iShares'
mode = ''

response = intrinio.ETFsApi().search_etfs(query, mode=mode)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
query str  
mode str When set, changes search mode to the specified mode. Paging is not available in rank_order. [optional]  

Return type

ApiResponseETFs