Skip to main content

Preferences

User settings are stored locally, ~/.openbb_platform/, as a JSON file, user_settings.json. It is read upon initializing the Python client, or when the Fast API is authorized. If the file does not exist, it will be created on the first run.

This file stores:

This is an example of how it might look after setup:

{
"credentials": {
"fmp_api_key": "REPLACE",
"polygon_api_key": "REPLACE",
},
"preferences": {
"data_directory": "~/OpenBBUserData",
"export_directory": "~/OpenBBUserData/exports",
"metadata": true,
"output_type": "OBBject"
},
"defaults": {
"commands": {
"/equity/price/historical": {
"provider": "fmp"
},
"/equity/fundamental/balance": {
"provider": [
"intrinio",
"fmp",
"polygon"
]
},
}
}
}

Preferences

PreferenceDefaultOptionsDescription
data_directory/home/OpenBBUserDataAny path.When launching the application for the first time this directory will be created. It serves as the default location where the application stores usage artifacts such as logs and exports.
export_directory/home/OpenBBUserData/exportsAny path.The OpenBB Charting Extension provides the capability to export images in various formats. This is the directory where it attempts to save such exports.
cache_directory/home/OpenBBUserData/cacheAny path.The directory where http requests and database caches are stored, for functions with caching.
user_styles_directory/home/OpenBBUserData/styles/userAny path.The OpenBB Charting Extension supports custom stylization. This directory is the location where it looks for user-defined styles. If no user styles are found in this directory the application will proceed with the default styles.
charting_extensionopenbb_charting["openbb_charting"]Name of the charting extension to be used with the application.
chart_styledark["dark", "light"]The default color style to use with the OpenBB Charting Extension plots. Options include "dark", and "light".
table_styledark["dark", "light"]"The default color style to use with the OpenBB Charting Extension tables. Options are "dark", and "light""
metadatatrue[true, false]Enables or disables the collection of metadata which provides information about operations including arguments duration route and timestamp. Disabling this feature may improve performance in cases where contextual information is not needed, or when the additional computation time and storage space are a concern.
output_typeOBBject["OBBject", "dataframe", "numpy", "dict", "chart", "polars", "llm"]Specifies the type of data the application will output when a command or endpoint is accessed. Note that choosing data formats only available in Python such as dataframe, numpy, or polars will render the application's API non-functional.
show_warningsfalse[true, false]Enables or disables the display of warnings.
note
  • If an OpenBBUserData folder is not in the home directory, the application will create one on first run. The user preferences with paths all default to this folder - exports, styles, or data - and can be changed at any time to suit.
  • The OpenBBUserData will still be created even if preferences are not pointing to it, this is because the application needs a place to store logs and other artifacts.
  • One way to export files or images from the OpenBB Platform is to leverage that functionality from the OpenBB Charting Extension. The export_directory preference is the location where the extension will attempt to save CSV and image files.

On this page