* cli docs website * changes * remove unused feat flags * typo * yeet stuff that can't be used * some progress * Add home screenshot * screenshots.md * fix links * new cards for cli pages * start config page * more updates * Add screenshots * flatten some things. * fix link * some more updates * some routine stuff * codespell * cli color * results in the global commands * increase codeBlock line-height * remove platform warning, obb is a class * minor change, danger warning * typo? * Data processing commands --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
4.5 KiB
Vendored
title, sidebar_position, description, keywords
| title | sidebar_position | description | keywords | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Data Sources | 7 | This page explains how to select a provider for any specific command, and set a default source for a route. |
|
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
Many commands have multiple data sources associated with it. This page describes how to select from multiple providers.
:::important
API credentials are defined in the user_settings.json file.
Find all data providers here, and manage all your credentials directly on the OpenBB Hub. :::
Data Source In-Command
To specify the data vendor for that particular command, use the --provider argument.
Parameter choices can be viewed from the help dialogue, -h or --help.
/equity/price/historical -h
usage: historical --symbol SYMBOL [SYMBOL ...] [--interval INTERVAL] [--start_date START_DATE] [--end_date END_DATE] [--chart]
[--provider {fmp,intrinio,polygon,tiingo,yfinance}] [--start_time START_TIME] [--end_time END_TIME] [--timezone TIMEZONE]
[--source {realtime,delayed,nasdaq_basic}] [--sort {asc,desc}] [--limit LIMIT] [--extended_hours] [--include_actions]
[--adjustment {splits_and_dividends,unadjusted,splits_only}] [--adjusted] [--prepost] [-h] [--export EXPORT]
[--sheet-name SHEET_NAME [SHEET_NAME ...]]
Get historical price data for a given stock. This includes open, high, low, close, and volume.
options:
--interval INTERVAL Time interval of the data to return.
--start_date START_DATE
Start date of the data, in YYYY-MM-DD format.
--end_date END_DATE End date of the data, in YYYY-MM-DD format.
--chart Whether to create a chart or not, by default False.
--provider {fmp,intrinio,polygon,tiingo,yfinance}
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fmp' if there is
no default.
--extended_hours Include Pre and Post market data. (provider: polygon, yfinance)
--adjustment {splits_and_dividends,unadjusted,splits_only}
The adjustment factor to apply. Default is splits only. (provider: polygon, yfinance)
-h, --help show this help message
--export EXPORT Export raw data into csv, json, xlsx and figure into png, jpg, pdf, svg
--sheet-name SHEET_NAME [SHEET_NAME ...]
Name of excel sheet to save data to. Only valid for .xlsx files.
required arguments:
--symbol SYMBOL [SYMBOL ...]
Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance.
intrinio:
--start_time START_TIME
Return intervals starting at the specified time on the `start_date` formatted as 'HH:MM:SS'.
--end_time END_TIME Return intervals stopping at the specified time on the `end_date` formatted as 'HH:MM:SS'.
--timezone TIMEZONE Timezone of the data, in the IANA format (Continent/City).
--source {realtime,delayed,nasdaq_basic}
The source of the data.
polygon:
--sort {asc,desc} Sort order of the data. This impacts the results in combination with the 'limit' parameter. The results are always returned in ascending order by date.
--limit LIMIT The number of data entries to return.
yfinance:
--include_actions Include dividends and stock splits in results.
:::note Provider-specific parameters are listed at the bottom of the print out. They are ignored when entered, if it is not supported by the selected provider. :::
Setting The Default Source
The default data source for each command (where multiple sources are available) can be defined within the user configuration file: /home/your-user/.openbb_platform/user_settings.json.
Set the default data provider for the /equity/price/historical command by adding the following line to your user_settings.json file:
{
"defaults": {
"routes": {
"/equity/price/historical": {
"provider": "fmp"
},
"/equity/fundamental/balance": {
"provider": "polygon"
},
...
}
}
}