mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-01 23:12:21 +00:00
25 lines
450 B
Python
25 lines
450 B
Python
"""ETF Helper module."""
|
|
__docformat__ = "numpy"
|
|
|
|
import yfinance as yf
|
|
|
|
|
|
def get_quote_type(symbol: str) -> str:
|
|
"""Get the quote type of the symbol.
|
|
|
|
Parameters
|
|
----------
|
|
symbol : str
|
|
Ticker to check.
|
|
|
|
Returns
|
|
-------
|
|
str
|
|
Returns the quote type of the symbol.
|
|
"""
|
|
try:
|
|
quote_type = yf.Ticker(symbol).info["quoteType"]
|
|
return quote_type
|
|
except TypeError:
|
|
return "N/A"
|