Files
OpenBB/website/content/platform/user_guides/dynamic_command_execution.mdx
Danglewood 3a8a71dd15 [Docs] Refactor Docs Pages For Diataxis (#6315)
* This change creates a PR

* start moving stuff around

* data_models/_category_.json

* reference/_category_.json

* moving some stuff around

* Introduction

* Documentation updates

* few broken links, clean up sidebar titles for how-to

* codespell

* quickstart - new provider extension

* add a comment

* map provider interface

* quickstart for new router extension

* [Docs] diataxis refactor refactor (#6425)

* Start refactor

* Edits

* [DOCS] Reorganize and edit. Fix sidebar navigation (#6445)

* Reorganize and edit. Fix sidebar navigation

* Fix broken linkages

* Edit

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>

* Fix links

---------

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>

* Fix broken links

* Reword CLA part in the Licensing FAQ

* change titles and order suggestion - cc @IgorWounds @piiq

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: hjoaquim <henriquecjoaquim@gmail.com>
2024-05-22 13:50:43 +00:00

48 lines
1.2 KiB
Plaintext
Vendored

---
title: Dynamic Command Execution
sidebar_position: 5
description: This guide provides detailed instructions on how to execute commands dynamically in the OpenBB Platform.
keywords:
- OpenBB community
- OpenBB Platform
- Custom commands
- API
- Python Interface
- Dynamic Execution
---
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
<HeadTitle title="Dynamic Command Execution | OpenBB Platform Docs" />
Dynamic execution provides an alternate entry point to functions. This method requires formatting the query as demonstrated below.
```python
from openbb_core.app.command_runner import CommandRunner
runner = CommandRunner()
output = await runner.run(
"/equity/fundamental/ratios",
provider_choices={
"provider": "fmp",
},
standard_params={
"symbol" : "TSLA",
"period" : "quarter",
},
extra_params={}
)
```
```console
>>> output
OBBject
id: 065241b7-bd9d-7313-8000-9406d8afab75
results: [{'symbol': 'TSLA', 'date': '2023-06-30', 'period': 'Q2', 'current_ratio':...
provider: fmp
warnings: None
chart: None
extra: {'metadata': {'arguments': {'provider_choices': {'provider': 'fmp'}, 'standa...
```