mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-02 15:32:04 +00:00
add some more
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"""Industry P/E Ratio data model."""
|
||||
|
||||
from datetime import date as dateType
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from openbb_provider.abstract.data import Data
|
||||
from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class IndustryPeQueryParams(QueryParams):
|
||||
"""Industry P/E Ratio Query."""
|
||||
|
||||
|
||||
class IndustryPeData(Data):
|
||||
"""Industry P/E Ratio Data."""
|
||||
|
||||
date: Optional[dateType] = Field(
|
||||
description="The date of the P/E ratio.", default=None
|
||||
)
|
||||
exchange: Optional[str] = Field(
|
||||
default=None, description="The exchange where the data is from."
|
||||
)
|
||||
sector: str = Field(description="The name of the industry.")
|
||||
pe: float = Field(description="The P/E ratio of the industry.")
|
||||
@@ -0,0 +1,24 @@
|
||||
"""Market Movers data model. Base model for market gainers/losers/most active."""
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from openbb_provider.abstract.data import Data
|
||||
from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class MarketMoversQueryParams(QueryParams):
|
||||
"""Market Movers Query."""
|
||||
|
||||
|
||||
class MarketMoversData(Data):
|
||||
"""Market Movers Data."""
|
||||
|
||||
symbol: str = Field(description="The ticker symbol.")
|
||||
name: Optional[str] = Field(
|
||||
default=None, description="The name associated with the ticker."
|
||||
)
|
||||
price: float = Field(description="The last price of the ticker.")
|
||||
change: float = Field(description="The change in price from open.")
|
||||
change_percent: float = Field(description="The change in percent from open.")
|
||||
@@ -0,0 +1,26 @@
|
||||
"""Sector P/E Ratio data model."""
|
||||
|
||||
from datetime import date as dateType
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from openbb_provider.abstract.data import Data
|
||||
from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class SectorPeQueryParams(QueryParams):
|
||||
"""Sector P/E Ratio Query."""
|
||||
|
||||
|
||||
class SectorPeData(Data):
|
||||
"""Sector P/E Ratio Data."""
|
||||
|
||||
date: Optional[dateType] = Field(
|
||||
description="The date of the P/E ratio.", default=None
|
||||
)
|
||||
exchange: Optional[str] = Field(
|
||||
default=None, description="The exchange where the data is from."
|
||||
)
|
||||
sector: str = Field(description="The name of the sector.")
|
||||
pe: float = Field(description="The P/E ratio of the sector.")
|
||||
@@ -0,0 +1,17 @@
|
||||
"""Sector Performance data model."""
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from openbb_provider.abstract.data import Data
|
||||
from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class SectorPerformanceQueryParams(QueryParams):
|
||||
"""Sector Performance Query."""
|
||||
|
||||
|
||||
class SectorPerformanceData(Data):
|
||||
"""Sector Performance Data."""
|
||||
|
||||
sector: str = Field(description="The name of the sector.")
|
||||
change_percent: float = Field(description="The change in percent from open.")
|
||||
Reference in New Issue
Block a user