### Install OpenBB Platform using pip Source: https://github.com/OpenBB-finance/OpenBB Installs the OpenBB Platform using the pip package manager. This is the primary method for getting started with the OpenBB ecosystem. ```bash pip install openbb ``` -------------------------------- ### Clone PyWry Repository and Install Development Dependencies Source: https://github.com/OpenBB-finance/pywry These commands guide through cloning the PyWry repository, installing Rust, setting up a Python virtual environment, and installing development dependencies including the project itself. ```bash git clone https://github.com/OpenBB-finance/pywry.git curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh python -m venv venv source venv/bin/activate pip install .[dev] ``` -------------------------------- ### MIDPRICE API Request Example (GET) Source: https://www.alphavantage.co/documentation/ Demonstrates how to construct a GET request to the OpenBB API to retrieve MIDPRICE technical indicator data. This example specifies the function, symbol, interval, time period, and includes an API key. ```text https://www.alphavantage.co/query?function=MIDPRICE&symbol=IBM&interval=daily&time_period=10&apikey=demo ``` -------------------------------- ### API Query Example Source: https://www.alphavantage.co/documentation/ An example of a GET request to an API endpoint. It demonstrates the structure of a request including function, symbol, interval, time_period, and apikey parameters. ```url https://www.alphavantage.co/query?function=DX&symbol=IBM&interval=daily&time_period=10&apikey=demo ``` -------------------------------- ### Alpha Vantage API Request Examples (GET) Source: https://www.alphavantage.co/documentation/ Demonstrates how to construct GET requests to the Alpha Vantage API for retrieving technical indicator data. Includes examples for both equity and forex/cryptocurrency pairs, specifying required parameters like function, symbol, interval, time_period, and apikey. ```HTTP GET https://www.alphavantage.co/query?function=AROON&symbol=IBM&interval=daily&time_period=14&apikey=demo ``` ```HTTP GET https://www.alphavantage.co/query?function=AROON&symbol=USDEUR&interval=weekly&time_period=14&apikey=demo ``` -------------------------------- ### Development Setup Script Source: https://context7_llms Executes a Python script to set up the development environment, optionally installing extra dependencies. ```shell python dev_install.py [-e|--extras] ``` -------------------------------- ### Install OpenBB Platform Source: https://github.com/OpenBB-finance/OpenBBTerminal/ Installs the OpenBB Platform as a PyPI package. Alternatively, you can clone the repository directly. ```bash pip install openbb ``` ```bash git clone https://github.com/OpenBB-finance/OpenBB.git ``` -------------------------------- ### Install Haystack using pip Source: https://github.com/deepset-ai/haystack Installs the Haystack library from the Python Package Index (PyPI). This is the simplest method for getting started with Haystack. ```shell pip install haystack-ai ``` -------------------------------- ### Run OpenBB MCP Server with Help Source: https://pypi.org/project/openbb-mcp-server/ Display help information for the openbb-mcp command, showing available options and their descriptions. This is useful for understanding the full range of configurable parameters. ```bash openbb-mcp --help ``` -------------------------------- ### Fetch T3 data using NodeJS Source: https://www.alphavantage.co/documentation/ This example demonstrates fetching T3 data in NodeJS using the `request` module. It makes a GET request to the Alpha Vantage API, handles potential errors, and logs the JSON data. You'll need to install the `request` module (`npm install request`). ```javascript 'use strict'; var request = require('request'); // replace the "demo" apikey below with your own key from https://www.alphavantage.co/support/#api-key var url = 'https://www.alphavantage.co/query?function=T3&symbol=IBM&interval=weekly&time_period=10&series_type=open&apikey=demo'; request.get({ url: url, json: true, headers: {'User-Agent': 'request'} }, (err, res, data) => { if (err) { console.log('Error:', err); } else if (res.statusCode !== 200) { console.log('Status:', res.statusCode); } else { // data is successfully parsed as a JSON object: console.log(data); } }); ``` -------------------------------- ### Basic FastAPI Application Setup Source: https://github.com/OpenBB-finance/OpenBB/blob/6b0ae943d9096e0683265ffc1233c71b4a9dad3b/openbb_platform/extensions/platform_api/README This Python code snippet shows the basic initialization of a FastAPI application. It imports the FastAPI class and creates an instance of the application, which serves as the foundation for building web APIs. ```python from fastapi import FastAPI app = FastAPI() ``` -------------------------------- ### Fetch MINUS_DM Data using NodeJS Source: https://www.alphavantage.co/documentation/ This NodeJS example demonstrates fetching MINUS_DM data from Alpha Vantage using the `request` module. It makes an HTTP GET request and handles the response, including error checking and JSON parsing. You'll need to install the `request` module (`npm install request`). ```javascript 'use strict'; var request = require('request'); // replace the "demo" apikey below with your own key from https://www.alphavantage.co/support/#api-key var url = 'https://www.alphavantage.co/query?function=MINUS_DM&symbol=IBM&interval=daily&time_period=10&apikey=demo'; request.get({ url: url, json: true, headers: {'User-Agent': 'request'} }, (err, res, data) => { if (err) { console.log('Error:', err); } else if (res.statusCode !== 200) { console.log('Status:', res.statusCode); } else { // data is successfully parsed as a JSON object: console.log(data); } }); ``` -------------------------------- ### Install OpenBB Platform Packages Source: https://github.com/OpenBB-finance/OpenBB Installs the OpenBB platform with all extras using pip. This command ensures all necessary packages are downloaded and configured for use. ```shell pip install "openbb[all]" ``` -------------------------------- ### Fetch TRANGE data using NodeJS with Alpha Vantage API Source: https://www.alphavantage.co/documentation/ Shows how to retrieve Average True Range (ATR) data from Alpha Vantage API using NodeJS. This example uses the 'request' library to perform the HTTP GET request and handle the JSON response. Make sure to install the 'request' package (`npm install request`). ```javascript 'use strict'; var request = require('request'); // replace the "demo" apikey below with your own key from https://www.alphavantage.co/support/#api-key var url = 'https://www.alphavantage.co/query?function=TRANGE&symbol=IBM&interval=daily&apikey=demo'; request.get({ url: url, json: true, headers: {'User-Agent': 'request'} }, (err, res, data) => { if (err) { console.log('Error:', err); } else if (res.statusCode !== 200) { console.log('Status:', res.statusCode); } else { // data is successfully parsed as a JSON object: console.log(data); } }); ``` -------------------------------- ### Fetch Global Cotton Price Data using NodeJS Source: https://www.alphavantage.co/documentation/ This example shows how to retrieve monthly global cotton price data from Alpha Vantage using NodeJS. It utilizes the 'request' library to make the HTTP GET request and handles the JSON response, including error checking. You need to install the 'request' library (`npm install request`). ```javascript 'use strict'; var request = require('request'); // replace the "demo" apikey below with your own key from https://www.alphavantage.co/support/#api-key var url = 'https://www.alphavantage.co/query?function=CORN&interval=monthly&apikey=demo'; request.get({ url: url, json: true, headers: {'User-Agent': 'request'} }, (err, res, data) => { if (err) { console.log('Error:', err); } else if (res.statusCode !== 200) { console.log('Status:', res.statusCode); } else { // data is successfully parsed as a JSON object: console.log(data); } }); ``` -------------------------------- ### Starting the OpenBB Platform API with Factory Function Source: https://github.com/OpenBB-finance/OpenBB/blob/6b0ae943d9096e0683265ffc1233c71b4a9dad3b/openbb_platform/extensions/platform_api/README This snippet shows how to start the OpenBB Platform API when it is served via a factory function. The `--factory` flag is used to indicate this configuration. ```APIDOC ## Starting the API with a Factory Function ### Description If your FastAPI instance is served via a factory function, you need to use the `--factory` flag when starting the OpenBB Platform API. ### Command ```shell openbb-api --app some_file.py:main --factory ``` ### Parameters * `--app` (str): Absolute path to the Python file with the target FastAPI instance. Defaults to the installed OpenBB Platform API. * `--factory` (flag): Indicates if the app name is a factory function. Defaults to 'false'. ``` -------------------------------- ### Run FastMCP Server Source: https://github.com/jlowin/fastmcp Starts a FastMCP server instance. This example configures the server to use HTTP transport, bind to all available network interfaces (0.0.0.0), and listen on port 8000. Ensure the 'mcp' library is installed and accessible in your Python environment. ```python mcp.run(transport="http", host="0.0.0.0", port=8000) ``` -------------------------------- ### Standard Router 'GET' Command Example (Python) Source: https://context7_llms A basic example of a standard router 'GET' command. This snippet defines a 'hello' function that returns a dictionary with the current date and a greeting message. ```Python @router.command( methods=["GET"], no_validate=True examples=[ PythonEx( description="Say Hello.", code=[ "result = obb.some_extension.hello()", ], ), ], ) async def hello() -> ( Any ): """Hello World.""" return { datetime.now().strftime( "%Y-%m-%d" ): "Hello from the Empty Router extension!" } ``` -------------------------------- ### Install Cython using Pip Source: https://cython.readthedocs.io/en/latest/src/quickstart/install.html The simplest method to install Cython, which automatically selects optimized binary wheels when available, or falls back to pure Python wheels for other platforms. ```bash pip install Cython ``` -------------------------------- ### Install Cython from Source Source: https://cython.readthedocs.io/en/latest/src/quickstart/install.html Installs Cython by downloading and unpacking the source code. This method is recommended for updating Cython or when specific versions are needed. ```bash pip install . ``` -------------------------------- ### ROCR API Request Example (GET) Source: https://www.alphavantage.co/documentation/ An example GET request to the Alpha Vantage API to fetch the Rate of Change Ratio (ROCR) for IBM. This demonstrates the use of required parameters like function, symbol, interval, time_period, series_type, and apikey. ```http https://www.alphavantage.co/query?function=ROCR&symbol=IBM&interval=daily&time_period=10&series_type=close&apikey=demo ``` -------------------------------- ### Launch OpenBB API with SSL Certificates Source: https://github.com/OpenBB-finance/OpenBB/blob/6b0ae943d9096e0683265ffc1233c71b4a9dad3b/openbb_platform/extensions/platform_api/README This command demonstrates how to start the OpenBB API using generated SSL key and certificate files. The `--ssl_keyfile` and `--ssl_certfile` arguments specify the paths to these files, enabling HTTPS for the API. ```shell openbb-api --ssl_keyfile localhost.key --ssl_certfile localhost.crt ``` -------------------------------- ### Client Entry Point Initialization in JavaScript Source: https://openbb.co/blog/celebrating-the-openbb-platform-v4-beta Initiates the client-side application by importing the necessary entry point script. This script handles the client's lifecycle and rendering. ```javascript import("/assets/entry.client-DdOrfa92.js"); ``` -------------------------------- ### Fetch Weekly Digital Currency Data (NodeJS) Source: https://www.alphavantage.co/documentation/ This code example shows how to retrieve weekly cryptocurrency data from Alpha Vantage using NodeJS. It uses the 'request' library to make an HTTP GET request and parse the JSON response. Ensure you have a valid API key and the 'request' module installed. ```javascript 'use strict'; var request = require('request'); // replace the "demo" apikey below with your own key from https://www.alphavantage.co/support/#api-key var url = 'https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_DAILY&symbol=BTC&market=EUR&apikey=demo'; request.get({ url: url, json: true, headers: {'User-Agent': 'request'} }, (err, res, data) => { if (err) { console.log('Error:', err); } else if (res.statusCode !== 200) { console.log('Status:', res.statusCode); } else { // data is successfully parsed as a JSON object: console.log(data); } }); ``` -------------------------------- ### LLMtxt API Example Call (GET Request) Source: https://www.alphavantage.co/documentation/ An example GET request to the LLMtxt API for retrieving Weighted Moving Average (WMA) data. It specifies the function, stock symbol, time interval, time period for calculation, series type, and the API key. ```http https://www.alphavantage.co/query?function=WMA&symbol=IBM&interval=weekly&time_period=10&series_type=open&apikey=demo ``` -------------------------------- ### Start OpenBB MCP Server with uvx Source: https://pypi.org/project/openbb-mcp-server/ Starts the OpenBB MCP server using the 'uvx' command, specifying the package and its core component. This offers an alternative method for launching the server. ```bash uvx --from openbb-mcp-server --with openbb openbb-mcp ``` -------------------------------- ### Start OpenBB MCP Server Source: https://pypi.org/project/openbb-mcp-server/ Starts the OpenBB MCP server using its default command-line interface. This is the basic way to launch the server. ```bash openbb-mcp ``` -------------------------------- ### Install openbb-mcp-server Source: https://pypi.org/project/openbb-mcp-server/ Installs the openbb-mcp-server package using pip. This is the primary method for getting the server onto your system. ```bash pip install openbb-mcp-server ``` -------------------------------- ### OpenBB Platform API Launcher Arguments Source: https://github.com/OpenBB-finance/OpenBB/blob/6b0ae943d9096e0683265ffc1233c71b4a9dad3b/openbb_platform/extensions/platform_api/README A comprehensive list of arguments available for launching and configuring the OpenBB Platform API. ```APIDOC ## OpenBB Platform API Launcher Arguments ### Description The behavior of the OpenBB Platform API script can be configured using various arguments and keyword arguments. Below is a list of the available launcher-specific arguments: ### Arguments * `--app` (str): Absolute path to the Python file with the target FastAPI instance. Default is the installed OpenBB Platform API. * `--name` (str): Name of the FastAPI instance in the app file. Default is 'app'. * `--factory` (flag): Flag to indicate if the app name is a factory function. Default is 'false'. * `--editable` (flag): Flag to make widgets.json an editable file that can be modified during runtime. Default is 'false'. * `--build` (str): If the file already exists, changes prompt action to overwrite/append/ignore. Only valid when `--editable` is true. Accepts 'overwrite', 'append', or 'ignore'. * `--no-build` (flag): Do not build the widgets.json file. Use this flag to load an existing widgets.json file without checking for updates. * `--login` (flag): Login to the OpenBB Platform. * `--exclude` (str): JSON encoded list of API paths to exclude from widgets.json. Disable entire routes with '*' - e.g. `["/api/v1/*"]`. * `--no-filter` (flag): Do not filter out widgets in widget_settings.json file. * `--widgets-json` (str): Absolute/relative path to use as the widgets.json file. Default is `~/envs/{env}/assets/widgets.json`, when `--editable` is 'true'. * `--apps-json` (str): Absolute/relative path to use as the apps.json file. Default is `~/OpenBBUserData/workspace_apps.json`. * `--agents-json` (str): Absolute/relative path to use as the agents.json file. Including this will add the `/agents` endpoint to the API. ``` -------------------------------- ### Install FastMCP using uv Source: https://github.com/jlowin/fastmcp This command installs the FastMCP library using the 'uv' package installer. It's the recommended method for setting up FastMCP. ```shell uv pip install fastmcp ``` -------------------------------- ### MACDEXT API Request Example (GET) Source: https://www.alphavantage.co/documentation/ An example of a GET request to the Alpha Vantage API to fetch MACDEXT indicator data for IBM. It specifies the function, symbol, interval, series type, and includes a placeholder for the API key. This demonstrates the basic structure for querying technical indicator data. ```HTTP https://www.alphavantage.co/query?function=MACDEXT&symbol=IBM&interval=daily&series_type=open&apikey=demo ``` -------------------------------- ### Install Data Extension Source: https://context7_llms Installs a data provider extension for the OpenBB Platform using pip. The example shows how to install the yFinance extension, which follows the naming convention `openbb-`. ```bash pip install openbb-yfinance ``` -------------------------------- ### Install OpenBB Platform CLI Source: https://github.com/OpenBB-finance/OpenBBTerminal/ Installs the OpenBB Platform Command Line Interface (CLI) using pip. This allows direct access to the OpenBB Platform features from the command line. Alternatively, the repository can be cloned. ```bash pip install openbb-cli ``` ```bash git clone https://github.com/OpenBB-finance/OpenBB.git ``` -------------------------------- ### Equity Router Descriptions and Examples (Python) Source: https://github.com/OpenBB-finance/OpenBBTerminal/pull/6155 This feature introduces updated descriptions and examples for the Equity router, covering various sub-sections like calendar, compare, darkpool, discovery, fundamentals, price, and shorts. It includes fixes for paragraph issues and ensures accurate examples. ```python # feat: equity/calendar # feat: compare router # fix descriptions # darkpool + discovery # fix paragraph issues # fix descriptions # fundamental part 1 # fundamental part2 # transcipts # ownership # fix # price # shorts # Update darkpool_router.py # minor fix # shorts examples # examples # ruff # black ``` -------------------------------- ### Install OpenBB CLI using pip Source: https://github.com/OpenBB-finance/OpenBB Installs the OpenBB Platform Command Line Interface (CLI) as a PyPI package. This allows users to interact with the OpenBB Platform directly from their terminal. ```bash pip install openbb-cli ``` -------------------------------- ### LLM API Example Call Source: https://www.alphavantage.co/documentation/ Example of a GET request to the LLM API to retrieve the AD technical indicator for IBM with a daily interval. Requires a valid API key. ```HTTP https://www.alphavantage.co/query?function=AD&symbol=IBM&interval=daily&apikey=demo ``` -------------------------------- ### Install OpenBB Platform v4 Source: https://openbb.co/blog/celebrating-the-openbb-platform-v4-beta Installs the OpenBB Platform using pip. This command installs the pre-release version of the OpenBB package. ```bash pip install openbb --pre ``` -------------------------------- ### Install Specific OpenBB Packages Source: https://context7_llms Demonstrates how to install individual components of the OpenBB Platform, such as specific extensions (e.g., charting, technical) or providers (e.g., yfinance). It also shows how to install providers and then link them with router extensions. ```console pip install openbb-charting ``` ```console pip install openbb-technical ``` ```console pip install openbb-yfinance ``` ```console pip install openbb-equity openbb-index openbb-derivatives ``` -------------------------------- ### Fetch Real GDP Per Capita using NodeJS Source: https://www.alphavantage.co/documentation/ This NodeJS example shows how to retrieve Real GDP Per Capita data from the Alpha Vantage API using the 'request' module. It makes an HTTP GET request, handles potential errors, and logs the JSON data if the request is successful. Remember to install the 'request' module and replace the demo API key. ```javascript 'use strict'; var request = require('request'); // replace the "demo" apikey below with your own key from https://www.alphavantage.co/support/#api-key var url = 'https://www.alphavantage.co/query?function=REAL_GDP_PER_CAPITA&apikey=demo'; request.get({ url: url, json: true, headers: {'User-Agent': 'request'} }, (err, res, data) => { if (err) { console.log('Error:', err); } else if (res.statusCode !== 200) { console.log('Status:', res.statusCode); } else { // data is successfully parsed as a JSON object: console.log(data); } }); ``` -------------------------------- ### Add More Examples into findSymbols Source: https://github.com/OpenBB-finance/OpenBBTerminal/pull/6155 This update enhances the `findSymbols` function by adding more illustrative examples. This aims to guide users on how to effectively utilize the function with various inputs. ```python from openbb import obb # Example usage: obb.equity.symbol.find_symbols(query='apple', limit=5) obb.equity.symbol.find_symbols(query='MSFT', provider='alpha_vantage') ``` -------------------------------- ### Start OpenBB Platform API Server Source: https://github.com/OpenBB-finance/OpenBB Launches the OpenBB Platform's API server on localhost using the openbb-api command. This command starts a FastAPI server via Uvicorn, typically accessible at 127.0.0.1:6900. ```shell openbb-api ``` -------------------------------- ### OpenBB MCP Client Commands (CLI) Source: https://pypi.org/project/openbb-mcp-server/ Demonstrates various command-line interface (CLI) commands for starting the OpenBB MCP server with different configurations. This includes using default settings, alternative transports, specifying categories, and disabling tool discovery. ```bash # Start with default settings openbb-mcp ``` ```bash # Use an alternative transport openbb-mcp --transport sse ``` ```bash # Start with specific categories and custom host/port openbb-mcp --default-categories equity,news --host 0.0.0.0 --port 8080 ``` ```bash # Start with allowed categories restriction openbb-mcp --allowed-categories equity,crypto,news ``` ```bash # Disable tool discovery for multi-client usage openbb-mcp --no-tool-discovery ``` -------------------------------- ### OpenBB LLMtxt API Example Source: https://www.alphavantage.co/documentation/ An example of a GET request to the OpenBB LLMtxt API to retrieve the CMO technical indicator for IBM. It specifies the interval, time period, series type, and requires an API key. ```HTTP https://www.alphavantage.co/query?function=CMO&symbol=IBM&interval=weekly&time_period=10&series_type=close&apikey=demo ``` -------------------------------- ### Run Simple Python 'Hello World' Script Source: https://code.visualstudio.com/docs/languages/python This snippet demonstrates the most basic Python program that prints 'Hello World' to the console. It serves as a fundamental example for verifying Python installation and VS Code's ability to execute Python files. ```python print("Hello World") ``` -------------------------------- ### PHP - Get Dividends Source: https://www.alphavantage.co/documentation/ Example of how to fetch dividend data for a given stock symbol using PHP. ```APIDOC ## GET /query?function=DIVIDENDS ### Description Fetches dividend data for a specified stock symbol using PHP. ### Method GET ### Endpoint `https://www.alphavantage.co/query` ### Parameters #### Query Parameters - **function** (string) - Required - The API function to call, set to `DIVIDENDS`. - **symbol** (string) - Required - The stock ticker symbol (e.g., `IBM`). - **apikey** (string) - Required - Your Alpha Vantage API key. - **datatype** (string) - Optional - The format for the returned data (`json` or `csv`, defaults to `json`). ### Request Example ```php ``` ### Response #### Success Response (200) Returns a JSON object containing dividend data. #### Response Example ```json { "symbol": "IBM", "dividends": [ { "date": "2023-03-08", "amount": 1.6600000000000001 }, { "date": "2023-03-07", "amount": 1.66 } ] } ``` ``` -------------------------------- ### Download and run plugin Source: https://publicreporting.cftc.gov/stories/s/r4w3-av2u After setting up the agent, plugins can be downloaded, verified, and executed using a specific command in the command prompt or terminal. This process ensures the plugin is correctly installed and ready for use. ```bash Copy and paste this command into the command prompt/terminal. Run the command by hitting enter or return. This will download the plugin from Socrata, verify it, and run it on your server. ``` -------------------------------- ### NodeJS - Get Dividends Source: https://www.alphavantage.co/documentation/ Example of how to fetch dividend data for a given stock symbol using NodeJS. ```APIDOC ## GET /query?function=DIVIDENDS ### Description Fetches dividend data for a specified stock symbol using NodeJS. ### Method GET ### Endpoint `https://www.alphavantage.co/query` ### Parameters #### Query Parameters - **function** (string) - Required - The API function to call, set to `DIVIDENDS`. - **symbol** (string) - Required - The stock ticker symbol (e.g., `IBM`). - **apikey** (string) - Required - Your Alpha Vantage API key. - **datatype** (string) - Optional - The format for the returned data (`json` or `csv`, defaults to `json`). ### Request Example ```javascript 'use strict'; var request = require('request'); // replace the "demo" apikey below with your own key from https://www.alphavantage.co/support/#api-key var url = 'https://www.alphavantage.co/query?function=DIVIDENDS&symbol=IBM&apikey=demo'; request.get({ url: url, json: true, headers: {'User-Agent': 'request'} }, (err, res, data) => { if (err) { console.log('Error:', err); } else if (res.statusCode !== 200) { console.log('Status:', res.statusCode); } else { // data is successfully parsed as a JSON object: console.log(data); } }); ``` ### Response #### Success Response (200) Returns a JSON object containing dividend data. #### Response Example ```json { "symbol": "IBM", "dividends": [ { "date": "2023-03-08", "amount": 1.6600000000000001 }, { "date": "2023-03-07", "amount": 1.66 } ] } ``` ``` -------------------------------- ### Python - Get Dividends Source: https://www.alphavantage.co/documentation/ Example of how to fetch dividend data for a given stock symbol using Python. ```APIDOC ## GET /query?function=DIVIDENDS ### Description Fetches dividend data for a specified stock symbol. ### Method GET ### Endpoint `https://www.alphavantage.co/query` ### Parameters #### Query Parameters - **function** (string) - Required - The API function to call, set to `DIVIDENDS`. - **symbol** (string) - Required - The stock ticker symbol (e.g., `IBM`). - **apikey** (string) - Required - Your Alpha Vantage API key. - **datatype** (string) - Optional - The format for the returned data (`json` or `csv`, defaults to `json`). ### Request Example ```python import requests # replace the "demo" apikey below with your own key from https://www.alphavantage.co/support/#api-key url = 'https://www.alphavantage.co/query?function=DIVIDENDS&symbol=IBM&apikey=demo' r = requests.get(url) data = r.json() print(data) ``` ### Response #### Success Response (200) Returns a JSON object containing dividend data. #### Response Example ```json { "symbol": "IBM", "dividends": [ { "date": "2023-03-08", "amount": 1.6600000000000001 }, { "date": "2023-03-07", "amount": 1.66 } ] } ``` ``` -------------------------------- ### Extend EnvBuilder to install setuptools and pip Source: https://docs.python.org/3/library/venv.html This example demonstrates subclassing `venv.EnvBuilder` to create a custom environment builder that automatically installs `setuptools` and `pip` into the virtual environment. It shows how to override methods to manage package installation and progress reporting. ```python import os import os.path from subprocess import Popen, PIPE import sys from threading import Thread from urllib.parse import urlparse from urllib.request import urlretrieve import venv class ExtendedEnvBuilder(venv.EnvBuilder): """ This builder installs setuptools and pip so that you can pip or easy_install other packages into the created virtual environment. :param nodist: If true, setuptools and pip are not installed into the created virtual environment. :param nopip: If true, pip is not installed into the created virtual environment. :param progress: If setuptools or pip are installed, the progress of the installation can be monitored by passing a progress callable. If specified, it is called with two arguments: a string indicating some progress, and a context indicating where the string is coming from. The context argument can have one of three values: 'main', indicating that it is called from virtualize() itself, and 'stdout' and 'stderr', which are obtained ``` -------------------------------- ### GET /hello_data Source: https://github.com/OpenBB-finance/OpenBB/blob/6b0ae943d9096e0683265ffc1233c71b4a9dad3b/openbb_platform/extensions/platform_api/README Retrieves sample data, potentially for display in a widget. This endpoint returns a list of MyData objects, each containing a date and a string. ```APIDOC ## GET /hello_data ### Description Retrieves sample data, potentially for display in a widget. This endpoint returns a list of MyData objects, each containing a date and a string. ### Method GET ### Endpoint /hello_data ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **MyData** (list) - A list of data objects. - **column_1** (date) - The date associated with the data. - **column_2** (string) - A string value. #### Response Example ```json [ { "column_1": "2023-10-27", "column_2": "Hello!" } ] ``` ``` -------------------------------- ### Example Notebook for Implied Earnings Move Source: https://github.com/OpenBB-finance/OpenBBTerminal/pull/6155 This documentation update adds an example notebook demonstrating the Implied Earnings Move. It likely includes code to fetch and analyze implied earnings data, providing a practical guide for users. The snippet focuses on the addition of this example notebook. ```python def add_implied_earnings_move_example_notebook(): # Logic to add the example notebook pass ``` -------------------------------- ### OpenBB MCP Server CLI Usage Source: https://pypi.org/project/openbb-mcp-server/ Examples of starting the OpenBB MCP server with different command-line options for transport, categories, host, and port. ```APIDOC ## OpenBB MCP Server CLI Commands ### Description Commands to start the OpenBB MCP server with various configurations. ### Start with default settings ```bash openbb-mcp ``` ### Use an alternative transport (SSE) ```bash openbb-mcp --transport sse ``` ### Start with specific categories and custom host/port ```bash openbb-mcp --default-categories equity,news --host 0.0.0.0 --port 8080 ``` ### Start with allowed categories restriction ```bash openbb-mcp --allowed-categories equity,crypto,news ``` ### Disable tool discovery ```bash openbb-mcp --no-tool-discovery ``` ``` -------------------------------- ### Install OpenBB from GitHub with Extensions Source: https://context7_llms Installs OpenBB from its GitHub repository, including all extensions, by running a development installation script. ```bash python dev_install.py -e ```