fetch_instruments
function backtide.data.fetch_instruments(symbols, instrument_type)
Get instruments given their symbols.
| Parameters |
symbols : str | Instrument | list[str | Instrument]
Symbols for which to get the instruments. The symbols should be of the
canonical form expected by backtide.
instrument_type : str | InstrumentType
For which instrument type to get the instruments.
|
| Returns |
list[Instrument]
Instruments corresponding to the provided symbols.
|
See Also
Download OHLCV data for the instruments described in a list of profiles.
List available instruments for a given instrument type.
Resolve the instrument profiles needed to download a set of symbols.
Example
>>> from backtide.data import fetch_instruments
>>> print(fetch_instruments(["AAPL", "MSFT"], "stocks"))
[Instrument(symbol="AAPL", name="Apple Inc.", base=None, quote="USD", instrument_type="stocks", exchange="XNAS", provider=Yahoo), Instrument(symbol="MSFT", name="Microsoft Corporation", base=None, quote="USD", instrument_type="stocks", exchange="XNAS", provider=Yahoo)]