Skip to content

Quantel

Quantel

__init__(self, api_key, validate=True) special

Authenticate with the Quantel Finance API

Parameters:

Name Type Description Default
api_key str

Quantel Finance API Key

required
validate bool

Validate API Key

True

Examples:

>>> from quantel import Quantel
>>>
>>> qt = Quantel(api_key="<quantel-api-key>")
Source code in quantel\__init__.py
def __init__(self, api_key: str, validate: bool = True):
    """
    Authenticate with the Quantel Finance API

    Args:
        api_key: Quantel Finance API Key
        validate: Validate API Key

    Example:

        >>> from quantel import Quantel
        >>>
        >>> qt = Quantel(api_key="<quantel-api-key>")
    """
    self.api_key = api_key
    self.host = "https://quantel-io.p.rapidapi.com/"

    if validate:
        self._validate_api()

ticker(self, symbols, asynchronous=False)

Parameters:

Name Type Description Default
symbols Union[list, str]

List of tickers, or space separated string

required
asynchronous bool

Enable asynchronous lookup of tickers

False

Examples:

>>> qt.ticker("GOOG")

Returns:

Type Description
_Ticker

Ticker class

Source code in quantel\__init__.py
def ticker(self, symbols: Union[list, str], asynchronous: bool = False) -> _Ticker:
    """

    Args:
        symbols: List of tickers, or space separated string
        asynchronous: Enable asynchronous lookup of tickers

    Example:
        >>> qt.ticker("GOOG")

    Returns:

        Ticker class

    """
    return _Ticker(symbols, self.host, self.api_key, asynchronous)