openbb-derivatives 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ Metadata-Version: 2.1
2
+ Name: openbb-derivatives
3
+ Version: 1.0.0
4
+ Summary: Derivatives extension for OpenBB
5
+ Author: OpenBB Team
6
+ Author-email: hello@openbb.co
7
+ Requires-Python: >=3.8,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Dist: openbb-core (>=1.0.0,<2.0.0)
15
+ Description-Content-Type: text/markdown
16
+
17
+ # OpenBB Derivatives Extension
18
+
19
+ This extension provides derivatives data for the OpenBB Platform.
20
+
21
+ ## Installation
22
+
23
+ To install the extension, run the following command in this folder:
24
+
25
+ ```bash
26
+ pip install openbb-derivatives
27
+ ```
28
+
29
+ For development please check [Contribution Guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/openbb_platform/CONTRIBUTING.md).
30
+
31
+ Documentation available [here](https://docs.openbb.co/sdk).
32
+
@@ -0,0 +1,15 @@
1
+ # OpenBB Derivatives Extension
2
+
3
+ This extension provides derivatives data for the OpenBB Platform.
4
+
5
+ ## Installation
6
+
7
+ To install the extension, run the following command in this folder:
8
+
9
+ ```bash
10
+ pip install openbb-derivatives
11
+ ```
12
+
13
+ For development please check [Contribution Guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/openbb_platform/CONTRIBUTING.md).
14
+
15
+ Documentation available [here](https://docs.openbb.co/sdk).
@@ -0,0 +1 @@
1
+ """Options."""
@@ -0,0 +1,10 @@
1
+ """Derivatives Router."""
2
+
3
+ from openbb_core.app.router import Router
4
+
5
+ from openbb_derivatives.futures.futures_router import router as futures_router
6
+ from openbb_derivatives.options.options_router import router as options_router
7
+
8
+ router = Router(prefix="")
9
+ router.include_router(options_router)
10
+ router.include_router(futures_router)
@@ -0,0 +1 @@
1
+ """Futures."""
@@ -0,0 +1,37 @@
1
+ """Futures Router."""
2
+
3
+ from openbb_core.app.model.command_context import CommandContext
4
+ from openbb_core.app.model.obbject import OBBject
5
+ from openbb_core.app.provider_interface import (
6
+ ExtraParams,
7
+ ProviderChoices,
8
+ StandardParams,
9
+ )
10
+ from openbb_core.app.query import Query
11
+ from openbb_core.app.router import Router
12
+ from pydantic import BaseModel
13
+
14
+ router = Router(prefix="/futures")
15
+
16
+
17
+ # pylint: disable=unused-argument
18
+ @router.command(model="FuturesHistorical")
19
+ async def historical(
20
+ cc: CommandContext,
21
+ provider_choices: ProviderChoices,
22
+ standard_params: StandardParams,
23
+ extra_params: ExtraParams,
24
+ ) -> OBBject[BaseModel]:
25
+ """Futures Historical Price. Futures historical data."""
26
+ return await OBBject.from_query(Query(**locals()))
27
+
28
+
29
+ @router.command(model="FuturesCurve")
30
+ async def curve(
31
+ cc: CommandContext,
32
+ provider_choices: ProviderChoices,
33
+ standard_params: StandardParams,
34
+ extra_params: ExtraParams,
35
+ ) -> OBBject[BaseModel]:
36
+ """Futures Historical Price. Futures historical data."""
37
+ return await OBBject.from_query(Query(**locals()))
@@ -0,0 +1 @@
1
+ """Options."""
@@ -0,0 +1,38 @@
1
+ """Options Router."""
2
+
3
+ from openbb_core.app.model.command_context import CommandContext
4
+ from openbb_core.app.model.obbject import OBBject
5
+ from openbb_core.app.provider_interface import (
6
+ ExtraParams,
7
+ ProviderChoices,
8
+ StandardParams,
9
+ )
10
+ from openbb_core.app.query import Query
11
+ from openbb_core.app.router import Router
12
+ from pydantic import BaseModel
13
+
14
+ router = Router(prefix="/options")
15
+
16
+ # pylint: disable=unused-argument
17
+
18
+
19
+ @router.command(model="OptionsChains")
20
+ async def chains(
21
+ cc: CommandContext,
22
+ provider_choices: ProviderChoices,
23
+ standard_params: StandardParams,
24
+ extra_params: ExtraParams,
25
+ ) -> OBBject[BaseModel]:
26
+ """Get the complete options chain for a ticker."""
27
+ return await OBBject.from_query(Query(**locals()))
28
+
29
+
30
+ @router.command(model="OptionsUnusual")
31
+ async def unusual(
32
+ cc: CommandContext,
33
+ provider_choices: ProviderChoices,
34
+ standard_params: StandardParams,
35
+ extra_params: ExtraParams,
36
+ ) -> OBBject[BaseModel]:
37
+ """Get the complete options chain for a ticker."""
38
+ return await OBBject.from_query(Query(**locals()))
@@ -0,0 +1,18 @@
1
+ [tool.poetry]
2
+ name = "openbb-derivatives"
3
+ version = "1.0.0"
4
+ description = "Derivatives extension for OpenBB"
5
+ authors = ["OpenBB Team <hello@openbb.co>"]
6
+ readme = "README.md"
7
+ packages = [{ include = "openbb_derivatives" }]
8
+
9
+ [tool.poetry.dependencies]
10
+ python = "^3.8"
11
+ openbb-core = "^1.0.0"
12
+
13
+ [build-system]
14
+ requires = ["poetry-core"]
15
+ build-backend = "poetry.core.masonry.api"
16
+
17
+ [tool.poetry.plugins."openbb_core_extension"]
18
+ derivatives = "openbb_derivatives.derivatives_router:router"