summaryrefslogtreecommitdiffstats
path: root/openbb_platform/extensions/fixedincome/openbb_fixedincome/fixedincome_router.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/extensions/fixedincome/openbb_fixedincome/fixedincome_router.py')
-rw-r--r--openbb_platform/extensions/fixedincome/openbb_fixedincome/fixedincome_router.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/openbb_platform/extensions/fixedincome/openbb_fixedincome/fixedincome_router.py b/openbb_platform/extensions/fixedincome/openbb_fixedincome/fixedincome_router.py
index fb346dd3cc3..f7d62a1b16b 100644
--- a/openbb_platform/extensions/fixedincome/openbb_fixedincome/fixedincome_router.py
+++ b/openbb_platform/extensions/fixedincome/openbb_fixedincome/fixedincome_router.py
@@ -81,3 +81,29 @@ async def bond_indices(
) -> OBBject: # type: ignore
"""Bond Indices."""
return await OBBject.from_query(Query(**locals()))
+
+
+@router.command(
+ model="MortgageIndices",
+ examples=[
+ APIEx(
+ description="The default state for FRED are the primary mortgage indices from Optimal Blue.",
+ parameters={"provider": "fred"},
+ ),
+ APIEx(
+ description="Multiple indices can be requested.",
+ parameters={
+ "index": "jumbo_30y,conforming_30y,conforming_15y",
+ "provider": "fred",
+ },
+ ),
+ ],
+)
+async def mortgage_indices(
+ cc: CommandContext,
+ provider_choices: ProviderChoices,
+ standard_params: StandardParams,
+ extra_params: ExtraParams,
+) -> OBBject: # type: ignore
+ """Mortgage Indices."""
+ return await OBBject.from_query(Query(**locals()))