summaryrefslogtreecommitdiffstats
path: root/openbb_platform/core/openbb_core/provider/standard_models/unemployment.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/core/openbb_core/provider/standard_models/unemployment.py')
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/unemployment.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/unemployment.py b/openbb_platform/core/openbb_core/provider/standard_models/unemployment.py
index 2091aff51c4..4380719fd77 100644
--- a/openbb_platform/core/openbb_core/provider/standard_models/unemployment.py
+++ b/openbb_platform/core/openbb_core/provider/standard_models/unemployment.py
@@ -1,7 +1,7 @@
"""Unemployment Standard Model."""
from datetime import date as dateType
-from typing import Optional
+from typing import Literal, Optional
from pydantic import Field
@@ -16,6 +16,15 @@ from openbb_core.provider.utils.descriptions import (
class UnemploymentQueryParams(QueryParams):
"""Unemployment Query."""
+ country: str = Field(
+ description=QUERY_DESCRIPTIONS.get("country", ""),
+ default="united_states",
+ )
+ frequency: Literal["monthly", "quarter", "annual"] = Field(
+ description=QUERY_DESCRIPTIONS.get("frequency", ""),
+ default="monthly",
+ json_schema_extra={"choices": ["monthly", "quarter", "annual"]},
+ )
start_date: Optional[dateType] = Field(
default=None, description=QUERY_DESCRIPTIONS.get("start_date")
)
@@ -30,11 +39,12 @@ class UnemploymentData(Data):
date: Optional[dateType] = Field(
default=None, description=DATA_DESCRIPTIONS.get("date")
)
- value: Optional[float] = Field(
- default=None,
- description="Unemployment rate (given as a whole number, i.e 10=10%)",
- )
country: Optional[str] = Field(
default=None,
description="Country for which unemployment rate is given",
)
+ value: Optional[float] = Field(
+ default=None,
+ description="Unemployment rate, as a normalized percent.",
+ json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100},
+ )