summaryrefslogtreecommitdiffstats
path: root/openbb_platform/core/openbb_core/provider/standard_models/mortgage_indices.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/core/openbb_core/provider/standard_models/mortgage_indices.py')
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/mortgage_indices.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/mortgage_indices.py b/openbb_platform/core/openbb_core/provider/standard_models/mortgage_indices.py
new file mode 100644
index 00000000000..bfba892bb2d
--- /dev/null
+++ b/openbb_platform/core/openbb_core/provider/standard_models/mortgage_indices.py
@@ -0,0 +1,46 @@
+"""Mortgage Indices Standard Model."""
+
+from datetime import (
+ date as dateType,
+)
+from typing import Optional
+
+from pydantic import Field
+
+from openbb_core.provider.abstract.data import Data
+from openbb_core.provider.abstract.query_params import QueryParams
+from openbb_core.provider.utils.descriptions import (
+ DATA_DESCRIPTIONS,
+ QUERY_DESCRIPTIONS,
+)
+
+
+class MortgageIndicesQueryParams(QueryParams):
+ """Mortgage Indices Query."""
+
+ start_date: Optional[dateType] = Field(
+ default=None,
+ description=QUERY_DESCRIPTIONS.get("start_date", ""),
+ )
+ end_date: Optional[dateType] = Field(
+ default=None,
+ description=QUERY_DESCRIPTIONS.get("end_date", ""),
+ )
+
+
+class MortgageIndicesData(Data):
+ """Mortgage Indices Data."""
+
+ date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", ""))
+ symbol: Optional[str] = Field(
+ default=None,
+ description=DATA_DESCRIPTIONS.get("symbol", ""),
+ )
+ name: Optional[str] = Field(
+ default=None,
+ description="Name of the index.",
+ )
+ rate: float = Field(
+ description="Mortgage rate.",
+ json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100},
+ )