From fbfaea7d30142a223f26390ba0e07467444b3aa0 Mon Sep 17 00:00:00 2001 From: montezdesousa Date: Mon, 12 Feb 2024 12:13:08 +0000 Subject: [PATCH] feat: otc --- .../core/openbb_core/provider/standard_models/otc_aggregate.py | 3 ++- .../providers/finra/openbb_finra/models/otc_aggregate.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/openbb_platform/core/openbb_core/provider/standard_models/otc_aggregate.py b/openbb_platform/core/openbb_core/provider/standard_models/otc_aggregate.py index a7651571c69..63178d8e9c1 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/otc_aggregate.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/otc_aggregate.py @@ -1,6 +1,7 @@ """OTC Aggregate Standard Model.""" from datetime import date as dateType +from typing import Optional from pydantic import Field @@ -12,7 +13,7 @@ from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS class OTCAggregateQueryParams(QueryParams): """OTC Aggregate Query.""" - symbol: str = Field( + symbol: Optional[str] = Field( description=QUERY_DESCRIPTIONS.get("symbol", ""), default=None, ) diff --git a/openbb_platform/providers/finra/openbb_finra/models/otc_aggregate.py b/openbb_platform/providers/finra/openbb_finra/models/otc_aggregate.py index 0dce1f6f144..d0750dd0b80 100644 --- a/openbb_platform/providers/finra/openbb_finra/models/otc_aggregate.py +++ b/openbb_platform/providers/finra/openbb_finra/models/otc_aggregate.py @@ -14,6 +14,8 @@ from pydantic import Field class FinraOTCAggregateQueryParams(OTCAggregateQueryParams): """FINRA OTC Aggregate Query.""" + __validator_dict__ = {"check_single": ("symbol",)} + tier: Literal["T1", "T2", "OTCE"] = Field( default="T1", description=""""T1 - Securities included in the S&P 500, Russell 1000 and selected exchange-traded products;