Parameters
Space-separated ticker symbols (e.g., ‘SPY AAPL MSFT’). Must contain at least one ticker.
Time period to download. Valid values include:
1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max
start and end parameters.Data interval/granularity. Valid values include:
1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1mo,3mo
1d (daily).Start date for the download (format: YYYY-MM-DD). Use with
end instead of period.End date for the download (format: YYYY-MM-DD). Use with
start instead of period.How to group the returned data:
column(default): Group by data columnsticker: Group by ticker symbol
Automatically adjust OHLC data for splits and dividends. Default is
true.Include dividend and split events in the data. Default is
false.Use multithreading for faster downloads when fetching multiple tickers. Default is
true.Format of the response:
json(default): Return structured JSON datamarkdown: Return formatted markdown table
Number of rows to include in markdown preview. Must be between 1 and 200. Default is 25.
Save the result to a file:
format: Eithercsvorjsonfilename(optional): Custom filename (defaults toyf_download-{timestamp}.{format})
Example Usage
Download multiple tickers for the last year
Download with custom date range
Download and save to CSV
Get intraday data with actions
Response Format
JSON Response (default)
The response contains adata field with the market data and an optional saved_path if the save parameter was used:
Markdown Response
Whenresponse_format is set to markdown, returns a formatted table:
Notes
- Use
periodfor relative time ranges orstart/endfor absolute dates, but not both - When downloading multiple tickers, the
group_byparameter controls data organization - The
threadsparameter can significantly speed up multi-ticker downloads - Intraday intervals (1m, 5m, etc.) have limited historical availability (typically 1-60 days)
- The
auto_adjustparameter adjusts prices for corporate actions to maintain continuity