Skip to content

ndl module

Module with NDLData.


NDLData class

NDLData(
    wrapper,
    data,
    single_key=True,
    classes=None,
    level_name=None,
    fetch_kwargs=None,
    returned_kwargs=None,
    last_index=None,
    delisted=None,
    tz_localize=None,
    tz_convert=None,
    missing_index=None,
    missing_columns=None,
    **kwargs
)

Data class for fetching from Nasdaq Data Link.

See https://github.com/Nasdaq/data-link-python for API.

See NDLData.fetch_symbol() for arguments.

Usage

  • Set up the API key globally (optional):
>>> from vectorbtpro import *

>>> vbt.NDLData.set_custom_settings(
...     api_key="YOUR_KEY"
... )
  • Pull a dataset:
>>> data = vbt.NDLData.pull(
...     "FRED/GDP",
...     start="2001-12-31",
...     end="2005-12-31"
... )
  • Pull a datatable:
>>> data = vbt.NDLData.pull(
...     "MER/F1",
...     data_format="datatable",
...     compnumber="39102",
...     paginate=True
... )

Superclasses

Inherited members


fetch_symbol class method

NDLData.fetch_symbol(
    symbol,
    api_key=None,
    data_format=None,
    start=None,
    end=None,
    tz=None,
    column_indices=None,
    **params
)

Override Data.fetch_symbol() to fetch a symbol from Nasdaq Data Link.

Args

symbol : str
Symbol.
api_key : str
API key.
data_format : str

Data format.

Supported are "dataset" and "datatable".

start : any

Retrieve data rows on and after the specified start date.

See to_tzaware_datetime().

end : any

Retrieve data rows up to and including the specified end date.

See to_tzaware_datetime().

tz : any

Timezone.

See to_timezone().

column_indices : int or iterable

Request one or more specific columns.

Column 0 is the date column and is always returned. Data begins at column 1.

**params
Keyword arguments sent as field/value params to Nasdaq Data Link with no interference.

For defaults, see custom.ndl in data.