Skip to content

quantpylib.wrappers.yfinance

YFinance

get_trade_bars(ticker, start, end, granularity, granularity_multiplier, **kwargs)

Fetches trade bars data for the specified ticker and time period.

Parameters:

Name Type Description Default
ticker str

The ticker symbol.

required
start datetime

The start date of the data to be fetched.

required
end datetime

The end date of the data to be fetched.

required
granularity Period

The granularity of the data.

required
granularity_multiplier int

The multiplier for the granularity.

required
**kwargs

Additional keyword arguments.

{}

Returns:

Type Description
DataFrame

The DataFrame containing the trade bars data.