From a4400642a8800c0deaed297c6439480ecc6d9618 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Thu, 2 May 2024 13:06:23 +0100 Subject: [PATCH 01/25] cli docs website --- website/content/cli/_category_.json | 4 + website/content/cli/index.md | 35 + website/content/cli/installation.md | 137 +++ website/content/cli/usage/_category_.json | 4 + .../content/cli/usage/data/_category_.json | 4 + website/content/cli/usage/data/api-keys.md | 857 ++++++++++++++++++ website/content/cli/usage/data/custom-data.md | 66 ++ .../content/cli/usage/data/data-sources.md | 129 +++ website/content/cli/usage/data/index.mdx | 26 + website/content/cli/usage/hub.md | 98 ++ .../cli/usage/keyboard-hotkey-macros.md | 72 ++ .../content/cli/usage/outputs/_category_.json | 4 + .../content/cli/usage/outputs/export-data.md | 70 ++ website/content/cli/usage/outputs/index.mdx | 26 + .../cli/usage/outputs/interactive-charts.md | 109 +++ .../cli/usage/outputs/interactive-tables.md | 80 ++ .../cli/usage/overview/_category_.json | 4 + .../usage/overview/commands-and-arguments.md | 161 ++++ .../overview/customizing-the-terminal.md | 117 +++ website/content/cli/usage/overview/index.mdx | 26 + .../overview/structure-and-navigation.md | 50 + .../cli/usage/routines/_category_.json | 4 + .../cli/usage/routines/community-routines.md | 79 ++ website/content/cli/usage/routines/index.mdx | 41 + .../routines/introduction-to-routines.md | 113 +++ .../usage/routines/overlay-financial-data.md | 131 +++ .../usage/routines/pipeline-of-commands.md | 96 ++ .../usage/routines/routine-macro-recorder.md | 47 + .../routines/routines-for-power-users.md | 203 +++++ website/sidebars.js | 5 + 30 files changed, 2798 insertions(+) create mode 100644 website/content/cli/_category_.json create mode 100644 website/content/cli/index.md create mode 100644 website/content/cli/installation.md create mode 100644 website/content/cli/usage/_category_.json create mode 100644 website/content/cli/usage/data/_category_.json create mode 100644 website/content/cli/usage/data/api-keys.md create mode 100644 website/content/cli/usage/data/custom-data.md create mode 100644 website/content/cli/usage/data/data-sources.md create mode 100644 website/content/cli/usage/data/index.mdx create mode 100644 website/content/cli/usage/hub.md create mode 100644 website/content/cli/usage/keyboard-hotkey-macros.md create mode 100644 website/content/cli/usage/outputs/_category_.json create mode 100644 website/content/cli/usage/outputs/export-data.md create mode 100644 website/content/cli/usage/outputs/index.mdx create mode 100644 website/content/cli/usage/outputs/interactive-charts.md create mode 100644 website/content/cli/usage/outputs/interactive-tables.md create mode 100644 website/content/cli/usage/overview/_category_.json create mode 100644 website/content/cli/usage/overview/commands-and-arguments.md create mode 100644 website/content/cli/usage/overview/customizing-the-terminal.md create mode 100644 website/content/cli/usage/overview/index.mdx create mode 100644 website/content/cli/usage/overview/structure-and-navigation.md create mode 100644 website/content/cli/usage/routines/_category_.json create mode 100644 website/content/cli/usage/routines/community-routines.md create mode 100644 website/content/cli/usage/routines/index.mdx create mode 100644 website/content/cli/usage/routines/introduction-to-routines.md create mode 100644 website/content/cli/usage/routines/overlay-financial-data.md create mode 100644 website/content/cli/usage/routines/pipeline-of-commands.md create mode 100644 website/content/cli/usage/routines/routine-macro-recorder.md create mode 100644 website/content/cli/usage/routines/routines-for-power-users.md diff --git a/website/content/cli/_category_.json b/website/content/cli/_category_.json new file mode 100644 index 000000000000..063f9e91bfd8 --- /dev/null +++ b/website/content/cli/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "OpenBB Platform CLI", + "position": 2 + } diff --git a/website/content/cli/index.md b/website/content/cli/index.md new file mode 100644 index 000000000000..bc6484eed42b --- /dev/null +++ b/website/content/cli/index.md @@ -0,0 +1,35 @@ +--- +title: Introduction +sidebar_position: 0 +description: Introduction to the OpenBB Platform CLI; a command line interface that wraps around the OpenBB Platform, offering convenient access to its pre-built data connectors and libraries for designing and building financial reports and applications. Discover how you can contribute to the platform. +keywords: +- OpenBB Platform CLI +- OpenBB Platform +- data connectors +- data access +- data processing +- third-party data providers +--- + + + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +The OpenBB Platform CLI is a command line interface that enhances the OpenBB Platform by providing easy access to its comprehensive data connectors and libraries. These tools are essential for designing and constructing financial reports and applications. As a robust tool, the CLI facilitates interaction with the platform, enabling users to retrieve and process data from third-party providers and create customized financial reports and applications. + +![Platform Docs pic](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/74520441-5e95-4ba6-9d16-6a2d5c966cf9) + +## What is the OpenBB Platform CLI? + +The OpenBB Platform CLI is a wrapper around the OpenBB Platform, this means that one can expect it to have the same functionalities that the OpenBB Platform offers with the enhancements and limitations that a command line interface brings. The CLI is designed to be user-friendly and intuitive, making it easy for users to interact with the platform and access its pre-built data connectors and libraries. + +The OpenBB Platform CLI is the OpenBB's sub product that intends to offer a replacement for the former [OpenBB Terminal](/terminal). This means that the navigation and usage of the CLI are similar to the Terminal, but with the added benefit of being able to access the OpenBB Platform's data connectors and libraries, i.e., the OpenBB Core and OpenBB Extensions. + +Starting with V4, we have completely restructured the previous version of the OpenBB SDK. +Instead of a single monolithic SDK, that comes with dependency nightmares and compatibility issues with things you may not need, we have morphed into the OpenBB Platform, which serves as a collection of building blocks to be used for your own need. + +--- + +Want to contribute? Check out our [Development section](/platform/development). diff --git a/website/content/cli/installation.md b/website/content/cli/installation.md new file mode 100644 index 000000000000..1a7c71bc6bc8 --- /dev/null +++ b/website/content/cli/installation.md @@ -0,0 +1,137 @@ +--- +title: Installation +sidebar_position: 1 +description: This page presents the general system requirements, supported environments, + installation procedures, and setup for running the OpenBB Platform. It discusses + the prerequisites including Python version, operating system requirements, Docker + usage, and the process of building the platform from source. +keywords: +- OpenBB Platform +- Python +- System requirements +- Supported environments +- Installation +- Docker +- Python virtual environment +- Installation from source +- Windows 10 +- Mac OS Big Sur +- Linux +- Package installation +- VS Code +- PyCharm +- Jupyter +- GitHub +- Conda +- venv +- API +- Repository +- pip +- Poetry +- Toml +- PyPI +- Node.js +- npm +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +## General Requirements and Environments + +Since the OpenBB Platform CLI is a wrapper around the OpenBB Platform, its requirements are the same. Please refer to the [OpenBB Platform install documentation](/platform/installation) for more information. + +## Installation + +Before installation, update the package manager so that `pip` is current, then create the environment with the desired version of Python. + +:::note +Installing packages directly to the system Python or `base` environment is not recommended. Create a new environment first (can be any name, using openbb here for example). + +```bash +conda create -n openbb-cli python=3.11 +conda activate openbb-cli +``` + +::: + +### PyPI + +Install from PyPI with: + +```console +pip install openbb-cli +``` + +This will install the core OpenBB Platform CLI, along with officially supported Platform's extensions and providers. + +#### Extensions + +To install all extensions and providers (both officially supported and community maintained ones): + +```console +pip install openbb[all] +``` + +To install a single extension: + +```console +pip install openbb[charting] +``` + +```console +pip install openbb[ta] +``` + +Or install a single provider: + +```console +pip install openbb[yfinance] +``` + +### Source + +To build the OpenBB Platform from the source code, first install `git`: + +```console +pip install git +``` + +Next, clone the repository from GitHub: + +```console +git clone git@github.com:OpenBB-finance/OpenBBTerminal.git +``` + +When it is done, checkout the branch where the code is living: + +```console +git checkout develop +``` + +Then, `cd` into the directory: + +```console +cd cli +``` + +Install required packages + +```console +pip install poetry +``` + +Finally, run `poetry` to install all dependencies: + +```console +poetry install +``` + +## Post-Installation + +You're ready to launch the OpenBB Platform CLI. To do so, run the following command: + +```console +openbb +``` \ No newline at end of file diff --git a/website/content/cli/usage/_category_.json b/website/content/cli/usage/_category_.json new file mode 100644 index 000000000000..db299faef7fa --- /dev/null +++ b/website/content/cli/usage/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Usage", + "position": 2 +} diff --git a/website/content/cli/usage/data/_category_.json b/website/content/cli/usage/data/_category_.json new file mode 100644 index 000000000000..626046e55b7c --- /dev/null +++ b/website/content/cli/usage/data/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Data", + "position": 2 +} diff --git a/website/content/cli/usage/data/api-keys.md b/website/content/cli/usage/data/api-keys.md new file mode 100644 index 000000000000..600744d9846c --- /dev/null +++ b/website/content/cli/usage/data/api-keys.md @@ -0,0 +1,857 @@ +--- +title: API Keys +sidebar_position: 2 +description: This documentation page describes how you can set your own API keys from each data vendor on OpenBB to leverage their datasets. +keywords: +- API keys +- datasets +- data vendors +- subscription +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +API (Application Programming Interface) keys are access credentials for obtaining data from a particular data vendor. They are a string of random characters assigned, by the data provider, to an individual account. + +## Setting API keys through Terminal + +Most vendors offer a free tier requiring only a valid email address, some will require an account with proper KYC (Know Your Customer). Each source is entered into the Terminal from the `/keys` menu with the syntax as described in the sections below. Adding the `-h` argument to the command will also display the expected inputs. For example, + +```console +(🦋) /keys/ $ reddit -h + +usage: reddit [-i CLIENT_ID] [-s CLIENT_SECRET] [-u USERNAME] [-p PASSWORD] [-a USER_AGENT [USER_AGENT ...]] [-h] + +Set Reddit API key. + +options: + -i CLIENT_ID, --id CLIENT_ID + Client ID (default: None) + -s CLIENT_SECRET, --secret CLIENT_SECRET + Client Secret (default: None) + -u USERNAME, --username USERNAME + Username (default: None) + -p PASSWORD, --password PASSWORD + Password (default: None) + -a USER_AGENT [USER_AGENT ...], --agent USER_AGENT [USER_AGENT ...] + User agent (default: None) + -h, --help show this help message (default: False) +``` + +In order to set the API key in the terminal, after obtaining the correct information from reddit, one would enter into the terminal: + +```console +(🦋) /keys/ $ reddit -i -s -u -p -a +``` + +A message similar to the one below will be printed when a function requesting data from an API is called but the key has not yet been entered. + +```console +(🦋) /stocks/fa/ $ rot + +API_FINNHUB_KEY not defined. Set API Keys in ~/.openbb_terminal/.env or under keys menu. +``` + +The menu also provides a method for testing the validity of a key upon entry. It can be easy to copy & paste the string with a missing character; so, if the test fails, check that the values were correctly recorded with the command: + +```console +(🦋) /keys/ $ mykeys --show +``` + +:::note +OpenBB recommends users to gradually obtaining API keys from data vendors based on their needs. + +In addition by accessing our [data vendor affiliate program](https://my.openbb.co/app/hub/affiliate) you can get discounts upon sign-up. +::: + + +## Supported data vendors + +This section covers all API keys listed above and include detailed instructions how to obtain each API key. By clicking on each name, the section will expand and instructions are provided. + +### AlphaVantage + +> Alpha Vantage provides enterprise-grade financial market data through a set of powerful and developer-friendly data APIs and spreadsheets. From traditional asset classes (e.g., stocks, ETFs, mutual funds) to economic indicators, from foreign exchange rates to commodities, from fundamental data to technical indicators, Alpha Vantage is your one-stop-shop for real-time and historical global market data delivered through cloud-based APIs, Excel, and Google Sheets. + +
+Instructions + +Go to: https://www.alphavantage.co/support/#api-key + +![AlphaVantage](https://user-images.githubusercontent.com/46355364/207820936-46c2ba00-81ff-4cd3-98a4-4fa44412996f.png) + +Fill out the form, pass Captcha, and click on, "GET FREE API KEY". The issued key can be entered into the OpenBB Terminal with: + +```console +/keys/av REPLACE_WITH_KEY +``` + +
+ +### Binance + +> Binance cryptocurrency exchange - We operate the worlds biggest bitcoin exchange and altcoin crypto exchange in the world by volume + +
+Instructions + +Go to: https://www.binance.com/en/support/faq/how-to-create-api-360002502072 + +![Binance](https://user-images.githubusercontent.com/46355364/207839805-f71cf12a-62d2-41cb-ba19-0c35917abc40.png) + +These instructions should provide clear guidance for obtaining an API Key. Enter the issued credentials into the OpenBB Terminal with: + +```console +/keys/binance -k REPLACE_WITH_KEY -s REPLACE_WITH_SECRET +``` + +
+ +### Bitquery + +> Bitquery is an API-first product company dedicated to power and solve blockchain data problems using the ground truth of on-chain data. + +
+Instructions + +Go to: https://bitquery.io/< + +![Bitquery](https://user-images.githubusercontent.com/46355364/207840322-5532a3f9-739f-4e28-9839-a58db932882e.png) + +Click "Try GraphQL API", which opens the following screen: + +![Try GraphQL API](https://user-images.githubusercontent.com/46355364/207840576-2c51a538-dd9b-484d-b11d-40e3e424df62.png) + +After creating an account and verifying the email address, get the value for the key by clicking on the "API Key" tab. + +![Get Bitquery API Key](https://user-images.githubusercontent.com/46355364/207840833-35c1b12c-9b4b-43fe-a33e-f7b92c43a011.png) + +Enter this API key into the OpenBB Terminal by typing: + +```console +/keys/bitquery REPLACE_WITH_KEY +``` + +
+ +### BizToc + +> BizToc is the one-stop business and finance news hub, encapsulating the top 200 US news providers in real time. + +
+Instructions + +The BizToc API is hosted on RapidAPI. To set up, go to: https://rapidapi.com/thma/api/biztoc. + +![biztoc0](https://github.com/marban/OpenBBTerminal/assets/18151143/04cdd423-f65e-4ad8-ad5a-4a59b0f5ddda) + +In the top right, select "Sign Up". After answering some questions, you will be prompted to select one of their plans. + +![biztoc1](https://github.com/marban/OpenBBTerminal/assets/18151143/9f3b72ea-ded7-48c5-aa33-bec5c0de8422) + +After signing up, navigate back to https://rapidapi.com/thma/api/biztoc. If you are logged in, you will see a header called X-RapidAPI-Key. + +![biztoc2](https://github.com/marban/OpenBBTerminal/assets/18151143/0f3b6c91-07e0-447a-90cd-a9e23522929f) + +Copy the key to the clipboard, and enter this key into the OpenBB Terminal with: + +```console +/keys/biztoc REPLACE_WITH_KEY +``` + +
+ +### CoinMarketCap + +> CoinMarketCap is the world's most-referenced price-tracking website for cryptoassets in the rapidly growing cryptocurrency space. Its mission is to make crypto discoverable and efficient globally by empowering retail users with unbiased, high quality and accurate information for drawing their own informed conclusions. + +
+Instructions + +Go to: https://coinmarketcap.com/api + +![CoinMarketCap](https://user-images.githubusercontent.com/46355364/207831111-3f09ed75-740e-4121-a67e-6e1f36e8ab9a.png) + +Click on, "Get Your Free API Key Now", which opens to the page: + +![CoinMarketCap](https://user-images.githubusercontent.com/46355364/207831345-06a48efe-63b2-4804-bcf9-52fa4a73f7db.png) + +Once the account has been created, copy the API key displayed within the dashboard. + +![CoinMarketCap](https://user-images.githubusercontent.com/46355364/207831705-e9f95018-bba7-49a9-b057-3443bc839861.png) + +Enter the API key into the OpenBB Terminal by typing: + +```console +/keys/cmc REPLACE_WITH_KEY +``` + +
+ +### Coinbase + +> Coinbase is a secure online platform for buying, selling, transferring, and storing cryptocurrency. + +
+Instructions + +Go to: https://help.coinbase.com/en/exchange/managing-my-account/how-to-create-an-api-key + +![Coinbase](https://user-images.githubusercontent.com/46355364/207841901-647f0aef-0c74-454d-b99e-367d784259f0.png) + +Follow the instructions to obtain the credentials for the specific account. Enter the three values into the OpenBB Terminal by typing: + +```console +/keys/coinbase -k REPLACE_WITH_KEY -s REPLACE_WITH_SECRET -p REPLACE_WITH_PASSPHRASE +``` + +
+ +### Coinglass + +> Coinglass is a cryptocurrency futures trading & information platform,where you can find the Bitcoin Liquidations ,Bitcoin open interest, Grayscale Bitcoin Trust,Bitcoin longs vs shorts ratio and actively compare funding rates for crypto futures.Above all the quantities are shown as per their respective contract value. + +
+Instructions + +Go to: https://www.coinglass.com/ + +![Coinglass](https://user-images.githubusercontent.com/46355364/207844601-8510687a-e54f-49b9-961f-5ef6718f58ab.png) + +Click, "Log in", and then sign up for an account. This opens the page: + +![Coinglass](https://user-images.githubusercontent.com/46355364/207844637-a9321889-c4d8-4d44-95fe-a6288a17ad19.png) + +With the account created, find the assigned API key within the account profile page. Enter this value into the OpenBB Terminal by typing: + +```console +/keys/coinglass REPLACE_WITH_KEY +``` + +
+ +### Crypto Panic + +> CryptoPanic is a news aggregator platform indicating impact on price and market for traders and cryptocurrency enthusiasts. + +
+Instructions + +Go to: https://cryptopanic.com/developers/api/ + +![Crypto Panic](https://user-images.githubusercontent.com/46355364/207848733-27e5a804-7ae7-4ca2-88b2-848b32929b6f.png) + +Click on, [Sign up](https://cryptopanic.com/accounts/signup/?next=/developers/api/), and after creating, the API key will be displayed on the documentation page, "Your free API auth token". + +![Crypto Panic](https://user-images.githubusercontent.com/46355364/207848971-3e4771b7-1faa-45fe-955f-81bd736b16b7.png) + +Enter that value in the OpenBB Terminal by typing: + +```console +/keys/cpanic REPLACE_WITH_KEY +``` + +
+ +### Databento + +> Databento eliminates tens of thousands of dollars in upfront expenses per dataset without sacrificing data integrity. We give you the flexibility to pick up real-time full exchange feeds and terabytes of historical data, whenever you need it. + +
+Instructions + +Go to: https://docs.databento.com/getting-started + +![Databento](https://user-images.githubusercontent.com/85772166/221943074-7a5e55c1-6193-42d8-a04c-431603a69a05.png) + +Click on, [Sign up](https://databento.com/signup), and after creating an account, the API key is found in the [account portal](https://databento.com/portal/keys). + +![Databento](https://user-images.githubusercontent.com/85772166/221943270-e0ada7bf-c7fb-46f2-bd7a-49afb3bc7bd8.png) + +Enter this into the terminal with: + +```console +/keys/databento REPLACE_WITH_KEY +``` + +
+ +### DEGIRO + +> DEGIRO is Europe's fastest growing online stock broker. DEGIRO distinguishes itself from its competitors by offering extremely low trading commissions. + +
+Instructions + +Go to: https://www.degiro.com/ + +![Degiro](https://user-images.githubusercontent.com/46355364/207838353-001d350c-872c-4770-a586-fb21318122eb.png) + +Click on, "Open an account", and then go through the registration process. After setting up the account, the login credentials can be entered in the OpenBB Terminal with: + +```console +/keys/degiro -u USERNAME -p PASSWORD +``` + +Instructions for setting up 2FA authorization are [here](https://github.com/Chavithra/degiro-connector#35-how-to-use-2fa-). + +
+ +### EODHD + +> Historical End of Day, Intraday, and Live prices API, with Fundamental Financial data API for more than 120000 stocks, ETFs and funds all over the world. + +
+Instructions + +Go to: https://eodhistoricaldata.com/r/?ref=869U7F4J + +![EODHD](https://user-images.githubusercontent.com/46355364/207849214-23763c95-7314-42ae-b97d-cb5810686498.png) + +Clicking on, "Registration", opens the page: + +![EODHD](https://user-images.githubusercontent.com/46355364/207849324-00d4a916-8260-45c0-9714-289e0a0574c0.png) + +Once registered, the API Key will be next to "API TOKEN". + +![EODHD](https://user-images.githubusercontent.com/46355364/207849462-37471270-929a-45c5-a164-a84249b19231.png) + +Enter this string into the OpenBB Terminal by typing: + +```console +/keys/eodhd REPLACE_WITH_KEY +``` + +
+ +### Finnhub + +> With the sole mission of democratizing financial data, we are proud to offer a FREE realtime API for stocks, forex and cryptocurrency. + +
+Instructions + +Go to: https://finnhub.io/ + +![Finnhub](https://user-images.githubusercontent.com/46355364/207832028-283c3321-8c05-4ee8-b4d2-41cdc940f408.png) + +Click on, "Get free api key", to open the page: + +![Finnhub](https://user-images.githubusercontent.com/46355364/207832185-f4c8406a-3b75-4acc-b3e8-3c4b3272d4da.png) + +Once the account has been created, find the API key in the account dashboard. + +![Finnhub](https://user-images.githubusercontent.com/46355364/207832601-62007d95-410c-4d03-a5a3-b177d1894a4c.png) + +Add this key to the OpenBB Terminal by entering: + +```console +/keys/finnhub REPLACE_WITH_KEY +``` + +
+ +### Financial Modeling Prep + +> Enhance your application with our data that goes up to 30 years back in history. Earnings calendar, financial statements, multiple exchanges and more! + +
+Instructions + +Go to: https://site.financialmodelingprep.com/developer/docs + +![FinancialModelingPrep](https://user-images.githubusercontent.com/46355364/207821920-64553d05-d461-4984-b0fe-be0368c71186.png) + +Click on, "Get my API KEY here", and sign up for a free account. + +![FinancialModelingPrep](https://user-images.githubusercontent.com/46355364/207822184-a723092e-ef42-4f87-8c55-db150f09741b.png) + +With an account created, sign in and navigate to the Dashboard, which shows the assigned token. by pressing the "Dashboard" button which will show the API key. + +![FinancialModelingPrep](https://user-images.githubusercontent.com/46355364/207823170-dd8191db-e125-44e5-b4f3-2df0e115c91d.png) + +Enter the key into the OpenBB Terminal with: + +```console +/keys/fmp REPLACE_WITH_KEY +``` + +
+ +### FRED + +> FRED is the trusted source for economic data since 1991. Download, graph, and track 819,000 US and international time series from 110 sources. + +
+Instructions + +Go to: https://fred.stlouisfed.org + +![FRED](https://user-images.githubusercontent.com/46355364/207827137-d143ba4c-72cb-467d-a7f4-5cc27c597aec.png) + +Click on, "My Account", create a new account or sign in with Google: + +![FRED](https://user-images.githubusercontent.com/46355364/207827011-65cdd501-27e3-436f-bd9d-b0d8381d46a7.png) + +After completing the sign-up, go to "My Account", and select "API Keys". Then, click on, "Request API Key". + +![FRED](https://user-images.githubusercontent.com/46355364/207827577-c869f989-4ef4-4949-ab57-6f3931f2ae9d.png) + +Fill in the box for information about the use-case for FRED, and by clicking, "Request API key", at the bottom of the page, the API key will be issued. + +![FRED](https://user-images.githubusercontent.com/46355364/207828032-0a32d3b8-1378-4db2-9064-aa1eb2111632.png) + +Enter the API key into the OpenBB Terminal with: + +```console +/keys/fred REPLACE_WITH_KEY +``` + +
+ +### GitHub + +> GitHub is where over 100 million developers shape the future of software. + +
+Instructions + +Go to: https://github.com + +![GitHub](https://user-images.githubusercontent.com/46355364/207846953-7feae777-3c3b-4f21-9dcf-84817c732618.png) + +Sign up for, or sign in to, GitHub. Once logged in, navigate to the [apps](https://github.com/settings/apps) page, under account settings. + +![GitHub](https://user-images.githubusercontent.com/46355364/207847215-3c04003f-26ea-4e62-9c13-ea35176bb5e3.png) + +Select, "New GitHub App": + +![GitHub](https://user-images.githubusercontent.com/46355364/207847383-d24416c6-18be-43f2-ae7c-455e8372a6ed.png) + +After creating the app, the key will be issued. Enter this token into the OpenBB Terminal with: + +```console +/keys/github REPLACE_WITH_KEY +``` + +
+ +### Glassnode + +> Glassnode makes blockchain data accessible for everyone. We source and carefully dissect on-chain data, to deliver contextualized and actionable insights. + +
+Instructions + +Go to: https://studio.glassnode.com + +![Glassnode](https://user-images.githubusercontent.com/46355364/207843761-799078ff-fa64-4d39-a6eb-ba01d250be69.png) + +Click on, "Sign up", and create an account: + +![Glassnode](https://user-images.githubusercontent.com/46355364/207843795-dd2cdbdb-45eb-4c7d-b967-ae9857d4ea5d.png) + +After creating an account, navigate to the [account settings](https://studio.glassnode.com/settings/api) and generate an API Key. + +![Glassnode](https://user-images.githubusercontent.com/46355364/207843950-5f33f37d-0203-4302-a67f-198808f18e06.png) + +Enter this key in the OpenBB terminal with: + +```console +/keys/glassnode REPLACE_WITH_KEY +``` + +
+ +### Intrinio + +> Intrinio is more than a financial data API provider – we're a real time data partner. That means we're your guide to every step of the financial data. + +
+Instructions + +Go to: https://intrinio.com/starter-plan + +![Intrinio](https://user-images.githubusercontent.com/85772166/219207556-fcfee614-59f1-46ae-bff4-c63dd2f6991d.png) + +An API key will be issued with a subscription. Find the token value within the account dashboard, and enter it into the OpenBB Terminal with: + +```console +/keys/intrinio REPLACE_WITH_KEY +``` + +
+ +### Messari + +> Gain an edge over the crypto market with professional grade data, tools, and research. + +
+Instructions + +Go to: https://messari.io + +![Messari](https://user-images.githubusercontent.com/46355364/207848122-ec6a41e4-76b7-4620-adc3-1f1c19f4bca6.png) + +Click on, "Sign up", and create an account. + +![Messari](https://user-images.githubusercontent.com/46355364/207848160-6a962e3c-3007-40a3-9431-cd5ddfe5bb8e.png) + +After creating the account, navigate to the [account page](https://messari.io/account/api), and click on the tab for, API Access. + +![Messari](https://user-images.githubusercontent.com/46355364/207848324-ade5bede-8e6b-4b87-bdec-eade3217c0d8.png) + +Copy the API key and add it to the OpenBB Terminal by entering: + +```console +/keys/messari REPLACE_WITH_KEY +``` + +
+ +### News API + +> News API is a simple, easy-to-use REST API that returns JSON search results for current and historic news articles published by over 80,000 worldwide sources. + +
+Instructions + +Go to: https://newsapi.org + +![News API](https://user-images.githubusercontent.com/46355364/207828250-0c5bc38c-90b4-427d-a611-b43c98c8e7ab.png) + +Click on, "Get API Key", and fill out the form. + +![News API](https://user-images.githubusercontent.com/46355364/207828421-76922bc2-cde0-493f-9eed-7f90eb831779.png) + +Register for an account and the next screen will provide the API Key. + +![News API](https://user-images.githubusercontent.com/46355364/207828736-f0fce53b-f302-4456-adf9-8d50ac41fbe2.png) + +Add this API key into the OpenBB Terminal by entering: + +```console +/keys/news REPLACE_WITH_KEY +``` + +
+ +### Oanda + +> OANDA's Currency Converter allows you to check the latest foreign exchange average bid/ask rates and convert all major world currencies. + +
+Instructions + +Go to: https://developer.oanda.com + +![Oanda](https://user-images.githubusercontent.com/46355364/207839324-d30aa2b6-be83-41ff-9b1b-146cac566789.png) + +After creating an account, follow the steps below. + +![Oanda](https://user-images.githubusercontent.com/46355364/207839246-eb40f093-b583-4edd-b178-99fe399bfb66.png) + +Upon completion of the account setup, enter the credentials into the OpenBB Terminal using the syntax: + +```console +/keys/oanda -a REPLACE_WITH_ACCOUNT -t REPLACE_WITH_TOKEN --account_type REPLACE_WITH_LIVE_OR_PRACTICE +``` + +
+ + +### OpenAI + +> An API for accessing new AI models developed by OpenAI. + +
+Instructions + +Go to: https://openai.com/blog/openai-api + +![OpenAI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/105685594/2b2b5f7c-745a-40d7-bd19-05ed3021f9da) + +Click sign up and create an account. Once done, you will be logged into the home page: +![OpenAI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/105685594/34976dce-bdf0-48cd-a9db-9e41eacdbc04) + + +Click the top right "Personal" button to find the following drop down: +![OpenAI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/105685594/95987173-3884-462e-a03b-dff040f0acb4) + + +Click `View API Keys`. This will take you to the api Keys menu. Then click `Create new secret key`: +![OpenAI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/105685594/210fa55b-8a33-4647-bdd4-28a478b02ba8) + +Then enter the Secret key credentials into the OpenBB Terminal using the syntax: + +```console +/keys/openai -k +``` + +
+ + + + +### Polygon + +> Live & historical data for US stocks for all 19 exchanges. Instant access to real-time and historical stock market data. + +
+Instructions + +Go to: https://polygon.io + +![Polygon](https://user-images.githubusercontent.com/46355364/207825623-fcd7f0a3-131a-4294-808c-754c13e38e2a.png) + +Click on, "Get your Free API Key". + +![Polygon](https://user-images.githubusercontent.com/46355364/207825952-ca5540ec-6ed2-4cef-a0ed-bb50b813932c.png) + +After signing up, the API Key is found at the bottom of the account dashboard page. + +![Polygon](https://user-images.githubusercontent.com/46355364/207826258-b1f318fa-fd9c-41d9-bf5c-fe16722e6601.png) + +Enter the key into the OpenBB Terminal by typing: + +```console +/keys/polygon REPLACE_WITH_KEY +``` + +
+ +### Quandl + +> The premier source for financial, economic, and alternative datasets, serving investment professionals. Quandl’s platform is used by over 400,000 people, including analysts from the world’s top hedge funds, asset managers and investment banks. + +
+Instructions + +Go to: https://www.quandl.com + +![Quandl](https://user-images.githubusercontent.com/46355364/207823899-208a3952-f557-4b73-aee6-64ac00faedb7.png) + +Click on, "Sign Up", and register a new account. + +![Quandl](https://user-images.githubusercontent.com/46355364/207824214-4b6b2b74-e709-4ed4-adf2-14803e6f3568.png) + +Follow the sign-up instructions, and upon completion the API key will be assigned. + +![Quandl](https://user-images.githubusercontent.com/46355364/207824664-3c82befb-9c69-42df-8a82-510d85c19a97.png) + +Enter the key into the OpenBB Terminal with: + +```console +/keys/quandl REPLACE_WITH_KEY +``` + +
+ +### Reddit + +> Reddit is a network of communities where people can dive into their interests, hobbies and passions. + +
+Instructions + +Sign in to Reddit, and then go to: https://old.reddit.com/prefs/apps/ + +![Reddit](https://preview.redd.it/540vrn3k0cn91.png?width=986&format=png&auto=webp&v=enabled&s=88228cd0cf4415b3487b8d35e1097f0caa804e15) + +Scroll down and click on "create application", selecting "script". + +![Reddit](https://preview.redd.it/7je4ehqa1cn91.png?width=916&format=png&auto=webp&v=enabled&s=dbdf65ccc0820cfe28eff8e81cba056f4fd8263e) + +Once the application is created, you must register it [here](https://old.reddit.com/wiki/api) + +![Reddit](https://user-images.githubusercontent.com/46355364/207834105-665180be-c2b6-43c8-b1c9-477729905010.png) + +Click on, "Read the full API terms and sign up for usage", and fill out the form. + +![Reddit](https://user-images.githubusercontent.com/46355364/207834850-32a0d4c8-9990-4919-94e3-abad1487a3bd.png) + +After submitting the form, check for a confirmation email. The credentials will be displayed [here](https://old.reddit.com/prefs/apps/), enter them into the OpenBB Terminal in one line: + +```console +/keys/reddit -i REPLACE_WITH_CLIENT_ID -s REPLACE_WITH_CLIENT_SECRET -u REPLACE_WITH_REDDIT_USERNAME -p REPLACE_WITH_REDDIT_PASSWORD -a REPLACE_WITH_USER_AGENT +``` + +
+ +### Robinhood + +> Robinhood has commission-free investing, and tools to help shape your financial future. + +
+Instructions + +Go to: https://robinhood.com/us/en + +![Robinhood](https://user-images.githubusercontent.com/46355364/207838058-a2311632-6459-4cfd-bc0a-639ee3931574.png) + +After registering for an account, it can be added to the OpenBB Terminal with: + +```console +/keys/rb -u REPLACE_WITH_USERNAME -p REPLACE_WITH_PASSWORD +``` + +The first login will request 2FA authorization from the device connected to the account. + +
+ +### Santiment + +> We provide tools to help you analyze crypto markets and find data-driven opportunities to optimize your investing. + +
+Instructions + +Go to: https://app.santiment.net + +Click on, "Sign up", and register for an account. + +![Santiment](https://user-images.githubusercontent.com/46355364/207849732-4bae61de-2f62-4919-b85d-f418f1bbd0c4.png) + +Navigate to the [account dashboard](https://app.santiment.net/account#api-keys) and generate a key. + +![Santiment](https://user-images.githubusercontent.com/46355364/207849839-31d1d0a7-6936-4ebd-a7f8-1292f6317b07.png) + +Add it to the OpenBB Terminal by entering: + +```console +/keys/santiment REPLACE_WITH_KEY +``` + +
+ +### Stocksera + +> Empowering investors to take advantage of alternative data. We track trending tickers on social media and provide alternative data for easy due-diligence & analysis. + +
+Instructions + +Go to: https://stocksera.pythonanywhere.com + +![Stocksera](https://user-images.githubusercontent.com/46355364/207853896-ee233569-26bb-4244-b115-43ac8885757a.png) + +Click on, "Log in", and create an account. + +![Stocksera](https://user-images.githubusercontent.com/46355364/207853985-46a7a17f-b6b2-442b-886d-f68b3ba2ad5a.png) + +Once logged in, navigate to the "Developers" tab and copy the API key. + +![Stocksera](https://user-images.githubusercontent.com/46355364/207854224-e5ddace0-15d1-491c-b616-263cca0bef02.png) + +Add the key to the OpenBB Terminal by entering: + +```console +/keys/stocksera REPLACE_WITH_KEY +``` + +
+ +### Token Terminal + +> Token Terminal is a platform that aggregates financial data on the leading blockchains and decentralized applications. + +
+Instructions + +Go to: https://tokenterminal.com + +![Token Terminal](https://user-images.githubusercontent.com/46355364/207850735-69368b4f-6a3e-46b8-ba69-3b79d9231f15.png) + +Click on, "Log in" and sign up for an account. + +![Token Terminal](https://user-images.githubusercontent.com/46355364/207850774-2071df78-3289-4c8e-9d64-156b9ec8ad81.png) + +Verify the email address, and then navigate go to the "API" tab and copy the API key to the clipboard. + +![Token Terminal](https://user-images.githubusercontent.com/46355364/207851035-71ea3eff-a11f-4835-8592-c07b3aa3f800.png) + +Add the key to the OpenBB Terminal by typing: + +```console +/keys/tokenterminal REPLACE_WITH_KEY +``` + +
+ +### Tradier + +> Tradier, the home of active traders. Our open collaboration platform allows investors to truly customize their trading experience like never before. + +
+Instructions + +Go to: https://documentation.tradier.com + +![Tradier](https://user-images.githubusercontent.com/46355364/207829178-a8bba770-f2ea-4480-b28e-efd81cf30980.png) + +Click on, "Open Account", to start the sign-up process. After the account has been setup, navigate to [Tradier Broker Dash](https://dash.tradier.com/login?redirect=settings.api) and create the application. Request a sandbox access token, and enter this key into the OpenBB Terminal with: + +```console +/keys/tradier REPLACE_WITH_KEY +``` + +
+ +### Twitter + +> From breaking news and entertainment to sports and politics, get the full story with all the live commentary. + +
+Upcoming changes to the Twitter API will deprecate the current functionality, it is uncertain if the current features will continue to work. + +![Twitter API](https://pbs.twimg.com/media/FooIJF3agAIU8SN?format=png&name=medium) + +
+ +### Ultima Insights + +> Ultima Insights offers tools such as the SEC Filing Analyst, Company news monitoring, Industry event watch, and Earnings Call Roundup for comprehensive investment monitoring. It incorporates daily Wall Street-level Qualitative analysis into OpenBB to keep users updated. The News curation system, powered by GPT + LLMs technology, presents relevant news to investors, often before it appears on platforms like Bloomberg. Ultima aims to provide timely and significant information for its users. + +
+Instructions + +Go to: https://ultimainsights.ai/openbb + +![Ultima Insights](https://user-images.githubusercontent.com/1911913/229215125-e3419788-eef3-4389-a3bd-5c08f3333347.png) + +Click on the "Get started" button for Ultima Pro or "Just Want the API Key" to get an Ultima API key for yout OpenBB account. Once you sign-up and confirm you want to start a trial with Ultima, Copy the API key to your clipboard and enter this key into the OpenBB Terminal with: + +```console +/keys/ultima REPLACE_WITH_KEY +``` + +
+ +### Whale Alert + +> Whale Alert continuously collects and analyzes billions of blockchain transactions and related-off chain data from hundreds of reliable sources and converts it into an easy to use standardized format. Our world-class analytics and custom high speed database solutions process transactions the moment they are made, resulting in the largest and most up-to-date blockchain dataset in the world. + +
+Instructions + +Go to: https://docs.whale-alert.io + +![Whale Alert](https://user-images.githubusercontent.com/46355364/207842892-3f71ee7a-6cd3-48a2-82e4-fa5ec5b13807.png) + +Click on, "sign up here". + +![Whale Alert](https://user-images.githubusercontent.com/46355364/207842992-427f1d2c-b34e-41c9-85fd-18511805fd16.png) + +After creating the account, click on, "Create", to issue the API Key. + +![Whale Alert](https://user-images.githubusercontent.com/46355364/207843214-20232465-9a52-4b66-b01a-0b8cecbdd612.png) + +Enter the key into the OpenBB Terminal by typing: + +```console +/keys/walert REPLACE_WITH_KEY +``` + +
diff --git a/website/content/cli/usage/data/custom-data.md b/website/content/cli/usage/data/custom-data.md new file mode 100644 index 000000000000..f9f99d0cf55b --- /dev/null +++ b/website/content/cli/usage/data/custom-data.md @@ -0,0 +1,66 @@ +--- +title: Custom Data +sidebar_position: 3 +description: Documentation detailing usage of the OpenBB Terminal for financial data + aggregation, standardization, and user data import. It explains the OpenBBUserData + folder functions, how to modify settings, and how to import or export user data. +keywords: +- financial data +- data aggregation +- data standardization +- OpenBBUserData folder +- import data +- export data +- Econometrics +- Portfolio +- Portfolio Optimization +- settings menu +- export folder location +- userdata command +- user-created files +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +The OpenBB Terminal not only allows access to a world of financial data through our data aggregation and standardization. We also allow users to bring their own data to the terminal and export data. + +## The OpenBBUserData Folder + +The `OpenBBUserData` folder's default location is the home of the system user account. By default this will be the following paths: +- macOS: `Macintosh HD/Users//OpenBBUserData` +- Windows: `C:/Users//OpenBBUserData` + +Within the folder you can find files that you have exported as well as files that you wish to import directly into the OpenBB Terminal. For example, this could be an orderbook which you can store in `OpenBBUserData/portfolio/holdings`. + +![OpenBBUserData Folder](https://user-images.githubusercontent.com/85772166/195742985-19f0e420-d8f7-4fea-a145-a0243b8f2ddc.png) + +This folder contains all things user-created. For example: + +- Screener presets +- Portfolio files +- Exported files +- Files to be imported by various functions +- Styles and themes +- Preferred data sources + +:::note +**Note:** With a WSL-enabled Windows installation, this folder will be under the Linux partition +::: + +### Update export folder location + +The location of this folder can be set by the user from the `/settings` menu. There should be no need to update paths in this menu unless the folders have been moved manually. If the location of the OpenBBUserData folder must be changed, it is best to move the entire existing folder to the new path. The path is then changed under the settings menu with: + +```console +/settings/ $ userdata --folder "/complete_path_to/OpenBBUserData" +``` + +## Import data + +Menus, such as [Econometrics](/terminal/menus/econometrics) or [Forecast](/terminal/menus/forecast), allow the user to import their own dataset. Files available to import will be included with the selections made available by auto-complete. In the Econometrics menu, this is activated after pressing the space bar with `load -f` + +![Importing Data](https://user-images.githubusercontent.com/85772166/204921760-38742f6c-ec78-4009-9c23-54dcb0504524.png) + +Both menus look in the `exports` and `custom_imports` folders within the `/OpenBBUserData` folder. diff --git a/website/content/cli/usage/data/data-sources.md b/website/content/cli/usage/data/data-sources.md new file mode 100644 index 000000000000..22939d1d9d72 --- /dev/null +++ b/website/content/cli/usage/data/data-sources.md @@ -0,0 +1,129 @@ +--- +title: Data sources +sidebar_position: 1 +description: This page provides useful information on dealing with different data + vendors when using OpenBB's Terminal. It outlines how to select a default data source, + acquire API keys, and switch the data vendor using specific commands, all in an + effort to streamline and improve the user's experience. +keywords: +- Terminal +- data vendors +- API keys +- data sources +- FinancialModelingPrep +- Polygon +- AlphaVantage +- EODHD +- YahooFinance +- source +- stocks/fa/income +- changing data source +- Default data source +- /sources +- get --cmd +- set --cmd +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +## Relationship With Data Vendors + +Most commands will require obtaining API keys from various data providers. OpenBB provides methods for consuming these data feeds, but has no control over the quality or quantity of data provided to an end-user. **No API Keys are required to get started using the Terminal**. + +See the list of data providers [here](/terminal/usage/data/api-keys), along with instructions for entering the credentials into the OpenBB Terminal. You can also request a new data source through this [form](https://openbb.co/request-a-feature). + +:::note +OpenBB doesn't store any financial data in its servers. We aggregate access to multiple data sources through API calls and standardize that interaction to provide users a seamless experience when dealing with different data vendors +::: + +## Changing the Data Source In-Command + +Many commands have multiple data sources associated with it. A great example is `/stocks/fa/income`, which allows you to select FinancialModelingPrep, Polygon, AlphaVantage, EODHD or YahooFinance. In order to specify the data vendor for that particular command, use the `--source` argument. + +This also becomes clear from the help menu. + +```console +/stocks/fa/income -h +``` + +```console +usage: income [-t TICKER] [-q] [-r] [-p column] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT] [--source {FinancialModelingPrep,Polygon,AlphaVantage,EODHD,YahooFinance}] + +Prints a complete income statement over time. This can be either quarterly or annually. + +optional arguments: + -t TICKER, --ticker TICKER + Ticker to analyze (default: None) + -q, --quarter Quarter fundamental data flag. (default: False) + -r, --ratios Shows percentage change of values. (default: False) + -p column, --plot column + Rows to plot, comma separated. (-1 represents invalid data) (default: None) + -h, --help show this help message (default: False) + --export EXPORT Export raw data into csv, json, xlsx (default: ) + --sheet-name SHEET_NAME [SHEET_NAME ...] + Name of excel sheet to save data to. Only valid for .xlsx files. (default: None) + -l LIMIT, --limit LIMIT + Number of entries to show in data. (default: 5) + --source {FinancialModelingPrep,Polygon,AlphaVantage,EODHD,YahooFinance} + Data source to select from (default: FinancialModelingPrep) + +For more information and examples, use 'about income' to access the related guide. +``` + +Within the source arguments it shows the available sources. An API key may be required to use a source, see this [page](/terminal/usage/data/api-keys) for insructions on obtaining and setting credentials. + +![Selecting a new Data Source](https://user-images.githubusercontent.com/85772166/233730763-54fd6400-f3ad-44a0-9c73-254d91ac2085.png) + +The available sources for each command are displayed on the right of the command, and they can be distinguished by the square brackets and distinct font color group. By default, if the user doesn't specify `--source` the Terminal will use the first data provider displayed. + +### Setting Default Source Through Hub (easy) + +The default data vendor can be selected with more ease through the OpenBB Hub. Instructions can be found [here](/terminal/usage/hub). + +### Setting Default Source Through Terminal + +The default data source for each command (where multiple sources are available) can be defined within the [`/sources`](/terminal/usage/data/data-sources) menu. + +For example, changing the default data provider for the `income` command: + +```console +/sources/get --cmd stocks/fa/income +``` + +```conole +Default : FinancialModelingPrep +Available : FinancialModelingPrep, Polygon, AlphaVantage, EODHD, YahooFinance +``` + +Then, change the default data provider with the, `set`, command. For example, change the data provider to `Polygon` with +the following: + +```console +/sources/set --cmd stocks/fa/income --source Polygon +``` + +A confirmation message is displayed. + +```console +Default data source for 'stocks/fa/income' set to 'Polygon'. +``` + +Using, `get`, once more will confirm the update: + +```console +/sources/get --cmd stocks/fa/income +``` + +```console +Default : Polygon +Available : Polygon, FinancialModelingPrep, AlphaVantage, EODHD, YahooFinance +``` diff --git a/website/content/cli/usage/data/index.mdx b/website/content/cli/usage/data/index.mdx new file mode 100644 index 000000000000..a6262fdc4db8 --- /dev/null +++ b/website/content/cli/usage/data/index.mdx @@ -0,0 +1,26 @@ +--- +title: Data +--- + +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +
    + + + +
diff --git a/website/content/cli/usage/hub.md b/website/content/cli/usage/hub.md new file mode 100644 index 000000000000..cd42a01270b2 --- /dev/null +++ b/website/content/cli/usage/hub.md @@ -0,0 +1,98 @@ +--- +title: Hub Synchronization +sidebar_position: 6 +description: This is a documentation page for OpenBB focusing on the integration of + OpenBB Platform CLI with OpenBB Hub. Topics covered include registration, login, managing + API keys, default data sources, theme styles, script routines, and personal access + tokens. +keywords: +- OpenBB Platform CLI +- OpenBB Terminal guide +- OpenBB Hub integration +- Registration process +- Login process +- API Keys management +- Default Data Sources +- Theme Styles +- Script Routines +- Personal Access Tokens +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +This guide will walk you through the process of integrating the OpenBB Platform CLI with the OpenBB Hub to achieve optimal performance. + +## Registration + +To get started, you'll need to create an account on the OpenBB Hub by visiting [https://my.openbb.co](https://my.openbb.co) + +By registering with the OpenBB Hub, you can easily access our products on multiple devices and maintain consistent settings for an improved user experience. This also enables you to receive updates for the terminal as soon as they become available. + +## Login + +Once you're successfully registered on the OpenBB Hub, you can log in to access all the benefits it has to offer. + +The login credentials you use on the OpenBB Hub will be the same ones you will use to access the OpenBB Platform CLI. + +To log in on your account while inside the CLI, simply access the `/account` menu and use the `login` command. + +## API Keys + +As you may already know, the OpenBB Platform acts as a mediator between users and data providers and does not store any data. This enables us to focus on providing a superior product experience for users, while data vendors can integrate their data sources to create a new revenue channel. However, this does mean that each user must manage their own API keys for each data provider they wish to access. + +After having an account on the OpenBB Hub, you can manage your API keys on [this page](https://my.openbb.co/app/platform/credentials). + +Upon logging in, the OpenBB Platform CLI will automatically retrieve the API keys associated with your account. + +If you have not saved them on the OpenBB Hub, they will be loaded from your local environment by default. However, if an API key is saved on the OpenBB Hub, it will take precedence over the local environment key. + +If an API key is updated in the Hub while the OpenBB Terminal is running, you will need to restart the CLI for the changes to take effect. + +## Theme Styles + +Theme styles correspond to the ability to change your terminal "skin" (i.e. coloring of the `menu`, `commands`, `data source`, `parameters`, `information` and `help`), the charts and tables style. + +In the OpenBB Hub, you have the ability to change your preferred themes for the CLI. After costumizing as intended, you can then download the theme and apply it to the CLI by adding it to you styles directory (`/home/your-user/OpenBBUserData/styles/user`). + +## Script Routines + +These are text files with an `.openbb` extension that allow users to create workflows of sequence of commands. And allows to create parameters that can be modified outside the CLI. An example would be the file, "_example.openbb_" looking like: + +```text +equity +price +# depict candle chart +historical --symbol $ARGV[0] --chart +``` + +and then run on the terminal utilizing: + +```text +/exe example.openbb -i MSFT +``` + +The OpenBB Hub allows users to manage their own script routines to be run in the OpenBB Platform CLI. + +Screenshot 2023-04-14 at 7 13 11 PM + +In addition, a few script routines will be distributed by the OpenBB Team on [this page](https://my.openbb.co/app/terminal/routines/default). These come primarily from academic content that the team is releasing, but can serve as an example of what you can do. + +Screenshot 2023-04-14 at 7 17 44 PM + +Note that the "Download" button allows you to download the example file and share with co-workers / colleagues. + +To run a routine on the CLI, select `exe --file` from the main menu and the available routines will pop up as auto-completions. For example: + +Screenshot 2023-04-14 at 7 23 16 PM + +## Personal Access Tokens + +Setting up API keys on the OpenBB Hub has an additional benefit: it allows you to generate a personal access token (PAT) that can be used with the OpenBB SDK. With this token, you can programmatically access the data that powers the OpenBB Terminal, without the need to add individual API keys for each user. + +You can find and manage your OpenBB PAT [here](https://my.openbb.co/app/platform/pat). + +Screenshot 2023-04-14 at 10 37 44 PM + +You can log in to the OpenBB Platform CLI using your PAT by running the `login` command on the `account` menu. diff --git a/website/content/cli/usage/keyboard-hotkey-macros.md b/website/content/cli/usage/keyboard-hotkey-macros.md new file mode 100644 index 000000000000..938184eeaf33 --- /dev/null +++ b/website/content/cli/usage/keyboard-hotkey-macros.md @@ -0,0 +1,72 @@ +--- +title: Keyboard Hotkey Macros +sidebar_position: 7 +description: Learn how to set hotkeys macros on a customizable keyboard for swift + and efficient investment research. Learn how to remap keys, assigning them custom + macro commands, shortcuts, or key combinations using the VIA configurator for an + enhanced experience, especially for OpenBB power users. +keywords: +- customizable keyboard +- hotkeys macros +- investment research +- VIA configurator +- Keychron +- OpenBB power users +- command pipeline +- remap keys +- macro commands +- shortcuts +- key combinations +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +This document will explain how you can set hotkeys macros on your customizable keyboard which allow you to perform investment research in a few seconds. + +## Supported Configurators + +### VIA + +This document will explain how you can set hotkeys on your customizable keyboard using [VIA](https://www.caniusevia.com/). + +Here is a list of VIA's supported keyboards: [https://www.caniusevia.com/docs/supported_keyboards](https://www.caniusevia.com/docs/supported_keyboards) + +Note: We were in the market looking for a keyboard that could be highliy customizable for the needs of OpenBB power users. This is when we stumbled upon Keychron and the VIA configurator which allows users to intuitively remap any key on the keyboard, and create numerous macro commands, shortcuts, or key combinations. +Here's a post from Keychron on VIA: [Why VIA is one of the most essential features for a custom keyboard?](https://www.keychron.com/blogs/news/why-qmk-via-is-one-of-the-most-essential-features-for-a-custom-keyboard) + +For the purpose of this example, the command pipeline we are creating has the following sequence of commands: `dps/psi/../fa/pt/income/..` + +1. Try VIA [here](https://usevia.app/). The following screen should popup + +![VIA](https://user-images.githubusercontent.com/25267873/236660856-f92ac602-cde9-48e6-8029-c083fbb75ff9.png) + +2. Select the Layer you are interested in altering. As we're not looking forward to remap any of the existing main keys, we need to go to layer 2, 3 or 4. In my case, with a Keychron Q2, I know that Layer 4 can be accessed by pressing on "Fn2". Thus, I select that layer. + +![Layer](https://user-images.githubusercontent.com/25267873/236660841-09203874-8a8e-4393-8674-357aad67a22b.png) + +3. Most keys should have a triangle upside down which simbolizes that they don't have any functionality. You want to select one of those keys to contain your hotkey routine. After that selection you want to remap the key functionality, hence in the **KEYMAP settings** below you click on MACROS tab and select "MO". Now the screen should look like this: + +![Layer](https://user-images.githubusercontent.com/25267873/236660948-a148582e-f928-4f12-ae54-9bdd3adfd020.png) + +4. Now we want to change what "MO" does and for that we select the **MACROS settings** below. Then we can select "M0" and insert `dps/psi/../fa/pt/income/..{KC_ENT}`. The screen should look like this: + +![Macro](https://user-images.githubusercontent.com/25267873/236661126-eeb5dc7c-2c01-4a43-ab64-12c470e864ce.png) + +Note that the `{KC_ENT}` will ensure that the command is run on the terminal. + +5. Save. To ensure that everything is correct you can go into the **KEYMAP settings** and click on the hotkey that you just created to see if it contains the sequence of commands, the following sequence should appear: + +![Save](https://user-images.githubusercontent.com/25267873/236661232-4f9119de-af37-49a2-948d-cfd6d650ed92.png) + +6. Finally, we are ready to test it on the [OpenBB Terminal](https://my.openbb.co/app/terminal). After going into `stocks` and doing `load AAPL`, I pressed "Fn2+Z" which lead to: + +![Test](https://user-images.githubusercontent.com/25267873/236660272-290fe586-7663-4cd6-bfc0-80b7f8f2efd1.png) diff --git a/website/content/cli/usage/outputs/_category_.json b/website/content/cli/usage/outputs/_category_.json new file mode 100644 index 000000000000..1e5caec41bc6 --- /dev/null +++ b/website/content/cli/usage/outputs/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Outputs", + "position": 3 +} diff --git a/website/content/cli/usage/outputs/export-data.md b/website/content/cli/usage/outputs/export-data.md new file mode 100644 index 000000000000..083e3850a72d --- /dev/null +++ b/website/content/cli/usage/outputs/export-data.md @@ -0,0 +1,70 @@ +--- +title: Export data +sidebar_position: 3 +description: Learn how to export financial data through the OpenBB Terminal in different + formats like XLSX, CSV, JSON, PNG, JPG, PDF, and SVG. Also learn to specify filename, + sheet name, and export directly into a chart. +keywords: +- financial data export +- XLSX +- CSV +- JSON +- PNG +- JPG +- PDF +- SVG +- filename specification +- sheet name specification +- export to chart +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +The OpenBB Terminal offers a variety of ways to export financial data. This can be to a text-based file - XLSX, CSV or JSON - or as images - PNG, JPG, PDF and SVG. + +To export as a spreadsheet, `xlsx`, add `--export xlsx` to the command. + +```console +/stocks/load AAPL -s 2010-01-01 --export xlsx +``` + +Which creates: + +![Export Example](https://user-images.githubusercontent.com/46355364/214817681-fd5324c3-003c-45eb-adf4-96d5b41a3c02.png) + +## Specifying the Filename + +Instead of the default filename, it can be specified. Exporting as a `csv` this time: + +```console +/stocks/load AAPL -s 2010-01-01 --export apple.csv +``` + +![Filename Example](https://user-images.githubusercontent.com/46355364/214818131-597b3bd0-9c66-43f1-bf0e-2c0a703e2645.png) + +## Specifying a Target Sheet Name + +With the `xlsx` option, `--sheet-name` allows multiple datasets to be saved to the same file. For example: + +```console +/stocks/load AAPL -s 2010-01-01 --export apple.xlsx --sheet-name Market Data +``` + +Then enter the `fa` (Fundamental Analysis) menu. Copy and paste the code below to follow along. This requires an API key from FinancialModelingPrep which you can obtain for free. Please have a look [here](/terminal/usage/data/api-keys). + +```console +fa +income --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Income Statement +balance --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Balance Sheet +cash --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Cash Flow Statement +``` + +This generates a file for `AAPL`, with market data from 2010-01-01 until now, as well as the income, balance and cash flow statements from the last ten years. + +![Sheet Name Example](https://user-images.githubusercontent.com/46355364/214824561-6eaf3a88-746a-4abc-91e1-420c9036c00d.png) + +## Export Directly From Charts + +See the [interactive charts](/terminal/usage/outputs/interactive-charts.md#export-tools) page for instructions. diff --git a/website/content/cli/usage/outputs/index.mdx b/website/content/cli/usage/outputs/index.mdx new file mode 100644 index 000000000000..f0d92a27cb20 --- /dev/null +++ b/website/content/cli/usage/outputs/index.mdx @@ -0,0 +1,26 @@ +--- +title: Outputs +--- + +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +
    + + + +
diff --git a/website/content/cli/usage/outputs/interactive-charts.md b/website/content/cli/usage/outputs/interactive-charts.md new file mode 100644 index 000000000000..4cb34f49aef8 --- /dev/null +++ b/website/content/cli/usage/outputs/interactive-charts.md @@ -0,0 +1,109 @@ +--- +title: Interactive Charts +sidebar_position: 2 +description: Explore how to effectively utilize OpenBB's interactive charts backed + by open source PyWry technology. Understand various capabilities including annotation, + color modification, drawing tools, data export, and supplementary data overlay. +keywords: +- interactive charts +- PyWry technology +- chart annotation +- drawing tools +- data export +- data overlay +- editing chart title +- Toolbar +- Text Tools +- Draw Tools +- Export Tools +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +A common type of output in OpenBB are interactive charts which open in a separated window (due to our [open source PyWry](https://github.com/OpenBB-finance/pywry) technology). The OpenBB charting library provides interactive and highly customizable charts. + +
+Charting cheat sheet + +![Group 653](https://user-images.githubusercontent.com/85772166/234313541-3d725e1c-ce48-4413-9267-b03571e0eccd.png) + +
+ +## Toolbar + +![Chart Tools](https://user-images.githubusercontent.com/85772166/233247997-55c03cbd-9ca9-4f5e-b3fb-3e5a9c63b6eb.png) + +The toolbar is located at the bottom of the window, and provides methods for: + +- Panning and zooming. +- Modifying the title and axis labels. +- Adjusting the hover read out. +- Toggling light/dark mode. +- Annotating and drawing. +- Exporting raw data. +- Saving the chart as an image. +- Adding supplementary external data as an overlay. + +The label for each tool is displayed by holding the mouse over it. + +The toolbar's visibility can be toggled utilizing the `ctrl + h` shortcut. + +## Text Tools + +Annotate a chart by clicking on the `Add Text` button, or with the keyboard, `ctrl + t`. + +![Annotate Charts](https://user-images.githubusercontent.com/85772166/233248056-d459d7a0-ba2d-4533-896a-79406ded859e.png) + +Enter some text, make any adjustments to the options, then `submit`. Place the crosshairs over the desired data point and click to place the text. + +![Place Text](https://user-images.githubusercontent.com/85772166/233728645-74734241-4da2-4cff-af17-b68a62e95113.png) + +After placement, the text can be updated or deleted by clicking on it again. + +![Delete Annotation](https://user-images.githubusercontent.com/85772166/233728428-55d2a8e5-a68a-4cd1-9dbf-4c1cd697187e.png) + +## Change Titles + +The title of the chart is edited by clicking the button, `Change Titles`, near the middle center of the toolbar, immediately to the right of the `Add Text` button. + +## Draw Tools + +![Edit Colors](https://user-images.githubusercontent.com/85772166/233729318-8af947fa-ce2a-43e2-85ab-657e583ac8b1.png) + +The fourth group of icons on the toolbar are for drawing lines and shapes. + +- Edit the colors. +- Draw a straight line. +- Draw a freeform line. +- Draw a circle. +- Draw a rectangle. +- Erase a shape. + +To draw on the chart, select one of the four drawing buttons and drag the mouse over the desired area. Click on any existing shape to modify it by dragging with the mouse and editing the color, or remove it by clicking the toolbar button, `Erase Active Shape`. The edit colors button will pop up as a floating icon, and clicking on that will display the color palette. + +## Export Tools + +The two buttons at the far-right of the toolbar are for saving the raw data or, to save an image file of the chart at the current panned and zoomed view. + +![Export Tools](https://user-images.githubusercontent.com/85772166/233248436-08a2a463-403b-4b1b-b7d8-80cd5af7bee3.png) + +## Overlay + +The button, `Overlay chart from CSV`, provides an easy import method for supplementing a chart with additional data. Clicking on the button opens a pop-up dialogue to select the file, column, and whether the overlay should be a bar, candlestick, or line chart. As a candlestick, the CSV file must contain OHLC data. The import window can also be opened with the keyboard, `ctrl-o`. + +![Overlay CSV](https://user-images.githubusercontent.com/85772166/233248522-16b539f4-b0ae-4c30-8c72-dfa59d0c0cfb.png) + +After choosing the file to overlay, select what to show and then click on `Submit`. + +![Overlay Options](https://user-images.githubusercontent.com/85772166/233250634-44864da0-0936-4d3c-8de2-c8374d26c1d2.png) + +![Overlay Chart](https://user-images.githubusercontent.com/85772166/233248639-6d12b16d-471f-4550-a8ab-8d8c18eeabb3.png) diff --git a/website/content/cli/usage/outputs/interactive-tables.md b/website/content/cli/usage/outputs/interactive-tables.md new file mode 100644 index 000000000000..f1258c87ab11 --- /dev/null +++ b/website/content/cli/usage/outputs/interactive-tables.md @@ -0,0 +1,80 @@ +--- +title: Interactive Tables +sidebar_position: 1 +description: Learn how to navigate and utilize OpenBB's interactive tables using our + open source PyWry technology. Understand how to sort and filter columns, hide or + remove columns, select number of rows per page, freeze index and column headers, + and export the data. +keywords: +- interactive tables +- PyWry technology +- sorting columns +- filtering columns +- hiding columns +- rows per page +- freeze index +- freeze column headers +- exporting data +- data visualization +- customizing tables +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +A common type of output in OpenBB are interactive tables which open in a separated window (utilizing our [open source PyWry](https://github.com/OpenBB-finance/pywry) technology). These provide methods for searching, sorting, filtering, exporting and even adapting settings directly on the table. + +
+Table cheat sheet + +![Chart Intro (5)](https://user-images.githubusercontent.com/85772166/234315026-de098953-111b-4b69-9124-31530c01407a.png) + +
+ +## Sorting + +Columns can be sorted ascending/descending/unsorted, by clicking the controls to the right of each header title. The status of the filtering is shown as a blue indicator. + +![Sort Columns](https://user-images.githubusercontent.com/85772166/233248754-20c18390-a7af-490c-9571-876447b1b0ae.png) + +## Filtering + +The settings button, at the lower-left corner, displays choices for customizing the table. By selecting the `Type` to be `Advanced`, columns become filterable. + +![Table Settings](https://user-images.githubusercontent.com/85772166/233248876-0d788ff4-974d-4d92-8186-56864469870a.png) + +The columns can be filtered with min/max values or by letters, depending on the content of each column. + +![Filtered Tables](https://user-images.githubusercontent.com/85772166/233248923-45873bf1-de6b-40f8-a4aa-05e7c3d21ab0.png) + +## Hiding columns + +The table will scroll to the right as far as there are columns. Columns can be removed from the table by clicking the icon to the right of the settings button and unchecking it from the list. + +![Select Columns](https://user-images.githubusercontent.com/85772166/233248976-849791a6-c126-437c-bb54-454ba6ea4fa2.png) + +## Select rows per page + +The number of rows per page is defined in the drop down selection near the center, at the bottom. + +![Rows per Page](https://user-images.githubusercontent.com/85772166/233249018-8269896d-72f7-4e72-a4d4-2715d1f11b96.png) + +## Freeze the Index and Column Headers + +Right-click on the index name to enable/disable freezing when scrolling to the right. Column headers are frozen by default. + +![Index Freeze](https://user-images.githubusercontent.com/85772166/234103702-0965dfbd-24ca-4a66-8c76-9fac28abcff8.png) + +## Exporting Data + +At the bottom-right corner of the table window, there is a button for exporting the data. To the left, the drop down selection for `Type` can be defined as a CSV, XLSX, or PNG file. Exporting the table as a PNG file will create a screenshot of the table at its current view, and data that is not visible will not be captured. + +![Export Data](https://user-images.githubusercontent.com/85772166/233249065-60728dd1-612e-4684-b196-892f3604c0f4.png) diff --git a/website/content/cli/usage/overview/_category_.json b/website/content/cli/usage/overview/_category_.json new file mode 100644 index 000000000000..d98d73979e26 --- /dev/null +++ b/website/content/cli/usage/overview/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Overview", + "position": 1 +} diff --git a/website/content/cli/usage/overview/commands-and-arguments.md b/website/content/cli/usage/overview/commands-and-arguments.md new file mode 100644 index 000000000000..182fb3f29e24 --- /dev/null +++ b/website/content/cli/usage/overview/commands-and-arguments.md @@ -0,0 +1,161 @@ +--- +title: Commands and arguments +sidebar_position: 2 +description: This documentation page includes a tutorial video that provides a short + introduction on commands and arguments for the OpenBB Terminal. It further explains + the help dialogue for functions, the auto-completion feature, and global commands + such as help, about, support, cls, quit, exit, and reset. Also, tips for submitting + support requests are provided. +keywords: +- tutorial video +- help arguments +- auto-complete +- global commands +- support command +- reset command +- command line interface +- metadata +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + + +## Help arguments + +A help dialogue for any function at the current location is printed to the screen by typing `-h` or `--help` after the command. The information returned contains a short description of the function and all accepted arguments. For example the `news` command will return: + +```console +(🦋) / $ news -h + +usage: news [-t TERM [TERM ...]] [-s SOURCES] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT] + +display news articles based on term and data sources + +options: + -t TERM [TERM ...], --term TERM [TERM ...] + search for a term on the news + -s SOURCES, --sources SOURCES + sources from where to get news from (separated by comma) + -h, --help show this help message + --export EXPORT Export raw data into csv, json, xlsx + --sheet-name SHEET_NAME [SHEET_NAME ...] + Name of excel sheet to save data to. Only valid for .xlsx files. + -l LIMIT, --limit LIMIT + Number of entries to show in data. + +For more information and examples, use 'about news' to access the related guide. +``` + +To search for news containing the term, "Federal Reserve", you can use this command: + +```console +(🦋) / $ news --term Federal Reserve +``` + + +## Auto-complete + +![Auto Complete](https://user-images.githubusercontent.com/85772166/233247702-f707531c-2c65-4380-a662-cd4bc2ae0199.png) + +The OpenBB Terminal is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments. Note that a menu doesn't has arguments attached. + +This functionality dramatically reduces the number of key strokes required to perform tasks and, in many cases, eliminates the need to consult the help dialogue for reminders. Choices - where they are bound by a defined list - are searchable with the up and down arrow keys. + + +## Global commands + +These are commands that can be used throughout the terminal and will work regardless of the menu where they belong. + +### Help + +The `help` command shows the current menu you are in and all the commands and menus that exist, including a short description for each of these. + +This is arguably one of the most helpful commands that the terminal. If you are familiar to navigating in a command line interface, it's the equivalent to `ls -ll`. + +### About + +The `about` command opens the browser to the OpenBB documentation pages for the specific command or menu. Note that this will depend on where the user is located within the terminal. + +```console +(🦋) / $ about stocks +``` + +The command above will open a browser to [Introduction to the Stocks menu](/terminal/menus/stocks). + +### Support + +The `support` command allows to submit a new request for support, a general question, or a bug report. The command will pre-populate a form with key information, like the command or menu name specific to the issue. Use the up and down arrow keys to browse and select the appropriate item for the ticket. + +![Support](https://user-images.githubusercontent.com/85772166/233577183-fbeb7be2-1d00-4ca0-86b3-42f1b71081e8.png) + +Naturally, this command has a help dialogue. + +```console +(🦋) / $ support -h + +Submit your support request + +options: + -c {search,load,quote,tob,candle,news,resources,codes,ta,ba,qa,disc,dps,scr,sia,ins,gov,res,dd,fa,bt,ca,options,th,forecast}, --command {generic,search,load,quote,tob,candle,news,resources,codes,ta,ba,qa,disc,dps,scr,sia,ins,gov,res,dd,fa,bt,ca,options,th,forecast} + Command that needs support (default: None) + --msg MSG [MSG ...], -m MSG [MSG ...] + Message to send. Enclose it with double quotes (default: ) + --type {bug,suggestion,question,generic}, -t {bug,suggestion,question,generic} + Support ticket type (default: generic) + -h, --help show this help message (default: False) +``` + +An example of a valid support ticket could be: + +```console +/stocks/ $ support search --type question --msg "How do I find stocks from India with OpenBB?" +``` + +The command opens a browser window to a pre-populated form on the OpenBB website. If you are signed-in to the Hub, all that is left to do is click `Submit`. + +![Submit Form](https://user-images.githubusercontent.com/85772166/233577448-3e426a88-d0cf-4338-8f4c-21b9fd01d8b2.png) + +PS: The answer to this question is: + +```console +(🦋) /stocks/ $ search --country india --exchange-country india +``` + +:::note +Tips for submitting a support request: + +- Tell us what version number is installed. +- Tell us what operating system and version the machine has. +- What is the installation type? Installer, Source, PyPi, Docker, other? +- Tell us the command and parameter combination causing the error. +- Tell us what symbol (ticker) is, or was trying to be, loaded. +- Show us the complete error message. +- Let us know any contextual information that will help us replicate and accurately identify the problem. +::: + +### CLS + +The `cls` command clears the entire terminal screen. + +### Quit + +The `quit` command (can also use `q` or `..`) allows to leave the current menu to go one menu above. If the user is on the root, that will mean leaving the terminal. + +### Exit + +The `exit` command allows the user to exit the terminal. + +### Reset + +The `reset` command (or `r`) allows a developer that is using the terminal through source code to quickly test it's code changes by re-starting the terminal with the code changes. This allows to improve speed of development. + +For more information on contributing to the OpenBB Terminal read our [contribution guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/blob/main/CONTRIBUTING.md). diff --git a/website/content/cli/usage/overview/customizing-the-terminal.md b/website/content/cli/usage/overview/customizing-the-terminal.md new file mode 100644 index 000000000000..04a144d366aa --- /dev/null +++ b/website/content/cli/usage/overview/customizing-the-terminal.md @@ -0,0 +1,117 @@ +--- +title: Customization +sidebar_position: 4 +description: This documentation page details the functionality of the Settings Menu + and the Feature Flags Menu in the OpenBB Terminal. It instructs users how to customize + the Terminal, alter its behaviour, and manipulate various environment variables. +keywords: +- Settings Menu +- Feature Flags Menu +- customize Terminal +- alter Terminal behaviour +- environment variables +- Documentation +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + +The OpenBB Terminal contains two menus for altering the behaviour and presentation of the Terminal, Settings and Feature Flags, both of which are accessed from the main menu. +
+ + +## Settings Menu + +The `/settings` menu provides methods for customizing the look of the Terminal. + +| Setting | Description | +| :----------- | :--------------------------------------------------------------- | +| `chart` | Select the chart style. | +| `colors` | Sets the color scheme for Terminal fonts. | +| `dt` | Add or remove date and time from the Terminal command line. | +| `flair` | Sets the flair emoji to be used. | +| `height` | Set the default plot height. | +| `lang` | Select the language for the Terminal menus and commands. | +| `source` | Use an alternate data sources file. (Not recommended to change.) | +| `table` | Select the table style. | +| `tz` | Select a timezone. | +| `userdata` | Change the local path to the OpenBBUserData folder. | +| `width` | Set the default plot width. | + +### Style example + +Set charts and tables styles as light or dark mode. + +```console +/settings/table -s light +``` + +```console +/settings/chart -s dark +``` + +### Timezone example + +Set the local timezone for the Terminal + +```console +/settings/tz Africa/Johannesburg +``` + +## Feature Flags Menu + +The `/featflags` menu provides methods for altering the behaviour and responses with environment variables. These configurations are on/off, and the status is indicated by the red/green text of each. Each parameter is listed below. + +| Feature | Description | +| :----------- | :---------------------------------------------------------------------------------------------- | +| `cls` | Clear the screen after each command. Default state is off. | +| `exithelp` | Automatically print the screen after navigating back one menu. Default state is off. | +| `interactive` | Enable/disable interactive tables. Disabling prints the table directly on the Terminal screen. | +| `overwrite` | Automatically overwrite exported files with the same name. Default state is off. | +| `promptkit` | Enable auto complete and history. Default state is on. | +| `rcontext` | Remember loaded tickers while switching menus. Default state is on. | +| `retryload` | Retries misspelled commands with the load function first. Default state is off. | +| `reporthtml` | Generate reports as HTML files. Default state is on. | +| `richpanel` | Displays a border around menus. Default state is on. | +| `tbhint` | Display usage hints in the bottom toolbar. Default state is on. | +| `version` | Displays the currently installed version number in the bottom right corner. | + +### Interactive example + +When it is off, the Terminal displays all tables directly on the screen instead of opening a window. + +```console +/stocks/quote spy +``` + +| | SPY | +|:-------------------|:----------------------------| +| day_low | 434.87 | +| day_high | 438.09 | +| symbol | SPY | +| name | SPDR S&P 500 ETF Trust | +| price | 437.25 | +| changes_percentage | 0.0732 | +| change | 0.32 | +| year_high | 459.44 | +| year_low | 373.61 | +| market_cap | 401300183873.0 | +| price_avg50 | 433.4872 | +| price_avg200 | 424 | +| volume | 56366265 | +| avg_volume | 83194937 | +| exchange | AMEX | +| open | 437.55 | +| previous_close | 436.93 | +| eps | 19.851322 | +| pe | 22.03 | +| shares_outstanding | 917782010 | +| date | 2023-11-08 21:00 | + +### Overwrite + +Enable this feature flag to remove the prompt when exporting a file with the same name. This will only overwrite an existing `XLSX` file if the `--sheet-name` is not defined. + +### Exithelp + +Enabling this prints the parent menu on the screen when navigating back from a sub-menu. diff --git a/website/content/cli/usage/overview/index.mdx b/website/content/cli/usage/overview/index.mdx new file mode 100644 index 000000000000..f2bb8fbe26a7 --- /dev/null +++ b/website/content/cli/usage/overview/index.mdx @@ -0,0 +1,26 @@ +--- +title: Overview +--- + +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +
    + + + +
diff --git a/website/content/cli/usage/overview/structure-and-navigation.md b/website/content/cli/usage/overview/structure-and-navigation.md new file mode 100644 index 000000000000..4128238351a4 --- /dev/null +++ b/website/content/cli/usage/overview/structure-and-navigation.md @@ -0,0 +1,50 @@ +--- +title: Structure and Navigation +sidebar_position: 1 +description: Learn about the OpenBB Terminal, an interactive Command Line Interface + application. Understand the structure and navigation of the terminal, functions + or commands input via a keyboard, and the presentation of results in the form of + interactive charts, tables, or text. Get introduced to terminal commands, terminal + menus, OpenBB Hub's theme style, and the concept of absolute paths. +keywords: +- CLI application +- terminal structure +- Terminal navigation +- Command Line Interface +- Interactive Charts and Tables +- Terminal commands +- terminal menus +- OpenBB Hub Theme Style +- Absolute paths +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +## Structure + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +The OpenBB Terminal is a Command Line Interface (CLI) application. Functions (commands) are called through the keyboard with results returned as charts, tables, or text. Charts and tables (if enabled) are displayed in a new window, and are fully interactive, while text prints directly to the Terminal screen. + +![The Home Screen](https://user-images.githubusercontent.com/85772166/233247655-2f8d0dae-be68-48ca-9b35-123b5b985cb6.png) + +A menu is a collection of commands (and sub-menus). A menu can be distinguished from a command because the former has a `>` on the left. The color of a command and a menu also differ, but these can be changed in OpenBB Hub's theme style. + +## Navigation + +Navigating through the Terminal menus is similar to traversing folders from any operating system's command line prompt. The `/home` screen is the main directory where everything begins, and the menus are paths branched from the main. Instead of `C:\Users\OpenBB\Documents`, you'll have something like `/stocks/options`. Instead of `cd ..`, you can do `..` to return the menu right above. To go back to the root menu you can do `/`. + +Absolute paths are also valid to-and-from any point. From the [`/stocks/options`](/terminal/menus/stocks/options) menu, you can go directly to [`crypto`](/terminal/menus/crypto) menu with: `/crypto`. Note the forward slash at the start to denote the "absolute" path. + + + diff --git a/website/content/cli/usage/routines/_category_.json b/website/content/cli/usage/routines/_category_.json new file mode 100644 index 000000000000..549ac0695baf --- /dev/null +++ b/website/content/cli/usage/routines/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Routines", + "position": 4 +} diff --git a/website/content/cli/usage/routines/community-routines.md b/website/content/cli/usage/routines/community-routines.md new file mode 100644 index 000000000000..b1ce0f07188b --- /dev/null +++ b/website/content/cli/usage/routines/community-routines.md @@ -0,0 +1,79 @@ +--- +title: Community Routines +sidebar_position: 6 +description: Page provides a detailed overview on the usage of OpenBB's Community + Routines. It explains how users can share, access, upvote, and search for investment + research scripts. Additionally, it presents the feature of using the new TimeGPT-1 + model from Nixtla, and the options to save, download, and share scripts. +keywords: +- Community Routines +- Investment Research +- Investment Scripts +- TimeGPT-1 Model +- Tutorial Video +- Upvotes +- Share Scripts +- Advanced Search +- Nixtla +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +Community routines will enable the community to share their investment research routines and streamline everyone's investment research workflow. + +This is where you can find them: [https://my.openbb.co/app/terminal/community-routines/new](https://my.openbb.co/app/terminal/community-routines/new?size=25&tags=&page=1) + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/5cbfb88d-7b7f-4ac6-bf0b-be245ce19317) + +There are 3 categories where you can find a collection of scripts: + +- **Hot**: High rate of recent upvotes + +- **Popular**: Most-voted scripts + +- **New**: Recently added scripts + +The icon on the left allows you to upvote your favorite scripts and see how many times they have been voted by the community. + +In addition, if you are looking for a specific script, you can use the advanced search field to filter by username, description, tags, and even date time. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/ecbc73ce-35b0-48b1-8fa4-ff6bd94db96f) + +When clicking on one of these scripts, you’ll be able to access the information associated with it - the username, title, description, and the script itself. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/15f162b6-360d-4f1b-b300-55298ed82b99) + +Plus you’ll have 2 possible actions: + +- Save that routine to your personal collection - so you can edit it directly on the Hub and save it for terminal usage. + +- Download the routine to your desktop - so you can share it with others or tweak it locally. + +When you click on the “Share” icon associated with a routine, you’ll be prompted with a link to share that routine with your colleagues. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/c8d6ecc1-7704-47ef-9f74-b336480c9fa1) + +The goal is that more users can benefit from other users' investment research workflow. + +If you select the check box “Run on terminal”, an “exe” will be added at the start of the link so you can copy-paste it into the OpenBB Terminal to run that same script. + +Finally, users can set their scripts to public or keep them private. + +In the screenshot below, you have a private routine that implements the new TimeGPT-1 (Beta) model from our friends at Nixtla. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/a6326901-106c-4514-a9bc-68f659b867a9) + +Also, don’t forget to set your socials on your account so other OpenBB users can reach out to you to ask you more questions about your routines. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/ace4c886-e521-46e5-a53a-736408dd096e) + +We hope you take advantage of this exciting addition and learn how to use one of the best features the terminal has to offer. diff --git a/website/content/cli/usage/routines/index.mdx b/website/content/cli/usage/routines/index.mdx new file mode 100644 index 000000000000..969e4b11263e --- /dev/null +++ b/website/content/cli/usage/routines/index.mdx @@ -0,0 +1,41 @@ +--- +title: Routines +--- + +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +
    + + + + + + +
diff --git a/website/content/cli/usage/routines/introduction-to-routines.md b/website/content/cli/usage/routines/introduction-to-routines.md new file mode 100644 index 000000000000..13e968a88ab5 --- /dev/null +++ b/website/content/cli/usage/routines/introduction-to-routines.md @@ -0,0 +1,113 @@ +--- +title: Introduction to Routines +sidebar_position: 2 +description: The page provides a detailed introduction to OpenBB Routines, which allow + users to automate processes and repetitive tasks in financial analysis and data + collection. It explains basic scripts, routine execution, and guides users on getting + started with an example. +keywords: +- OpenBB Routines +- automated processes +- repetitive tasks +- data collection +- basic script +- routine execution +- tutorial video +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +## Introduction + +OpenBB Routines allows users to capture and write simple scripts for automating processes and repetitive tasks. In essence, these are text plain-text files that can be created or modified in any basic text editor with the only difference being the `.openbb` extension. + +Other software like STATA, SPSS, and R-Studio share similar functionality in the area of Econometrics and the OpenBB routine scripts venture into the area of financial analysis and data collection to speed up the process. + +Routines make it easy to automate a series of processes, and this includes mining and dumping large amounts of data to organized spreadsheets. Making use of `--export` and `--sheet-name`, data collection is more efficient and reliable, with results that are easily replicable. + +A pipeline of commands is difficult to share, so to encourage users to share ideas and processes, we created [Community Routines](community-routines.md) for the [OpenBB Hub](https://my.openbb.co/). Routines can be created, stored, and shared - executable in any Terminal installation, by URL. + +## Routine execution + +Run a routine file from the main menu, with the `exe` command. A great start would be to use `exe --example` to get a sense of what this functionality does. Below, the `--help` dialogue is displayed. + +```console +/exe -h +``` + +```console +usage: exe [--file FILE [FILE ...]] [-i ROUTINE_ARGS] [-e] [--url URL] [-h] + +Execute automated routine script. For an example, please use `exe --example` and for documentation and to learn how create your own script type `about exe`. + +optional arguments: + --file FILE [FILE ...], -f FILE [FILE ...] + The path or .openbb file to run. (default: None) + -i ROUTINE_ARGS, --input ROUTINE_ARGS + Select multiple inputs to be replaced in the routine and separated by commas. E.g. GME,AMC,BTC-USD (default: None) + -e, --example Run an example script to understand how routines can be used. (default: False) + --url URL URL to run openbb script from. (default: None) + -h, --help show this help message (default: False) + +For more information and examples, use 'about exe' to access the related guide. +``` + +## Basic Script + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/eaeb3511-d544-4579-8d76-f7a4fd7bb1d3) + +The most basic script style contains 2 main elements: + +- **Comments**: any text after a hashtag (`#`) is referred to as a comment. This is used to explain what is happening within the line below and is ignored when the file is executed. +- **Commands**: any text *without* a hashtag is being run inside the OpenBB Terminal as if the user had prompted that line in the terminal. Note that this means that you are able to create a pipeline of commands in a single line, i.e. `stocks/load AAPL/candle --ma 20` is a valid line for the script. + +For instance, the text below corresponds to the example file that OpenBB provides. + +```console +# Go into the stocks context +stocks + +# Load a company ticker, e.g. Apple +load AAPL + +# Show a candle chart with a 20 day Moving Average +candle --ma 20 + +# Switch over to the Fundamental Analysis menu +fa + +# Show Earnings per Share (EPS) estimates +epsfc + +# Show price targets charts +pt + +# Show future estimations +est + +# Return to home +home +``` + +## Getting started + +As a starting point, let's use the example above. + +1. Create a new text file with the name `routines_template.openbb` and copy and paste the routine above. + +2. Move the file inside the `routines` folder within the [OpenBBUserData](/terminal/usage/data/custom-data) folder and, optionally, adjust the name to your liking. + +3. Open up the OpenBB Terminal, and type `exe --file routines_template`. If you changed the name of the file, then replace, `routines_template`, with that. As long as the file remains in the `~/OpenBBUserData/routines` folder, OpenBB Terminal's auto-completer will provide it as a choice. + +When this routine is run, a candle chart with a moving average of 20 days, expectations and price targets from analysts and estimated future performance should pop up before returning to the home window. + +![OpenBB Routine Script Execution](https://user-images.githubusercontent.com/46355364/223207167-dfab3a74-d34d-47d4-bf6e-44944e8fbfa2.png) diff --git a/website/content/cli/usage/routines/overlay-financial-data.md b/website/content/cli/usage/routines/overlay-financial-data.md new file mode 100644 index 000000000000..e8f5e8d78076 --- /dev/null +++ b/website/content/cli/usage/routines/overlay-financial-data.md @@ -0,0 +1,131 @@ +--- +title: Overlay Financial Data +sidebar_position: 3 +description: Guide to improve financial data comparison and visualization using the + 'hold on' command in OpenBBTerminal. Covers overlaying data on the same axes, customizing + chart legends and titles, analyzing FAANG companies and GDP/CPI data, and more. +keywords: +- hold on command +- overlay financial data +- same axis plotting +- customizing charts +- financial data comparison +- MatLab +- financial charts +- FAANG companies +- CPI +- GDP +- data visualization +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +## Hold on command + +Often analysts want to be able to overlay financial data. This is possible through the introduction of the `hold on` command. + +The `hold` functionality is available to allow users to overlay multiple datasets onto the same chart axes. This is useful for comparing datasets, or for plotting multiple datasets that share the same x-axis. This guide will walk through the functionalities and the recommended workflow. + +Drawing inspiration from MatLab, the `hold` function is used to toggle the holding state of the current figure. Unlike MatLab, this function needs to be called before calling any function that charts. The hold state can be turned on, from any terminal menu, by running: + +```console +hold on +``` + +By default, new plots will be placed on a new axis, meaning comparing the magnitude values can be tricky. If you wish to plot subsequent figures on the same axis, you can use the sameaxis argument: + +```console +hold on --sameaxis +``` + +Once the hold state is turned on, any terminal command with a plot will not be shown until the hold is turned off. To turn off the hold state, and see the combined figure, run: + +```console +hold off +``` + +An example workflow is as follows. What this will do is plot the CPI and the GDP of the United States on the same axis. + +```console +/economy/hold on +gdp -c united_states +cpi -c united_states +hold off +``` + +Which outputs: + +![hold on ex1](https://github.com/OpenBB-finance/OpenBBTerminal/assets/18151143/a3b1f09e-1a64-4af0-a5a2-070590d848e1) + +To demonstrate, the `--sameaxis` argument, we can run the previous commands, but starting with `hold on --sameaxis`. Because GDP is being measured by USD-per-capita (OECD), and CPI is a function of percent, we will only see CPI as a flat line. + +![hold on ex2](https://github.com/OpenBB-finance/OpenBBTerminal/assets/18151143/43219ca7-126b-4782-bd95-5fa8967e0c6c) + +## Customizing Charts + +A chart is only as good as its labelling. In the previous example, we can see that the legends reflected the command paths used, but not the arguments. If we added a second country, we would not be able to tell which line is which country. In order to avoid this confusion, when the hold state is on, every function comes with a `--legend` argument. + +Text following the, `--legend`, argument is passed into the legend when the chart is created. If a command is run without the, `--legend`, argument, it will default to using the command location. In rare cases, a legend may not appear due to it not being defined in the functions `view` file. In this case, please raise a [GitHub issue](https://github.com/OpenBB-finance/OpenBBTerminal/issues/new/choose) so the team can address it. + +An additional customization is the chart title. This can be specified by adding the `--title` argument to the hold off functionality. To exemplify these capabilities, we can plot an income statement item from many companies. We will examine FAANG companies and plot their revenues on the same axis, over the last forty quarters. + +```console +/stocks/fa/hold on --sameaxis +income -t AAPL -q -l 40 --plot revenue --legend AAPL Revenue +income -t META -q -l 40 --plot revenue --legend META +income -t AMZN -q -l 40 --plot revenue +income -t GOOG -q -l 40 --plot revenue --legend GOOG +income -t NFLX -q -l 40 --plot revenue --legend netflix +hold off --title FAANG Revenues 10 Year +``` + +![hold on custom](https://github.com/OpenBB-finance/OpenBBTerminal/assets/18151143/793d8309-6e49-42ca-b9bd-ff0dad9da959) + +### Example as a Pipeline of Commands + +The following pipeline of commands is the equivalent. + +```console +/stocks/fa/hold on --sameaxis/income -t AAPL -q -l 40 --plot revenue --legend AAPL Revenue/income -t META -q -l 40 --plot revenue --legend META/income -t AMZN -q -l 40 --plot revenue/income -t GOOG -q -l 40 --plot revenue --legend GOOG/income -t NFLX -q -l 40 --plot revenue --legend netflix/hold off --title FAANG Revenues 10 Year +``` + +### Example as a Routine + +Or, a user can create a routine that can be run with the, `/exe`, command. + +```bash + $STOCKS=AAPL,AMZN,MSFT,TSLA,GOOG + + stocks + fa + hold on --sameaxis + + foreach $$tick in $STOCKS: + income -t $$tick -l 40 -q --plot revenue --legend $$tick revenue + end + + hold off--title FAANG Revenues 10 Year +``` + +### Known Issues + +Unfortunately, there are some known issues with the hold functionality. These are being worked on, and will be addressed in future releases. The following are known issues: + +- When plotting charts, if the x axes are not the same, there may be an undesired result. For example, if looking at the `fixedincome/ycrv` function, the x axes is a number in years, so trying to plot a date along x will not work. + +- Candle charts are not supported within the hold state. A work around to plot a close value would be to navigate to `qa/pick Close/line`, which will plot a line chart. + +- Figures that have subplots on their own are not supported. This functionality is meant to overlay data on the same axes, so if there are multiple subplots, it is not supported. An example would be a function like `ta/macd`. The TA functions already have a multiple indicator functionality, `ta/multi`. + +- Running a single plot in the hold state messes with the figure layout and does not give the desired margin. + +- Time series data of varying frequencies may not produce smooth visuals. diff --git a/website/content/cli/usage/routines/pipeline-of-commands.md b/website/content/cli/usage/routines/pipeline-of-commands.md new file mode 100644 index 000000000000..72b4fbe738ff --- /dev/null +++ b/website/content/cli/usage/routines/pipeline-of-commands.md @@ -0,0 +1,96 @@ +--- +title: The Pipeline of Commands +sidebar_position: 1 +description: This page provides a detailed explanation of the OpenBB Terminal command pipeline. + The tutorial video and walkthrough guides users in automating their investment + research process by using single commands, and sequences of commands, + to manipulate and study data. +keywords: +- Hub +- Routine +- Community Routines +- Terminal +- Architecture +- EXE +- Script +- Single command +- Pipeline of commands +- Command sequence +- Automate investment research +- Tutorial video +- GME's dark pool data +- Technical Analysis +- Moving Average Convergence/Divergence indicator +- Stock price loaded +- Exponential moving average indicator +- Price vs Short interest +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +## Single Command + +If you have a good understanding of the Terminal's architecture, you will recognize that commands and menus are organized in the form of a tree. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/a5f10833-9693-4b39-9491-b431919db828) + +If the intention is to explore an equity, enter at base of the menu (`/stocks/`), then browse or navigate towards the point of interest - for example, Dark Pools (`/stocks/dps`). + +While all the information is in one place, having to type one command at a time is far from optimal. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/41737800-7c60-48ad-a43d-814016d81762) + +## Pipeline of Commands + +One of the main objectives of the OpenBB Terminal was the ability to automate a user's investment research workflow - not just a single command, but the complete process. This is where the pipeline of commands comes in, running a sequence of commands. + +The example above can be recreated by running: + +```console +/stocks/load GME/dps/psi +``` + +Which looks like: + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/c21c5452-5a67-4384-851c-d2801b60f8cd) + +Another example is: + +```console +/stocks/load GME/dps/psi/../fa/pt/income/../ins/stats +``` + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/61db4010-bdc2-4851-9e47-79fb4425b816) + +### Step-by-Step Explanation + +```console +/stocks/load amzn/ta/macd/ema -l 50,200/../dps/psi +``` + +This will do the following: + +1. `stocks` - Go into `stocks` menu + +2. `load amzn` - Load Amazon's stock inside stock menu + +3. `ta` - Go into Technical Analysis (`ta`) menu + +4. `macd` - Run the moving average convergence/divergence indicator (`macd`) on the stock price loaded (i.e. `amzn`) + +5. `ema -l 50,200` - Run the exponential moving average indicator with windows of length 50 and 200 (`ema -l 50,200`) on the stock price loaded (i.e. `amzn`) + +6. `..` - Go one menu up + +7. `dps` - Go into Dark pool and Short (`dps`) menu + +8. `psi` - Go into Price vs Short interest (`psi`) menu diff --git a/website/content/cli/usage/routines/routine-macro-recorder.md b/website/content/cli/usage/routines/routine-macro-recorder.md new file mode 100644 index 000000000000..b3fcb62d764a --- /dev/null +++ b/website/content/cli/usage/routines/routine-macro-recorder.md @@ -0,0 +1,47 @@ +--- +title: Routine Macro Recorder +sidebar_position: 4 +description: Learn how to use the macro recorder in OpenBB to start saving commands + and automate common tasks with scripts. This page guides you through the process + of recording, saving, and accessing your recorded routines. +keywords: +- macro recorder +- script routines +- global commands +- Excel's VBA methods +- command recording +- routine script +- terminal main menu +- exe --file +- OpenBBUserData +- routines folder +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +OpenBB script routines can be captured with the macro recorder, controlled with global commands, `record` to start saving commands and `stop` to terminate the recording. This shares similarities with that of Excel's VBA methods. This means that any command you run will be automatically recorded for the routine script and once you type `stop` it automatically saves the file to the `~/OpenBBUserData/routines/` folder. + +For example, if you copy and paste the following prompt in the OpenBB Terminal and press enter, you will see an example. + +```console +/record/economy/cpi/treasury/index sp500/stop +``` + +The following shows the output from this pipeline of commands. + +![Routines](https://user-images.githubusercontent.com/46355364/223204998-70d9e5da-f84e-4c22-90c4-576dcf87c1df.png) + +Because there was a `record` and `stop` at the `start` and `end` respectively, a routine script was created. This file cane be found inside the `routines` folder within the `OpenBBUserData` folder (more on exporting and import data [here](/terminal/usage/data/custom-data)). + +Now, you should be able to access the routine file from the terminal main menu by doing `/exe --file` and using the auto-completer. Note that the naming of the file will differ for you based on the time you are executing the script. + +![Routines](https://user-images.githubusercontent.com/46355364/223205394-77e7a33d-e9fa-4686-b32f-e8d183b265e6.png) diff --git a/website/content/cli/usage/routines/routines-for-power-users.md b/website/content/cli/usage/routines/routines-for-power-users.md new file mode 100644 index 000000000000..f370cefba3fd --- /dev/null +++ b/website/content/cli/usage/routines/routines-for-power-users.md @@ -0,0 +1,203 @@ +--- +title: Routines for Power Users +sidebar_position: 5 +description: This documentation guides on running automated workflows in OpenBB by + introducing variables and arguments for routines. Explains about input variables, + relative time keyword variables, internal script variables and creating loops for + batch execution. +keywords: +- automated workflows +- routines +- arguments +- variables +- relative time keywords +- internal script variables +- loops +- batch execution +- OpenBBTutorial +- Technical Analysis +- Stock Tickers +- Running Scripts +- Executing Commands +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; + + + +## Input Variables + +When utilizing basic routines capabilities, users had to create separate routines for each specific ticker, such as `my_due_diligence_AAPL.openbb` or `my_due_diligence_TSLA.openbb`. This approach was suboptimal, considering that we had control over reading these scripts and they were meant to be used within our ecosystem. + +To address this limitation, we introduced the concept of arguments, inspired by the Perl language. These arguments are variables referenced within the `.openbb` script as `$ARGV` or `$ARGV[0]`, `$ARGV[1]`, and so on. They are provided in the terminal when running `exe` by adding the `--input` flag, followed by the variables separated by commas. + +For instance, if a routine file called `script_with_input.openbb` had the following format: + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/5b0f558e-ace0-423d-a3db-b6369755cffb) + +And we run it in the terminal with `exe —file script_with_input.openbb —input MSFT`, what would be run would be `stocks/load MSFT --start 2015-01-01/ta/ema -l 20,50,100,200` and so you could use the same routine for multiple tickers - **making it a more powerful automated workflow**. + +For instance, the example below shows how you can run the same script for MSFT but also TSLA ticker. + +And we run it in the terminal with exe —file script_with_input.openbb —input MSFT, what would be run would be stocks/load MSFT --start 2015-01-01/ta/ema -l 20,50,100,200 and so you could use the same routine for multiple tickers - making it a more powerful automated workflow. + +For instance, the example below shows how you can run the same script for `MSFT` but also `TSLA` ticker. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/8a744571-59b9-4293-bdd7-5dd6e2c8eef3) + +### Example + +Let's look into the following routine (the file can be downloaded [here](https://www.dropbox.com/s/usooz6y29r1xldb/routines_template_with_inputs.openbb?dl=1)): + +```bash +# This script requires you to use arguments. This can be done with the following: +# exe --file routines_template_with_inputs.openbb -i TSLA,AAPL,MSFT + +# Go to the stocks menu +stocks + +# Load a ticker, given the argument used. E.g. -i TSLA +load $ARGV[0] + +# Enter the Technical Analysis (ta) menu +ta + +# Show the fibonacci retracement levels +fib + +# Enter the comparison analysis (ca) menu +../ca + +# Set two extra tickers based on the arguments used. E.g. -i TSLA,AAPL,MSFT +add $ARGV[1],$ARGV[2] + +# Plot the historical prices +historical + +# Return to home +home +``` + +This script includes `$ARGV[0]`, `$ARGV[1]` and `$ARGV[2]`. This means that the script requires you to submit three arguments. In this case, they refer to stock tickers. Therefore, like the script also says, you can include these arguments with `-i` or `--input` followed by three tickers (e.g. `/exe routines_template_with_inputs.openbb -i TSLA,AAPL,MSFT`). Resulting in the following, + +![OpenBB Script with Input](https://user-images.githubusercontent.com/46355364/223207706-42995834-577f-4747-8185-42a016f441d9.png) + +Note: Make sure you saved this script in the `~/OpenBBUserData/routines/` folder else you are not able to execute it. + +## Set Variables + +In addition to enabling users to run scripts with external variables using the keyword `ARGV`, we also support the use of internal variables within the script. These variables are defined by starting with the `$` character. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/c0cc6e1e-b87c-46f4-8c94-539408745433) + +Which has the following output: + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/77060dfc-216e-490f-af72-3d4af5642e0f) + +Note that the variable can have a single element or can be constituted by an array where elements are separated using a comma “,”. + +### Variables Example + +Example of the script below: + +```bash +# Set date variable +$DATE = 2022-01-01 + +# Set list of tickers to iterate +$TICKERS = AAPL,MSFT + +# dive into stocks +stocks + +# candle chart for first ticker +load $TICKERS[0] --start $DATE/candle + +# candle chart for second ticker +load $TICKERS[1] --start $DATE[0]/candle +``` + +Note that a variable can be declared as a single argument `$DATE = 2022-01-01` but it can also be declared as a list `$TICKERS = AAPL,MSFT`. + +When declared as a list, the user needs to use the indexing to access the element of interest, i.e. if interested in `MSFT` then `$TICKERS[1]` should be used. + +When a single element is defined, then the user can access it through the variable name or indexing the first position equally, i.e. `$DATE` = `$DATE[0]`. + +Note that slicing is also possible, and the same convention as python is utilized. If the user has defined inputs `AAPL,MSFT,TSLA,NVDA,GOOG` then by selecting `$ARGV[1:3]` the tickers `MSFT,TSLA` are selected. + +## Relative Time Keyword Variables + +In addition to the powerful variables discussed earlier, OpenBB also supports the usage of relative keywords, particularly for working with dates. These relative keywords provide flexibility when specifying dates about the current day. There are four types of relative keywords: + +1. **AGO**: Denotes a time in the past relative to the present day. Valid examples include `$365DAYSAGO`, `$12MONTHSAGO`, `$1YEARSAGO`. + +2. **FROMNOW**: Denotes a time in the future relative to the present day. Valid examples include `$365DAYSFROMNOW`, `$12MONTHSFROMNOW`, `$1YEARSFROMNOW`. + +3. **LAST**: Refers to the last specific day of the week or month that has occurred. Valid examples include `$LASTMONDAY`, `$LASTJUNE`. + +4. **NEXT**: Refers to the next specific day of the week or month that will occur. Valid examples include `$NEXTFRIDAY`, `$NEXTNOVEMBER`. + +The result will be a date with the conventional date associated with OpenBB, i.e. `YYYY-MM-DD`. + +### Relative Time Example + +By picking on the previous example, we can add to the load `--start` argument the keyword `$18MONTHSAGO`. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/e0e9b4a2-3d8d-4f72-8029-55f009dc15ee) + +This will result in the following output: + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/78d6235e-15a1-47cb-a99c-19694b6af0d9) + +## Foreach Loop + +Finally, what scripting language would this be if there were no loops? For this, we were inspired by MatLab. The loops in OpenBB utilize the foreach and end convention, allowing for iteration through a list of variables or arguments to execute a sequence of commands. + +To create a foreach loop, you need to follow these steps: + +1. Create the loop header using the syntax: `foreach $$VAR in X` where `X` represents either an argument or a list of variables. It's worth noting that you can choose alternative names for the `$$VAR` variable, as long as the `$$` convention is maintained. + +2. Insert the commands you wish to repeat on the subsequent lines. + +3. Conclude the loop with the keyword `end`. + +### Loop Examples + +```bash +# Iterates through ARGV elements from position 1 onwards +foreach $$VAR in $ARGV[1:] + load $$VAR --start $DATES[0] --end $DATES[1]/dps/psi/.. +end +``` + +```bash +# Loops through all $ARGV variables +FOREACH $$SOMETHING in $ARGV + load $$SOMETHING --start $DATE[0]/ins/stats/.. + end +``` + +```bash +# Iterates through ARGV elements in position 1,2 +foreach $$VAR in $ARGV[1:3] + load $$VAR --start 2022-01-01 + ba + regions + .. +END +``` + +```bash +# Loops through PLTR and BB +foreach $$X in PLTR,BB + load $$X --start $LASTJANUARY + candle +END +``` diff --git a/website/sidebars.js b/website/sidebars.js index 363ca91127ee..4da3bf39d99b 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -37,6 +37,11 @@ const sidebars = { items: [ { type: "autogenerated", dirName: "platform" }], }, + { + type: "category", + label: "OpenBB Platform CLI", + items: [{ type: "autogenerated", dirName: "cli" }], + }, { type: "category", label: "OpenBB Bot", From f7e5ce07b2916e9bb4b4747e454a50006f3a2989 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Thu, 2 May 2024 17:18:24 +0100 Subject: [PATCH 02/25] changes --- website/content/cli/usage/data/api-keys.md | 844 +----------------- website/content/cli/usage/data/custom-data.md | 29 +- .../content/cli/usage/data/data-sources.md | 122 +-- .../content/cli/usage/outputs/export-data.md | 4 + .../cli/usage/outputs/interactive-charts.md | 12 +- .../cli/usage/outputs/interactive-tables.md | 10 +- .../usage/overview/commands-and-arguments.md | 128 +-- .../overview/customizing-the-terminal.md | 100 +-- .../overview/structure-and-navigation.md | 13 +- .../cli/usage/routines/community-routines.md | 4 + website/content/cli/usage/routines/index.mdx | 27 +- .../routines/introduction-to-routines.md | 31 +- .../usage/routines/overlay-financial-data.md | 131 --- .../usage/routines/pipeline-of-commands.md | 52 +- .../usage/routines/routine-macro-recorder.md | 10 +- .../routines/routines-for-power-users.md | 12 +- 16 files changed, 222 insertions(+), 1307 deletions(-) delete mode 100644 website/content/cli/usage/routines/overlay-financial-data.md diff --git a/website/content/cli/usage/data/api-keys.md b/website/content/cli/usage/data/api-keys.md index 600744d9846c..7bd358279c99 100644 --- a/website/content/cli/usage/data/api-keys.md +++ b/website/content/cli/usage/data/api-keys.md @@ -7,851 +7,17 @@ keywords: - datasets - data vendors - subscription +- CLI --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + API (Application Programming Interface) keys are access credentials for obtaining data from a particular data vendor. They are a string of random characters assigned, by the data provider, to an individual account. -## Setting API keys through Terminal +## Setting API keys -Most vendors offer a free tier requiring only a valid email address, some will require an account with proper KYC (Know Your Customer). Each source is entered into the Terminal from the `/keys` menu with the syntax as described in the sections below. Adding the `-h` argument to the command will also display the expected inputs. For example, +Most vendors offer a free tier requiring only a valid email address, some will require an account with proper KYC (Know Your Customer). -```console -(🦋) /keys/ $ reddit -h - -usage: reddit [-i CLIENT_ID] [-s CLIENT_SECRET] [-u USERNAME] [-p PASSWORD] [-a USER_AGENT [USER_AGENT ...]] [-h] - -Set Reddit API key. - -options: - -i CLIENT_ID, --id CLIENT_ID - Client ID (default: None) - -s CLIENT_SECRET, --secret CLIENT_SECRET - Client Secret (default: None) - -u USERNAME, --username USERNAME - Username (default: None) - -p PASSWORD, --password PASSWORD - Password (default: None) - -a USER_AGENT [USER_AGENT ...], --agent USER_AGENT [USER_AGENT ...] - User agent (default: None) - -h, --help show this help message (default: False) -``` - -In order to set the API key in the terminal, after obtaining the correct information from reddit, one would enter into the terminal: - -```console -(🦋) /keys/ $ reddit -i -s -u -p -a -``` - -A message similar to the one below will be printed when a function requesting data from an API is called but the key has not yet been entered. - -```console -(🦋) /stocks/fa/ $ rot - -API_FINNHUB_KEY not defined. Set API Keys in ~/.openbb_terminal/.env or under keys menu. -``` - -The menu also provides a method for testing the validity of a key upon entry. It can be easy to copy & paste the string with a missing character; so, if the test fails, check that the values were correctly recorded with the command: - -```console -(🦋) /keys/ $ mykeys --show -``` - -:::note -OpenBB recommends users to gradually obtaining API keys from data vendors based on their needs. - -In addition by accessing our [data vendor affiliate program](https://my.openbb.co/app/hub/affiliate) you can get discounts upon sign-up. -::: - - -## Supported data vendors - -This section covers all API keys listed above and include detailed instructions how to obtain each API key. By clicking on each name, the section will expand and instructions are provided. - -### AlphaVantage - -> Alpha Vantage provides enterprise-grade financial market data through a set of powerful and developer-friendly data APIs and spreadsheets. From traditional asset classes (e.g., stocks, ETFs, mutual funds) to economic indicators, from foreign exchange rates to commodities, from fundamental data to technical indicators, Alpha Vantage is your one-stop-shop for real-time and historical global market data delivered through cloud-based APIs, Excel, and Google Sheets. - -
-Instructions - -Go to: https://www.alphavantage.co/support/#api-key - -![AlphaVantage](https://user-images.githubusercontent.com/46355364/207820936-46c2ba00-81ff-4cd3-98a4-4fa44412996f.png) - -Fill out the form, pass Captcha, and click on, "GET FREE API KEY". The issued key can be entered into the OpenBB Terminal with: - -```console -/keys/av REPLACE_WITH_KEY -``` - -
- -### Binance - -> Binance cryptocurrency exchange - We operate the worlds biggest bitcoin exchange and altcoin crypto exchange in the world by volume - -
-Instructions - -Go to: https://www.binance.com/en/support/faq/how-to-create-api-360002502072 - -![Binance](https://user-images.githubusercontent.com/46355364/207839805-f71cf12a-62d2-41cb-ba19-0c35917abc40.png) - -These instructions should provide clear guidance for obtaining an API Key. Enter the issued credentials into the OpenBB Terminal with: - -```console -/keys/binance -k REPLACE_WITH_KEY -s REPLACE_WITH_SECRET -``` - -
- -### Bitquery - -> Bitquery is an API-first product company dedicated to power and solve blockchain data problems using the ground truth of on-chain data. - -
-Instructions - -Go to: https://bitquery.io/< - -![Bitquery](https://user-images.githubusercontent.com/46355364/207840322-5532a3f9-739f-4e28-9839-a58db932882e.png) - -Click "Try GraphQL API", which opens the following screen: - -![Try GraphQL API](https://user-images.githubusercontent.com/46355364/207840576-2c51a538-dd9b-484d-b11d-40e3e424df62.png) - -After creating an account and verifying the email address, get the value for the key by clicking on the "API Key" tab. - -![Get Bitquery API Key](https://user-images.githubusercontent.com/46355364/207840833-35c1b12c-9b4b-43fe-a33e-f7b92c43a011.png) - -Enter this API key into the OpenBB Terminal by typing: - -```console -/keys/bitquery REPLACE_WITH_KEY -``` - -
- -### BizToc - -> BizToc is the one-stop business and finance news hub, encapsulating the top 200 US news providers in real time. - -
-Instructions - -The BizToc API is hosted on RapidAPI. To set up, go to: https://rapidapi.com/thma/api/biztoc. - -![biztoc0](https://github.com/marban/OpenBBTerminal/assets/18151143/04cdd423-f65e-4ad8-ad5a-4a59b0f5ddda) - -In the top right, select "Sign Up". After answering some questions, you will be prompted to select one of their plans. - -![biztoc1](https://github.com/marban/OpenBBTerminal/assets/18151143/9f3b72ea-ded7-48c5-aa33-bec5c0de8422) - -After signing up, navigate back to https://rapidapi.com/thma/api/biztoc. If you are logged in, you will see a header called X-RapidAPI-Key. - -![biztoc2](https://github.com/marban/OpenBBTerminal/assets/18151143/0f3b6c91-07e0-447a-90cd-a9e23522929f) - -Copy the key to the clipboard, and enter this key into the OpenBB Terminal with: - -```console -/keys/biztoc REPLACE_WITH_KEY -``` - -
- -### CoinMarketCap - -> CoinMarketCap is the world's most-referenced price-tracking website for cryptoassets in the rapidly growing cryptocurrency space. Its mission is to make crypto discoverable and efficient globally by empowering retail users with unbiased, high quality and accurate information for drawing their own informed conclusions. - -
-Instructions - -Go to: https://coinmarketcap.com/api - -![CoinMarketCap](https://user-images.githubusercontent.com/46355364/207831111-3f09ed75-740e-4121-a67e-6e1f36e8ab9a.png) - -Click on, "Get Your Free API Key Now", which opens to the page: - -![CoinMarketCap](https://user-images.githubusercontent.com/46355364/207831345-06a48efe-63b2-4804-bcf9-52fa4a73f7db.png) - -Once the account has been created, copy the API key displayed within the dashboard. - -![CoinMarketCap](https://user-images.githubusercontent.com/46355364/207831705-e9f95018-bba7-49a9-b057-3443bc839861.png) - -Enter the API key into the OpenBB Terminal by typing: - -```console -/keys/cmc REPLACE_WITH_KEY -``` - -
- -### Coinbase - -> Coinbase is a secure online platform for buying, selling, transferring, and storing cryptocurrency. - -
-Instructions - -Go to: https://help.coinbase.com/en/exchange/managing-my-account/how-to-create-an-api-key - -![Coinbase](https://user-images.githubusercontent.com/46355364/207841901-647f0aef-0c74-454d-b99e-367d784259f0.png) - -Follow the instructions to obtain the credentials for the specific account. Enter the three values into the OpenBB Terminal by typing: - -```console -/keys/coinbase -k REPLACE_WITH_KEY -s REPLACE_WITH_SECRET -p REPLACE_WITH_PASSPHRASE -``` - -
- -### Coinglass - -> Coinglass is a cryptocurrency futures trading & information platform,where you can find the Bitcoin Liquidations ,Bitcoin open interest, Grayscale Bitcoin Trust,Bitcoin longs vs shorts ratio and actively compare funding rates for crypto futures.Above all the quantities are shown as per their respective contract value. - -
-Instructions - -Go to: https://www.coinglass.com/ - -![Coinglass](https://user-images.githubusercontent.com/46355364/207844601-8510687a-e54f-49b9-961f-5ef6718f58ab.png) - -Click, "Log in", and then sign up for an account. This opens the page: - -![Coinglass](https://user-images.githubusercontent.com/46355364/207844637-a9321889-c4d8-4d44-95fe-a6288a17ad19.png) - -With the account created, find the assigned API key within the account profile page. Enter this value into the OpenBB Terminal by typing: - -```console -/keys/coinglass REPLACE_WITH_KEY -``` - -
- -### Crypto Panic - -> CryptoPanic is a news aggregator platform indicating impact on price and market for traders and cryptocurrency enthusiasts. - -
-Instructions - -Go to: https://cryptopanic.com/developers/api/ - -![Crypto Panic](https://user-images.githubusercontent.com/46355364/207848733-27e5a804-7ae7-4ca2-88b2-848b32929b6f.png) - -Click on, [Sign up](https://cryptopanic.com/accounts/signup/?next=/developers/api/), and after creating, the API key will be displayed on the documentation page, "Your free API auth token". - -![Crypto Panic](https://user-images.githubusercontent.com/46355364/207848971-3e4771b7-1faa-45fe-955f-81bd736b16b7.png) - -Enter that value in the OpenBB Terminal by typing: - -```console -/keys/cpanic REPLACE_WITH_KEY -``` - -
- -### Databento - -> Databento eliminates tens of thousands of dollars in upfront expenses per dataset without sacrificing data integrity. We give you the flexibility to pick up real-time full exchange feeds and terabytes of historical data, whenever you need it. - -
-Instructions - -Go to: https://docs.databento.com/getting-started - -![Databento](https://user-images.githubusercontent.com/85772166/221943074-7a5e55c1-6193-42d8-a04c-431603a69a05.png) - -Click on, [Sign up](https://databento.com/signup), and after creating an account, the API key is found in the [account portal](https://databento.com/portal/keys). - -![Databento](https://user-images.githubusercontent.com/85772166/221943270-e0ada7bf-c7fb-46f2-bd7a-49afb3bc7bd8.png) - -Enter this into the terminal with: - -```console -/keys/databento REPLACE_WITH_KEY -``` - -
- -### DEGIRO - -> DEGIRO is Europe's fastest growing online stock broker. DEGIRO distinguishes itself from its competitors by offering extremely low trading commissions. - -
-Instructions - -Go to: https://www.degiro.com/ - -![Degiro](https://user-images.githubusercontent.com/46355364/207838353-001d350c-872c-4770-a586-fb21318122eb.png) - -Click on, "Open an account", and then go through the registration process. After setting up the account, the login credentials can be entered in the OpenBB Terminal with: - -```console -/keys/degiro -u USERNAME -p PASSWORD -``` - -Instructions for setting up 2FA authorization are [here](https://github.com/Chavithra/degiro-connector#35-how-to-use-2fa-). - -
- -### EODHD - -> Historical End of Day, Intraday, and Live prices API, with Fundamental Financial data API for more than 120000 stocks, ETFs and funds all over the world. - -
-Instructions - -Go to: https://eodhistoricaldata.com/r/?ref=869U7F4J - -![EODHD](https://user-images.githubusercontent.com/46355364/207849214-23763c95-7314-42ae-b97d-cb5810686498.png) - -Clicking on, "Registration", opens the page: - -![EODHD](https://user-images.githubusercontent.com/46355364/207849324-00d4a916-8260-45c0-9714-289e0a0574c0.png) - -Once registered, the API Key will be next to "API TOKEN". - -![EODHD](https://user-images.githubusercontent.com/46355364/207849462-37471270-929a-45c5-a164-a84249b19231.png) - -Enter this string into the OpenBB Terminal by typing: - -```console -/keys/eodhd REPLACE_WITH_KEY -``` - -
- -### Finnhub - -> With the sole mission of democratizing financial data, we are proud to offer a FREE realtime API for stocks, forex and cryptocurrency. - -
-Instructions - -Go to: https://finnhub.io/ - -![Finnhub](https://user-images.githubusercontent.com/46355364/207832028-283c3321-8c05-4ee8-b4d2-41cdc940f408.png) - -Click on, "Get free api key", to open the page: - -![Finnhub](https://user-images.githubusercontent.com/46355364/207832185-f4c8406a-3b75-4acc-b3e8-3c4b3272d4da.png) - -Once the account has been created, find the API key in the account dashboard. - -![Finnhub](https://user-images.githubusercontent.com/46355364/207832601-62007d95-410c-4d03-a5a3-b177d1894a4c.png) - -Add this key to the OpenBB Terminal by entering: - -```console -/keys/finnhub REPLACE_WITH_KEY -``` - -
- -### Financial Modeling Prep - -> Enhance your application with our data that goes up to 30 years back in history. Earnings calendar, financial statements, multiple exchanges and more! - -
-Instructions - -Go to: https://site.financialmodelingprep.com/developer/docs - -![FinancialModelingPrep](https://user-images.githubusercontent.com/46355364/207821920-64553d05-d461-4984-b0fe-be0368c71186.png) - -Click on, "Get my API KEY here", and sign up for a free account. - -![FinancialModelingPrep](https://user-images.githubusercontent.com/46355364/207822184-a723092e-ef42-4f87-8c55-db150f09741b.png) - -With an account created, sign in and navigate to the Dashboard, which shows the assigned token. by pressing the "Dashboard" button which will show the API key. - -![FinancialModelingPrep](https://user-images.githubusercontent.com/46355364/207823170-dd8191db-e125-44e5-b4f3-2df0e115c91d.png) - -Enter the key into the OpenBB Terminal with: - -```console -/keys/fmp REPLACE_WITH_KEY -``` - -
- -### FRED - -> FRED is the trusted source for economic data since 1991. Download, graph, and track 819,000 US and international time series from 110 sources. - -
-Instructions - -Go to: https://fred.stlouisfed.org - -![FRED](https://user-images.githubusercontent.com/46355364/207827137-d143ba4c-72cb-467d-a7f4-5cc27c597aec.png) - -Click on, "My Account", create a new account or sign in with Google: - -![FRED](https://user-images.githubusercontent.com/46355364/207827011-65cdd501-27e3-436f-bd9d-b0d8381d46a7.png) - -After completing the sign-up, go to "My Account", and select "API Keys". Then, click on, "Request API Key". - -![FRED](https://user-images.githubusercontent.com/46355364/207827577-c869f989-4ef4-4949-ab57-6f3931f2ae9d.png) - -Fill in the box for information about the use-case for FRED, and by clicking, "Request API key", at the bottom of the page, the API key will be issued. - -![FRED](https://user-images.githubusercontent.com/46355364/207828032-0a32d3b8-1378-4db2-9064-aa1eb2111632.png) - -Enter the API key into the OpenBB Terminal with: - -```console -/keys/fred REPLACE_WITH_KEY -``` - -
- -### GitHub - -> GitHub is where over 100 million developers shape the future of software. - -
-Instructions - -Go to: https://github.com - -![GitHub](https://user-images.githubusercontent.com/46355364/207846953-7feae777-3c3b-4f21-9dcf-84817c732618.png) - -Sign up for, or sign in to, GitHub. Once logged in, navigate to the [apps](https://github.com/settings/apps) page, under account settings. - -![GitHub](https://user-images.githubusercontent.com/46355364/207847215-3c04003f-26ea-4e62-9c13-ea35176bb5e3.png) - -Select, "New GitHub App": - -![GitHub](https://user-images.githubusercontent.com/46355364/207847383-d24416c6-18be-43f2-ae7c-455e8372a6ed.png) - -After creating the app, the key will be issued. Enter this token into the OpenBB Terminal with: - -```console -/keys/github REPLACE_WITH_KEY -``` - -
- -### Glassnode - -> Glassnode makes blockchain data accessible for everyone. We source and carefully dissect on-chain data, to deliver contextualized and actionable insights. - -
-Instructions - -Go to: https://studio.glassnode.com - -![Glassnode](https://user-images.githubusercontent.com/46355364/207843761-799078ff-fa64-4d39-a6eb-ba01d250be69.png) - -Click on, "Sign up", and create an account: - -![Glassnode](https://user-images.githubusercontent.com/46355364/207843795-dd2cdbdb-45eb-4c7d-b967-ae9857d4ea5d.png) - -After creating an account, navigate to the [account settings](https://studio.glassnode.com/settings/api) and generate an API Key. - -![Glassnode](https://user-images.githubusercontent.com/46355364/207843950-5f33f37d-0203-4302-a67f-198808f18e06.png) - -Enter this key in the OpenBB terminal with: - -```console -/keys/glassnode REPLACE_WITH_KEY -``` - -
- -### Intrinio - -> Intrinio is more than a financial data API provider – we're a real time data partner. That means we're your guide to every step of the financial data. - -
-Instructions - -Go to: https://intrinio.com/starter-plan - -![Intrinio](https://user-images.githubusercontent.com/85772166/219207556-fcfee614-59f1-46ae-bff4-c63dd2f6991d.png) - -An API key will be issued with a subscription. Find the token value within the account dashboard, and enter it into the OpenBB Terminal with: - -```console -/keys/intrinio REPLACE_WITH_KEY -``` - -
- -### Messari - -> Gain an edge over the crypto market with professional grade data, tools, and research. - -
-Instructions - -Go to: https://messari.io - -![Messari](https://user-images.githubusercontent.com/46355364/207848122-ec6a41e4-76b7-4620-adc3-1f1c19f4bca6.png) - -Click on, "Sign up", and create an account. - -![Messari](https://user-images.githubusercontent.com/46355364/207848160-6a962e3c-3007-40a3-9431-cd5ddfe5bb8e.png) - -After creating the account, navigate to the [account page](https://messari.io/account/api), and click on the tab for, API Access. - -![Messari](https://user-images.githubusercontent.com/46355364/207848324-ade5bede-8e6b-4b87-bdec-eade3217c0d8.png) - -Copy the API key and add it to the OpenBB Terminal by entering: - -```console -/keys/messari REPLACE_WITH_KEY -``` - -
- -### News API - -> News API is a simple, easy-to-use REST API that returns JSON search results for current and historic news articles published by over 80,000 worldwide sources. - -
-Instructions - -Go to: https://newsapi.org - -![News API](https://user-images.githubusercontent.com/46355364/207828250-0c5bc38c-90b4-427d-a611-b43c98c8e7ab.png) - -Click on, "Get API Key", and fill out the form. - -![News API](https://user-images.githubusercontent.com/46355364/207828421-76922bc2-cde0-493f-9eed-7f90eb831779.png) - -Register for an account and the next screen will provide the API Key. - -![News API](https://user-images.githubusercontent.com/46355364/207828736-f0fce53b-f302-4456-adf9-8d50ac41fbe2.png) - -Add this API key into the OpenBB Terminal by entering: - -```console -/keys/news REPLACE_WITH_KEY -``` - -
- -### Oanda - -> OANDA's Currency Converter allows you to check the latest foreign exchange average bid/ask rates and convert all major world currencies. - -
-Instructions - -Go to: https://developer.oanda.com - -![Oanda](https://user-images.githubusercontent.com/46355364/207839324-d30aa2b6-be83-41ff-9b1b-146cac566789.png) - -After creating an account, follow the steps below. - -![Oanda](https://user-images.githubusercontent.com/46355364/207839246-eb40f093-b583-4edd-b178-99fe399bfb66.png) - -Upon completion of the account setup, enter the credentials into the OpenBB Terminal using the syntax: - -```console -/keys/oanda -a REPLACE_WITH_ACCOUNT -t REPLACE_WITH_TOKEN --account_type REPLACE_WITH_LIVE_OR_PRACTICE -``` - -
- - -### OpenAI - -> An API for accessing new AI models developed by OpenAI. - -
-Instructions - -Go to: https://openai.com/blog/openai-api - -![OpenAI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/105685594/2b2b5f7c-745a-40d7-bd19-05ed3021f9da) - -Click sign up and create an account. Once done, you will be logged into the home page: -![OpenAI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/105685594/34976dce-bdf0-48cd-a9db-9e41eacdbc04) - - -Click the top right "Personal" button to find the following drop down: -![OpenAI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/105685594/95987173-3884-462e-a03b-dff040f0acb4) - - -Click `View API Keys`. This will take you to the api Keys menu. Then click `Create new secret key`: -![OpenAI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/105685594/210fa55b-8a33-4647-bdd4-28a478b02ba8) - -Then enter the Secret key credentials into the OpenBB Terminal using the syntax: - -```console -/keys/openai -k -``` - -
- - - - -### Polygon - -> Live & historical data for US stocks for all 19 exchanges. Instant access to real-time and historical stock market data. - -
-Instructions - -Go to: https://polygon.io - -![Polygon](https://user-images.githubusercontent.com/46355364/207825623-fcd7f0a3-131a-4294-808c-754c13e38e2a.png) - -Click on, "Get your Free API Key". - -![Polygon](https://user-images.githubusercontent.com/46355364/207825952-ca5540ec-6ed2-4cef-a0ed-bb50b813932c.png) - -After signing up, the API Key is found at the bottom of the account dashboard page. - -![Polygon](https://user-images.githubusercontent.com/46355364/207826258-b1f318fa-fd9c-41d9-bf5c-fe16722e6601.png) - -Enter the key into the OpenBB Terminal by typing: - -```console -/keys/polygon REPLACE_WITH_KEY -``` - -
- -### Quandl - -> The premier source for financial, economic, and alternative datasets, serving investment professionals. Quandl’s platform is used by over 400,000 people, including analysts from the world’s top hedge funds, asset managers and investment banks. - -
-Instructions - -Go to: https://www.quandl.com - -![Quandl](https://user-images.githubusercontent.com/46355364/207823899-208a3952-f557-4b73-aee6-64ac00faedb7.png) - -Click on, "Sign Up", and register a new account. - -![Quandl](https://user-images.githubusercontent.com/46355364/207824214-4b6b2b74-e709-4ed4-adf2-14803e6f3568.png) - -Follow the sign-up instructions, and upon completion the API key will be assigned. - -![Quandl](https://user-images.githubusercontent.com/46355364/207824664-3c82befb-9c69-42df-8a82-510d85c19a97.png) - -Enter the key into the OpenBB Terminal with: - -```console -/keys/quandl REPLACE_WITH_KEY -``` - -
- -### Reddit - -> Reddit is a network of communities where people can dive into their interests, hobbies and passions. - -
-Instructions - -Sign in to Reddit, and then go to: https://old.reddit.com/prefs/apps/ - -![Reddit](https://preview.redd.it/540vrn3k0cn91.png?width=986&format=png&auto=webp&v=enabled&s=88228cd0cf4415b3487b8d35e1097f0caa804e15) - -Scroll down and click on "create application", selecting "script". - -![Reddit](https://preview.redd.it/7je4ehqa1cn91.png?width=916&format=png&auto=webp&v=enabled&s=dbdf65ccc0820cfe28eff8e81cba056f4fd8263e) - -Once the application is created, you must register it [here](https://old.reddit.com/wiki/api) - -![Reddit](https://user-images.githubusercontent.com/46355364/207834105-665180be-c2b6-43c8-b1c9-477729905010.png) - -Click on, "Read the full API terms and sign up for usage", and fill out the form. - -![Reddit](https://user-images.githubusercontent.com/46355364/207834850-32a0d4c8-9990-4919-94e3-abad1487a3bd.png) - -After submitting the form, check for a confirmation email. The credentials will be displayed [here](https://old.reddit.com/prefs/apps/), enter them into the OpenBB Terminal in one line: - -```console -/keys/reddit -i REPLACE_WITH_CLIENT_ID -s REPLACE_WITH_CLIENT_SECRET -u REPLACE_WITH_REDDIT_USERNAME -p REPLACE_WITH_REDDIT_PASSWORD -a REPLACE_WITH_USER_AGENT -``` - -
- -### Robinhood - -> Robinhood has commission-free investing, and tools to help shape your financial future. - -
-Instructions - -Go to: https://robinhood.com/us/en - -![Robinhood](https://user-images.githubusercontent.com/46355364/207838058-a2311632-6459-4cfd-bc0a-639ee3931574.png) - -After registering for an account, it can be added to the OpenBB Terminal with: - -```console -/keys/rb -u REPLACE_WITH_USERNAME -p REPLACE_WITH_PASSWORD -``` - -The first login will request 2FA authorization from the device connected to the account. - -
- -### Santiment - -> We provide tools to help you analyze crypto markets and find data-driven opportunities to optimize your investing. - -
-Instructions - -Go to: https://app.santiment.net - -Click on, "Sign up", and register for an account. - -![Santiment](https://user-images.githubusercontent.com/46355364/207849732-4bae61de-2f62-4919-b85d-f418f1bbd0c4.png) - -Navigate to the [account dashboard](https://app.santiment.net/account#api-keys) and generate a key. - -![Santiment](https://user-images.githubusercontent.com/46355364/207849839-31d1d0a7-6936-4ebd-a7f8-1292f6317b07.png) - -Add it to the OpenBB Terminal by entering: - -```console -/keys/santiment REPLACE_WITH_KEY -``` - -
- -### Stocksera - -> Empowering investors to take advantage of alternative data. We track trending tickers on social media and provide alternative data for easy due-diligence & analysis. - -
-Instructions - -Go to: https://stocksera.pythonanywhere.com - -![Stocksera](https://user-images.githubusercontent.com/46355364/207853896-ee233569-26bb-4244-b115-43ac8885757a.png) - -Click on, "Log in", and create an account. - -![Stocksera](https://user-images.githubusercontent.com/46355364/207853985-46a7a17f-b6b2-442b-886d-f68b3ba2ad5a.png) - -Once logged in, navigate to the "Developers" tab and copy the API key. - -![Stocksera](https://user-images.githubusercontent.com/46355364/207854224-e5ddace0-15d1-491c-b616-263cca0bef02.png) - -Add the key to the OpenBB Terminal by entering: - -```console -/keys/stocksera REPLACE_WITH_KEY -``` - -
- -### Token Terminal - -> Token Terminal is a platform that aggregates financial data on the leading blockchains and decentralized applications. - -
-Instructions - -Go to: https://tokenterminal.com - -![Token Terminal](https://user-images.githubusercontent.com/46355364/207850735-69368b4f-6a3e-46b8-ba69-3b79d9231f15.png) - -Click on, "Log in" and sign up for an account. - -![Token Terminal](https://user-images.githubusercontent.com/46355364/207850774-2071df78-3289-4c8e-9d64-156b9ec8ad81.png) - -Verify the email address, and then navigate go to the "API" tab and copy the API key to the clipboard. - -![Token Terminal](https://user-images.githubusercontent.com/46355364/207851035-71ea3eff-a11f-4835-8592-c07b3aa3f800.png) - -Add the key to the OpenBB Terminal by typing: - -```console -/keys/tokenterminal REPLACE_WITH_KEY -``` - -
- -### Tradier - -> Tradier, the home of active traders. Our open collaboration platform allows investors to truly customize their trading experience like never before. - -
-Instructions - -Go to: https://documentation.tradier.com - -![Tradier](https://user-images.githubusercontent.com/46355364/207829178-a8bba770-f2ea-4480-b28e-efd81cf30980.png) - -Click on, "Open Account", to start the sign-up process. After the account has been setup, navigate to [Tradier Broker Dash](https://dash.tradier.com/login?redirect=settings.api) and create the application. Request a sandbox access token, and enter this key into the OpenBB Terminal with: - -```console -/keys/tradier REPLACE_WITH_KEY -``` - -
- -### Twitter - -> From breaking news and entertainment to sports and politics, get the full story with all the live commentary. - -
-Upcoming changes to the Twitter API will deprecate the current functionality, it is uncertain if the current features will continue to work. - -![Twitter API](https://pbs.twimg.com/media/FooIJF3agAIU8SN?format=png&name=medium) - -
- -### Ultima Insights - -> Ultima Insights offers tools such as the SEC Filing Analyst, Company news monitoring, Industry event watch, and Earnings Call Roundup for comprehensive investment monitoring. It incorporates daily Wall Street-level Qualitative analysis into OpenBB to keep users updated. The News curation system, powered by GPT + LLMs technology, presents relevant news to investors, often before it appears on platforms like Bloomberg. Ultima aims to provide timely and significant information for its users. - -
-Instructions - -Go to: https://ultimainsights.ai/openbb - -![Ultima Insights](https://user-images.githubusercontent.com/1911913/229215125-e3419788-eef3-4389-a3bd-5c08f3333347.png) - -Click on the "Get started" button for Ultima Pro or "Just Want the API Key" to get an Ultima API key for yout OpenBB account. Once you sign-up and confirm you want to start a trial with Ultima, Copy the API key to your clipboard and enter this key into the OpenBB Terminal with: - -```console -/keys/ultima REPLACE_WITH_KEY -``` - -
- -### Whale Alert - -> Whale Alert continuously collects and analyzes billions of blockchain transactions and related-off chain data from hundreds of reliable sources and converts it into an easy to use standardized format. Our world-class analytics and custom high speed database solutions process transactions the moment they are made, resulting in the largest and most up-to-date blockchain dataset in the world. - -
-Instructions - -Go to: https://docs.whale-alert.io - -![Whale Alert](https://user-images.githubusercontent.com/46355364/207842892-3f71ee7a-6cd3-48a2-82e4-fa5ec5b13807.png) - -Click on, "sign up here". - -![Whale Alert](https://user-images.githubusercontent.com/46355364/207842992-427f1d2c-b34e-41c9-85fd-18511805fd16.png) - -After creating the account, click on, "Create", to issue the API Key. - -![Whale Alert](https://user-images.githubusercontent.com/46355364/207843214-20232465-9a52-4b66-b01a-0b8cecbdd612.png) - -Enter the key into the OpenBB Terminal by typing: - -```console -/keys/walert REPLACE_WITH_KEY -``` - -
+Find all data providers [here](https://my.openbb.co/app/platform/data-providers), and manage all you credentials directly on the [OpenBB Hub](https://my.openbb.co/app/platform/credentials). diff --git a/website/content/cli/usage/data/custom-data.md b/website/content/cli/usage/data/custom-data.md index f9f99d0cf55b..6b90a7f44421 100644 --- a/website/content/cli/usage/data/custom-data.md +++ b/website/content/cli/usage/data/custom-data.md @@ -1,7 +1,7 @@ --- title: Custom Data sidebar_position: 3 -description: Documentation detailing usage of the OpenBB Terminal for financial data +description: Documentation detailing usage of the OpenBB Platform CLI for financial data aggregation, standardization, and user data import. It explains the OpenBBUserData folder functions, how to modify settings, and how to import or export user data. keywords: @@ -18,13 +18,14 @@ keywords: - export folder location - userdata command - user-created files +- CLI --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + -The OpenBB Terminal not only allows access to a world of financial data through our data aggregation and standardization. We also allow users to bring their own data to the terminal and export data. +The OpenBB Platform CLI not only allows access to a world of financial data through our data aggregation and standardization. ## The OpenBBUserData Folder @@ -32,18 +33,16 @@ The `OpenBBUserData` folder's default location is the home of the system user ac - macOS: `Macintosh HD/Users//OpenBBUserData` - Windows: `C:/Users//OpenBBUserData` -Within the folder you can find files that you have exported as well as files that you wish to import directly into the OpenBB Terminal. For example, this could be an orderbook which you can store in `OpenBBUserData/portfolio/holdings`. +Within the folder you can find files that you have exported. ![OpenBBUserData Folder](https://user-images.githubusercontent.com/85772166/195742985-19f0e420-d8f7-4fea-a145-a0243b8f2ddc.png) This folder contains all things user-created. For example: -- Screener presets -- Portfolio files - Exported files -- Files to be imported by various functions - Styles and themes -- Preferred data sources +- Routines +- Logs :::note **Note:** With a WSL-enabled Windows installation, this folder will be under the Linux partition @@ -51,16 +50,4 @@ This folder contains all things user-created. For example: ### Update export folder location -The location of this folder can be set by the user from the `/settings` menu. There should be no need to update paths in this menu unless the folders have been moved manually. If the location of the OpenBBUserData folder must be changed, it is best to move the entire existing folder to the new path. The path is then changed under the settings menu with: - -```console -/settings/ $ userdata --folder "/complete_path_to/OpenBBUserData" -``` - -## Import data - -Menus, such as [Econometrics](/terminal/menus/econometrics) or [Forecast](/terminal/menus/forecast), allow the user to import their own dataset. Files available to import will be included with the selections made available by auto-complete. In the Econometrics menu, this is activated after pressing the space bar with `load -f` - -![Importing Data](https://user-images.githubusercontent.com/85772166/204921760-38742f6c-ec78-4009-9c23-54dcb0504524.png) - -Both menus look in the `exports` and `custom_imports` folders within the `/OpenBBUserData` folder. +The location of this folder can be set by the user by changing the user configuration file: `/home/your-user/.openbb_platform/user_settings.json`. diff --git a/website/content/cli/usage/data/data-sources.md b/website/content/cli/usage/data/data-sources.md index 22939d1d9d72..a44d7b32f2d0 100644 --- a/website/content/cli/usage/data/data-sources.md +++ b/website/content/cli/usage/data/data-sources.md @@ -2,11 +2,12 @@ title: Data sources sidebar_position: 1 description: This page provides useful information on dealing with different data - vendors when using OpenBB's Terminal. It outlines how to select a default data source, + vendors when using the OpenBB Platform CLI. It outlines how to select a default data source, acquire API keys, and switch the data vendor using specific commands, all in an effort to streamline and improve the user's experience. keywords: - Terminal +- CLI - data vendors - API keys - data sources @@ -26,7 +27,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; @@ -35,11 +36,15 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Short video on where the data comes from" /> +:::note +Note that the commands and menus may vary. +::: + ## Relationship With Data Vendors -Most commands will require obtaining API keys from various data providers. OpenBB provides methods for consuming these data feeds, but has no control over the quality or quantity of data provided to an end-user. **No API Keys are required to get started using the Terminal**. +Most commands will require obtaining API keys from various data providers. OpenBB provides methods for consuming these data feeds, but has no control over the quality or quantity of data provided to an end-user. **No API Keys are required to get started using the CLI**. -See the list of data providers [here](/terminal/usage/data/api-keys), along with instructions for entering the credentials into the OpenBB Terminal. You can also request a new data source through this [form](https://openbb.co/request-a-feature). +See the list of providers [here](https://my.openbb.co/app/platform/data-providers). :::note OpenBB doesn't store any financial data in its servers. We aggregate access to multiple data sources through API calls and standardize that interaction to provide users a seamless experience when dealing with different data vendors @@ -47,83 +52,86 @@ OpenBB doesn't store any financial data in its servers. We aggregate access to m ## Changing the Data Source In-Command -Many commands have multiple data sources associated with it. A great example is `/stocks/fa/income`, which allows you to select FinancialModelingPrep, Polygon, AlphaVantage, EODHD or YahooFinance. In order to specify the data vendor for that particular command, use the `--source` argument. +Many commands have multiple data sources associated with it. A great example is `/equity/price/historical`.. In order to specify the data vendor for that particular command, use the `--provider` argument. This also becomes clear from the help menu. ```console -/stocks/fa/income -h +/equity/price/historical -h ``` ```console -usage: income [-t TICKER] [-q] [-r] [-p column] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT] [--source {FinancialModelingPrep,Polygon,AlphaVantage,EODHD,YahooFinance}] +usage: historical --symbol SYMBOL [SYMBOL ...] [--interval INTERVAL] [--start_date START_DATE] [--end_date END_DATE] [--chart] + [--provider {alpha_vantage,cboe,fmp,intrinio,polygon,tiingo,tmx,tradier,yfinance}] [--adjustment {splits_only,splits_and_dividends,unadjusted}] [--extended_hours] + [--adjusted] [--use_cache] [--start_time START_TIME] [--end_time END_TIME] [--timezone TIMEZONE] [--source {realtime,delayed,nasdaq_basic}] [--sort {asc,desc}] + [--limit LIMIT] [--include_actions] [--prepost] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] -Prints a complete income statement over time. This can be either quarterly or annually. +Get historical price data for a given stock. This includes open, high, low, close, and volume. optional arguments: - -t TICKER, --ticker TICKER - Ticker to analyze (default: None) - -q, --quarter Quarter fundamental data flag. (default: False) - -r, --ratios Shows percentage change of values. (default: False) - -p column, --plot column - Rows to plot, comma separated. (-1 represents invalid data) (default: None) - -h, --help show this help message (default: False) - --export EXPORT Export raw data into csv, json, xlsx (default: ) + --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 {alpha_vantage,cboe,fmp,intrinio,polygon,tiingo,tmx,tradier,yfinance} + The provider to use for the query, by default None. + If None, the provider specified in defaults is selected or 'alpha_vantage' if there is + no default. + -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. (default: None) - -l LIMIT, --limit LIMIT - Number of entries to show in data. (default: 5) - --source {FinancialModelingPrep,Polygon,AlphaVantage,EODHD,YahooFinance} - Data source to select from (default: FinancialModelingPrep) - -For more information and examples, use 'about income' to access the related guide. -``` + Name of excel sheet to save data to. Only valid for .xlsx files. -Within the source arguments it shows the available sources. An API key may be required to use a source, see this [page](/terminal/usage/data/api-keys) for insructions on obtaining and setting credentials. +required arguments: + --symbol SYMBOL [SYMBOL ...] + Symbol to get data for. Multiple comma separated items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance. -![Selecting a new Data Source](https://user-images.githubusercontent.com/85772166/233730763-54fd6400-f3ad-44a0-9c73-254d91ac2085.png) +alpha_vantage: + --adjustment {splits_only,splits_and_dividends,unadjusted} + The adjustment factor to apply. 'splits_only' is not supported for intraday data. + --extended_hours Include Pre and Post market data. + --adjusted This field is deprecated (4.1.5) and will be removed in a future version. Use 'adjustment' set as 'splits_and_dividends' instead. -The available sources for each command are displayed on the right of the command, and they can be distinguished by the square brackets and distinct font color group. By default, if the user doesn't specify `--source` the Terminal will use the first data provider displayed. +cboe: + --use_cache When True, the company directories will be cached for 24 hours and are used to validate symbols. The results of the function are not cached. Set as False to bypass. -### Setting Default Source Through Hub (easy) +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. -The default data vendor can be selected with more ease through the OpenBB Hub. Instructions can be found [here](/terminal/usage/hub). +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. -### Setting Default Source Through Terminal +yfinance: + --include_actions Include dividends and stock splits in results. + --prepost This field is deprecated (4.1.5) and will be removed in a future version. Use 'extended_hours' as True instead. -The default data source for each command (where multiple sources are available) can be defined within the [`/sources`](/terminal/usage/data/data-sources) menu. - -For example, changing the default data provider for the `income` command: - -```console -/sources/get --cmd stocks/fa/income -``` +For more information and examples, use 'about historical' to access the related guide. -```conole -Default : FinancialModelingPrep -Available : FinancialModelingPrep, Polygon, AlphaVantage, EODHD, YahooFinance ``` -Then, change the default data provider with the, `set`, command. For example, change the data provider to `Polygon` with -the following: +:::info +Each provider also brings the possibility of different arguments. For example, the `polygon` provider has the `--sort` and `--limit` arguments, while the `yfinance` provider has the `--include_actions` and `--prepost` arguments. +::: -```console -/sources/set --cmd stocks/fa/income --source Polygon -``` +The available providers for each command are displayed on the right of the command, and they can be distinguished by the square brackets and distinct font color group. By default, if the user doesn't specify `--provider` the CLI will use the first data provider displayed. -A confirmation message is displayed. +### Setting Default Sources -```console -Default data source for 'stocks/fa/income' set to 'Polygon'. -``` +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`. -Using, `get`, once more will confirm the update: +For example, changing the default data provider for the `/equity/price/historical` command would be adding the following line to the user configuration file: -```console -/sources/get --cmd stocks/fa/income -``` - -```console -Default : Polygon -Available : Polygon, FinancialModelingPrep, AlphaVantage, EODHD, YahooFinance +```json +{ + ... + "defaults": {"routes": {"equity/price/historical": {"provider":"yfinance"}}} + ... +} ``` diff --git a/website/content/cli/usage/outputs/export-data.md b/website/content/cli/usage/outputs/export-data.md index 083e3850a72d..411005ba9666 100644 --- a/website/content/cli/usage/outputs/export-data.md +++ b/website/content/cli/usage/outputs/export-data.md @@ -24,6 +24,10 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; The OpenBB Terminal offers a variety of ways to export financial data. This can be to a text-based file - XLSX, CSV or JSON - or as images - PNG, JPG, PDF and SVG. +:::note +Note that the commands and menus may vary. +::: + To export as a spreadsheet, `xlsx`, add `--export xlsx` to the command. ```console diff --git a/website/content/cli/usage/outputs/interactive-charts.md b/website/content/cli/usage/outputs/interactive-charts.md index 4cb34f49aef8..36960dac1a08 100644 --- a/website/content/cli/usage/outputs/interactive-charts.md +++ b/website/content/cli/usage/outputs/interactive-charts.md @@ -20,7 +20,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; @@ -29,8 +29,18 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Short introduction on interactive charts" /> +:::note +Note that the commands and menus may vary. +::: + A common type of output in OpenBB are interactive charts which open in a separated window (due to our [open source PyWry](https://github.com/OpenBB-finance/pywry) technology). The OpenBB charting library provides interactive and highly customizable charts. +:::tip +Not all commands have a charting output, the ones that do, will display a chart argument (`--chart`), which will trigger the charting output instead of the default table output. + +Example: `equity/price/historical --symbol AAPL --chart` +::: +
Charting cheat sheet diff --git a/website/content/cli/usage/outputs/interactive-tables.md b/website/content/cli/usage/outputs/interactive-tables.md index f1258c87ab11..9b0deafe1293 100644 --- a/website/content/cli/usage/outputs/interactive-tables.md +++ b/website/content/cli/usage/outputs/interactive-tables.md @@ -21,7 +21,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; @@ -30,8 +30,16 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Short introduction on interactive tables" /> +:::note +Note that the commands and menus may vary. +::: + A common type of output in OpenBB are interactive tables which open in a separated window (utilizing our [open source PyWry](https://github.com/OpenBB-finance/pywry) technology). These provide methods for searching, sorting, filtering, exporting and even adapting settings directly on the table. +:::tip +All OpenBB Platform CLI results are displayed in interactive tables by default, unless the interactive model is disabled. +::: +
Table cheat sheet diff --git a/website/content/cli/usage/overview/commands-and-arguments.md b/website/content/cli/usage/overview/commands-and-arguments.md index 182fb3f29e24..d5859dcbcf88 100644 --- a/website/content/cli/usage/overview/commands-and-arguments.md +++ b/website/content/cli/usage/overview/commands-and-arguments.md @@ -2,7 +2,7 @@ title: Commands and arguments sidebar_position: 2 description: This documentation page includes a tutorial video that provides a short - introduction on commands and arguments for the OpenBB Terminal. It further explains + introduction on commands and arguments for the OpenBB Platform CLI. It further explains the help dialogue for functions, the auto-completion feature, and global commands such as help, about, support, cls, quit, exit, and reset. Also, tips for submitting support requests are provided. @@ -19,7 +19,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; @@ -28,37 +28,49 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Short introduction on commands and arguments" /> +:::note +Note that the commands and menus may vary. +::: ## Help arguments A help dialogue for any function at the current location is printed to the screen by typing `-h` or `--help` after the command. The information returned contains a short description of the function and all accepted arguments. For example the `news` command will return: ```console -(🦋) / $ news -h - -usage: news [-t TERM [TERM ...]] [-s SOURCES] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT] - -display news articles based on term and data sources - -options: - -t TERM [TERM ...], --term TERM [TERM ...] - search for a term on the news - -s SOURCES, --sources SOURCES - sources from where to get news from (separated by comma) +(🦋) /news/ $ company --help + +usage: company [--symbol SYMBOL [SYMBOL ...]] [--start_date START_DATE] [--end_date END_DATE] [--limit LIMIT] [--provider {benzinga,fmp,intrinio,polygon,tiingo,tmx,yfinance}] + [--date DATE] [--display {headline,abstract,full}] [--updated_since UPDATED_SINCE] [--published_since PUBLISHED_SINCE] [--sort {id,created,updated}] + [--order {asc,desc}] [--isin ISIN] [--cusip CUSIP] [--channels CHANNELS] [--topics TOPICS] [--authors AUTHORS] [--content_types CONTENT_TYPES] [--page PAGE] + [--source {yahoo,moody,moody_us_news,moody_us_press_releases}] [--sentiment {positive,neutral,negative}] [--language LANGUAGE] [--topic TOPIC] + [--word_count_greater_than WORD_COUNT_GREATER_THAN] [--word_count_less_than WORD_COUNT_LESS_THAN] [--is_spam] + [--business_relevance_greater_than BUSINESS_RELEVANCE_GREATER_THAN] [--business_relevance_less_than BUSINESS_RELEVANCE_LESS_THAN] [--offset OFFSET] [-h] + [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] + +Company News. Get news for one or more companies. + +optional arguments: + --symbol SYMBOL [SYMBOL ...] + Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp, intrinio, polygon, tiingo, tmx, yfinance. + --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. + --limit LIMIT The number of data entries to return. + --provider {benzinga,fmp,intrinio,polygon,tiingo,tmx,yfinance} + The provider to use for the query, by default None. + If None, the provider specified in defaults is selected or 'benzinga' if there is + no default. -h, --help show this help message - --export EXPORT Export raw data into csv, json, xlsx + --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. - -l LIMIT, --limit LIMIT - Number of entries to show in data. -For more information and examples, use 'about news' to access the related guide. ``` -To search for news containing the term, "Federal Reserve", you can use this command: +To search for news for a certain ticker, you can use this command: ```console -(🦋) / $ news --term Federal Reserve +(🦋) /news/ $ company --symbol aapl ``` @@ -66,96 +78,32 @@ To search for news containing the term, "Federal Reserve", you can use this comm ![Auto Complete](https://user-images.githubusercontent.com/85772166/233247702-f707531c-2c65-4380-a662-cd4bc2ae0199.png) -The OpenBB Terminal is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments. Note that a menu doesn't has arguments attached. +The OpenBB Platform CLI is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments. Note that a menu doesn't has arguments attached. This functionality dramatically reduces the number of key strokes required to perform tasks and, in many cases, eliminates the need to consult the help dialogue for reminders. Choices - where they are bound by a defined list - are searchable with the up and down arrow keys. - ## Global commands -These are commands that can be used throughout the terminal and will work regardless of the menu where they belong. +These are commands that can be used throughout the CLI and will work regardless of the menu where they belong. ### Help The `help` command shows the current menu you are in and all the commands and menus that exist, including a short description for each of these. -This is arguably one of the most helpful commands that the terminal. If you are familiar to navigating in a command line interface, it's the equivalent to `ls -ll`. - -### About - -The `about` command opens the browser to the OpenBB documentation pages for the specific command or menu. Note that this will depend on where the user is located within the terminal. - -```console -(🦋) / $ about stocks -``` - -The command above will open a browser to [Introduction to the Stocks menu](/terminal/menus/stocks). - -### Support - -The `support` command allows to submit a new request for support, a general question, or a bug report. The command will pre-populate a form with key information, like the command or menu name specific to the issue. Use the up and down arrow keys to browse and select the appropriate item for the ticket. - -![Support](https://user-images.githubusercontent.com/85772166/233577183-fbeb7be2-1d00-4ca0-86b3-42f1b71081e8.png) - -Naturally, this command has a help dialogue. - -```console -(🦋) / $ support -h - -Submit your support request - -options: - -c {search,load,quote,tob,candle,news,resources,codes,ta,ba,qa,disc,dps,scr,sia,ins,gov,res,dd,fa,bt,ca,options,th,forecast}, --command {generic,search,load,quote,tob,candle,news,resources,codes,ta,ba,qa,disc,dps,scr,sia,ins,gov,res,dd,fa,bt,ca,options,th,forecast} - Command that needs support (default: None) - --msg MSG [MSG ...], -m MSG [MSG ...] - Message to send. Enclose it with double quotes (default: ) - --type {bug,suggestion,question,generic}, -t {bug,suggestion,question,generic} - Support ticket type (default: generic) - -h, --help show this help message (default: False) -``` - -An example of a valid support ticket could be: - -```console -/stocks/ $ support search --type question --msg "How do I find stocks from India with OpenBB?" -``` - -The command opens a browser window to a pre-populated form on the OpenBB website. If you are signed-in to the Hub, all that is left to do is click `Submit`. - -![Submit Form](https://user-images.githubusercontent.com/85772166/233577448-3e426a88-d0cf-4338-8f4c-21b9fd01d8b2.png) - -PS: The answer to this question is: - -```console -(🦋) /stocks/ $ search --country india --exchange-country india -``` - -:::note -Tips for submitting a support request: - -- Tell us what version number is installed. -- Tell us what operating system and version the machine has. -- What is the installation type? Installer, Source, PyPi, Docker, other? -- Tell us the command and parameter combination causing the error. -- Tell us what symbol (ticker) is, or was trying to be, loaded. -- Show us the complete error message. -- Let us know any contextual information that will help us replicate and accurately identify the problem. -::: +This is arguably one of the most helpful commands that the CLI. If you are familiar to navigating in a command line interface, it's the equivalent to `ls -ll`. ### CLS -The `cls` command clears the entire terminal screen. +The `cls` command clears the entire CLI screen. ### Quit -The `quit` command (can also use `q` or `..`) allows to leave the current menu to go one menu above. If the user is on the root, that will mean leaving the terminal. +The `quit` command (can also use `q` or `..`) allows to leave the current menu to go one menu above. If the user is on the root, that will mean leaving the CLI. ### Exit -The `exit` command allows the user to exit the terminal. +The `exit` command allows the user to exit the CLI. ### Reset -The `reset` command (or `r`) allows a developer that is using the terminal through source code to quickly test it's code changes by re-starting the terminal with the code changes. This allows to improve speed of development. - -For more information on contributing to the OpenBB Terminal read our [contribution guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/blob/main/CONTRIBUTING.md). +The `reset` command (or `r`) allows a developer that is using the CLI through source code to quickly test it's code changes by re-starting the CLI with the code changes. This allows to improve speed of development. diff --git a/website/content/cli/usage/overview/customizing-the-terminal.md b/website/content/cli/usage/overview/customizing-the-terminal.md index 04a144d366aa..fc28ebbe2b76 100644 --- a/website/content/cli/usage/overview/customizing-the-terminal.md +++ b/website/content/cli/usage/overview/customizing-the-terminal.md @@ -2,116 +2,40 @@ title: Customization sidebar_position: 4 description: This documentation page details the functionality of the Settings Menu - and the Feature Flags Menu in the OpenBB Terminal. It instructs users how to customize - the Terminal, alter its behaviour, and manipulate various environment variables. + and the Feature Flags Menu in the OpenBB Platform CLI. It instructs users how to customize + the CLI, alter its behaviour, and manipulate various environment variables. keywords: - Settings Menu - Feature Flags Menu -- customize Terminal -- alter Terminal behaviour +- customize CLI +- alter CLI behaviour - environment variables - Documentation +- OpenBB Platform CLI --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - -The OpenBB Terminal contains two menus for altering the behaviour and presentation of the Terminal, Settings and Feature Flags, both of which are accessed from the main menu. -
- + ## Settings Menu -The `/settings` menu provides methods for customizing the look of the Terminal. +The `/settings` menu provides methods for customizing the look of the CLI. | Setting | Description | | :----------- | :--------------------------------------------------------------- | -| `chart` | Select the chart style. | -| `colors` | Sets the color scheme for Terminal fonts. | -| `dt` | Add or remove date and time from the Terminal command line. | | `flair` | Sets the flair emoji to be used. | -| `height` | Set the default plot height. | -| `lang` | Select the language for the Terminal menus and commands. | -| `source` | Use an alternate data sources file. (Not recommended to change.) | -| `table` | Select the table style. | -| `tz` | Select a timezone. | -| `userdata` | Change the local path to the OpenBBUserData folder. | -| `width` | Set the default plot width. | - -### Style example - -Set charts and tables styles as light or dark mode. - -```console -/settings/table -s light -``` - -```console -/settings/chart -s dark -``` - -### Timezone example - -Set the local timezone for the Terminal - -```console -/settings/tz Africa/Johannesburg -``` - -## Feature Flags Menu - -The `/featflags` menu provides methods for altering the behaviour and responses with environment variables. These configurations are on/off, and the status is indicated by the red/green text of each. Each parameter is listed below. - -| Feature | Description | -| :----------- | :---------------------------------------------------------------------------------------------- | +| `language` | Select the language for the CLI menus and commands. | +| `timezone` | Select a timezone. | +| `n_rows` | Set the number of rows to display in the CLI's interactive tables. | +| `n_cols` | Set the number of columns to display in the CLI's interactive tables. | | `cls` | Clear the screen after each command. Default state is off. | | `exithelp` | Automatically print the screen after navigating back one menu. Default state is off. | -| `interactive` | Enable/disable interactive tables. Disabling prints the table directly on the Terminal screen. | +| `interactive` | Enable/disable interactive tables. Disabling prints the table directly on the CLI screen. | | `overwrite` | Automatically overwrite exported files with the same name. Default state is off. | | `promptkit` | Enable auto complete and history. Default state is on. | | `rcontext` | Remember loaded tickers while switching menus. Default state is on. | | `retryload` | Retries misspelled commands with the load function first. Default state is off. | -| `reporthtml` | Generate reports as HTML files. Default state is on. | | `richpanel` | Displays a border around menus. Default state is on. | | `tbhint` | Display usage hints in the bottom toolbar. Default state is on. | | `version` | Displays the currently installed version number in the bottom right corner. | - -### Interactive example - -When it is off, the Terminal displays all tables directly on the screen instead of opening a window. - -```console -/stocks/quote spy -``` - -| | SPY | -|:-------------------|:----------------------------| -| day_low | 434.87 | -| day_high | 438.09 | -| symbol | SPY | -| name | SPDR S&P 500 ETF Trust | -| price | 437.25 | -| changes_percentage | 0.0732 | -| change | 0.32 | -| year_high | 459.44 | -| year_low | 373.61 | -| market_cap | 401300183873.0 | -| price_avg50 | 433.4872 | -| price_avg200 | 424 | -| volume | 56366265 | -| avg_volume | 83194937 | -| exchange | AMEX | -| open | 437.55 | -| previous_close | 436.93 | -| eps | 19.851322 | -| pe | 22.03 | -| shares_outstanding | 917782010 | -| date | 2023-11-08 21:00 | - -### Overwrite - -Enable this feature flag to remove the prompt when exporting a file with the same name. This will only overwrite an existing `XLSX` file if the `--sheet-name` is not defined. - -### Exithelp - -Enabling this prints the parent menu on the screen when navigating back from a sub-menu. diff --git a/website/content/cli/usage/overview/structure-and-navigation.md b/website/content/cli/usage/overview/structure-and-navigation.md index 4128238351a4..1a867eed689f 100644 --- a/website/content/cli/usage/overview/structure-and-navigation.md +++ b/website/content/cli/usage/overview/structure-and-navigation.md @@ -1,13 +1,14 @@ --- title: Structure and Navigation sidebar_position: 1 -description: Learn about the OpenBB Terminal, an interactive Command Line Interface +description: Learn about the OpenBB Platform CLI, an interactive Command Line Interface application. Understand the structure and navigation of the terminal, functions or commands input via a keyboard, and the presentation of results in the form of interactive charts, tables, or text. Get introduced to terminal commands, terminal menus, OpenBB Hub's theme style, and the concept of absolute paths. keywords: - CLI application +- OpenBB Platform CLI - terminal structure - Terminal navigation - Command Line Interface @@ -31,7 +32,11 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Short introduction to terminal structure" /> -The OpenBB Terminal is a Command Line Interface (CLI) application. Functions (commands) are called through the keyboard with results returned as charts, tables, or text. Charts and tables (if enabled) are displayed in a new window, and are fully interactive, while text prints directly to the Terminal screen. +:::note +Note that the commands and menus may vary. +::: + +The OpenBB Platform CLI is a Command Line Interface (CLI) application. Functions (commands) are called through the keyboard with results returned as charts, tables, or text. Charts and tables (if enabled) are displayed in a new window, and are fully interactive, while text prints directly to the Terminal screen. ![The Home Screen](https://user-images.githubusercontent.com/85772166/233247655-2f8d0dae-be68-48ca-9b35-123b5b985cb6.png) @@ -39,9 +44,9 @@ A menu is a collection of commands (and sub-menus). A menu can be distinguished ## Navigation -Navigating through the Terminal menus is similar to traversing folders from any operating system's command line prompt. The `/home` screen is the main directory where everything begins, and the menus are paths branched from the main. Instead of `C:\Users\OpenBB\Documents`, you'll have something like `/stocks/options`. Instead of `cd ..`, you can do `..` to return the menu right above. To go back to the root menu you can do `/`. +Navigating through the CLI menus is similar to traversing folders from any operating system's command line prompt. The `/home` screen is the main directory where everything begins, and the menus are paths branched from the main. Instead of `C:\Users\OpenBB\Documents`, you'll have something like `/equity/price`. Instead of `cd ..`, you can do `..` to return the menu right above. To go back to the root menu you can do `/`. -Absolute paths are also valid to-and-from any point. From the [`/stocks/options`](/terminal/menus/stocks/options) menu, you can go directly to [`crypto`](/terminal/menus/crypto) menu with: `/crypto`. Note the forward slash at the start to denote the "absolute" path. +Absolute paths are also valid to-and-from any point. From the `/equity/price` menu, you can go directly to `crypto` menu with: `/crypto`. Note the forward slash at the start to denote the "absolute" path. +:::note +Note that the commands and menus may vary. +::: + Community routines will enable the community to share their investment research routines and streamline everyone's investment research workflow. This is where you can find them: [https://my.openbb.co/app/terminal/community-routines/new](https://my.openbb.co/app/terminal/community-routines/new?size=25&tags=&page=1) diff --git a/website/content/cli/usage/routines/index.mdx b/website/content/cli/usage/routines/index.mdx index 969e4b11263e..25e4d88b0377 100644 --- a/website/content/cli/usage/routines/index.mdx +++ b/website/content/cli/usage/routines/index.mdx @@ -3,39 +3,34 @@ title: Routines --- import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; +import HeadTitle from "@site/src/components/General/HeadTitle.tsx";
    - - + - - + - + - + + />
diff --git a/website/content/cli/usage/routines/introduction-to-routines.md b/website/content/cli/usage/routines/introduction-to-routines.md index 13e968a88ab5..f2e460a0a54f 100644 --- a/website/content/cli/usage/routines/introduction-to-routines.md +++ b/website/content/cli/usage/routines/introduction-to-routines.md @@ -17,7 +17,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; @@ -26,6 +26,10 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Show short introduction to OpenBB routines" /> +:::note +Note that the commands and menus may vary. +::: + ## Introduction OpenBB Routines allows users to capture and write simple scripts for automating processes and repetitive tasks. In essence, these are text plain-text files that can be created or modified in any basic text editor with the only difference being the `.openbb` extension. @@ -68,31 +72,28 @@ For more information and examples, use 'about exe' to access the related guide. The most basic script style contains 2 main elements: - **Comments**: any text after a hashtag (`#`) is referred to as a comment. This is used to explain what is happening within the line below and is ignored when the file is executed. -- **Commands**: any text *without* a hashtag is being run inside the OpenBB Terminal as if the user had prompted that line in the terminal. Note that this means that you are able to create a pipeline of commands in a single line, i.e. `stocks/load AAPL/candle --ma 20` is a valid line for the script. +- **Commands**: any text *without* a hashtag is being run inside the OpenBB Terminal as if the user had prompted that line in the terminal. Note that this means that you are able to create a pipeline of commands in a single line, i.e. `equity/price/historical --symbol --provider fmp` is a valid line for the script. For instance, the text below corresponds to the example file that OpenBB provides. ```console # Go into the stocks context -stocks +equity/price # Load a company ticker, e.g. Apple -load AAPL +historical --symbol AAPL # Show a candle chart with a 20 day Moving Average -candle --ma 20 +/technical/ema --length 20 # Switch over to the Fundamental Analysis menu -fa - -# Show Earnings per Share (EPS) estimates -epsfc +/equity/fundamental -# Show price targets charts -pt +# Show balance sheet +balance --symbol aapl -# Show future estimations -est +# Show cash flow statement +cash --symbol aapl # Return to home home @@ -107,7 +108,3 @@ As a starting point, let's use the example above. 2. Move the file inside the `routines` folder within the [OpenBBUserData](/terminal/usage/data/custom-data) folder and, optionally, adjust the name to your liking. 3. Open up the OpenBB Terminal, and type `exe --file routines_template`. If you changed the name of the file, then replace, `routines_template`, with that. As long as the file remains in the `~/OpenBBUserData/routines` folder, OpenBB Terminal's auto-completer will provide it as a choice. - -When this routine is run, a candle chart with a moving average of 20 days, expectations and price targets from analysts and estimated future performance should pop up before returning to the home window. - -![OpenBB Routine Script Execution](https://user-images.githubusercontent.com/46355364/223207167-dfab3a74-d34d-47d4-bf6e-44944e8fbfa2.png) diff --git a/website/content/cli/usage/routines/overlay-financial-data.md b/website/content/cli/usage/routines/overlay-financial-data.md deleted file mode 100644 index e8f5e8d78076..000000000000 --- a/website/content/cli/usage/routines/overlay-financial-data.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: Overlay Financial Data -sidebar_position: 3 -description: Guide to improve financial data comparison and visualization using the - 'hold on' command in OpenBBTerminal. Covers overlaying data on the same axes, customizing - chart legends and titles, analyzing FAANG companies and GDP/CPI data, and more. -keywords: -- hold on command -- overlay financial data -- same axis plotting -- customizing charts -- financial data comparison -- MatLab -- financial charts -- FAANG companies -- CPI -- GDP -- data visualization ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -## Hold on command - -Often analysts want to be able to overlay financial data. This is possible through the introduction of the `hold on` command. - -The `hold` functionality is available to allow users to overlay multiple datasets onto the same chart axes. This is useful for comparing datasets, or for plotting multiple datasets that share the same x-axis. This guide will walk through the functionalities and the recommended workflow. - -Drawing inspiration from MatLab, the `hold` function is used to toggle the holding state of the current figure. Unlike MatLab, this function needs to be called before calling any function that charts. The hold state can be turned on, from any terminal menu, by running: - -```console -hold on -``` - -By default, new plots will be placed on a new axis, meaning comparing the magnitude values can be tricky. If you wish to plot subsequent figures on the same axis, you can use the sameaxis argument: - -```console -hold on --sameaxis -``` - -Once the hold state is turned on, any terminal command with a plot will not be shown until the hold is turned off. To turn off the hold state, and see the combined figure, run: - -```console -hold off -``` - -An example workflow is as follows. What this will do is plot the CPI and the GDP of the United States on the same axis. - -```console -/economy/hold on -gdp -c united_states -cpi -c united_states -hold off -``` - -Which outputs: - -![hold on ex1](https://github.com/OpenBB-finance/OpenBBTerminal/assets/18151143/a3b1f09e-1a64-4af0-a5a2-070590d848e1) - -To demonstrate, the `--sameaxis` argument, we can run the previous commands, but starting with `hold on --sameaxis`. Because GDP is being measured by USD-per-capita (OECD), and CPI is a function of percent, we will only see CPI as a flat line. - -![hold on ex2](https://github.com/OpenBB-finance/OpenBBTerminal/assets/18151143/43219ca7-126b-4782-bd95-5fa8967e0c6c) - -## Customizing Charts - -A chart is only as good as its labelling. In the previous example, we can see that the legends reflected the command paths used, but not the arguments. If we added a second country, we would not be able to tell which line is which country. In order to avoid this confusion, when the hold state is on, every function comes with a `--legend` argument. - -Text following the, `--legend`, argument is passed into the legend when the chart is created. If a command is run without the, `--legend`, argument, it will default to using the command location. In rare cases, a legend may not appear due to it not being defined in the functions `view` file. In this case, please raise a [GitHub issue](https://github.com/OpenBB-finance/OpenBBTerminal/issues/new/choose) so the team can address it. - -An additional customization is the chart title. This can be specified by adding the `--title` argument to the hold off functionality. To exemplify these capabilities, we can plot an income statement item from many companies. We will examine FAANG companies and plot their revenues on the same axis, over the last forty quarters. - -```console -/stocks/fa/hold on --sameaxis -income -t AAPL -q -l 40 --plot revenue --legend AAPL Revenue -income -t META -q -l 40 --plot revenue --legend META -income -t AMZN -q -l 40 --plot revenue -income -t GOOG -q -l 40 --plot revenue --legend GOOG -income -t NFLX -q -l 40 --plot revenue --legend netflix -hold off --title FAANG Revenues 10 Year -``` - -![hold on custom](https://github.com/OpenBB-finance/OpenBBTerminal/assets/18151143/793d8309-6e49-42ca-b9bd-ff0dad9da959) - -### Example as a Pipeline of Commands - -The following pipeline of commands is the equivalent. - -```console -/stocks/fa/hold on --sameaxis/income -t AAPL -q -l 40 --plot revenue --legend AAPL Revenue/income -t META -q -l 40 --plot revenue --legend META/income -t AMZN -q -l 40 --plot revenue/income -t GOOG -q -l 40 --plot revenue --legend GOOG/income -t NFLX -q -l 40 --plot revenue --legend netflix/hold off --title FAANG Revenues 10 Year -``` - -### Example as a Routine - -Or, a user can create a routine that can be run with the, `/exe`, command. - -```bash - $STOCKS=AAPL,AMZN,MSFT,TSLA,GOOG - - stocks - fa - hold on --sameaxis - - foreach $$tick in $STOCKS: - income -t $$tick -l 40 -q --plot revenue --legend $$tick revenue - end - - hold off--title FAANG Revenues 10 Year -``` - -### Known Issues - -Unfortunately, there are some known issues with the hold functionality. These are being worked on, and will be addressed in future releases. The following are known issues: - -- When plotting charts, if the x axes are not the same, there may be an undesired result. For example, if looking at the `fixedincome/ycrv` function, the x axes is a number in years, so trying to plot a date along x will not work. - -- Candle charts are not supported within the hold state. A work around to plot a close value would be to navigate to `qa/pick Close/line`, which will plot a line chart. - -- Figures that have subplots on their own are not supported. This functionality is meant to overlay data on the same axes, so if there are multiple subplots, it is not supported. An example would be a function like `ta/macd`. The TA functions already have a multiple indicator functionality, `ta/multi`. - -- Running a single plot in the hold state messes with the figure layout and does not give the desired margin. - -- Time series data of varying frequencies may not produce smooth visuals. diff --git a/website/content/cli/usage/routines/pipeline-of-commands.md b/website/content/cli/usage/routines/pipeline-of-commands.md index 72b4fbe738ff..e1609032241e 100644 --- a/website/content/cli/usage/routines/pipeline-of-commands.md +++ b/website/content/cli/usage/routines/pipeline-of-commands.md @@ -1,7 +1,7 @@ --- title: The Pipeline of Commands sidebar_position: 1 -description: This page provides a detailed explanation of the OpenBB Terminal command pipeline. +description: This page provides a detailed explanation of the OpenBB Platform CLI command pipeline. The tutorial video and walkthrough guides users in automating their investment research process by using single commands, and sequences of commands, to manipulate and study data. @@ -28,7 +28,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; @@ -37,60 +37,42 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Short video on pipeline of commands" /> +:::note +Note that the commands and menus may vary. +::: + ## Single Command -If you have a good understanding of the Terminal's architecture, you will recognize that commands and menus are organized in the form of a tree. +If you have a good understanding of the Platform CLI's architecture, you will recognize that commands and menus are organized in the form of a tree. ![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/a5f10833-9693-4b39-9491-b431919db828) -If the intention is to explore an equity, enter at base of the menu (`/stocks/`), then browse or navigate towards the point of interest - for example, Dark Pools (`/stocks/dps`). +If the intention is to explore an equity, enter at base of the menu (`/equity/`), then browse or navigate towards the point of interest - for example, Dark Pools (`/equity/darkpool`). While all the information is in one place, having to type one command at a time is far from optimal. -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/41737800-7c60-48ad-a43d-814016d81762) - ## Pipeline of Commands -One of the main objectives of the OpenBB Terminal was the ability to automate a user's investment research workflow - not just a single command, but the complete process. This is where the pipeline of commands comes in, running a sequence of commands. - -The example above can be recreated by running: - -```console -/stocks/load GME/dps/psi -``` - -Which looks like: +One of the main objectives of the OpenBB Platform CLI was the ability to automate a user's investment research workflow - not just a single command, but the complete process. This is where the pipeline of commands comes in, running a sequence of commands. -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/c21c5452-5a67-4384-851c-d2801b60f8cd) - -Another example is: +An example of a pipeline of commands is: ```console -/stocks/load GME/dps/psi/../fa/pt/income/../ins/stats +/equity/price/historical --symbol AAPL/../../technical/ema --data 0 --length 50 ``` -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/61db4010-bdc2-4851-9e47-79fb4425b816) +Which will perform a exponential moving average (`ema`) on the historical price of Apple (`AAPL`). ### Step-by-Step Explanation -```console -/stocks/load amzn/ta/macd/ema -l 50,200/../dps/psi -``` - This will do the following: -1. `stocks` - Go into `stocks` menu - -2. `load amzn` - Load Amazon's stock inside stock menu - -3. `ta` - Go into Technical Analysis (`ta`) menu - -4. `macd` - Run the moving average convergence/divergence indicator (`macd`) on the stock price loaded (i.e. `amzn`) +1. `equity` - Go into `equity` menu -5. `ema -l 50,200` - Run the exponential moving average indicator with windows of length 50 and 200 (`ema -l 50,200`) on the stock price loaded (i.e. `amzn`) +2. `price` - Go into `price` sub-menu -6. `..` - Go one menu up +3. `historical --symbol AAPL` - Load historical price data for Apple -7. `dps` - Go into Dark pool and Short (`dps`) menu +4. `technical` - Go into Technical Analysis (`technical`) menu -8. `psi` - Go into Price vs Short interest (`psi`) menu +5. `ema --data 0 --length 50` - Run the exponential moving average indicator with windows of length 50 (`--length 50`) on the last cached result (`--data 0`) diff --git a/website/content/cli/usage/routines/routine-macro-recorder.md b/website/content/cli/usage/routines/routine-macro-recorder.md index b3fcb62d764a..64d8719351df 100644 --- a/website/content/cli/usage/routines/routine-macro-recorder.md +++ b/website/content/cli/usage/routines/routine-macro-recorder.md @@ -19,7 +19,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; @@ -28,9 +28,13 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Short video on recording commands to create routine" /> +:::note +Note that the commands and menus may vary. +::: + OpenBB script routines can be captured with the macro recorder, controlled with global commands, `record` to start saving commands and `stop` to terminate the recording. This shares similarities with that of Excel's VBA methods. This means that any command you run will be automatically recorded for the routine script and once you type `stop` it automatically saves the file to the `~/OpenBBUserData/routines/` folder. -For example, if you copy and paste the following prompt in the OpenBB Terminal and press enter, you will see an example. +For example, if you copy and paste the following prompt in the OpenBB Platform CLI and press enter, you will see an example. ```console /record/economy/cpi/treasury/index sp500/stop @@ -42,6 +46,6 @@ The following shows the output from this pipeline of commands. Because there was a `record` and `stop` at the `start` and `end` respectively, a routine script was created. This file cane be found inside the `routines` folder within the `OpenBBUserData` folder (more on exporting and import data [here](/terminal/usage/data/custom-data)). -Now, you should be able to access the routine file from the terminal main menu by doing `/exe --file` and using the auto-completer. Note that the naming of the file will differ for you based on the time you are executing the script. +Now, you should be able to access the routine file from the CLI main menu by doing `/exe --file` and using the auto-completer. Note that the naming of the file will differ for you based on the time you are executing the script. ![Routines](https://user-images.githubusercontent.com/46355364/223205394-77e7a33d-e9fa-4686-b32f-e8d183b265e6.png) diff --git a/website/content/cli/usage/routines/routines-for-power-users.md b/website/content/cli/usage/routines/routines-for-power-users.md index f370cefba3fd..d40594a7c6e5 100644 --- a/website/content/cli/usage/routines/routines-for-power-users.md +++ b/website/content/cli/usage/routines/routines-for-power-users.md @@ -23,7 +23,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; @@ -32,21 +32,25 @@ import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; videoLegend="Short video on what power users can do with routines" /> +:::note +Note that the commands and menus may vary. +::: + ## Input Variables When utilizing basic routines capabilities, users had to create separate routines for each specific ticker, such as `my_due_diligence_AAPL.openbb` or `my_due_diligence_TSLA.openbb`. This approach was suboptimal, considering that we had control over reading these scripts and they were meant to be used within our ecosystem. -To address this limitation, we introduced the concept of arguments, inspired by the Perl language. These arguments are variables referenced within the `.openbb` script as `$ARGV` or `$ARGV[0]`, `$ARGV[1]`, and so on. They are provided in the terminal when running `exe` by adding the `--input` flag, followed by the variables separated by commas. +To address this limitation, we introduced the concept of arguments, inspired by the Perl language. These arguments are variables referenced within the `.openbb` script as `$ARGV` or `$ARGV[0]`, `$ARGV[1]`, and so on. They are provided in the CLI when running `exe` by adding the `--input` flag, followed by the variables separated by commas. For instance, if a routine file called `script_with_input.openbb` had the following format: ![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/5b0f558e-ace0-423d-a3db-b6369755cffb) -And we run it in the terminal with `exe —file script_with_input.openbb —input MSFT`, what would be run would be `stocks/load MSFT --start 2015-01-01/ta/ema -l 20,50,100,200` and so you could use the same routine for multiple tickers - **making it a more powerful automated workflow**. +And we run it in the CLI with `exe —file script_with_input.openbb —input MSFT`, what would be run would be `stocks/load MSFT --start 2015-01-01/ta/ema -l 20,50,100,200` and so you could use the same routine for multiple tickers - **making it a more powerful automated workflow**. For instance, the example below shows how you can run the same script for MSFT but also TSLA ticker. -And we run it in the terminal with exe —file script_with_input.openbb —input MSFT, what would be run would be stocks/load MSFT --start 2015-01-01/ta/ema -l 20,50,100,200 and so you could use the same routine for multiple tickers - making it a more powerful automated workflow. +And we run it in the CLI with exe —file script_with_input.openbb —input MSFT, what would be run would be stocks/load MSFT --start 2015-01-01/ta/ema -l 20,50,100,200 and so you could use the same routine for multiple tickers - making it a more powerful automated workflow. For instance, the example below shows how you can run the same script for `MSFT` but also `TSLA` ticker. From bb5977cf37adc0d4a70c1f5b1d9781e89642db18 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Thu, 2 May 2024 17:18:39 +0100 Subject: [PATCH 03/25] remove unused feat flags --- cli/openbb_cli/controllers/feature_flags_controller.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cli/openbb_cli/controllers/feature_flags_controller.py b/cli/openbb_cli/controllers/feature_flags_controller.py index d6de826964bd..1bf95b4fbd74 100644 --- a/cli/openbb_cli/controllers/feature_flags_controller.py +++ b/cli/openbb_cli/controllers/feature_flags_controller.py @@ -21,13 +21,9 @@ class FeatureFlagsController(BaseController): CHOICES_COMMANDS: List[str] = [ "retryload", - "tab", "interactive", "cls", - "watermark", "promptkit", - "thoughts", - "reporthtml", "exithelp", "rcontext", "richpanel", From 768a24ee77dd247bc7af74e04b556b7a71e6ca5e Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Thu, 2 May 2024 17:21:52 +0100 Subject: [PATCH 04/25] typo --- website/content/cli/usage/hub.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/cli/usage/hub.md b/website/content/cli/usage/hub.md index cd42a01270b2..4b05d7551b77 100644 --- a/website/content/cli/usage/hub.md +++ b/website/content/cli/usage/hub.md @@ -54,7 +54,7 @@ If an API key is updated in the Hub while the OpenBB Terminal is running, you wi Theme styles correspond to the ability to change your terminal "skin" (i.e. coloring of the `menu`, `commands`, `data source`, `parameters`, `information` and `help`), the charts and tables style. -In the OpenBB Hub, you have the ability to change your preferred themes for the CLI. After costumizing as intended, you can then download the theme and apply it to the CLI by adding it to you styles directory (`/home/your-user/OpenBBUserData/styles/user`). +In the OpenBB Hub, you have the ability to change your preferred themes for the CLI. After customizing as intended, you can then download the theme and apply it to the CLI by adding it to you styles directory (`/home/your-user/OpenBBUserData/styles/user`). ## Script Routines From 5c298f1cbd04945fc12f755684db2954e124bf51 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 7 May 2024 17:04:08 -0700 Subject: [PATCH 05/25] yeet stuff that can't be used --- website/content/cli/_category_.json | 2 +- website/content/cli/index.md | 4 - website/content/cli/installation.md | 121 ++---------------- .../cli/usage/commands-and-arguments.md | 58 +++++++++ .../customizing-the-terminal.md | 8 +- website/content/cli/usage/data/api-keys.md | 4 +- .../content/cli/usage/data/data-sources.md | 68 +++------- .../{custom-data.md => openbbuserdata.md} | 10 +- website/content/cli/usage/hub.md | 9 -- .../cli/usage/keyboard-hotkey-macros.md | 45 ------- .../content/cli/usage/outputs/export-data.md | 19 +-- .../cli/usage/outputs/interactive-charts.md | 13 +- .../cli/usage/outputs/interactive-tables.md | 12 +- .../usage/overview/commands-and-arguments.md | 109 ---------------- .../cli/usage/routines/community-routines.md | 63 +-------- .../routines/introduction-to-routines.md | 21 +-- .../usage/routines/pipeline-of-commands.md | 30 +---- .../usage/routines/routine-macro-recorder.md | 19 +-- .../routines/routines-for-power-users.md | 119 ++--------------- .../structure-and-navigation.md | 27 +--- 20 files changed, 124 insertions(+), 637 deletions(-) create mode 100644 website/content/cli/usage/commands-and-arguments.md rename website/content/cli/usage/{overview => }/customizing-the-terminal.md (86%) rename website/content/cli/usage/data/{custom-data.md => openbbuserdata.md} (71%) delete mode 100644 website/content/cli/usage/overview/commands-and-arguments.md rename website/content/cli/usage/{overview => }/structure-and-navigation.md (59%) diff --git a/website/content/cli/_category_.json b/website/content/cli/_category_.json index 063f9e91bfd8..b81b612f4ece 100644 --- a/website/content/cli/_category_.json +++ b/website/content/cli/_category_.json @@ -1,4 +1,4 @@ { - "label": "OpenBB Platform CLI", + "label": "OpenBB CLI", "position": 2 } diff --git a/website/content/cli/index.md b/website/content/cli/index.md index bc6484eed42b..78eb5fe175d2 100644 --- a/website/content/cli/index.md +++ b/website/content/cli/index.md @@ -17,10 +17,6 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -The OpenBB Platform CLI is a command line interface that enhances the OpenBB Platform by providing easy access to its comprehensive data connectors and libraries. These tools are essential for designing and constructing financial reports and applications. As a robust tool, the CLI facilitates interaction with the platform, enabling users to retrieve and process data from third-party providers and create customized financial reports and applications. - -![Platform Docs pic](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/74520441-5e95-4ba6-9d16-6a2d5c966cf9) - ## What is the OpenBB Platform CLI? The OpenBB Platform CLI is a wrapper around the OpenBB Platform, this means that one can expect it to have the same functionalities that the OpenBB Platform offers with the enhancements and limitations that a command line interface brings. The CLI is designed to be user-friendly and intuitive, making it easy for users to interact with the platform and access its pre-built data connectors and libraries. diff --git a/website/content/cli/installation.md b/website/content/cli/installation.md index 1a7c71bc6bc8..5eff2c44cc83 100644 --- a/website/content/cli/installation.md +++ b/website/content/cli/installation.md @@ -8,130 +8,35 @@ description: This page presents the general system requirements, supported envir keywords: - OpenBB Platform - Python -- System requirements -- Supported environments -- Installation -- Docker -- Python virtual environment -- Installation from source -- Windows 10 -- Mac OS Big Sur -- Linux -- Package installation -- VS Code -- PyCharm -- Jupyter -- GitHub -- Conda -- venv -- API -- Repository +- CLI +- installation - pip -- Poetry -- Toml -- PyPI -- Node.js -- npm +- pypi + --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - -## General Requirements and Environments - -Since the OpenBB Platform CLI is a wrapper around the OpenBB Platform, its requirements are the same. Please refer to the [OpenBB Platform install documentation](/platform/installation) for more information. - -## Installation + -Before installation, update the package manager so that `pip` is current, then create the environment with the desired version of Python. - -:::note -Installing packages directly to the system Python or `base` environment is not recommended. Create a new environment first (can be any name, using openbb here for example). - -```bash -conda create -n openbb-cli python=3.11 -conda activate openbb-cli -``` - -::: +The OpenBB CLI is a wrapper around the OpenBB Platform, its requirements are the same and its components rely on your specific configuration of installed components. Please refer to the [OpenBB Platform install documentation](/platform/installation) for more information. ### PyPI -Install from PyPI with: +Within your existing OpenBB environment, install `openbb-cli` with: ```console pip install openbb-cli ``` -This will install the core OpenBB Platform CLI, along with officially supported Platform's extensions and providers. - -#### Extensions - -To install all extensions and providers (both officially supported and community maintained ones): - -```console -pip install openbb[all] -``` - -To install a single extension: - -```console -pip install openbb[charting] -``` - -```console -pip install openbb[ta] -``` - -Or install a single provider: - -```console -pip install openbb[yfinance] -``` - -### Source - -To build the OpenBB Platform from the source code, first install `git`: - -```console -pip install git -``` - -Next, clone the repository from GitHub: - -```console -git clone git@github.com:OpenBB-finance/OpenBBTerminal.git -``` - -When it is done, checkout the branch where the code is living: - -```console -git checkout develop -``` - -Then, `cd` into the directory: - -```console -cd cli -``` +:::info +If you do not already have the OpenBB Platform packages installed, this will install the Core packages +::: -Install required packages +The installation script adds `openbb` to the PATH within your Python environment. The application can be launched from any path, as long as the environment is active. ```console -pip install poetry -``` - -Finally, run `poetry` to install all dependencies: +openbb -```console -poetry install +Welcome to OpenBB Platform CLI v1.0.0 ``` - -## Post-Installation - -You're ready to launch the OpenBB Platform CLI. To do so, run the following command: - -```console -openbb -``` \ No newline at end of file diff --git a/website/content/cli/usage/commands-and-arguments.md b/website/content/cli/usage/commands-and-arguments.md new file mode 100644 index 000000000000..ea9afd37da0d --- /dev/null +++ b/website/content/cli/usage/commands-and-arguments.md @@ -0,0 +1,58 @@ +--- +title: Commands And Arguments +sidebar_position: 2 +description: This page explains how to enter commands and arguments into the OpenBB CLI. +keywords: +- help arguments +- auto-complete +- global commands +- support command +- reset command +- command line interface +- metadata +- cli +- parameters +- functions +- commands +- options +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + + +## Help arguments + +The `help` command shows the current menu you are in and all the commands and menus that exist, including a short description for each of these. + +This is arguably one of the most helpful commands that the CLI. If you are familiar to navigating in a command line interface, it's the equivalent to `ls -ll`. + + +## Auto-complete + +The OpenBB Platform CLI is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments. Note that a menu doesn't has arguments attached. + +This functionality dramatically reduces the number of key strokes required to perform tasks and, in many cases, eliminates the need to consult the help dialogue for reminders. Choices - where they are bound by a defined list - are searchable with the up and down arrow keys. + +## Global commands + +These are commands that can be used throughout the CLI and will work regardless of the menu where they belong. + +### Help + +`--help`, or `-h` can be attached to any command, as described above. + +### CLS + +The `cls` command clears the entire CLI screen. + +### Quit + +The `quit` command (can also use `q` or `..`) allows to leave the current menu to go one menu above. If the user is on the root, that will mean leaving the CLI. + +### Exit + +The `exit` command allows the user to exit the CLI. + +### Reset diff --git a/website/content/cli/usage/overview/customizing-the-terminal.md b/website/content/cli/usage/customizing-the-terminal.md similarity index 86% rename from website/content/cli/usage/overview/customizing-the-terminal.md rename to website/content/cli/usage/customizing-the-terminal.md index fc28ebbe2b76..262c96d34bfb 100644 --- a/website/content/cli/usage/overview/customizing-the-terminal.md +++ b/website/content/cli/usage/customizing-the-terminal.md @@ -1,9 +1,7 @@ --- title: Customization sidebar_position: 4 -description: This documentation page details the functionality of the Settings Menu - and the Feature Flags Menu in the OpenBB Platform CLI. It instructs users how to customize - the CLI, alter its behaviour, and manipulate various environment variables. +description: This documentation page details the settings and feature flags that can be defined under the `/settings` menu. keywords: - Settings Menu - Feature Flags Menu @@ -12,11 +10,13 @@ keywords: - environment variables - Documentation - OpenBB Platform CLI +- preferences +- user --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + ## Settings Menu diff --git a/website/content/cli/usage/data/api-keys.md b/website/content/cli/usage/data/api-keys.md index 7bd358279c99..5a6761692fde 100644 --- a/website/content/cli/usage/data/api-keys.md +++ b/website/content/cli/usage/data/api-keys.md @@ -12,7 +12,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + API (Application Programming Interface) keys are access credentials for obtaining data from a particular data vendor. They are a string of random characters assigned, by the data provider, to an individual account. @@ -20,4 +20,4 @@ API (Application Programming Interface) keys are access credentials for obtainin Most vendors offer a free tier requiring only a valid email address, some will require an account with proper KYC (Know Your Customer). -Find all data providers [here](https://my.openbb.co/app/platform/data-providers), and manage all you credentials directly on the [OpenBB Hub](https://my.openbb.co/app/platform/credentials). +Find all data providers [here](https://docs.openbb.co/platform/extensions/data_extensions), and manage all your credentials directly on the [OpenBB Hub](https://my.openbb.co/app/platform/credentials). diff --git a/website/content/cli/usage/data/data-sources.md b/website/content/cli/usage/data/data-sources.md index a44d7b32f2d0..6b3e161fda21 100644 --- a/website/content/cli/usage/data/data-sources.md +++ b/website/content/cli/usage/data/data-sources.md @@ -27,34 +27,14 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - +## Selecting The Data Source In-Command -:::note -Note that the commands and menus may vary. -::: +Many commands have multiple data sources associated with it. In order to specify the data vendor for that particular command, use the `--provider` argument. -## Relationship With Data Vendors - -Most commands will require obtaining API keys from various data providers. OpenBB provides methods for consuming these data feeds, but has no control over the quality or quantity of data provided to an end-user. **No API Keys are required to get started using the CLI**. - -See the list of providers [here](https://my.openbb.co/app/platform/data-providers). - -:::note -OpenBB doesn't store any financial data in its servers. We aggregate access to multiple data sources through API calls and standardize that interaction to provide users a seamless experience when dealing with different data vendors -::: - -## Changing the Data Source In-Command - -Many commands have multiple data sources associated with it. A great example is `/equity/price/historical`.. In order to specify the data vendor for that particular command, use the `--provider` argument. - -This also becomes clear from the help menu. +Parameter choices can be viewed from the help dialogue, `-h` or `--help`. ```console /equity/price/historical -h @@ -62,22 +42,26 @@ This also becomes clear from the help menu. ```console usage: historical --symbol SYMBOL [SYMBOL ...] [--interval INTERVAL] [--start_date START_DATE] [--end_date END_DATE] [--chart] - [--provider {alpha_vantage,cboe,fmp,intrinio,polygon,tiingo,tmx,tradier,yfinance}] [--adjustment {splits_only,splits_and_dividends,unadjusted}] [--extended_hours] - [--adjusted] [--use_cache] [--start_time START_TIME] [--end_time END_TIME] [--timezone TIMEZONE] [--source {realtime,delayed,nasdaq_basic}] [--sort {asc,desc}] - [--limit LIMIT] [--include_actions] [--prepost] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] + [--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. -optional arguments: +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 {alpha_vantage,cboe,fmp,intrinio,polygon,tiingo,tmx,tradier,yfinance} + --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 'alpha_vantage' if there is + 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 ...] @@ -85,16 +69,7 @@ optional arguments: required arguments: --symbol SYMBOL [SYMBOL ...] - Symbol to get data for. Multiple comma separated items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance. - -alpha_vantage: - --adjustment {splits_only,splits_and_dividends,unadjusted} - The adjustment factor to apply. 'splits_only' is not supported for intraday data. - --extended_hours Include Pre and Post market data. - --adjusted This field is deprecated (4.1.5) and will be removed in a future version. Use 'adjustment' set as 'splits_and_dividends' instead. - -cboe: - --use_cache When True, the company directories will be cached for 24 hours and are used to validate symbols. The results of the function are not cached. Set as False to bypass. + Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance. intrinio: --start_time START_TIME @@ -110,23 +85,14 @@ polygon: yfinance: --include_actions Include dividends and stock splits in results. - --prepost This field is deprecated (4.1.5) and will be removed in a future version. Use 'extended_hours' as True instead. - -For more information and examples, use 'about historical' to access the related guide. - ``` -:::info -Each provider also brings the possibility of different arguments. For example, the `polygon` provider has the `--sort` and `--limit` arguments, while the `yfinance` provider has the `--include_actions` and `--prepost` arguments. -::: - -The available providers for each command are displayed on the right of the command, and they can be distinguished by the square brackets and distinct font color group. By default, if the user doesn't specify `--provider` the CLI will use the first data provider displayed. -### Setting Default Sources +### 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`. -For example, changing the default data provider for the `/equity/price/historical` command would be adding the following line to the user configuration file: +Set the default data provider for the `/equity/price/historical` command by adding the following line to your `user_settings.json` file: ```json { diff --git a/website/content/cli/usage/data/custom-data.md b/website/content/cli/usage/data/openbbuserdata.md similarity index 71% rename from website/content/cli/usage/data/custom-data.md rename to website/content/cli/usage/data/openbbuserdata.md index 6b90a7f44421..b32b640e029d 100644 --- a/website/content/cli/usage/data/custom-data.md +++ b/website/content/cli/usage/data/openbbuserdata.md @@ -1,9 +1,7 @@ --- -title: Custom Data +title: OpenBBUserData Folder sidebar_position: 3 -description: Documentation detailing usage of the OpenBB Platform CLI for financial data - aggregation, standardization, and user data import. It explains the OpenBBUserData - folder functions, how to modify settings, and how to import or export user data. +description: This page outlines the OpenBBUserData folder. keywords: - financial data - data aggregation @@ -23,7 +21,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + The OpenBB Platform CLI not only allows access to a world of financial data through our data aggregation and standardization. @@ -35,8 +33,6 @@ The `OpenBBUserData` folder's default location is the home of the system user ac Within the folder you can find files that you have exported. -![OpenBBUserData Folder](https://user-images.githubusercontent.com/85772166/195742985-19f0e420-d8f7-4fea-a145-a0243b8f2ddc.png) - This folder contains all things user-created. For example: - Exported files diff --git a/website/content/cli/usage/hub.md b/website/content/cli/usage/hub.md index 4b05d7551b77..3804b7fc2796 100644 --- a/website/content/cli/usage/hub.md +++ b/website/content/cli/usage/hub.md @@ -75,17 +75,10 @@ and then run on the terminal utilizing: The OpenBB Hub allows users to manage their own script routines to be run in the OpenBB Platform CLI. -Screenshot 2023-04-14 at 7 13 11 PM - -In addition, a few script routines will be distributed by the OpenBB Team on [this page](https://my.openbb.co/app/terminal/routines/default). These come primarily from academic content that the team is releasing, but can serve as an example of what you can do. - -Screenshot 2023-04-14 at 7 17 44 PM - Note that the "Download" button allows you to download the example file and share with co-workers / colleagues. To run a routine on the CLI, select `exe --file` from the main menu and the available routines will pop up as auto-completions. For example: -Screenshot 2023-04-14 at 7 23 16 PM ## Personal Access Tokens @@ -93,6 +86,4 @@ Setting up API keys on the OpenBB Hub has an additional benefit: it allows you t You can find and manage your OpenBB PAT [here](https://my.openbb.co/app/platform/pat). -Screenshot 2023-04-14 at 10 37 44 PM - You can log in to the OpenBB Platform CLI using your PAT by running the `login` command on the `account` menu. diff --git a/website/content/cli/usage/keyboard-hotkey-macros.md b/website/content/cli/usage/keyboard-hotkey-macros.md index 938184eeaf33..0a9b6b63745a 100644 --- a/website/content/cli/usage/keyboard-hotkey-macros.md +++ b/website/content/cli/usage/keyboard-hotkey-macros.md @@ -23,50 +23,5 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - This document will explain how you can set hotkeys macros on your customizable keyboard which allow you to perform investment research in a few seconds. -## Supported Configurators - -### VIA - -This document will explain how you can set hotkeys on your customizable keyboard using [VIA](https://www.caniusevia.com/). - -Here is a list of VIA's supported keyboards: [https://www.caniusevia.com/docs/supported_keyboards](https://www.caniusevia.com/docs/supported_keyboards) - -Note: We were in the market looking for a keyboard that could be highliy customizable for the needs of OpenBB power users. This is when we stumbled upon Keychron and the VIA configurator which allows users to intuitively remap any key on the keyboard, and create numerous macro commands, shortcuts, or key combinations. -Here's a post from Keychron on VIA: [Why VIA is one of the most essential features for a custom keyboard?](https://www.keychron.com/blogs/news/why-qmk-via-is-one-of-the-most-essential-features-for-a-custom-keyboard) - -For the purpose of this example, the command pipeline we are creating has the following sequence of commands: `dps/psi/../fa/pt/income/..` - -1. Try VIA [here](https://usevia.app/). The following screen should popup - -![VIA](https://user-images.githubusercontent.com/25267873/236660856-f92ac602-cde9-48e6-8029-c083fbb75ff9.png) - -2. Select the Layer you are interested in altering. As we're not looking forward to remap any of the existing main keys, we need to go to layer 2, 3 or 4. In my case, with a Keychron Q2, I know that Layer 4 can be accessed by pressing on "Fn2". Thus, I select that layer. - -![Layer](https://user-images.githubusercontent.com/25267873/236660841-09203874-8a8e-4393-8674-357aad67a22b.png) - -3. Most keys should have a triangle upside down which simbolizes that they don't have any functionality. You want to select one of those keys to contain your hotkey routine. After that selection you want to remap the key functionality, hence in the **KEYMAP settings** below you click on MACROS tab and select "MO". Now the screen should look like this: - -![Layer](https://user-images.githubusercontent.com/25267873/236660948-a148582e-f928-4f12-ae54-9bdd3adfd020.png) - -4. Now we want to change what "MO" does and for that we select the **MACROS settings** below. Then we can select "M0" and insert `dps/psi/../fa/pt/income/..{KC_ENT}`. The screen should look like this: - -![Macro](https://user-images.githubusercontent.com/25267873/236661126-eeb5dc7c-2c01-4a43-ab64-12c470e864ce.png) - -Note that the `{KC_ENT}` will ensure that the command is run on the terminal. - -5. Save. To ensure that everything is correct you can go into the **KEYMAP settings** and click on the hotkey that you just created to see if it contains the sequence of commands, the following sequence should appear: - -![Save](https://user-images.githubusercontent.com/25267873/236661232-4f9119de-af37-49a2-948d-cfd6d650ed92.png) - -6. Finally, we are ready to test it on the [OpenBB Terminal](https://my.openbb.co/app/terminal). After going into `stocks` and doing `load AAPL`, I pressed "Fn2+Z" which lead to: - -![Test](https://user-images.githubusercontent.com/25267873/236660272-290fe586-7663-4cd6-bfc0-80b7f8f2efd1.png) diff --git a/website/content/cli/usage/outputs/export-data.md b/website/content/cli/usage/outputs/export-data.md index 411005ba9666..65cf9661bfae 100644 --- a/website/content/cli/usage/outputs/export-data.md +++ b/website/content/cli/usage/outputs/export-data.md @@ -31,44 +31,37 @@ Note that the commands and menus may vary. To export as a spreadsheet, `xlsx`, add `--export xlsx` to the command. ```console -/stocks/load AAPL -s 2010-01-01 --export xlsx + ``` Which creates: -![Export Example](https://user-images.githubusercontent.com/46355364/214817681-fd5324c3-003c-45eb-adf4-96d5b41a3c02.png) ## Specifying the Filename Instead of the default filename, it can be specified. Exporting as a `csv` this time: ```console -/stocks/load AAPL -s 2010-01-01 --export apple.csv + ``` -![Filename Example](https://user-images.githubusercontent.com/46355364/214818131-597b3bd0-9c66-43f1-bf0e-2c0a703e2645.png) + ## Specifying a Target Sheet Name With the `xlsx` option, `--sheet-name` allows multiple datasets to be saved to the same file. For example: ```console -/stocks/load AAPL -s 2010-01-01 --export apple.xlsx --sheet-name Market Data -``` -Then enter the `fa` (Fundamental Analysis) menu. Copy and paste the code below to follow along. This requires an API key from FinancialModelingPrep which you can obtain for free. Please have a look [here](/terminal/usage/data/api-keys). +``` ```console -fa -income --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Income Statement -balance --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Balance Sheet -cash --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Cash Flow Statement + ``` This generates a file for `AAPL`, with market data from 2010-01-01 until now, as well as the income, balance and cash flow statements from the last ten years. -![Sheet Name Example](https://user-images.githubusercontent.com/46355364/214824561-6eaf3a88-746a-4abc-91e1-420c9036c00d.png) ## Export Directly From Charts -See the [interactive charts](/terminal/usage/outputs/interactive-charts.md#export-tools) page for instructions. +See the [interactive charts](interactive-charts.md#export-tools) page for instructions. diff --git a/website/content/cli/usage/outputs/interactive-charts.md b/website/content/cli/usage/outputs/interactive-charts.md index 36960dac1a08..f7cb854e1c21 100644 --- a/website/content/cli/usage/outputs/interactive-charts.md +++ b/website/content/cli/usage/outputs/interactive-charts.md @@ -22,18 +22,7 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -:::note -Note that the commands and menus may vary. -::: - -A common type of output in OpenBB are interactive charts which open in a separated window (due to our [open source PyWry](https://github.com/OpenBB-finance/pywry) technology). The OpenBB charting library provides interactive and highly customizable charts. +Interactive charts open in a separate window ([PyWry](https://github.com/OpenBB-finance/pywry)). The OpenBB charting library provides interactive and highly customizable charts. :::tip Not all commands have a charting output, the ones that do, will display a chart argument (`--chart`), which will trigger the charting output instead of the default table output. diff --git a/website/content/cli/usage/outputs/interactive-tables.md b/website/content/cli/usage/outputs/interactive-tables.md index 9b0deafe1293..695beff89f9d 100644 --- a/website/content/cli/usage/outputs/interactive-tables.md +++ b/website/content/cli/usage/outputs/interactive-tables.md @@ -23,18 +23,8 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - -:::note -Note that the commands and menus may vary. -::: - -A common type of output in OpenBB are interactive tables which open in a separated window (utilizing our [open source PyWry](https://github.com/OpenBB-finance/pywry) technology). These provide methods for searching, sorting, filtering, exporting and even adapting settings directly on the table. +Interactive tables open in a separate window ([PyWry](https://github.com/OpenBB-finance/pywry)). These provide methods for searching, sorting, filtering, exporting and even adapting settings directly on the table. :::tip All OpenBB Platform CLI results are displayed in interactive tables by default, unless the interactive model is disabled. diff --git a/website/content/cli/usage/overview/commands-and-arguments.md b/website/content/cli/usage/overview/commands-and-arguments.md deleted file mode 100644 index d5859dcbcf88..000000000000 --- a/website/content/cli/usage/overview/commands-and-arguments.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Commands and arguments -sidebar_position: 2 -description: This documentation page includes a tutorial video that provides a short - introduction on commands and arguments for the OpenBB Platform CLI. It further explains - the help dialogue for functions, the auto-completion feature, and global commands - such as help, about, support, cls, quit, exit, and reset. Also, tips for submitting - support requests are provided. -keywords: -- tutorial video -- help arguments -- auto-complete -- global commands -- support command -- reset command -- command line interface -- metadata ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -:::note -Note that the commands and menus may vary. -::: - -## Help arguments - -A help dialogue for any function at the current location is printed to the screen by typing `-h` or `--help` after the command. The information returned contains a short description of the function and all accepted arguments. For example the `news` command will return: - -```console -(🦋) /news/ $ company --help - -usage: company [--symbol SYMBOL [SYMBOL ...]] [--start_date START_DATE] [--end_date END_DATE] [--limit LIMIT] [--provider {benzinga,fmp,intrinio,polygon,tiingo,tmx,yfinance}] - [--date DATE] [--display {headline,abstract,full}] [--updated_since UPDATED_SINCE] [--published_since PUBLISHED_SINCE] [--sort {id,created,updated}] - [--order {asc,desc}] [--isin ISIN] [--cusip CUSIP] [--channels CHANNELS] [--topics TOPICS] [--authors AUTHORS] [--content_types CONTENT_TYPES] [--page PAGE] - [--source {yahoo,moody,moody_us_news,moody_us_press_releases}] [--sentiment {positive,neutral,negative}] [--language LANGUAGE] [--topic TOPIC] - [--word_count_greater_than WORD_COUNT_GREATER_THAN] [--word_count_less_than WORD_COUNT_LESS_THAN] [--is_spam] - [--business_relevance_greater_than BUSINESS_RELEVANCE_GREATER_THAN] [--business_relevance_less_than BUSINESS_RELEVANCE_LESS_THAN] [--offset OFFSET] [-h] - [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] - -Company News. Get news for one or more companies. - -optional arguments: - --symbol SYMBOL [SYMBOL ...] - Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp, intrinio, polygon, tiingo, tmx, yfinance. - --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. - --limit LIMIT The number of data entries to return. - --provider {benzinga,fmp,intrinio,polygon,tiingo,tmx,yfinance} - The provider to use for the query, by default None. - If None, the provider specified in defaults is selected or 'benzinga' if there is - no default. - -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. - -``` - -To search for news for a certain ticker, you can use this command: - -```console -(🦋) /news/ $ company --symbol aapl -``` - - -## Auto-complete - -![Auto Complete](https://user-images.githubusercontent.com/85772166/233247702-f707531c-2c65-4380-a662-cd4bc2ae0199.png) - -The OpenBB Platform CLI is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments. Note that a menu doesn't has arguments attached. - -This functionality dramatically reduces the number of key strokes required to perform tasks and, in many cases, eliminates the need to consult the help dialogue for reminders. Choices - where they are bound by a defined list - are searchable with the up and down arrow keys. - -## Global commands - -These are commands that can be used throughout the CLI and will work regardless of the menu where they belong. - -### Help - -The `help` command shows the current menu you are in and all the commands and menus that exist, including a short description for each of these. - -This is arguably one of the most helpful commands that the CLI. If you are familiar to navigating in a command line interface, it's the equivalent to `ls -ll`. - -### CLS - -The `cls` command clears the entire CLI screen. - -### Quit - -The `quit` command (can also use `q` or `..`) allows to leave the current menu to go one menu above. If the user is on the root, that will mean leaving the CLI. - -### Exit - -The `exit` command allows the user to exit the CLI. - -### Reset - -The `reset` command (or `r`) allows a developer that is using the CLI through source code to quickly test it's code changes by re-starting the CLI with the code changes. This allows to improve speed of development. diff --git a/website/content/cli/usage/routines/community-routines.md b/website/content/cli/usage/routines/community-routines.md index daf827dd79c7..13e4260d93b2 100644 --- a/website/content/cli/usage/routines/community-routines.md +++ b/website/content/cli/usage/routines/community-routines.md @@ -19,65 +19,4 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -:::note -Note that the commands and menus may vary. -::: - -Community routines will enable the community to share their investment research routines and streamline everyone's investment research workflow. - -This is where you can find them: [https://my.openbb.co/app/terminal/community-routines/new](https://my.openbb.co/app/terminal/community-routines/new?size=25&tags=&page=1) - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/5cbfb88d-7b7f-4ac6-bf0b-be245ce19317) - -There are 3 categories where you can find a collection of scripts: - -- **Hot**: High rate of recent upvotes - -- **Popular**: Most-voted scripts - -- **New**: Recently added scripts - -The icon on the left allows you to upvote your favorite scripts and see how many times they have been voted by the community. - -In addition, if you are looking for a specific script, you can use the advanced search field to filter by username, description, tags, and even date time. - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/ecbc73ce-35b0-48b1-8fa4-ff6bd94db96f) - -When clicking on one of these scripts, you’ll be able to access the information associated with it - the username, title, description, and the script itself. - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/15f162b6-360d-4f1b-b300-55298ed82b99) - -Plus you’ll have 2 possible actions: - -- Save that routine to your personal collection - so you can edit it directly on the Hub and save it for terminal usage. - -- Download the routine to your desktop - so you can share it with others or tweak it locally. - -When you click on the “Share” icon associated with a routine, you’ll be prompted with a link to share that routine with your colleagues. - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/c8d6ecc1-7704-47ef-9f74-b336480c9fa1) - -The goal is that more users can benefit from other users' investment research workflow. - -If you select the check box “Run on terminal”, an “exe” will be added at the start of the link so you can copy-paste it into the OpenBB Terminal to run that same script. - -Finally, users can set their scripts to public or keep them private. - -In the screenshot below, you have a private routine that implements the new TimeGPT-1 (Beta) model from our friends at Nixtla. - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/a6326901-106c-4514-a9bc-68f659b867a9) - -Also, don’t forget to set your socials on your account so other OpenBB users can reach out to you to ask you more questions about your routines. - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/ace4c886-e521-46e5-a53a-736408dd096e) - -We hope you take advantage of this exciting addition and learn how to use one of the best features the terminal has to offer. + diff --git a/website/content/cli/usage/routines/introduction-to-routines.md b/website/content/cli/usage/routines/introduction-to-routines.md index f2e460a0a54f..a34ae0d0a87c 100644 --- a/website/content/cli/usage/routines/introduction-to-routines.md +++ b/website/content/cli/usage/routines/introduction-to-routines.md @@ -17,18 +17,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -:::note -Note that the commands and menus may vary. -::: + ## Introduction @@ -67,12 +56,10 @@ For more information and examples, use 'about exe' to access the related guide. ## Basic Script -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/eaeb3511-d544-4579-8d76-f7a4fd7bb1d3) - The most basic script style contains 2 main elements: - **Comments**: any text after a hashtag (`#`) is referred to as a comment. This is used to explain what is happening within the line below and is ignored when the file is executed. -- **Commands**: any text *without* a hashtag is being run inside the OpenBB Terminal as if the user had prompted that line in the terminal. Note that this means that you are able to create a pipeline of commands in a single line, i.e. `equity/price/historical --symbol --provider fmp` is a valid line for the script. +- **Commands**: any text *without* a hashtag is being run inside the CLI as if the user had prompted that line in the terminal. Note that this means that you are able to create a pipeline of commands in a single line, i.e. `equity/price/historical --symbol AAPL --provider fmp` is a valid line for the script. For instance, the text below corresponds to the example file that OpenBB provides. @@ -105,6 +92,6 @@ As a starting point, let's use the example above. 1. Create a new text file with the name `routines_template.openbb` and copy and paste the routine above. -2. Move the file inside the `routines` folder within the [OpenBBUserData](/terminal/usage/data/custom-data) folder and, optionally, adjust the name to your liking. +2. Move the file inside the `routines` folder within the [OpenBBUserData](/data/openbbuserdata) folder and, optionally, adjust the name to your liking. -3. Open up the OpenBB Terminal, and type `exe --file routines_template`. If you changed the name of the file, then replace, `routines_template`, with that. As long as the file remains in the `~/OpenBBUserData/routines` folder, OpenBB Terminal's auto-completer will provide it as a choice. +3. Open up the CLI, and type `exe --file routines_template`. If you changed the name of the file, then replace, `routines_template`, with that. As long as the file remains in the `~/OpenBBUserData/routines` folder, the CLI's auto-completer will provide it as a choice. diff --git a/website/content/cli/usage/routines/pipeline-of-commands.md b/website/content/cli/usage/routines/pipeline-of-commands.md index e1609032241e..68a53a6dde2f 100644 --- a/website/content/cli/usage/routines/pipeline-of-commands.md +++ b/website/content/cli/usage/routines/pipeline-of-commands.md @@ -9,44 +9,16 @@ keywords: - Hub - Routine - Community Routines -- Terminal -- Architecture -- EXE -- Script -- Single command -- Pipeline of commands -- Command sequence -- Automate investment research -- Tutorial video -- GME's dark pool data -- Technical Analysis -- Moving Average Convergence/Divergence indicator -- Stock price loaded -- Exponential moving average indicator -- Price vs Short interest --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -:::note -Note that the commands and menus may vary. -::: + ## Single Command If you have a good understanding of the Platform CLI's architecture, you will recognize that commands and menus are organized in the form of a tree. -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/a5f10833-9693-4b39-9491-b431919db828) - If the intention is to explore an equity, enter at base of the menu (`/equity/`), then browse or navigate towards the point of interest - for example, Dark Pools (`/equity/darkpool`). While all the information is in one place, having to type one command at a time is far from optimal. diff --git a/website/content/cli/usage/routines/routine-macro-recorder.md b/website/content/cli/usage/routines/routine-macro-recorder.md index 64d8719351df..0640169f713e 100644 --- a/website/content/cli/usage/routines/routine-macro-recorder.md +++ b/website/content/cli/usage/routines/routine-macro-recorder.md @@ -19,33 +19,18 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -:::note -Note that the commands and menus may vary. -::: + OpenBB script routines can be captured with the macro recorder, controlled with global commands, `record` to start saving commands and `stop` to terminate the recording. This shares similarities with that of Excel's VBA methods. This means that any command you run will be automatically recorded for the routine script and once you type `stop` it automatically saves the file to the `~/OpenBBUserData/routines/` folder. For example, if you copy and paste the following prompt in the OpenBB Platform CLI and press enter, you will see an example. ```console -/record/economy/cpi/treasury/index sp500/stop + ``` The following shows the output from this pipeline of commands. -![Routines](https://user-images.githubusercontent.com/46355364/223204998-70d9e5da-f84e-4c22-90c4-576dcf87c1df.png) - Because there was a `record` and `stop` at the `start` and `end` respectively, a routine script was created. This file cane be found inside the `routines` folder within the `OpenBBUserData` folder (more on exporting and import data [here](/terminal/usage/data/custom-data)). Now, you should be able to access the routine file from the CLI main menu by doing `/exe --file` and using the auto-completer. Note that the naming of the file will differ for you based on the time you are executing the script. - -![Routines](https://user-images.githubusercontent.com/46355364/223205394-77e7a33d-e9fa-4686-b32f-e8d183b265e6.png) diff --git a/website/content/cli/usage/routines/routines-for-power-users.md b/website/content/cli/usage/routines/routines-for-power-users.md index d40594a7c6e5..abd240580242 100644 --- a/website/content/cli/usage/routines/routines-for-power-users.md +++ b/website/content/cli/usage/routines/routines-for-power-users.md @@ -23,118 +23,31 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -:::note -Note that the commands and menus may vary. -::: + ## Input Variables -When utilizing basic routines capabilities, users had to create separate routines for each specific ticker, such as `my_due_diligence_AAPL.openbb` or `my_due_diligence_TSLA.openbb`. This approach was suboptimal, considering that we had control over reading these scripts and they were meant to be used within our ecosystem. - -To address this limitation, we introduced the concept of arguments, inspired by the Perl language. These arguments are variables referenced within the `.openbb` script as `$ARGV` or `$ARGV[0]`, `$ARGV[1]`, and so on. They are provided in the CLI when running `exe` by adding the `--input` flag, followed by the variables separated by commas. - -For instance, if a routine file called `script_with_input.openbb` had the following format: - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/5b0f558e-ace0-423d-a3db-b6369755cffb) - -And we run it in the CLI with `exe —file script_with_input.openbb —input MSFT`, what would be run would be `stocks/load MSFT --start 2015-01-01/ta/ema -l 20,50,100,200` and so you could use the same routine for multiple tickers - **making it a more powerful automated workflow**. - -For instance, the example below shows how you can run the same script for MSFT but also TSLA ticker. - -And we run it in the CLI with exe —file script_with_input.openbb —input MSFT, what would be run would be stocks/load MSFT --start 2015-01-01/ta/ema -l 20,50,100,200 and so you could use the same routine for multiple tickers - making it a more powerful automated workflow. - -For instance, the example below shows how you can run the same script for `MSFT` but also `TSLA` ticker. - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/8a744571-59b9-4293-bdd7-5dd6e2c8eef3) +Arguments are variables referenced within the `.openbb` script as `$ARGV` or `$ARGV[0]`, `$ARGV[1]`, and so on. They are provided in the CLI when running `exe` by adding the `--input` flag, followed by the variables separated by commas. ### Example -Let's look into the following routine (the file can be downloaded [here](https://www.dropbox.com/s/usooz6y29r1xldb/routines_template_with_inputs.openbb?dl=1)): - ```bash # This script requires you to use arguments. This can be done with the following: # exe --file routines_template_with_inputs.openbb -i TSLA,AAPL,MSFT # Go to the stocks menu -stocks - -# Load a ticker, given the argument used. E.g. -i TSLA -load $ARGV[0] - -# Enter the Technical Analysis (ta) menu -ta - -# Show the fibonacci retracement levels -fib - -# Enter the comparison analysis (ca) menu -../ca - -# Set two extra tickers based on the arguments used. E.g. -i TSLA,AAPL,MSFT -add $ARGV[1],$ARGV[2] - -# Plot the historical prices -historical - -# Return to home -home ``` -This script includes `$ARGV[0]`, `$ARGV[1]` and `$ARGV[2]`. This means that the script requires you to submit three arguments. In this case, they refer to stock tickers. Therefore, like the script also says, you can include these arguments with `-i` or `--input` followed by three tickers (e.g. `/exe routines_template_with_inputs.openbb -i TSLA,AAPL,MSFT`). Resulting in the following, - -![OpenBB Script with Input](https://user-images.githubusercontent.com/46355364/223207706-42995834-577f-4747-8185-42a016f441d9.png) - -Note: Make sure you saved this script in the `~/OpenBBUserData/routines/` folder else you are not able to execute it. - ## Set Variables -In addition to enabling users to run scripts with external variables using the keyword `ARGV`, we also support the use of internal variables within the script. These variables are defined by starting with the `$` character. - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/c0cc6e1e-b87c-46f4-8c94-539408745433) +In addition to external variables using the keyword, `ARGV`, internal variables can be defined with the, `$`, character. Which has the following output: -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/77060dfc-216e-490f-af72-3d4af5642e0f) - Note that the variable can have a single element or can be constituted by an array where elements are separated using a comma “,”. ### Variables Example -Example of the script below: - -```bash -# Set date variable -$DATE = 2022-01-01 - -# Set list of tickers to iterate -$TICKERS = AAPL,MSFT - -# dive into stocks -stocks - -# candle chart for first ticker -load $TICKERS[0] --start $DATE/candle - -# candle chart for second ticker -load $TICKERS[1] --start $DATE[0]/candle -``` - -Note that a variable can be declared as a single argument `$DATE = 2022-01-01` but it can also be declared as a list `$TICKERS = AAPL,MSFT`. - -When declared as a list, the user needs to use the indexing to access the element of interest, i.e. if interested in `MSFT` then `$TICKERS[1]` should be used. - -When a single element is defined, then the user can access it through the variable name or indexing the first position equally, i.e. `$DATE` = `$DATE[0]`. - -Note that slicing is also possible, and the same convention as python is utilized. If the user has defined inputs `AAPL,MSFT,TSLA,NVDA,GOOG` then by selecting `$ARGV[1:3]` the tickers `MSFT,TSLA` are selected. ## Relative Time Keyword Variables @@ -152,14 +65,6 @@ The result will be a date with the conventional date associated with OpenBB, i.e ### Relative Time Example -By picking on the previous example, we can add to the load `--start` argument the keyword `$18MONTHSAGO`. - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/e0e9b4a2-3d8d-4f72-8029-55f009dc15ee) - -This will result in the following output: - -![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/25267873/78d6235e-15a1-47cb-a99c-19694b6af0d9) - ## Foreach Loop Finally, what scripting language would this be if there were no loops? For this, we were inspired by MatLab. The loops in OpenBB utilize the foreach and end convention, allowing for iteration through a list of variables or arguments to execute a sequence of commands. @@ -177,31 +82,23 @@ To create a foreach loop, you need to follow these steps: ```bash # Iterates through ARGV elements from position 1 onwards foreach $$VAR in $ARGV[1:] - load $$VAR --start $DATES[0] --end $DATES[1]/dps/psi/.. + some_command end ``` ```bash # Loops through all $ARGV variables FOREACH $$SOMETHING in $ARGV - load $$SOMETHING --start $DATE[0]/ins/stats/.. + some_sequence end ``` ```bash # Iterates through ARGV elements in position 1,2 foreach $$VAR in $ARGV[1:3] - load $$VAR --start 2022-01-01 - ba - regions + some_menu + another_menu + some_command .. END ``` - -```bash -# Loops through PLTR and BB -foreach $$X in PLTR,BB - load $$X --start $LASTJANUARY - candle -END -``` diff --git a/website/content/cli/usage/overview/structure-and-navigation.md b/website/content/cli/usage/structure-and-navigation.md similarity index 59% rename from website/content/cli/usage/overview/structure-and-navigation.md rename to website/content/cli/usage/structure-and-navigation.md index 1a867eed689f..17aedd9befe6 100644 --- a/website/content/cli/usage/overview/structure-and-navigation.md +++ b/website/content/cli/usage/structure-and-navigation.md @@ -1,11 +1,7 @@ --- title: Structure and Navigation sidebar_position: 1 -description: Learn about the OpenBB Platform CLI, an interactive Command Line Interface - application. Understand the structure and navigation of the terminal, functions - or commands input via a keyboard, and the presentation of results in the form of - interactive charts, tables, or text. Get introduced to terminal commands, terminal - menus, OpenBB Hub's theme style, and the concept of absolute paths. +description: This page describes the layout and structure of the OpenBB CLI, as well as how to navigate it. keywords: - CLI application - OpenBB Platform CLI @@ -21,25 +17,12 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + ## Structure -import TutorialVideo from '@site/src/components/General/TutorialVideo.tsx'; - - - -:::note -Note that the commands and menus may vary. -::: - The OpenBB Platform CLI is a Command Line Interface (CLI) application. Functions (commands) are called through the keyboard with results returned as charts, tables, or text. Charts and tables (if enabled) are displayed in a new window, and are fully interactive, while text prints directly to the Terminal screen. -![The Home Screen](https://user-images.githubusercontent.com/85772166/233247655-2f8d0dae-be68-48ca-9b35-123b5b985cb6.png) - A menu is a collection of commands (and sub-menus). A menu can be distinguished from a command because the former has a `>` on the left. The color of a command and a menu also differ, but these can be changed in OpenBB Hub's theme style. ## Navigation @@ -47,9 +30,3 @@ A menu is a collection of commands (and sub-menus). A menu can be distinguished Navigating through the CLI menus is similar to traversing folders from any operating system's command line prompt. The `/home` screen is the main directory where everything begins, and the menus are paths branched from the main. Instead of `C:\Users\OpenBB\Documents`, you'll have something like `/equity/price`. Instead of `cd ..`, you can do `..` to return the menu right above. To go back to the root menu you can do `/`. Absolute paths are also valid to-and-from any point. From the `/equity/price` menu, you can go directly to `crypto` menu with: `/crypto`. Note the forward slash at the start to denote the "absolute" path. - - - From 6c95a2ee4dbe66589d8af808dfa6d86b48b2a13f Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 8 May 2024 15:30:11 -0700 Subject: [PATCH 06/25] some progress --- website/content/cli/_category_.json | 2 +- website/content/cli/index.md | 53 ++++-- website/content/cli/installation.md | 50 ++++-- website/content/cli/quickstart.md | 158 ++++++++++++++++++ .../cli/usage/commands-and-arguments.md | 2 +- website/sidebars.js | 5 +- .../theme/DocSidebarItem/Category/index.js | 1 + 7 files changed, 246 insertions(+), 25 deletions(-) create mode 100644 website/content/cli/quickstart.md diff --git a/website/content/cli/_category_.json b/website/content/cli/_category_.json index b81b612f4ece..a68e9f9ff3b4 100644 --- a/website/content/cli/_category_.json +++ b/website/content/cli/_category_.json @@ -1,4 +1,4 @@ { "label": "OpenBB CLI", "position": 2 - } +} diff --git a/website/content/cli/index.md b/website/content/cli/index.md index 78eb5fe175d2..c7e4e40ded75 100644 --- a/website/content/cli/index.md +++ b/website/content/cli/index.md @@ -1,30 +1,63 @@ --- -title: Introduction +id: index +title: OpenBB CLI sidebar_position: 0 -description: Introduction to the OpenBB Platform CLI; a command line interface that wraps around the OpenBB Platform, offering convenient access to its pre-built data connectors and libraries for designing and building financial reports and applications. Discover how you can contribute to the platform. +description: The OpenBB CLI is a command line interface wrapping the OpenBB Platform. It offers a convenient way to interact with the Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts. No experience with Python, or other programming languages, is required. keywords: -- OpenBB Platform CLI -- OpenBB Platform +- OpenBB +- CLI +- Platform - data connectors - data access - data processing - third-party data providers +- introduction --- +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + -## What is the OpenBB Platform CLI? +## Overview -The OpenBB Platform CLI is a wrapper around the OpenBB Platform, this means that one can expect it to have the same functionalities that the OpenBB Platform offers with the enhancements and limitations that a command line interface brings. The CLI is designed to be user-friendly and intuitive, making it easy for users to interact with the platform and access its pre-built data connectors and libraries. +The OpenBB CLI is a command line interface wrapping the OpenBB Platform. It offers a convenient way to interact with the Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts. -The OpenBB Platform CLI is the OpenBB's sub product that intends to offer a replacement for the former [OpenBB Terminal](/terminal). This means that the navigation and usage of the CLI are similar to the Terminal, but with the added benefit of being able to access the OpenBB Platform's data connectors and libraries, i.e., the OpenBB Core and OpenBB Extensions. +The CLI is the next iteration of the [OpenBB Terminal](/terminal), and leverages the extendability of the OpenBB Platform architecture in an easy-to-consume and script format. -Starting with V4, we have completely restructured the previous version of the OpenBB SDK. -Instead of a single monolithic SDK, that comes with dependency nightmares and compatibility issues with things you may not need, we have morphed into the OpenBB Platform, which serves as a collection of building blocks to be used for your own need. +![CLI Home](cli_home.png) + +## Guides & Documentation + +
    + + + + + +
--- diff --git a/website/content/cli/installation.md b/website/content/cli/installation.md index 5eff2c44cc83..a7ab22f77db2 100644 --- a/website/content/cli/installation.md +++ b/website/content/cli/installation.md @@ -1,10 +1,7 @@ --- title: Installation -sidebar_position: 1 -description: This page presents the general system requirements, supported environments, - installation procedures, and setup for running the OpenBB Platform. It discusses - the prerequisites including Python version, operating system requirements, Docker - usage, and the process of building the platform from source. +sidebar_position: 2 +description: This page provides installation instructions for the OpenBB CLI. keywords: - OpenBB Platform - Python @@ -19,9 +16,19 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -The OpenBB CLI is a wrapper around the OpenBB Platform, its requirements are the same and its components rely on your specific configuration of installed components. Please refer to the [OpenBB Platform install documentation](/platform/installation) for more information. +## Pre-Requisites -### PyPI +The OpenBB CLI is a wrapper around the [Platform](/platform), and should be installed along side an existing OpenBB installation. + +- A Python virtual environment with a version between 3.9 and 3.11, inclusive, is required. + +Please refer to the [OpenBB Platform install documentation](/platform/installation) for instructions and more information. + +:::info +If the OpenBB Platform is not already installed, the `openbb-cli` package will install the default components. +::: + +## PyPI Within your existing OpenBB environment, install `openbb-cli` with: @@ -29,9 +36,6 @@ Within your existing OpenBB environment, install `openbb-cli` with: pip install openbb-cli ``` -:::info -If you do not already have the OpenBB Platform packages installed, this will install the Core packages -::: The installation script adds `openbb` to the PATH within your Python environment. The application can be launched from any path, as long as the environment is active. @@ -40,3 +44,29 @@ openbb Welcome to OpenBB Platform CLI v1.0.0 ``` + +## Source + +Follow the instructions [here](/platform/installation#source) to clone the GitHub repo and install the OpenBB Platform from the source code. + +Next, navigate into the folder: `~/OpenBBTerminal/cli` + +:::tip +The Python environment should have `toml` and `poetry` installed. + +```bash +pip install toml poetry +``` +::: + +Finally, enter: + +```console +poetry install +``` + +Alternatively, install locally with `pip`: + +```bash +pip install -e . +``` diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md new file mode 100644 index 000000000000..31116257a49f --- /dev/null +++ b/website/content/cli/quickstart.md @@ -0,0 +1,158 @@ +--- +title: Quick Start +sidebar_position: 2 +description: This page is a quick start guide for the OpenBB CLI. +keywords: +- quickstart +- quick start +- tutorial +- getting started +- cli +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +## Launch + +- Open a Terminal and activate the environment where the `openbb-cli` package was installed. +- On the command line, enter: `openbb` + +![CLI Home](cli_home.png) + +## Login + +Login to your [OpenBB Hub account](https://my.openbb.co) to add your stored keys to the session. + +```console +/account/login --pat REPLACE_WITH_YOUR_PAT +``` + +Login by email & password is also possible. + +```console +/account/login --email my@emailaddress.com --password n0Ts3CuR3L!kEPAT +``` + +:::tip +Add `--remember-me` to the command to persist the login until actively logging out. +::: + +## Menus + +:::tip +Menus are distinguishable from commands by the character, `>`, on the left of the screen. +::: + +Enter a menu by typing it out and pressing return. + +```console +economy +``` + +![Economy Menu](economy_menu.png) + +## Help Dialogues + +Display the help dialogue by attaching, `--help` or `-h`, to any command. + +:::tip +Use this to identify the providers compatible with each parameter, if applicable. +::: + +```console +calendar --help +``` + +```bash +usage: calendar [--start_date START_DATE] [--end_date END_DATE] [--provider {fmp,nasdaq,tradingeconomics}] [--country COUNTRY] [--importance {Low,Medium,High}] + [--group {interest rate,inflation,bonds,consumer,gdp,government,housing,labour,markets,money,prices,trade,business}] [-h] [--export EXPORT] + [--sheet-name SHEET_NAME [SHEET_NAME ...]] + +Get the upcoming, or historical, economic calendar of global events. + +options: + --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. + --provider {fmp,nasdaq,tradingeconomics} + 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. + --country COUNTRY Country of the event. (provider: nasdaq, tradingeconomics) + -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. + +tradingeconomics: + --importance {Low,Medium,High} + Importance of the event. + --group {interest rate,inflation,bonds,consumer,gdp,government,housing,labour,markets,money,prices,trade,business} + Grouping of events + +``` + +If the source selected was Nasdaq, `--provider nasdaq`, the `--importance` and `--group` parameters will be ignored. + +```console +/economy/calendar --provider nasdaq --country united_states +``` + +| date | country | event | actual | previous | consensus | description | +|:--------------------|:--------------|:-------------------------|:---------|:-----------|:------------|:--------------| +| 2024-05-08 13:30:00 | United States | Fed Governor Cook Speaks | - | - | - | | +| cont... | | | | | | | + +## Jump Between Menus + +Use absolute paths to navigate from anywhere, to anywhere. + +From: + +```console +/equity/calendar/earnings +``` + +To: + +```console +/economy/calendar +``` + +## Export Data + +Data can be exported as a CSV, JSON, or XLSX file. + +### Named File + +This command exports the Nasdaq directory as a specific CSV file. The path to the file is displayed on-screen. + +```console +/equity/search --provider nasdaq --export nasdaq_directory.csv +``` + +```console +Saved file: /Users/myusername/OpenBBUserData/nasdaq_directory.csv +``` + +### Unnamed File + +If only supplied with the file type, the export will be given a generic name beginning with the date and time. + +```console +/equity/search --provider nasdaq --export csv +``` + +``` +Saved file: /Users/myusername/OpenBBUserData/20240508_145308_controllers_search.csv +``` + +## Run Multiple Commands + +A chain of commands can be run from a single line, separate each process with `/`. + +``` +equity/fundamental/balance --symbol MSFT --period quarter --export msft_financials.xlsx --sheet-name balance +``` \ No newline at end of file diff --git a/website/content/cli/usage/commands-and-arguments.md b/website/content/cli/usage/commands-and-arguments.md index ea9afd37da0d..952e6255a052 100644 --- a/website/content/cli/usage/commands-and-arguments.md +++ b/website/content/cli/usage/commands-and-arguments.md @@ -31,7 +31,7 @@ This is arguably one of the most helpful commands that the CLI. If you are famil ## Auto-complete -The OpenBB Platform CLI is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments. Note that a menu doesn't has arguments attached. +The OpenBB CLI is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments. This functionality dramatically reduces the number of key strokes required to perform tasks and, in many cases, eliminates the need to consult the help dialogue for reminders. Choices - where they are bound by a defined list - are searchable with the up and down arrow keys. diff --git a/website/sidebars.js b/website/sidebars.js index 4da3bf39d99b..bfdc5ed5720a 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -34,12 +34,11 @@ const sidebars = { { type: "category", label: "OpenBB Platform", - items: [ - { type: "autogenerated", dirName: "platform" }], + items: [{ type: "autogenerated", dirName: "platform" }], }, { type: "category", - label: "OpenBB Platform CLI", + label: "OpenBB CLI", items: [{ type: "autogenerated", dirName: "cli" }], }, { diff --git a/website/src/theme/DocSidebarItem/Category/index.js b/website/src/theme/DocSidebarItem/Category/index.js index 0d8c90879431..8a0dec3297e9 100644 --- a/website/src/theme/DocSidebarItem/Category/index.js +++ b/website/src/theme/DocSidebarItem/Category/index.js @@ -85,6 +85,7 @@ export default function DocSidebarItemCategory({ "OpenBB Bot": "/bot", "OpenBB Terminal Pro": "/pro", "OpenBB Add-in for Excel": "/excel", + "OpenBB CLI": "/cli", }; const newHref = labelToHrefMap[label] || href; const { From 736a9dbbc2caf6e531a2056f93d2cbd69bf3289a Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 8 May 2024 15:33:12 -0700 Subject: [PATCH 07/25] Add home screenshot --- website/content/cli/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/cli/index.md b/website/content/cli/index.md index c7e4e40ded75..0cfdddaa58bb 100644 --- a/website/content/cli/index.md +++ b/website/content/cli/index.md @@ -27,7 +27,7 @@ The OpenBB CLI is a command line interface wrapping the OpenBB Platform. It offe The CLI is the next iteration of the [OpenBB Terminal](/terminal), and leverages the extendability of the OpenBB Platform architecture in an easy-to-consume and script format. -![CLI Home](cli_home.png) +![CLI Home](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/d1617c3b-c83d-4491-a7bc-986321fd7230) ## Guides & Documentation From 2cfd659255c34ab29615397714fe2b9761cedd6a Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 8 May 2024 15:38:22 -0700 Subject: [PATCH 08/25] screenshots.md --- website/content/cli/quickstart.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index 31116257a49f..e4b187707cd0 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -19,7 +19,7 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - Open a Terminal and activate the environment where the `openbb-cli` package was installed. - On the command line, enter: `openbb` -![CLI Home](cli_home.png) +![CLI Home](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/d1617c3b-c83d-4491-a7bc-986321fd7230) ## Login @@ -51,7 +51,7 @@ Enter a menu by typing it out and pressing return. economy ``` -![Economy Menu](economy_menu.png) +![Economy Menu](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/b68491fc-d6c3-42a7-80db-bfe2aa848a5a) ## Help Dialogues @@ -155,4 +155,4 @@ A chain of commands can be run from a single line, separate each process with `/ ``` equity/fundamental/balance --symbol MSFT --period quarter --export msft_financials.xlsx --sheet-name balance -``` \ No newline at end of file +``` From 2a1203197b7f6808a1a6633c5b84d411c4efb871 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Thu, 9 May 2024 14:57:25 +0100 Subject: [PATCH 09/25] fix links --- website/content/cli/usage/overview/index.mdx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/content/cli/usage/overview/index.mdx b/website/content/cli/usage/overview/index.mdx index f2bb8fbe26a7..4e15e6e5e592 100644 --- a/website/content/cli/usage/overview/index.mdx +++ b/website/content/cli/usage/overview/index.mdx @@ -3,24 +3,24 @@ title: Overview --- import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; +import HeadTitle from "@site/src/components/General/HeadTitle.tsx";
    - - + - + + url="customizing-the-terminal" + />
From 9e0f81b5411977c9c1cb401270314b12dc48fb83 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Thu, 9 May 2024 15:43:36 +0100 Subject: [PATCH 10/25] new cards for cli pages --- website/src/components/General/NewReferenceCard.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/src/components/General/NewReferenceCard.tsx b/website/src/components/General/NewReferenceCard.tsx index f40993a99090..d75bb780f193 100644 --- a/website/src/components/General/NewReferenceCard.tsx +++ b/website/src/components/General/NewReferenceCard.tsx @@ -40,13 +40,16 @@ export default function NewReferenceCard({ cleanedPath.startsWith("/platform"), "hover:bg-[#16A34A] border-[#16A34A] dark:hover:bg-[#14532D] dark:border-[#14532D]": cleanedPath.startsWith("/excel"), + "hover:bg-[#D3D3D3] border-[#D3D3D3] dark:hover:bg-[#5c5c5c] dark:border-[#5c5c5c]": + cleanedPath.startsWith("/cli"), header_docs: !cleanedPath.startsWith("/terminal") && !cleanedPath.startsWith("/pro") && !cleanedPath.startsWith("/excel") && !cleanedPath.startsWith("/sdk") && !cleanedPath.startsWith("/platform") && - !cleanedPath.startsWith("/bot"), + !cleanedPath.startsWith("/bot") && + !cleanedPath.startsWith("/cli"), }, )} to={url} From fda14b843d0b729a73ddaf89647170e9d9e7d00c Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Thu, 9 May 2024 15:22:28 -0700 Subject: [PATCH 11/25] start config page --- website/content/cli/configuration.md | 58 +++++++++++++++++++++++ website/content/cli/quickstart.md | 2 +- website/content/cli/usage/_category_.json | 2 +- 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 website/content/cli/configuration.md diff --git a/website/content/cli/configuration.md b/website/content/cli/configuration.md new file mode 100644 index 000000000000..005de0590ab0 --- /dev/null +++ b/website/content/cli/configuration.md @@ -0,0 +1,58 @@ +--- +title: Configuration & Settings +sidebar_position: 3 +description: This documentation page details the various settings and feature flags used to customize the OpenBB CLI. +keywords: +- Settings Menu +- Feature Flags Menu +- customize CLI +- alter CLI behaviour +- environment variables +- Documentation +- OpenBB Platform CLI +- preferences +- user +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +In addition to the OpenBB Platform's `user_settings.json` file, described [here](/platform/usage/settings_and_environment_variables), there are settings and environment variables affecting the CLI only. + +## Settings Menu + +The `/settings` menu provides methods for customizing the look of the CLI. The menu is divided into two sections: + +- Feature Flags + - On/Off status is reflected by red/green text. + - Status is toggled by entering the item as a command. +- Preferences + - Choices and options will be presented as a typical function. + +### Feature Flags + +| Feature Flags | Description | +| :----------- | :--------------------------------------------------------------- | +| `interactive` | Enable/disable interactive tables. Disabling prints the table directly on the CLI screen. | +| `cls` | Clear the screen after each command. Default state is off. | +| `promptkit` | Enable auto complete and history. Default state is on. | +| `richpanel` | Displays a border around menus. Default state is on. | +| `tbhint` | Display usage hints in the bottom toolbar. Default state is on. | +| `exithelp` | Automatically print the screen after navigating back one menu. Default state is off. | +| `overwrite` | Automatically overwrite exported files with the same name. Default state is off. | +| `version` | Displays the currently installed version number in the bottom right corner. | +| `obbject_msg` | Displays a message whenever a new result is added to the registry. Default state is off. | + +### Preferences + +| Preferences | Description | +| :----------- | :--------------------------------------------------------------- | +| `console_style` | apply a custom rich style to the CLI | +| `flair` | choose flair icon | +| `timezone` | pick timezone | +| `language` | translation language | +| `n_rows` | number of rows to show on non interactive tables | +| `n_cols` | number of columns to show on non interactive tables | +| `obbject_res` | define the maximum number of obbjects allowed in the registry | +| `obbject_display` | define the maximum number of cached results to display on the help menu | diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index e4b187707cd0..3cd6330eb570 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -154,5 +154,5 @@ Saved file: /Users/myusername/OpenBBUserData/20240508_145308_controllers_search. A chain of commands can be run from a single line, separate each process with `/`. ``` -equity/fundamental/balance --symbol MSFT --period quarter --export msft_financials.xlsx --sheet-name balance +equity/fundamental/balance --symbol MSFT --provider yfinance --period quarter --export msft_financials.xlsx --sheet-name balance/cash --symbol MSFT --provider yfinance --period quarter --export msft_financials.xlsx --sheet-name cash/income --symbol MSFT --provider yfinance --period quarter --export msft_financials.xlsx --sheet-name income ``` diff --git a/website/content/cli/usage/_category_.json b/website/content/cli/usage/_category_.json index db299faef7fa..7bcae2266d62 100644 --- a/website/content/cli/usage/_category_.json +++ b/website/content/cli/usage/_category_.json @@ -1,4 +1,4 @@ { "label": "Usage", - "position": 2 + "position": 5 } From 697705836e1dcd827f1eeda00770f20156fd977c Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Thu, 9 May 2024 19:06:02 -0700 Subject: [PATCH 12/25] more updates --- website/content/cli/configuration.md | 10 +- .../cli/{usage/data => }/data-sources.md | 40 +++--- website/content/cli/index.md | 21 ++-- website/content/cli/openbbuserdata.md | 53 ++++++++ website/content/cli/quickstart.md | 118 ++++++++++++++---- .../content/cli/usage/data/_category_.json | 4 - website/content/cli/usage/data/api-keys.md | 23 ---- website/content/cli/usage/data/index.mdx | 26 ---- .../content/cli/usage/data/openbbuserdata.md | 49 -------- 9 files changed, 187 insertions(+), 157 deletions(-) rename website/content/cli/{usage/data => }/data-sources.md (80%) create mode 100644 website/content/cli/openbbuserdata.md delete mode 100644 website/content/cli/usage/data/_category_.json delete mode 100644 website/content/cli/usage/data/api-keys.md delete mode 100644 website/content/cli/usage/data/index.mdx delete mode 100644 website/content/cli/usage/data/openbbuserdata.md diff --git a/website/content/cli/configuration.md b/website/content/cli/configuration.md index 005de0590ab0..d406fb0e745c 100644 --- a/website/content/cli/configuration.md +++ b/website/content/cli/configuration.md @@ -20,9 +20,17 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; In addition to the OpenBB Platform's `user_settings.json` file, described [here](/platform/usage/settings_and_environment_variables), there are settings and environment variables affecting the CLI only. +:::important +API credentials are defined in the `user_settings.json` file. + +Find all data providers [here](/platform/extensions/data_extensions), and manage all your credentials directly on the [OpenBB Hub](https://my.openbb.co/app/platform/credentials). + +Define default data sources by following the pattern outlined [here](data-sources) +::: + ## Settings Menu -The `/settings` menu provides methods for customizing the look of the CLI. The menu is divided into two sections: +The `/settings` menu provides methods for customizing the look and feel of the CLI. The menu is divided into two sections: - Feature Flags - On/Off status is reflected by red/green text. diff --git a/website/content/cli/usage/data/data-sources.md b/website/content/cli/data-sources.md similarity index 80% rename from website/content/cli/usage/data/data-sources.md rename to website/content/cli/data-sources.md index 6b3e161fda21..54e354c25a29 100644 --- a/website/content/cli/usage/data/data-sources.md +++ b/website/content/cli/data-sources.md @@ -1,38 +1,37 @@ --- -title: Data sources -sidebar_position: 1 -description: This page provides useful information on dealing with different data - vendors when using the OpenBB Platform CLI. It outlines how to select a default data source, - acquire API keys, and switch the data vendor using specific commands, all in an - effort to streamline and improve the user's experience. +title: Data Sources +sidebar_position: 4 +description: This page explains how to select a provider for any specific command, and set a default souce for a route. keywords: - Terminal - CLI -- data vendors +- provider - API keys -- data sources - FinancialModelingPrep - Polygon - AlphaVantage -- EODHD +- Intrinio - YahooFinance - source -- stocks/fa/income -- changing data source -- Default data source -- /sources -- get --cmd -- set --cmd +- data +- default --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + +Many commands have multiple data sources associated with it. -## Selecting The Data Source In-Command +:::important +API credentials are defined in the `user_settings.json` file. -Many commands have multiple data sources associated with it. In order to specify the data vendor for that particular command, use the `--provider` argument. +Find all data providers [here](/platform/extensions/data_extensions), and manage all your credentials directly on the [OpenBB Hub](https://my.openbb.co/app/platform/credentials). +::: + +## 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`. @@ -87,8 +86,11 @@ 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 +## 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`. diff --git a/website/content/cli/index.md b/website/content/cli/index.md index 0cfdddaa58bb..497dc1daafe6 100644 --- a/website/content/cli/index.md +++ b/website/content/cli/index.md @@ -1,6 +1,5 @@ --- -id: index -title: OpenBB CLI +title: Introduction sidebar_position: 0 description: The OpenBB CLI is a command line interface wrapping the OpenBB Platform. It offers a convenient way to interact with the Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts. No experience with Python, or other programming languages, is required. keywords: @@ -43,19 +42,19 @@ The CLI is the next iteration of the [OpenBB Terminal](/terminal), and leverages url="cli/quickstart" /> diff --git a/website/content/cli/openbbuserdata.md b/website/content/cli/openbbuserdata.md new file mode 100644 index 000000000000..ed0742511ec5 --- /dev/null +++ b/website/content/cli/openbbuserdata.md @@ -0,0 +1,53 @@ +--- +title: OpenBBUserData Folder +sidebar_position: 5 +description: The OpenBBUserData folder is where exports, routines, and other user-related content is saved and stored. Its default location is the home of the system user account. +keywords: +- OpenBBUserData folder +- settings +- data +- preferences +- exports +- CLI +- save +- routines +- xlsx +- csv +- user_settings.json +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +The OpenBBUserData folder is where exports, routines, and other user-related content is saved and stored. + +Its default location is the home of the system user account, similar to the following paths: +- macOS: `Macintosh HD/Users//OpenBBUserData` +- Windows: `C:/Users//OpenBBUserData` + +This folder contains all things user-created. For example: + +- Exported files +- Styles and themes +- Routines +- Logs + +:::note +**Note:** With a WSL-enabled Windows installation, this folder will be under the Linux partition +::: + +### Update Export Folder Location + +The location of this folder can be set by the user by changing the user configuration file: `/home/your-user/.openbb_platform/user_settings.json`. + +```json +{ +... +"preferences": { + "data_directory": "/path/to/NewOpenBBUserData", + "export_directory": "/path/to/NewOpenBBUserData" +}, +... +} +``` diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index 3cd6330eb570..eb6aec6e5f67 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -23,25 +23,27 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; ## Login -Login to your [OpenBB Hub account](https://my.openbb.co) to add your stored keys to the session. +Login to your [OpenBB Hub account](https://my.openbb.co) to add stored keys to the session. ```console /account/login --pat REPLACE_WITH_YOUR_PAT ``` +:::tip +Add `--remember-me` to the command to persist the login until actively logging out. +::: + Login by email & password is also possible. ```console /account/login --email my@emailaddress.com --password n0Ts3CuR3L!kEPAT ``` -:::tip -Add `--remember-me` to the command to persist the login until actively logging out. -::: +Find all data providers [here](https://docs.openbb.co/platform/extensions/data_extensions), and manage all your credentials directly on the [OpenBB Hub](https://my.openbb.co/app/platform/credentials). ## Menus -:::tip +:::info Menus are distinguishable from commands by the character, `>`, on the left of the screen. ::: @@ -53,11 +55,87 @@ economy ![Economy Menu](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/b68491fc-d6c3-42a7-80db-bfe2aa848a5a) +### Go Back One Level + +Return to the parent menu by entering either: + +- `..` +- `q` + +### Go Back To Home + +Return to the base menu by entering either: + +- `/` +- `home` + +### Jump Between Menus + +Use absolute paths to navigate from anywhere, to anywhere. + +From: + +```console +/equity/calendar/earnings +``` + +To: + +```console +/economy/calendar +``` + +## Commands + +Commands are displayed on-screen in a lighter colour, compared with menu items, and they will not have, `>`. + +Functions have a variety of parameters that differ by endpoint and provider. Use the `--help` dialogue to understand the nuances of any particular command. + +### How To Enter Parameters + +Parameters are all defined through the same pattern, `--argument`, followed by a space, and then the value. + +If the parameter is a boolean (true/false), there is no value to enter. Adding the `--argument` flags the pararmeter to be the opposite of its default state. + +:::danger +The use of positional arguments (i.e, `historical AAPL --start_date 2024-01-01`) is not currently supported. +::: + +### Use Auto Complete + +The auto completion engine is triggered when the spacebar is pressed following any command, or parameter with a defined set of choices. + +After the first parameter has been set, remaining parameters will be triggered by entering `--`. + +```console +historical --symbol AAPL --start_date 2024-01-01 -- +``` + +![Auto Complete](autocomplete1.png) + +### Data Processing Commands + +Extensions such as, `openbb-technical` + +Data processing extensions, like `openbb-technical` accept `data` as an input. + +:::info +Outputs from functions are stored as `results` and are selected with the `--data` parameter. +::: + +```console +/equity/price/historical --symbol SPY --start_date 2024-01-01 --provider yfinance + +/technical/rsi --data 0 --chart +``` + +![SPY RSI](rsi1.png) + ## Help Dialogues Display the help dialogue by attaching, `--help` or `-h`, to any command. -:::tip +:::info Use this to identify the providers compatible with each parameter, if applicable. ::: @@ -65,7 +143,7 @@ Use this to identify the providers compatible with each parameter, if applicable calendar --help ``` -```bash +```console usage: calendar [--start_date START_DATE] [--end_date END_DATE] [--provider {fmp,nasdaq,tradingeconomics}] [--country COUNTRY] [--importance {Low,Medium,High}] [--group {interest rate,inflation,bonds,consumer,gdp,government,housing,labour,markets,money,prices,trade,business}] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] @@ -105,25 +183,9 @@ If the source selected was Nasdaq, `--provider nasdaq`, the `--importance` and ` | 2024-05-08 13:30:00 | United States | Fed Governor Cook Speaks | - | - | - | | | cont... | | | | | | | -## Jump Between Menus - -Use absolute paths to navigate from anywhere, to anywhere. - -From: - -```console -/equity/calendar/earnings -``` - -To: - -```console -/economy/calendar -``` - ## Export Data -Data can be exported as a CSV, JSON, or XLSX file. +Data can be exported as a CSV, JSON, or XLSX file, and can also be exported directly from the interactive tables and charts. ### Named File @@ -149,6 +211,14 @@ If only supplied with the file type, the export will be given a generic name beg Saved file: /Users/myusername/OpenBBUserData/20240508_145308_controllers_search.csv ``` +### Specify Sheet Name + +Exports can share the same `.xlsx` file by providing a `--sheet-name`. + +```console +/equity/search --provider nasdaq --export directory.xlsx --sheet-name nasdaq +``` + ## Run Multiple Commands A chain of commands can be run from a single line, separate each process with `/`. diff --git a/website/content/cli/usage/data/_category_.json b/website/content/cli/usage/data/_category_.json deleted file mode 100644 index 626046e55b7c..000000000000 --- a/website/content/cli/usage/data/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Data", - "position": 2 -} diff --git a/website/content/cli/usage/data/api-keys.md b/website/content/cli/usage/data/api-keys.md deleted file mode 100644 index 5a6761692fde..000000000000 --- a/website/content/cli/usage/data/api-keys.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: API Keys -sidebar_position: 2 -description: This documentation page describes how you can set your own API keys from each data vendor on OpenBB to leverage their datasets. -keywords: -- API keys -- datasets -- data vendors -- subscription -- CLI ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -API (Application Programming Interface) keys are access credentials for obtaining data from a particular data vendor. They are a string of random characters assigned, by the data provider, to an individual account. - -## Setting API keys - -Most vendors offer a free tier requiring only a valid email address, some will require an account with proper KYC (Know Your Customer). - -Find all data providers [here](https://docs.openbb.co/platform/extensions/data_extensions), and manage all your credentials directly on the [OpenBB Hub](https://my.openbb.co/app/platform/credentials). diff --git a/website/content/cli/usage/data/index.mdx b/website/content/cli/usage/data/index.mdx deleted file mode 100644 index a6262fdc4db8..000000000000 --- a/website/content/cli/usage/data/index.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Data ---- - -import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -
    - - - -
diff --git a/website/content/cli/usage/data/openbbuserdata.md b/website/content/cli/usage/data/openbbuserdata.md deleted file mode 100644 index b32b640e029d..000000000000 --- a/website/content/cli/usage/data/openbbuserdata.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: OpenBBUserData Folder -sidebar_position: 3 -description: This page outlines the OpenBBUserData folder. -keywords: -- financial data -- data aggregation -- data standardization -- OpenBBUserData folder -- import data -- export data -- Econometrics -- Portfolio -- Portfolio Optimization -- settings menu -- export folder location -- userdata command -- user-created files -- CLI ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -The OpenBB Platform CLI not only allows access to a world of financial data through our data aggregation and standardization. - -## The OpenBBUserData Folder - -The `OpenBBUserData` folder's default location is the home of the system user account. By default this will be the following paths: -- macOS: `Macintosh HD/Users//OpenBBUserData` -- Windows: `C:/Users//OpenBBUserData` - -Within the folder you can find files that you have exported. - -This folder contains all things user-created. For example: - -- Exported files -- Styles and themes -- Routines -- Logs - -:::note -**Note:** With a WSL-enabled Windows installation, this folder will be under the Linux partition -::: - -### Update export folder location - -The location of this folder can be set by the user by changing the user configuration file: `/home/your-user/.openbb_platform/user_settings.json`. From b07f3eb15ad2953adf94b475966a0950b0b426a2 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Thu, 9 May 2024 19:08:57 -0700 Subject: [PATCH 13/25] Add screenshots --- website/content/cli/quickstart.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index eb6aec6e5f67..3568859ecf19 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -111,7 +111,7 @@ After the first parameter has been set, remaining parameters will be triggered b historical --symbol AAPL --start_date 2024-01-01 -- ``` -![Auto Complete](autocomplete1.png) +![Auto Complete](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/78e68bbd-094e-4558-bce0-92b8d556fcaf) ### Data Processing Commands @@ -129,7 +129,7 @@ Outputs from functions are stored as `results` and are selected with the `--data /technical/rsi --data 0 --chart ``` -![SPY RSI](rsi1.png) +![SPY RSI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/b480da04-92e6-48e2-bccf-cebc16fb083a) ## Help Dialogues From 98a8a4f95ca43c789328496250f3eceef80c9f37 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Thu, 9 May 2024 19:31:33 -0700 Subject: [PATCH 14/25] flatten some things. --- website/content/cli/index.md | 10 +++ website/content/cli/installation.md | 4 ++ .../{usage/outputs => }/interactive-charts.md | 17 ++--- .../{usage/outputs => }/interactive-tables.md | 11 ++- website/content/cli/openbbuserdata.md | 4 +- website/content/cli/usage/_category_.json | 2 +- .../cli/usage/customizing-the-terminal.md | 41 ------------ .../content/cli/usage/outputs/_category_.json | 4 -- .../content/cli/usage/outputs/export-data.md | 67 ------------------- website/content/cli/usage/outputs/index.mdx | 26 ------- .../cli/usage/overview/_category_.json | 4 -- website/content/cli/usage/overview/index.mdx | 26 ------- 12 files changed, 31 insertions(+), 185 deletions(-) rename website/content/cli/{usage/outputs => }/interactive-charts.md (90%) rename website/content/cli/{usage/outputs => }/interactive-tables.md (85%) delete mode 100644 website/content/cli/usage/customizing-the-terminal.md delete mode 100644 website/content/cli/usage/outputs/_category_.json delete mode 100644 website/content/cli/usage/outputs/export-data.md delete mode 100644 website/content/cli/usage/outputs/index.mdx delete mode 100644 website/content/cli/usage/overview/_category_.json delete mode 100644 website/content/cli/usage/overview/index.mdx diff --git a/website/content/cli/index.md b/website/content/cli/index.md index 497dc1daafe6..adf656161bc5 100644 --- a/website/content/cli/index.md +++ b/website/content/cli/index.md @@ -56,6 +56,16 @@ The CLI is the next iteration of the [OpenBB Terminal](/terminal), and leverages description="The OpenBBUserData folder is where exports, routines, and other related files are saved." url="cli/openbbuserdata" /> + + --- diff --git a/website/content/cli/installation.md b/website/content/cli/installation.md index a7ab22f77db2..51c1819538ab 100644 --- a/website/content/cli/installation.md +++ b/website/content/cli/installation.md @@ -70,3 +70,7 @@ Alternatively, install locally with `pip`: ```bash pip install -e . ``` + +## Installing New Modules + +New extensions, or removals, are automatically added (removed) to the CLI on the next launch. diff --git a/website/content/cli/usage/outputs/interactive-charts.md b/website/content/cli/interactive-charts.md similarity index 90% rename from website/content/cli/usage/outputs/interactive-charts.md rename to website/content/cli/interactive-charts.md index f7cb854e1c21..ff4b6a294c9f 100644 --- a/website/content/cli/usage/outputs/interactive-charts.md +++ b/website/content/cli/interactive-charts.md @@ -1,14 +1,15 @@ --- title: Interactive Charts -sidebar_position: 2 -description: Explore how to effectively utilize OpenBB's interactive charts backed - by open source PyWry technology. Understand various capabilities including annotation, - color modification, drawing tools, data export, and supplementary data overlay. +sidebar_position: 6 +description: This page provides a detailed explanation of the OpenBB Interactive Charts. Understand various capabilities including annotation, color modification, drawing tools, data export, and supplementary data overlay. keywords: - interactive charts -- PyWry technology -- chart annotation -- drawing tools +- PyWry +- annotation +- drawing +- lines +- modebar +- plotly - data export - data overlay - editing chart title @@ -20,7 +21,7 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + Interactive charts open in a separate window ([PyWry](https://github.com/OpenBB-finance/pywry)). The OpenBB charting library provides interactive and highly customizable charts. diff --git a/website/content/cli/usage/outputs/interactive-tables.md b/website/content/cli/interactive-tables.md similarity index 85% rename from website/content/cli/usage/outputs/interactive-tables.md rename to website/content/cli/interactive-tables.md index 695beff89f9d..4620993d2b74 100644 --- a/website/content/cli/usage/outputs/interactive-tables.md +++ b/website/content/cli/interactive-tables.md @@ -1,10 +1,7 @@ --- title: Interactive Tables -sidebar_position: 1 -description: Learn how to navigate and utilize OpenBB's interactive tables using our - open source PyWry technology. Understand how to sort and filter columns, hide or - remove columns, select number of rows per page, freeze index and column headers, - and export the data. +sidebar_position: 7 +description: This page explains how to navigate and utilize OpenBB's interactive tables. Understand how to sort and filter columns, hide or remove columns, select number of rows per page, freeze index and column headers, and export the data. keywords: - interactive tables - PyWry technology @@ -21,13 +18,13 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + Interactive tables open in a separate window ([PyWry](https://github.com/OpenBB-finance/pywry)). These provide methods for searching, sorting, filtering, exporting and even adapting settings directly on the table. :::tip -All OpenBB Platform CLI results are displayed in interactive tables by default, unless the interactive model is disabled. +All OpenBB CLI results are displayed in interactive tables by default, unless the interactive model is disabled from the `/settings` menu. :::
diff --git a/website/content/cli/openbbuserdata.md b/website/content/cli/openbbuserdata.md index ed0742511ec5..93022d8bdd51 100644 --- a/website/content/cli/openbbuserdata.md +++ b/website/content/cli/openbbuserdata.md @@ -22,6 +22,8 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; The OpenBBUserData folder is where exports, routines, and other user-related content is saved and stored. +## Default Location + Its default location is the home of the system user account, similar to the following paths: - macOS: `Macintosh HD/Users//OpenBBUserData` - Windows: `C:/Users//OpenBBUserData` @@ -37,7 +39,7 @@ This folder contains all things user-created. For example: **Note:** With a WSL-enabled Windows installation, this folder will be under the Linux partition ::: -### Update Export Folder Location +## Update Folder Location The location of this folder can be set by the user by changing the user configuration file: `/home/your-user/.openbb_platform/user_settings.json`. diff --git a/website/content/cli/usage/_category_.json b/website/content/cli/usage/_category_.json index 7bcae2266d62..b6b739ba589b 100644 --- a/website/content/cli/usage/_category_.json +++ b/website/content/cli/usage/_category_.json @@ -1,4 +1,4 @@ { "label": "Usage", - "position": 5 + "position": 11 } diff --git a/website/content/cli/usage/customizing-the-terminal.md b/website/content/cli/usage/customizing-the-terminal.md deleted file mode 100644 index 262c96d34bfb..000000000000 --- a/website/content/cli/usage/customizing-the-terminal.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Customization -sidebar_position: 4 -description: This documentation page details the settings and feature flags that can be defined under the `/settings` menu. -keywords: -- Settings Menu -- Feature Flags Menu -- customize CLI -- alter CLI behaviour -- environment variables -- Documentation -- OpenBB Platform CLI -- preferences -- user ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -## Settings Menu - -The `/settings` menu provides methods for customizing the look of the CLI. - -| Setting | Description | -| :----------- | :--------------------------------------------------------------- | -| `flair` | Sets the flair emoji to be used. | -| `language` | Select the language for the CLI menus and commands. | -| `timezone` | Select a timezone. | -| `n_rows` | Set the number of rows to display in the CLI's interactive tables. | -| `n_cols` | Set the number of columns to display in the CLI's interactive tables. | -| `cls` | Clear the screen after each command. Default state is off. | -| `exithelp` | Automatically print the screen after navigating back one menu. Default state is off. | -| `interactive` | Enable/disable interactive tables. Disabling prints the table directly on the CLI screen. | -| `overwrite` | Automatically overwrite exported files with the same name. Default state is off. | -| `promptkit` | Enable auto complete and history. Default state is on. | -| `rcontext` | Remember loaded tickers while switching menus. Default state is on. | -| `retryload` | Retries misspelled commands with the load function first. Default state is off. | -| `richpanel` | Displays a border around menus. Default state is on. | -| `tbhint` | Display usage hints in the bottom toolbar. Default state is on. | -| `version` | Displays the currently installed version number in the bottom right corner. | diff --git a/website/content/cli/usage/outputs/_category_.json b/website/content/cli/usage/outputs/_category_.json deleted file mode 100644 index 1e5caec41bc6..000000000000 --- a/website/content/cli/usage/outputs/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Outputs", - "position": 3 -} diff --git a/website/content/cli/usage/outputs/export-data.md b/website/content/cli/usage/outputs/export-data.md deleted file mode 100644 index 65cf9661bfae..000000000000 --- a/website/content/cli/usage/outputs/export-data.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Export data -sidebar_position: 3 -description: Learn how to export financial data through the OpenBB Terminal in different - formats like XLSX, CSV, JSON, PNG, JPG, PDF, and SVG. Also learn to specify filename, - sheet name, and export directly into a chart. -keywords: -- financial data export -- XLSX -- CSV -- JSON -- PNG -- JPG -- PDF -- SVG -- filename specification -- sheet name specification -- export to chart ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -The OpenBB Terminal offers a variety of ways to export financial data. This can be to a text-based file - XLSX, CSV or JSON - or as images - PNG, JPG, PDF and SVG. - -:::note -Note that the commands and menus may vary. -::: - -To export as a spreadsheet, `xlsx`, add `--export xlsx` to the command. - -```console - -``` - -Which creates: - - -## Specifying the Filename - -Instead of the default filename, it can be specified. Exporting as a `csv` this time: - -```console - -``` - - - -## Specifying a Target Sheet Name - -With the `xlsx` option, `--sheet-name` allows multiple datasets to be saved to the same file. For example: - -```console - -``` - -```console - -``` - -This generates a file for `AAPL`, with market data from 2010-01-01 until now, as well as the income, balance and cash flow statements from the last ten years. - - -## Export Directly From Charts - -See the [interactive charts](interactive-charts.md#export-tools) page for instructions. diff --git a/website/content/cli/usage/outputs/index.mdx b/website/content/cli/usage/outputs/index.mdx deleted file mode 100644 index f0d92a27cb20..000000000000 --- a/website/content/cli/usage/outputs/index.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Outputs ---- - -import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -
    - - - -
diff --git a/website/content/cli/usage/overview/_category_.json b/website/content/cli/usage/overview/_category_.json deleted file mode 100644 index d98d73979e26..000000000000 --- a/website/content/cli/usage/overview/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Overview", - "position": 1 -} diff --git a/website/content/cli/usage/overview/index.mdx b/website/content/cli/usage/overview/index.mdx deleted file mode 100644 index 4e15e6e5e592..000000000000 --- a/website/content/cli/usage/overview/index.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Overview ---- - -import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; -import HeadTitle from "@site/src/components/General/HeadTitle.tsx"; - - - -
    - - - -
From 0f08f0d4fb79f7da3643d6cdf1aaf560a494c09e Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Thu, 9 May 2024 20:42:19 -0700 Subject: [PATCH 15/25] fix link --- website/content/cli/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/cli/index.md b/website/content/cli/index.md index adf656161bc5..307304f64fbc 100644 --- a/website/content/cli/index.md +++ b/website/content/cli/index.md @@ -44,7 +44,7 @@ The CLI is the next iteration of the [OpenBB Terminal](/terminal), and leverages Date: Fri, 10 May 2024 21:13:33 -0700 Subject: [PATCH 16/25] some more updates --- website/content/cli/configuration.md | 2 +- website/content/cli/data-sources.md | 4 +- website/content/cli/hub.md | 111 ++++++++++++++++++++++++++ website/content/cli/index.md | 9 ++- website/content/cli/openbbuserdata.md | 4 + website/content/cli/quickstart.md | 12 ++- website/content/cli/usage/hub.md | 89 --------------------- 7 files changed, 135 insertions(+), 96 deletions(-) create mode 100644 website/content/cli/hub.md delete mode 100644 website/content/cli/usage/hub.md diff --git a/website/content/cli/configuration.md b/website/content/cli/configuration.md index d406fb0e745c..4f06bd7b8481 100644 --- a/website/content/cli/configuration.md +++ b/website/content/cli/configuration.md @@ -49,8 +49,8 @@ The `/settings` menu provides methods for customizing the look and feel of the C | `tbhint` | Display usage hints in the bottom toolbar. Default state is on. | | `exithelp` | Automatically print the screen after navigating back one menu. Default state is off. | | `overwrite` | Automatically overwrite exported files with the same name. Default state is off. | -| `version` | Displays the currently installed version number in the bottom right corner. | | `obbject_msg` | Displays a message whenever a new result is added to the registry. Default state is off. | +| `version` | Displays the currently installed version number in the bottom right corner. | ### Preferences diff --git a/website/content/cli/data-sources.md b/website/content/cli/data-sources.md index 54e354c25a29..e77d41240b56 100644 --- a/website/content/cli/data-sources.md +++ b/website/content/cli/data-sources.md @@ -1,6 +1,6 @@ --- title: Data Sources -sidebar_position: 4 +sidebar_position: 5 description: This page explains how to select a provider for any specific command, and set a default souce for a route. keywords: - Terminal @@ -21,7 +21,7 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -Many commands have multiple data sources associated with it. +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. diff --git a/website/content/cli/hub.md b/website/content/cli/hub.md new file mode 100644 index 000000000000..75e247ca1773 --- /dev/null +++ b/website/content/cli/hub.md @@ -0,0 +1,111 @@ +--- +title: Hub Synchronization +sidebar_position: 4 +description: This page outlines the `/account` menu within the OpenBB CLI, and integrations with the OpenBB Hub. +keywords: +- OpenBB Platform CLI +- OpenBB Hub +- Registration +- Login process +- API Keys management +- Theme +- Style +- Dark +- Light +- Script Routines +- Personal Access Tokens +- PAT +- Credentials +- Customization +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +This page outlines the `/account` menu within the OpenBB CLI and integrations with the OpenBB Hub. + +## Registration + +To get started, you'll need to create an account on the OpenBB Hub by visiting [https://my.openbb.co](https://my.openbb.co) + +By registering with the OpenBB Hub, you can easily access our products on multiple devices and maintain consistent settings for an improved user experience. + +## Login + +Once you're successfully registered on the OpenBB Hub, you can log in to access all the benefits it has to offer. + +:::tip +OpenBB recommends logging in via the Personal Access Token (PAT) method. This revokable token allows users to login without transmitting any personally identifiable information, like an email address, which makes it an ideal solution for shared machines and public network connections. +::: + +To login, enter the `/account` menu and then use the `login` command with your choice of login method. + +### PAT + +```console +/account +login --pat REPLACE_WITH_PAT +``` + +### Email & Password + +```console +/account +login --email my@emailaddress.com --password totallysecurepassword +``` + +## API Keys + +The OpenBB Platform acts as a mediator between users and data providers. + +With an OpenBB Hub account, you can manage your API keys on [this page](https://my.openbb.co/app/platform/credentials). + +Upon logging in, the CLI will automatically retrieve the API keys associated with your account. + +If you have not saved them on the OpenBB Hub, they will be loaded from your local environment by default. + +:::danger +If an API key is saved on the OpenBB Hub, it will take precedence over the local environment key. +::: + +The CLI will need to be restarted, or refreshed, when changes are made on the Hub. + +## Theme Styles + +Theme styles correspond to the ability to change the terminal "skin" (i.e. coloring of the `menu`, `commands`, `data source`, `parameters`, `information` and `help`), as well as the chart and table styles. + +In the OpenBB Hub, you can select the text colours for the CLI. After customizing: +- Download the theme to your styles directory (`/home/your-user/OpenBBUserData/styles/user`). +- Apply it by selecting the style from the `/settings` menu. + +```console +/settings +console_style -s openbb_config +``` + +Replace `openbb_config` with the name of the downloaded (JSON) file. + +## Script Routines + +The OpenBB Hub allows users to create, edit, manage, and share their script routines that can be run in the OpenBB Platform CLI. + +The "Download" button will save the file locally. Add it to `/home/your-user/OpenBBUserData/routines`, for the script to populate as a choice for the `exe` command on next launch. + +## Refresh + +The `refresh` command will update any changes without the need to logout and login. + +```console +/account +refresh +``` + +## Logout + +Logging out will restore any local credentials and preferences defined in the `user_settings.json` file. + +```console +/account +logout +``` diff --git a/website/content/cli/index.md b/website/content/cli/index.md index 307304f64fbc..8097697a0884 100644 --- a/website/content/cli/index.md +++ b/website/content/cli/index.md @@ -46,6 +46,11 @@ The CLI is the next iteration of the [OpenBB Terminal](/terminal), and leverages description="An explanation of the settings and environment variables that customize the look and feel of the OpenBB CLI." url="cli/configuration" /> + diff --git a/website/content/cli/openbbuserdata.md b/website/content/cli/openbbuserdata.md index 93022d8bdd51..754994e3c916 100644 --- a/website/content/cli/openbbuserdata.md +++ b/website/content/cli/openbbuserdata.md @@ -22,6 +22,10 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; The OpenBBUserData folder is where exports, routines, and other user-related content is saved and stored. +:::info +If a new file is placed in the folder (like a Routine) the CLI will need to be reset before auto complete will recognize it. +::: + ## Default Location Its default location is the home of the system user account, similar to the following paths: diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index 3568859ecf19..01743931ed52 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -221,8 +221,16 @@ Exports can share the same `.xlsx` file by providing a `--sheet-name`. ## Run Multiple Commands -A chain of commands can be run from a single line, separate each process with `/`. +A chain of commands can be run from a single line, separate each process with `/`. The example below will draw two charts and can be pasted as a single line. +```console +/equity/price/historical --symbol AAPL,MSFT,GOOGL,AMZN,META,NVDA,NFLX,TSLA,QQQ --start_date 2022-01-01 --provider yfinance --chart/performance --symbol AAPL,MSFT,GOOGL,AMZN,META,NVDA,NFLX,TSLA,QQQ --provider finviz --chart ``` -equity/fundamental/balance --symbol MSFT --provider yfinance --period quarter --export msft_financials.xlsx --sheet-name balance/cash --symbol MSFT --provider yfinance --period quarter --export msft_financials.xlsx --sheet-name cash/income --symbol MSFT --provider yfinance --period quarter --export msft_financials.xlsx --sheet-name income + +## Example Routine + +To demonstrate how multiple commands are sequenced as a script, try running the example Routine. + +```console +/exe --example ``` diff --git a/website/content/cli/usage/hub.md b/website/content/cli/usage/hub.md deleted file mode 100644 index 3804b7fc2796..000000000000 --- a/website/content/cli/usage/hub.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Hub Synchronization -sidebar_position: 6 -description: This is a documentation page for OpenBB focusing on the integration of - OpenBB Platform CLI with OpenBB Hub. Topics covered include registration, login, managing - API keys, default data sources, theme styles, script routines, and personal access - tokens. -keywords: -- OpenBB Platform CLI -- OpenBB Terminal guide -- OpenBB Hub integration -- Registration process -- Login process -- API Keys management -- Default Data Sources -- Theme Styles -- Script Routines -- Personal Access Tokens ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -This guide will walk you through the process of integrating the OpenBB Platform CLI with the OpenBB Hub to achieve optimal performance. - -## Registration - -To get started, you'll need to create an account on the OpenBB Hub by visiting [https://my.openbb.co](https://my.openbb.co) - -By registering with the OpenBB Hub, you can easily access our products on multiple devices and maintain consistent settings for an improved user experience. This also enables you to receive updates for the terminal as soon as they become available. - -## Login - -Once you're successfully registered on the OpenBB Hub, you can log in to access all the benefits it has to offer. - -The login credentials you use on the OpenBB Hub will be the same ones you will use to access the OpenBB Platform CLI. - -To log in on your account while inside the CLI, simply access the `/account` menu and use the `login` command. - -## API Keys - -As you may already know, the OpenBB Platform acts as a mediator between users and data providers and does not store any data. This enables us to focus on providing a superior product experience for users, while data vendors can integrate their data sources to create a new revenue channel. However, this does mean that each user must manage their own API keys for each data provider they wish to access. - -After having an account on the OpenBB Hub, you can manage your API keys on [this page](https://my.openbb.co/app/platform/credentials). - -Upon logging in, the OpenBB Platform CLI will automatically retrieve the API keys associated with your account. - -If you have not saved them on the OpenBB Hub, they will be loaded from your local environment by default. However, if an API key is saved on the OpenBB Hub, it will take precedence over the local environment key. - -If an API key is updated in the Hub while the OpenBB Terminal is running, you will need to restart the CLI for the changes to take effect. - -## Theme Styles - -Theme styles correspond to the ability to change your terminal "skin" (i.e. coloring of the `menu`, `commands`, `data source`, `parameters`, `information` and `help`), the charts and tables style. - -In the OpenBB Hub, you have the ability to change your preferred themes for the CLI. After customizing as intended, you can then download the theme and apply it to the CLI by adding it to you styles directory (`/home/your-user/OpenBBUserData/styles/user`). - -## Script Routines - -These are text files with an `.openbb` extension that allow users to create workflows of sequence of commands. And allows to create parameters that can be modified outside the CLI. An example would be the file, "_example.openbb_" looking like: - -```text -equity -price -# depict candle chart -historical --symbol $ARGV[0] --chart -``` - -and then run on the terminal utilizing: - -```text -/exe example.openbb -i MSFT -``` - -The OpenBB Hub allows users to manage their own script routines to be run in the OpenBB Platform CLI. - -Note that the "Download" button allows you to download the example file and share with co-workers / colleagues. - -To run a routine on the CLI, select `exe --file` from the main menu and the available routines will pop up as auto-completions. For example: - - -## Personal Access Tokens - -Setting up API keys on the OpenBB Hub has an additional benefit: it allows you to generate a personal access token (PAT) that can be used with the OpenBB SDK. With this token, you can programmatically access the data that powers the OpenBB Terminal, without the need to add individual API keys for each user. - -You can find and manage your OpenBB PAT [here](https://my.openbb.co/app/platform/pat). - -You can log in to the OpenBB Platform CLI using your PAT by running the `login` command on the `account` menu. From 61972169831d618025efea44f2e158639290ad7e Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Sun, 12 May 2024 14:18:20 -0700 Subject: [PATCH 17/25] some routine stuff --- .../cli/{usage => }/commands-and-arguments.md | 22 +++-- website/content/cli/configuration.md | 2 +- website/content/cli/data-sources.md | 16 +++- website/content/cli/hub.md | 2 +- website/content/cli/interactive-charts.md | 2 +- website/content/cli/interactive-tables.md | 2 +- website/content/cli/openbbuserdata.md | 2 +- .../cli/{usage => }/routines/_category_.json | 2 +- .../advanced-routines.md} | 83 +++++++++++-------- .../cli/routines/community-routines.md | 52 ++++++++++++ .../cli/{usage => }/routines/index.mdx | 25 +++--- .../routines/introduction-to-routines.md | 59 ++++++++++--- .../cli/routines/routine-macro-recorder.md | 46 ++++++++++ .../{usage => }/structure-and-navigation.md | 24 ++++-- website/content/cli/usage/_category_.json | 4 - .../cli/usage/keyboard-hotkey-macros.md | 27 ------ .../cli/usage/routines/community-routines.md | 22 ----- .../usage/routines/pipeline-of-commands.md | 50 ----------- .../usage/routines/routine-macro-recorder.md | 36 -------- 19 files changed, 255 insertions(+), 223 deletions(-) rename website/content/cli/{usage => }/commands-and-arguments.md (54%) rename website/content/cli/{usage => }/routines/_category_.json (61%) rename website/content/cli/{usage/routines/routines-for-power-users.md => routines/advanced-routines.md} (70%) create mode 100644 website/content/cli/routines/community-routines.md rename website/content/cli/{usage => }/routines/index.mdx (57%) rename website/content/cli/{usage => }/routines/introduction-to-routines.md (66%) create mode 100644 website/content/cli/routines/routine-macro-recorder.md rename website/content/cli/{usage => }/structure-and-navigation.md (85%) delete mode 100644 website/content/cli/usage/_category_.json delete mode 100644 website/content/cli/usage/keyboard-hotkey-macros.md delete mode 100644 website/content/cli/usage/routines/community-routines.md delete mode 100644 website/content/cli/usage/routines/pipeline-of-commands.md delete mode 100644 website/content/cli/usage/routines/routine-macro-recorder.md diff --git a/website/content/cli/usage/commands-and-arguments.md b/website/content/cli/commands-and-arguments.md similarity index 54% rename from website/content/cli/usage/commands-and-arguments.md rename to website/content/cli/commands-and-arguments.md index 952e6255a052..94d37f6f7897 100644 --- a/website/content/cli/usage/commands-and-arguments.md +++ b/website/content/cli/commands-and-arguments.md @@ -1,6 +1,6 @@ --- title: Commands And Arguments -sidebar_position: 2 +sidebar_position: 4 description: This page explains how to enter commands and arguments into the OpenBB CLI. keywords: - help arguments @@ -19,21 +19,33 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + +Commands are displayed on-screen in a lighter colour, compared with menu items, and they will not be prefaced with, `>`. + +Functions have a variety of parameters that differ by endpoint and provider. The --help dialogue will provide guidance on nuances of any particular command. + +The available data sources for each command are displayed on the right side of the screen, and are selected with the `--provider` argument. ## Help arguments -The `help` command shows the current menu you are in and all the commands and menus that exist, including a short description for each of these. +The `help` command shows the current menu. The screen will display all the commands and menus that exist, including a short description for each of these. + +Adding `--help`, or `-h`, to any command will display the description and parameters for that particular function. + +## Entering Parameters + +Parameters are all defined through the same pattern, --argument, followed by a space, and then the value. -This is arguably one of the most helpful commands that the CLI. If you are familiar to navigating in a command line interface, it's the equivalent to `ls -ll`. +If the parameter is a boolean (true/false), there is no value to enter. Adding the --argument flags the pararmeter to be the opposite of its default state. +Use the auto-complete to prompt choices and reduce the amount of keystrokes required to run a complex function. ## Auto-complete The OpenBB CLI is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments. -This functionality dramatically reduces the number of key strokes required to perform tasks and, in many cases, eliminates the need to consult the help dialogue for reminders. Choices - where they are bound by a defined list - are searchable with the up and down arrow keys. +This functionality dramatically reduces the number of key strokes required to perform tasks and, in many cases, eliminates the need to consult the help dialogue for reminders. Choices - where they are bound by a defined list - are scrollable with the up and down arrow keys. ## Global commands diff --git a/website/content/cli/configuration.md b/website/content/cli/configuration.md index 4f06bd7b8481..360aebae253f 100644 --- a/website/content/cli/configuration.md +++ b/website/content/cli/configuration.md @@ -1,6 +1,6 @@ --- title: Configuration & Settings -sidebar_position: 3 +sidebar_position: 5 description: This documentation page details the various settings and feature flags used to customize the OpenBB CLI. keywords: - Settings Menu diff --git a/website/content/cli/data-sources.md b/website/content/cli/data-sources.md index e77d41240b56..8822c4c48cd6 100644 --- a/website/content/cli/data-sources.md +++ b/website/content/cli/data-sources.md @@ -1,6 +1,6 @@ --- title: Data Sources -sidebar_position: 5 +sidebar_position: 7 description: This page explains how to select a provider for any specific command, and set a default souce for a route. keywords: - Terminal @@ -98,8 +98,16 @@ Set the default data provider for the `/equity/price/historical` command by addi ```json { - ... - "defaults": {"routes": {"equity/price/historical": {"provider":"yfinance"}}} - ... + "defaults": { + "routes": { + "/equity/price/historical": { + "provider": "fmp" + }, + "/equity/fundamental/balance": { + "provider": "polygon" + }, + ... + } + } } ``` diff --git a/website/content/cli/hub.md b/website/content/cli/hub.md index 75e247ca1773..d7e77fd9e63c 100644 --- a/website/content/cli/hub.md +++ b/website/content/cli/hub.md @@ -1,6 +1,6 @@ --- title: Hub Synchronization -sidebar_position: 4 +sidebar_position: 6 description: This page outlines the `/account` menu within the OpenBB CLI, and integrations with the OpenBB Hub. keywords: - OpenBB Platform CLI diff --git a/website/content/cli/interactive-charts.md b/website/content/cli/interactive-charts.md index ff4b6a294c9f..efd7438808e1 100644 --- a/website/content/cli/interactive-charts.md +++ b/website/content/cli/interactive-charts.md @@ -1,6 +1,6 @@ --- title: Interactive Charts -sidebar_position: 6 +sidebar_position: 9 description: This page provides a detailed explanation of the OpenBB Interactive Charts. Understand various capabilities including annotation, color modification, drawing tools, data export, and supplementary data overlay. keywords: - interactive charts diff --git a/website/content/cli/interactive-tables.md b/website/content/cli/interactive-tables.md index 4620993d2b74..1399576b3606 100644 --- a/website/content/cli/interactive-tables.md +++ b/website/content/cli/interactive-tables.md @@ -1,6 +1,6 @@ --- title: Interactive Tables -sidebar_position: 7 +sidebar_position: 10 description: This page explains how to navigate and utilize OpenBB's interactive tables. Understand how to sort and filter columns, hide or remove columns, select number of rows per page, freeze index and column headers, and export the data. keywords: - interactive tables diff --git a/website/content/cli/openbbuserdata.md b/website/content/cli/openbbuserdata.md index 754994e3c916..036731b19365 100644 --- a/website/content/cli/openbbuserdata.md +++ b/website/content/cli/openbbuserdata.md @@ -1,6 +1,6 @@ --- title: OpenBBUserData Folder -sidebar_position: 5 +sidebar_position: 8 description: The OpenBBUserData folder is where exports, routines, and other user-related content is saved and stored. Its default location is the home of the system user account. keywords: - OpenBBUserData folder diff --git a/website/content/cli/usage/routines/_category_.json b/website/content/cli/routines/_category_.json similarity index 61% rename from website/content/cli/usage/routines/_category_.json rename to website/content/cli/routines/_category_.json index 549ac0695baf..baa94ff89038 100644 --- a/website/content/cli/usage/routines/_category_.json +++ b/website/content/cli/routines/_category_.json @@ -1,4 +1,4 @@ { "label": "Routines", - "position": 4 + "position": 11 } diff --git a/website/content/cli/usage/routines/routines-for-power-users.md b/website/content/cli/routines/advanced-routines.md similarity index 70% rename from website/content/cli/usage/routines/routines-for-power-users.md rename to website/content/cli/routines/advanced-routines.md index abd240580242..deb5988eb0ef 100644 --- a/website/content/cli/usage/routines/routines-for-power-users.md +++ b/website/content/cli/routines/advanced-routines.md @@ -1,8 +1,8 @@ --- -title: Routines for Power Users +title: Advanced Routines sidebar_position: 5 -description: This documentation guides on running automated workflows in OpenBB by - introducing variables and arguments for routines. Explains about input variables, +description: This page provides guidance on creating and running advanced workflows in the OpenBB CLI by + introducing variables and arguments for routines. It explains input variables, relative time keyword variables, internal script variables and creating loops for batch execution. keywords: @@ -14,16 +14,14 @@ keywords: - internal script variables - loops - batch execution -- OpenBBTutorial -- Technical Analysis -- Stock Tickers +- Tutorial - Running Scripts - Executing Commands --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + ## Input Variables @@ -31,23 +29,39 @@ Arguments are variables referenced within the `.openbb` script as `$ARGV` or `$A ### Example -```bash +```text # This script requires you to use arguments. This can be done with the following: -# exe --file routines_template_with_inputs.openbb -i TSLA,AAPL,MSFT +# exe --file routines_template_with_input.openbb -i TSLA +# Replace the name of the file with your file. -# Go to the stocks menu +# Navigate to the menu +/equity/price + +# Load the data and display a chart +historical --symbol $ARGV --chart ``` ## Set Variables In addition to external variables using the keyword, `ARGV`, internal variables can be defined with the, `$`, character. -Which has the following output: - Note that the variable can have a single element or can be constituted by an array where elements are separated using a comma “,”. -### Variables Example +### Internal Variables Example + +```text +# Example routine with internal variables. + +$TICKERS = XLE,XOP,XLB,XLI,XLP,XLY,XHE,XLV,XLF,KRE,XLK,XLC,XLU,XLRE + +/equity + +price +historical --symbol $TICKERS --provider yfinance --start_date 2024-01-01 --chart + +home +``` ## Relative Time Keyword Variables @@ -65,6 +79,24 @@ The result will be a date with the conventional date associated with OpenBB, i.e ### Relative Time Example +```text +$TICKERS = XLE,XOP,XLB,XLI,XLP,XLY,XHE,XLV,XLF,KRE,XLK,XLC,XLU,XLRE + +/equity + +price + +historical --symbol $TICKERS --provider yfinance --start_date $3MONTHSAGO --chart + +.. + +calendar + +earnings --start_date $NEXTMONDAY --end_date $NEXTFRIDAY --provider nasdaq + +home +``` + ## Foreach Loop Finally, what scripting language would this be if there were no loops? For this, we were inspired by MatLab. The loops in OpenBB utilize the foreach and end convention, allowing for iteration through a list of variables or arguments to execute a sequence of commands. @@ -77,28 +109,11 @@ To create a foreach loop, you need to follow these steps: 3. Conclude the loop with the keyword `end`. -### Loop Examples +### Loop Example -```bash -# Iterates through ARGV elements from position 1 onwards +```text +# Iterates through ARGV elements. foreach $$VAR in $ARGV[1:] - some_command + /equity/fundamental/filings --symbol $$VAR --provider sec end ``` - -```bash -# Loops through all $ARGV variables -FOREACH $$SOMETHING in $ARGV - some_sequence - end -``` - -```bash -# Iterates through ARGV elements in position 1,2 -foreach $$VAR in $ARGV[1:3] - some_menu - another_menu - some_command - .. -END -``` diff --git a/website/content/cli/routines/community-routines.md b/website/content/cli/routines/community-routines.md new file mode 100644 index 000000000000..1fa10fcdd048 --- /dev/null +++ b/website/content/cli/routines/community-routines.md @@ -0,0 +1,52 @@ +--- +title: Community Routines +sidebar_position: 3 +description: Page provides a detailed overview of OpenBB's Community + Routines. It explains how users can create, modify, share, vote, download, and search for investment + research scripts. +keywords: +- Community Routines +- Investment Research +- Investment Scripts +- Upvotes +- Share Scripts +- Advanced Search +- CLI +- automation +- Hub +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +## Overview + +Community Routines are a feature of the [OpenBB Hub](https://my.openbb.co) that provides methods for creating, editing and sharing OpenBB CLI scripts in the cloud. + +Users can create routines that are private or public, with public routines able to run directly from a URL. + +## Create Routines + +- From the sidebar, click on "My Routines". +- Scroll down and click the button, "Create New". +- Enter a name for the routine. +- Select the "public" check box to make it runnable via URL. +- Add tags (optional). +- Add a short description. +- Enter your workflow into the Script box. +- Click the "Create" button. + +## Run From URL + +To run a routine with a URL, it must be made public. Existing routines can be modified by clicking on the item under, "My Routines". Check the "Public" box to activate. + +The URL will follow the pattern, `https://my.openbb.co/u/{username}/routine/{routine-name}`, which can be executed from the CLI with: + +```console +/exe --url {URL} +``` + +## Download + +Alternatively, click the "Download" button at the bottom of the routine editor to manually download the file to the machine. Place the file in the `OpenBBUserData/routines` folder and open the CLI. The script will be presented as a choice by auto-complete. diff --git a/website/content/cli/usage/routines/index.mdx b/website/content/cli/routines/index.mdx similarity index 57% rename from website/content/cli/usage/routines/index.mdx rename to website/content/cli/routines/index.mdx index 25e4d88b0377..cf5947ef80a0 100644 --- a/website/content/cli/usage/routines/index.mdx +++ b/website/content/cli/routines/index.mdx @@ -5,32 +5,27 @@ title: Routines import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; import HeadTitle from "@site/src/components/General/HeadTitle.tsx"; - +
    - - -
+ + \ No newline at end of file diff --git a/website/content/cli/usage/routines/introduction-to-routines.md b/website/content/cli/routines/introduction-to-routines.md similarity index 66% rename from website/content/cli/usage/routines/introduction-to-routines.md rename to website/content/cli/routines/introduction-to-routines.md index a34ae0d0a87c..7eaf8ecd9734 100644 --- a/website/content/cli/usage/routines/introduction-to-routines.md +++ b/website/content/cli/routines/introduction-to-routines.md @@ -1,9 +1,9 @@ --- title: Introduction to Routines -sidebar_position: 2 +sidebar_position: 1 description: The page provides a detailed introduction to OpenBB Routines, which allow users to automate processes and repetitive tasks in financial analysis and data - collection. It explains basic scripts, routine execution, and guides users on getting + collection. It explains conventions, basic scripts, routine execution, and guides users on getting started with an example. keywords: - OpenBB Routines @@ -12,14 +12,16 @@ keywords: - data collection - basic script - routine execution -- tutorial video +- automation +- routines +- cli --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + -## Introduction +## Overview OpenBB Routines allows users to capture and write simple scripts for automating processes and repetitive tasks. In essence, these are text plain-text files that can be created or modified in any basic text editor with the only difference being the `.openbb` extension. @@ -27,11 +29,39 @@ Other software like STATA, SPSS, and R-Studio share similar functionality in the Routines make it easy to automate a series of processes, and this includes mining and dumping large amounts of data to organized spreadsheets. Making use of `--export` and `--sheet-name`, data collection is more efficient and reliable, with results that are easily replicable. -A pipeline of commands is difficult to share, so to encourage users to share ideas and processes, we created [Community Routines](community-routines.md) for the [OpenBB Hub](https://my.openbb.co/). Routines can be created, stored, and shared - executable in any Terminal installation, by URL. +A pipeline of commands is difficult to share, so to encourage users to share ideas and processes, we created [Community Routines](community-routines.md) for the [OpenBB Hub](https://my.openbb.co/). Routines can be created, stored, and shared - executable in any OpenBB CLI installation, by URL. + +## Pipeline of Commands + +One of the main objectives of the OpenBB Platform CLI is to automate a user's investment research workflow - not just a single command, but the complete process. This is where the pipeline of commands comes in, running a sequence of commands. + +An example of a pipeline of commands is: + +```console +/equity/price/historical --symbol AAPL/../../technical/ema --data OBB0 --length 50 +``` + +Which will perform a exponential moving average (`ema`) on the historical price of Apple (`AAPL`). + +### Step-by-Step Explanation + +This will do the following: + +1. `equity` - Go into `equity` menu. + +2. `price` - Go into `price` sub-menu. + +3. `historical --symbol AAPL` - Load historical price data for Apple. + +4. `..` (X2) will walk back to the root menu. + +5. `technical` - Go into Technical Analysis (`technical`) menu. + +6. `ema --data OBB0 --length 50` - Run the exponential moving average indicator with windows of length 50 (`--length 50`) on the last cached result (`--data OBB0`) ## Routine execution -Run a routine file from the main menu, with the `exe` command. A great start would be to use `exe --example` to get a sense of what this functionality does. Below, the `--help` dialogue is displayed. +Run a routine file from the main menu, with the `exe` command. Try, `exe --example`, to get a sense of what this functionality does. Below, the `--help` dialogue is displayed. ```console /exe -h @@ -64,23 +94,26 @@ The most basic script style contains 2 main elements: For instance, the text below corresponds to the example file that OpenBB provides. ```console -# Go into the stocks context +# Navigate into the price sub-menu of the equity module. equity/price # Load a company ticker, e.g. Apple -historical --symbol AAPL +historical --symbol AAPL --provider yfinance # Show a candle chart with a 20 day Moving Average -/technical/ema --length 20 +/technical/ema --data OBB0 --length 20 # Switch over to the Fundamental Analysis menu /equity/fundamental # Show balance sheet -balance --symbol aapl +balance --symbol aapl --provider yfinance # Show cash flow statement -cash --symbol aapl +cash --symbol aapl --provider yfinance + +# Show income statement +income --symbol aapl --provider yfinance # Return to home home @@ -92,6 +125,6 @@ As a starting point, let's use the example above. 1. Create a new text file with the name `routines_template.openbb` and copy and paste the routine above. -2. Move the file inside the `routines` folder within the [OpenBBUserData](/data/openbbuserdata) folder and, optionally, adjust the name to your liking. +2. Move the file inside the `routines` folder within the [OpenBBUserData](openbbuserdata) folder and, optionally, adjust the name to your liking. 3. Open up the CLI, and type `exe --file routines_template`. If you changed the name of the file, then replace, `routines_template`, with that. As long as the file remains in the `~/OpenBBUserData/routines` folder, the CLI's auto-completer will provide it as a choice. diff --git a/website/content/cli/routines/routine-macro-recorder.md b/website/content/cli/routines/routine-macro-recorder.md new file mode 100644 index 000000000000..2221b7d8d342 --- /dev/null +++ b/website/content/cli/routines/routine-macro-recorder.md @@ -0,0 +1,46 @@ +--- +title: Routine Macro Recorder +sidebar_position: 4 +description: Learn how to use the macro recorder in OpenBB to start saving commands + and automate common tasks with scripts. This page guides you through the process + of recording, saving, and accessing your recorded routines. +keywords: +- macro recorder +- script routines +- global commands +- command recording +- routine script +- terminal main menu +- exe --file +- OpenBBUserData +- routines folder +- cli +- record +- stop +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +OpenBB script routines can be captured with the macro recorder, controlled with global commands. Enter, `record`, to start saving commands, and then, `stop`, terminates the recording. This means that any command you run will be captured in the script; and on `stop`, it will be saved to the `~/OpenBBUserData/routines/` folder. + +For example: + +```console +record -n sample + +/equity/price/historical --symbol SPY --provider cboe --interval 1m/home/derivatives/options/chains --symbol SPY --provider cboe/home/stop/r +``` + +The final command after `stop`, `r`, resets the CLI so that the routine is presented as a choice in the `exe` command. + +It can now be played back by entering: + +```console +/exe --file sample.openbb +``` + +:::tip +The routine can be edited to replace parameter values with input variables - e.g, `$ARGV[0]`, `$ARGV[1]`, etc. +::: diff --git a/website/content/cli/usage/structure-and-navigation.md b/website/content/cli/structure-and-navigation.md similarity index 85% rename from website/content/cli/usage/structure-and-navigation.md rename to website/content/cli/structure-and-navigation.md index 17aedd9befe6..bcb6f6d840e0 100644 --- a/website/content/cli/usage/structure-and-navigation.md +++ b/website/content/cli/structure-and-navigation.md @@ -1,23 +1,24 @@ --- title: Structure and Navigation -sidebar_position: 1 +sidebar_position: 3 description: This page describes the layout and structure of the OpenBB CLI, as well as how to navigate it. keywords: - CLI application - OpenBB Platform CLI -- terminal structure -- Terminal navigation +- structure +- navigation - Command Line Interface -- Interactive Charts and Tables -- Terminal commands -- terminal menus +- navigating +- Home +- commands +- menus - OpenBB Hub Theme Style - Absolute paths --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + ## Structure @@ -29,4 +30,13 @@ A menu is a collection of commands (and sub-menus). A menu can be distinguished Navigating through the CLI menus is similar to traversing folders from any operating system's command line prompt. The `/home` screen is the main directory where everything begins, and the menus are paths branched from the main. Instead of `C:\Users\OpenBB\Documents`, you'll have something like `/equity/price`. Instead of `cd ..`, you can do `..` to return the menu right above. To go back to the root menu you can do `/`. +### Absolute Paths + Absolute paths are also valid to-and-from any point. From the `/equity/price` menu, you can go directly to `crypto` menu with: `/crypto`. Note the forward slash at the start to denote the "absolute" path. + +### Home + +Return to the Home screen from anywhere by entering any of the following: + +- `/` +- `home` diff --git a/website/content/cli/usage/_category_.json b/website/content/cli/usage/_category_.json deleted file mode 100644 index b6b739ba589b..000000000000 --- a/website/content/cli/usage/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Usage", - "position": 11 -} diff --git a/website/content/cli/usage/keyboard-hotkey-macros.md b/website/content/cli/usage/keyboard-hotkey-macros.md deleted file mode 100644 index 0a9b6b63745a..000000000000 --- a/website/content/cli/usage/keyboard-hotkey-macros.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Keyboard Hotkey Macros -sidebar_position: 7 -description: Learn how to set hotkeys macros on a customizable keyboard for swift - and efficient investment research. Learn how to remap keys, assigning them custom - macro commands, shortcuts, or key combinations using the VIA configurator for an - enhanced experience, especially for OpenBB power users. -keywords: -- customizable keyboard -- hotkeys macros -- investment research -- VIA configurator -- Keychron -- OpenBB power users -- command pipeline -- remap keys -- macro commands -- shortcuts -- key combinations ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -This document will explain how you can set hotkeys macros on your customizable keyboard which allow you to perform investment research in a few seconds. - diff --git a/website/content/cli/usage/routines/community-routines.md b/website/content/cli/usage/routines/community-routines.md deleted file mode 100644 index 13e4260d93b2..000000000000 --- a/website/content/cli/usage/routines/community-routines.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Community Routines -sidebar_position: 6 -description: Page provides a detailed overview on the usage of OpenBB's Community - Routines. It explains how users can share, access, upvote, and search for investment - research scripts. Additionally, it presents the feature of using the new TimeGPT-1 - model from Nixtla, and the options to save, download, and share scripts. -keywords: -- Community Routines -- Investment Research -- Investment Scripts -- TimeGPT-1 Model -- Tutorial Video -- Upvotes -- Share Scripts -- Advanced Search -- Nixtla ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - diff --git a/website/content/cli/usage/routines/pipeline-of-commands.md b/website/content/cli/usage/routines/pipeline-of-commands.md deleted file mode 100644 index 68a53a6dde2f..000000000000 --- a/website/content/cli/usage/routines/pipeline-of-commands.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: The Pipeline of Commands -sidebar_position: 1 -description: This page provides a detailed explanation of the OpenBB Platform CLI command pipeline. - The tutorial video and walkthrough guides users in automating their investment - research process by using single commands, and sequences of commands, - to manipulate and study data. -keywords: -- Hub -- Routine -- Community Routines ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -## Single Command - -If you have a good understanding of the Platform CLI's architecture, you will recognize that commands and menus are organized in the form of a tree. - -If the intention is to explore an equity, enter at base of the menu (`/equity/`), then browse or navigate towards the point of interest - for example, Dark Pools (`/equity/darkpool`). - -While all the information is in one place, having to type one command at a time is far from optimal. - -## Pipeline of Commands - -One of the main objectives of the OpenBB Platform CLI was the ability to automate a user's investment research workflow - not just a single command, but the complete process. This is where the pipeline of commands comes in, running a sequence of commands. - -An example of a pipeline of commands is: - -```console -/equity/price/historical --symbol AAPL/../../technical/ema --data 0 --length 50 -``` - -Which will perform a exponential moving average (`ema`) on the historical price of Apple (`AAPL`). - -### Step-by-Step Explanation - -This will do the following: - -1. `equity` - Go into `equity` menu - -2. `price` - Go into `price` sub-menu - -3. `historical --symbol AAPL` - Load historical price data for Apple - -4. `technical` - Go into Technical Analysis (`technical`) menu - -5. `ema --data 0 --length 50` - Run the exponential moving average indicator with windows of length 50 (`--length 50`) on the last cached result (`--data 0`) diff --git a/website/content/cli/usage/routines/routine-macro-recorder.md b/website/content/cli/usage/routines/routine-macro-recorder.md deleted file mode 100644 index 0640169f713e..000000000000 --- a/website/content/cli/usage/routines/routine-macro-recorder.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Routine Macro Recorder -sidebar_position: 4 -description: Learn how to use the macro recorder in OpenBB to start saving commands - and automate common tasks with scripts. This page guides you through the process - of recording, saving, and accessing your recorded routines. -keywords: -- macro recorder -- script routines -- global commands -- Excel's VBA methods -- command recording -- routine script -- terminal main menu -- exe --file -- OpenBBUserData -- routines folder ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -OpenBB script routines can be captured with the macro recorder, controlled with global commands, `record` to start saving commands and `stop` to terminate the recording. This shares similarities with that of Excel's VBA methods. This means that any command you run will be automatically recorded for the routine script and once you type `stop` it automatically saves the file to the `~/OpenBBUserData/routines/` folder. - -For example, if you copy and paste the following prompt in the OpenBB Platform CLI and press enter, you will see an example. - -```console - -``` - -The following shows the output from this pipeline of commands. - -Because there was a `record` and `stop` at the `start` and `end` respectively, a routine script was created. This file cane be found inside the `routines` folder within the `OpenBBUserData` folder (more on exporting and import data [here](/terminal/usage/data/custom-data)). - -Now, you should be able to access the routine file from the CLI main menu by doing `/exe --file` and using the auto-completer. Note that the naming of the file will differ for you based on the time you are executing the script. From eb6a71dae87e733d40dc820cb703d1aaaa3cefb0 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Sun, 12 May 2024 14:22:24 -0700 Subject: [PATCH 18/25] codespell --- website/content/cli/commands-and-arguments.md | 2 +- website/content/cli/data-sources.md | 2 +- website/content/cli/quickstart.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/cli/commands-and-arguments.md b/website/content/cli/commands-and-arguments.md index 94d37f6f7897..a9bcbc7f60cc 100644 --- a/website/content/cli/commands-and-arguments.md +++ b/website/content/cli/commands-and-arguments.md @@ -37,7 +37,7 @@ Adding `--help`, or `-h`, to any command will display the description and parame Parameters are all defined through the same pattern, --argument, followed by a space, and then the value. -If the parameter is a boolean (true/false), there is no value to enter. Adding the --argument flags the pararmeter to be the opposite of its default state. +If the parameter is a boolean (true/false), there is no value to enter. Adding the --argument flags the parameter to be the opposite of its default state. Use the auto-complete to prompt choices and reduce the amount of keystrokes required to run a complex function. diff --git a/website/content/cli/data-sources.md b/website/content/cli/data-sources.md index 8822c4c48cd6..f6bd3a0d7626 100644 --- a/website/content/cli/data-sources.md +++ b/website/content/cli/data-sources.md @@ -1,7 +1,7 @@ --- title: Data Sources sidebar_position: 7 -description: This page explains how to select a provider for any specific command, and set a default souce for a route. +description: This page explains how to select a provider for any specific command, and set a default source for a route. keywords: - Terminal - CLI diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index 01743931ed52..82cd2a209510 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -95,7 +95,7 @@ Functions have a variety of parameters that differ by endpoint and provider. Use Parameters are all defined through the same pattern, `--argument`, followed by a space, and then the value. -If the parameter is a boolean (true/false), there is no value to enter. Adding the `--argument` flags the pararmeter to be the opposite of its default state. +If the parameter is a boolean (true/false), there is no value to enter. Adding the `--argument` flags the parameter to be the opposite of its default state. :::danger The use of positional arguments (i.e, `historical AAPL --start_date 2024-01-01`) is not currently supported. From 6f0c52235c875646f9cf5e352d37ef2235109898 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Tue, 14 May 2024 14:55:28 +0100 Subject: [PATCH 19/25] cli color --- website/src/theme/Navbar/Layout/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/src/theme/Navbar/Layout/index.js b/website/src/theme/Navbar/Layout/index.js index 8a767c3f6200..65e2a425e6e4 100644 --- a/website/src/theme/Navbar/Layout/index.js +++ b/website/src/theme/Navbar/Layout/index.js @@ -80,6 +80,18 @@ export default function NavbarLayout({ children }) { "#3a204f" ); } + } else if (cleanedPath.startsWith("/cli")) { + if (document.documentElement.getAttribute("data-theme") === "dark") { + document.documentElement.style.setProperty( + "--ifm-color-primary", + "#d3d3d3" + ); + } else { + document.documentElement.style.setProperty( + "--ifm-color-primary", + "#d3d3d3" + ); + } } else { } }, [pathname]); From ca7f878f0b00da75c2f3d43ff9f2060f2564dc27 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Tue, 14 May 2024 14:59:14 +0100 Subject: [PATCH 20/25] results in the global commands --- website/content/cli/commands-and-arguments.md | 6 ++++++ website/package-lock.json | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/website/content/cli/commands-and-arguments.md b/website/content/cli/commands-and-arguments.md index a9bcbc7f60cc..709b73f3bc95 100644 --- a/website/content/cli/commands-and-arguments.md +++ b/website/content/cli/commands-and-arguments.md @@ -68,3 +68,9 @@ The `quit` command (can also use `q` or `..`) allows to leave the current menu t The `exit` command allows the user to exit the CLI. ### Reset + +The `reset` command will reset the CLI to its default state. This is specially useful for development so you can refresh the CLI without having to close and open it again. + +### Results + +The `results` command will display the stack of `OBBjects` that have been generated during the session, which can be later injected on the data processing commands. diff --git a/website/package-lock.json b/website/package-lock.json index ddcb2300e626..d4355a0b3d57 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -13952,12 +13952,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/search-insights": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.13.0.tgz", - "integrity": "sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==", - "peer": true - }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", @@ -15149,6 +15143,7 @@ "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" From d00476da791af573a86521b2d121c4b635c63424 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 14 May 2024 15:22:21 +0100 Subject: [PATCH 21/25] increase codeBlock line-height --- website/src/theme/CodeBlock/Content/styles.module.css | 1 + 1 file changed, 1 insertion(+) diff --git a/website/src/theme/CodeBlock/Content/styles.module.css b/website/src/theme/CodeBlock/Content/styles.module.css index c1b10cde049a..1cc776c2fbfa 100644 --- a/website/src/theme/CodeBlock/Content/styles.module.css +++ b/website/src/theme/CodeBlock/Content/styles.module.css @@ -35,6 +35,7 @@ float: left; min-width: 100%; padding: var(--ifm-pre-padding); + line-height: 18px; } .codeBlockLinesWithNumbering { From 65b9e0c04a634d5467c063227e8bc5b8ed6a5b73 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 14 May 2024 15:29:43 +0100 Subject: [PATCH 22/25] remove platform warning, obb is a class --- website/content/platform/installation.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/website/content/platform/installation.md b/website/content/platform/installation.md index 2db5639e2f68..9ef0a060ce44 100644 --- a/website/content/platform/installation.md +++ b/website/content/platform/installation.md @@ -123,15 +123,6 @@ From your python interpreter, import the OpenBB Platform: from openbb import obb ``` -:::warning -This import statement is required due to the statefulness of the obb package. There is currently no support for imports such as - -```console -from openbb.obb.equity import * -``` - -::: - When the package is imported, any installed extensions will be discovered, imported and available for use. :::note From f54c85032068cfd7cb262edb1aa300c7f91d7c55 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 14 May 2024 15:34:12 +0100 Subject: [PATCH 23/25] minor change, danger warning --- website/content/cli/quickstart.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index 82cd2a209510..93a43ead7a2b 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -98,7 +98,11 @@ Parameters are all defined through the same pattern, `--argument`, followed by a If the parameter is a boolean (true/false), there is no value to enter. Adding the `--argument` flags the parameter to be the opposite of its default state. :::danger -The use of positional arguments (i.e, `historical AAPL --start_date 2024-01-01`) is not currently supported. +The use of positional arguments is not supported. + +❌ `historical AAPL --start_date 2024-01-01` + +✅ `historical --symbol AAPL --start_date 2024-01-01` ::: ### Use Auto Complete From fb5151faba16fbf4bd141799bfd927b74c6fe4c2 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 14 May 2024 15:35:45 +0100 Subject: [PATCH 24/25] typo? --- website/content/cli/quickstart.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index 93a43ead7a2b..7975d59855b4 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -119,8 +119,6 @@ historical --symbol AAPL --start_date 2024-01-01 -- ### Data Processing Commands -Extensions such as, `openbb-technical` - Data processing extensions, like `openbb-technical` accept `data` as an input. :::info From 2d6c8929caf36a13d693136b10e4050d784cab13 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 14 May 2024 15:42:17 +0100 Subject: [PATCH 25/25] Data processing commands --- website/content/cli/quickstart.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md index 7975d59855b4..ef9841087311 100644 --- a/website/content/cli/quickstart.md +++ b/website/content/cli/quickstart.md @@ -119,16 +119,21 @@ historical --symbol AAPL --start_date 2024-01-01 -- ### Data Processing Commands -Data processing extensions, like `openbb-technical` accept `data` as an input. +Data processing extensions, like `openbb-technical` accept `--data` as an input. :::info -Outputs from functions are stored as `results` and are selected with the `--data` parameter. +Command outputs are cached. These can be check using the `results` command and are selected with the `--data` parameter. ::: ```console +# Store the command output /equity/price/historical --symbol SPY --start_date 2024-01-01 --provider yfinance -/technical/rsi --data 0 --chart +# Check results content +results + +# Use the results +/technical/rsi --data OBB0 --chart ``` ![SPY RSI](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/b480da04-92e6-48e2-bccf-cebc16fb083a)