diff --git a/sdk/python/funds/candles.mdx b/sdk/python/funds/candles.mdx index 5bae2c9..97d0185 100644 --- a/sdk/python/funds/candles.mdx +++ b/sdk/python/funds/candles.mdx @@ -15,7 +15,7 @@ Use the `candles()` method on the `funds` resource to fetch fund candles. The me | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with candles data (default). | -| **INTERNAL** | `list[FundsCandle]` or `list[FundsCandlesHumanReadable]` | Returns a list of FundsCandle objects or FundsCandlesHumanReadable objects. | +| **INTERNAL** | `list[FundsCandle]` or `list[FundsCandlesHumanReadable]` | Returns a list of FundsCandle objects. When `use_human_readable=True`, returns a list of FundsCandlesHumanReadable objects with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -234,3 +234,57 @@ for candle in candles: + +## FundsCandle + +```python +@dataclass +class FundsCandle: + t: datetime.datetime + o: float + h: float + l: float + c: float +``` + +FundsCandle represents a single fund candle (OHLC data), encapsulating price information for a specific time period. + +#### Properties + +- `t` (datetime.datetime): The timestamp for the candle (automatically converted from Unix timestamp). +- `o` (float): The opening price. +- `h` (float): The highest price. +- `l` (float): The lowest price. +- `c` (float): The closing price. + +#### Notes + +- The `t` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. + + +## FundsCandlesHumanReadable + +```python +@dataclass +class FundsCandlesHumanReadable: + Date: datetime.datetime + Open: float + High: float + Low: float + Close: float +``` + +FundsCandlesHumanReadable represents a fund candle in human-readable format with capitalized field names and formatted values. + +#### Properties + +- `Date` (datetime.datetime): The timestamp for the candle (automatically converted from Unix timestamp). +- `Open` (float): The opening price. +- `High` (float): The highest price. +- `Low` (float): The lowest price. +- `Close` (float): The closing price. + +#### Notes + +- The `Date` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. +- Field names use capitalized format (e.g., `Open` instead of `o`, `Date` instead of `t`). diff --git a/sdk/python/markets/status.mdx b/sdk/python/markets/status.mdx index 681d8de..d13b2b3 100644 --- a/sdk/python/markets/status.mdx +++ b/sdk/python/markets/status.mdx @@ -15,7 +15,7 @@ Use the `status()` method on the `markets` resource to fetch market status infor | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with market status data (default). | -| **INTERNAL** | `list[MarketStatus]` or `list[MarketStatusHumanReadable]` | Returns a list of MarketStatus objects or a list of MarketStatusHumanReadable objects. | +| **INTERNAL** | `list[MarketStatus]` or `list[MarketStatusHumanReadable]` | Returns a list of MarketStatus objects. When `use_human_readable=True`, returns a list of MarketStatusHumanReadable objects with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -216,3 +216,45 @@ for status in status_list: + +## MarketStatus + +```python +@dataclass +class MarketStatus: + date: datetime.date + status: str +``` + +MarketStatus represents market status information for a specific date, indicating whether the market is open or closed. + +#### Properties + +- `date` (datetime.date): The date for which the market status applies (automatically converted from timestamp). +- `status` (str): The market status (e.g., "open", "closed"). + +#### Notes + +- The `date` field is automatically converted to a `datetime.date` object from a Unix timestamp. + + +## MarketStatusHumanReadable + +```python +@dataclass +class MarketStatusHumanReadable: + Status: str + Date: datetime.datetime +``` + +MarketStatusHumanReadable represents market status information in human-readable format with capitalized field names and formatted values. + +#### Properties + +- `Status` (str): The market status (e.g., "open", "closed"). +- `Date` (datetime.datetime): The date for which the market status applies (automatically converted from timestamp). + +#### Notes + +- The `Date` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. +- Field names use capitalized format (e.g., `Date` instead of `date`, `Status` instead of `status`). diff --git a/sdk/python/options/chain.mdx b/sdk/python/options/chain.mdx index e0629be..b33f2ab 100644 --- a/sdk/python/options/chain.mdx +++ b/sdk/python/options/chain.mdx @@ -15,7 +15,7 @@ Use the `chain()` method on the `options` resource to fetch options chain data. | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with options chain data indexed by optionSymbol (default). | -| **INTERNAL** | `OptionsChain` or `OptionsChainHumanReadable` | Returns an OptionsChain object containing lists of option data. | +| **INTERNAL** | `OptionsChain` or `OptionsChainHumanReadable` | Returns an OptionsChain object containing lists of option data. When `use_human_readable=True`, returns an OptionsChainHumanReadable object with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -482,3 +482,71 @@ OptionsChain represents the options chain data with lists of equal length for ea - Timestamp fields (`expiration`, `firstTraded`, `updated`) are automatically converted to `datetime.datetime` objects. - The `OptionsChainHumanReadable` variant uses capitalized field names with underscores (e.g., `Expiration_Date` instead of `expiration`). + +## OptionsChainHumanReadable + +```python +@dataclass +class OptionsChainHumanReadable: + Symbol: list[str] + Underlying: list[str] + Expiration_Date: list[datetime.datetime] + Side: list[str] + Strike: list[float] + First_Traded: list[datetime.datetime] + Days_To_Expiration: list[int] + Date: list[datetime.datetime] + Bid: list[float] + Bid_Size: list[int] + Mid: list[float] + Ask: list[float] + Ask_Size: list[int] + Last: list[float] + Open_Interest: list[int] + Volume: list[int] + In_The_Money: list[bool] + Intrinsic_Value: list[float] + Extrinsic_Value: list[float] + Underlying_Price: list[float] + IV: list[float] + Delta: list[float] + Gamma: list[float] + Theta: list[float] + Vega: list[float] +``` + +OptionsChainHumanReadable represents the options chain data in human-readable format with capitalized field names and formatted values. All lists have the same length, allowing you to access option data by index. + +#### Properties + +- `Symbol` (list[str]): List of option symbols. +- `Underlying` (list[str]): List of underlying symbols. +- `Expiration_Date` (list[datetime.datetime]): List of expiration dates (automatically converted from timestamps). +- `Option_Side` (list[str]): List of option sides ("call" or "put"). +- `Strike` (list[float | int]): List of strike prices. +- `First_Traded` (list[datetime.datetime]): List of first traded dates (automatically converted from timestamps). +- `Days_To_Expiration` (list[int]): List of days to expiration. +- `Date` (list[datetime.datetime]): List of last update timestamps (automatically converted from timestamps). +- `Bid` (list[float]): List of bid prices. +- `Bid_Size` (list[int]): List of bid sizes. +- `Mid` (list[float]): List of mid prices. +- `Ask` (list[float]): List of ask prices. +- `Ask_Size` (list[int]): List of ask sizes. +- `Last` (list[float]): List of last traded prices. +- `Open_Interest` (list[int]): List of open interest values. +- `Volume` (list[int]): List of trading volumes. +- `In_The_Money` (list[bool]): List indicating if options are in the money. +- `Intrinsic_Value` (list[float]): List of intrinsic values. +- `Extrinsic_Value` (list[float]): List of extrinsic values. +- `Underlying_Price` (list[float]): List of underlying prices. +- `IV` (list[float]): List of implied volatilities. +- `Delta` (list[float]): List of Delta values. +- `Gamma` (list[float]): List of Gamma values. +- `Theta` (list[float]): List of Theta values. +- `Vega` (list[float]): List of Vega values. + +#### Notes + +- All lists have the same length, allowing you to access option data by index (e.g., `chain.Symbol[0]`, `chain.Strike[0]`, etc.). +- Timestamp fields (`Expiration_Date`, `First_Traded`, `Date`) are automatically converted to `datetime.datetime` objects. +- Field names use capitalized format with underscores (e.g., `Expiration_Date` instead of `expiration`, `Option_Side` instead of `side`, `Bid_Size` instead of `bidSize`). diff --git a/sdk/python/options/expirations.mdx b/sdk/python/options/expirations.mdx index 0c32696..7696c9e 100644 --- a/sdk/python/options/expirations.mdx +++ b/sdk/python/options/expirations.mdx @@ -15,7 +15,7 @@ Use the `expirations()` method on the `options` resource to fetch expiration dat | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with expiration dates indexed by expirations (default). | -| **INTERNAL** | `OptionsExpirations` or `OptionsExpirationsHumanReadable` | Returns an OptionsExpirations object. | +| **INTERNAL** | `OptionsExpirations` or `OptionsExpirationsHumanReadable` | Returns an OptionsExpirations object. When `use_human_readable=True`, returns an OptionsExpirationsHumanReadable object with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -184,3 +184,49 @@ print(f"Date: {expirations.Date}") + +## OptionsExpirations + +```python +@dataclass +class OptionsExpirations: + s: str + expirations: list[datetime.datetime] + updated: datetime.datetime +``` + +OptionsExpirations represents expiration dates for options, encapsulating a list of expiration dates and an update timestamp. + +#### Properties + +- `s` (str): Status indicator ("ok" for successful responses). +- `expirations` (list[datetime.datetime]): List of expiration dates (automatically converted from timestamps). +- `updated` (datetime.datetime): The time when the data was last updated (automatically converted from timestamp). + +#### Notes + +- The `expirations` list contains `datetime.datetime` objects automatically converted from Unix timestamps. +- The `updated` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. + + +## OptionsExpirationsHumanReadable + +```python +@dataclass +class OptionsExpirationsHumanReadable: + Expirations: list[datetime.datetime] + Date: datetime.datetime +``` + +OptionsExpirationsHumanReadable represents expiration dates in human-readable format with capitalized field names and formatted values. + +#### Properties + +- `Expirations` (list[datetime.datetime]): List of expiration dates (automatically converted from timestamps). +- `Date` (datetime.datetime): The time when the data was last updated (automatically converted from timestamp). + +#### Notes + +- The `Expirations` list contains `datetime.datetime` objects automatically converted from Unix timestamps. +- The `Date` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. +- Field names use capitalized format (e.g., `Expirations` instead of `expirations`, `Date` instead of `updated`). diff --git a/sdk/python/options/lookup.mdx b/sdk/python/options/lookup.mdx index f96ea6b..1193bea 100644 --- a/sdk/python/options/lookup.mdx +++ b/sdk/python/options/lookup.mdx @@ -15,7 +15,7 @@ Use the `lookup()` method on the `options` resource to lookup option symbols. Th | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with option lookup data indexed by optionSymbol (default). | -| **INTERNAL** | `OptionsLookup` or `OptionsLookupHumanReadable` | Returns an OptionsLookup object. | +| **INTERNAL** | `OptionsLookup` or `OptionsLookupHumanReadable` | Returns an OptionsLookup object. When `use_human_readable=True`, returns an OptionsLookupHumanReadable object with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -185,3 +185,38 @@ print(f"Symbol: {lookup_result.Symbol}") + +## OptionsLookup + +```python +@dataclass +class OptionsLookup: + s: str + optionSymbol: str +``` + +OptionsLookup represents the result of an option symbol lookup, containing the resolved option symbol. + +#### Properties + +- `s` (str): Status indicator ("ok" for successful responses). +- `optionSymbol` (str): The resolved option symbol. + + +## OptionsLookupHumanReadable + +```python +@dataclass +class OptionsLookupHumanReadable: + Symbol: str +``` + +OptionsLookupHumanReadable represents an option symbol lookup result in human-readable format with capitalized field names. + +#### Properties + +- `Symbol` (str): The resolved option symbol. + +#### Notes + +- Field names use capitalized format (e.g., `Symbol` instead of `optionSymbol`). diff --git a/sdk/python/options/quotes.mdx b/sdk/python/options/quotes.mdx index df7ddac..22fef82 100644 --- a/sdk/python/options/quotes.mdx +++ b/sdk/python/options/quotes.mdx @@ -15,7 +15,7 @@ Use the `quotes()` method on the `options` resource to fetch option quotes. The | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with option quotes indexed by optionSymbol (default). | -| **INTERNAL** | `OptionsQuotes` or `OptionsQuotesHumanReadable` | Returns an OptionsQuotes object. | +| **INTERNAL** | `OptionsQuotes` or `OptionsQuotesHumanReadable` | Returns an OptionsQuotes object containing lists of option quote data. When `use_human_readable=True`, returns an OptionsQuotesHumanReadable object with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -198,3 +198,141 @@ print(f"First option ask: {quotes.Ask[0]}") + +## OptionsQuotes + +```python +@dataclass +class OptionsQuotes: + s: str + optionSymbol: list[str] + underlying: list[str] + expiration: list[datetime.datetime] + side: list[str] + strike: list[float] + firstTraded: list[datetime.datetime] + dte: list[int] + updated: list[datetime.datetime] + bid: list[float] + bidSize: list[int] + mid: list[float] + ask: list[float] + askSize: list[int] + last: list[float] + openInterest: list[int] + volume: list[int] + inTheMoney: list[bool] + intrinsicValue: list[float] + extrinsicValue: list[float] + underlyingPrice: list[float] + iv: list[float] + delta: list[float] + gamma: list[float] + theta: list[float] + vega: list[float] +``` + +OptionsQuotes represents option quotes data with lists of equal length for each field. All lists have the same length, allowing you to access option data by index. + +#### Properties + +- `s` (str): Status indicator ("ok" for successful responses). +- `optionSymbol` (list[str]): List of option symbols. +- `underlying` (list[str]): List of underlying symbols. +- `expiration` (list[datetime.datetime]): List of expiration dates (automatically converted from timestamps). +- `side` (list[str]): List of option sides ("call" or "put"). +- `strike` (list[float]): List of strike prices. +- `firstTraded` (list[datetime.datetime]): List of first traded dates (automatically converted from timestamps). +- `dte` (list[int]): List of days to expiration. +- `updated` (list[datetime.datetime]): List of last update timestamps (automatically converted from timestamps). +- `bid` (list[float]): List of bid prices. +- `bidSize` (list[int]): List of bid sizes. +- `mid` (list[float]): List of mid prices. +- `ask` (list[float]): List of ask prices. +- `askSize` (list[int]): List of ask sizes. +- `last` (list[float]): List of last traded prices. +- `openInterest` (list[int]): List of open interest values. +- `volume` (list[int]): List of trading volumes. +- `inTheMoney` (list[bool]): List indicating if options are in the money. +- `intrinsicValue` (list[float]): List of intrinsic values. +- `extrinsicValue` (list[float]): List of extrinsic values. +- `underlyingPrice` (list[float]): List of underlying prices. +- `iv` (list[float]): List of implied volatilities. +- `delta` (list[float]): List of Delta values. +- `gamma` (list[float]): List of Gamma values. +- `theta` (list[float]): List of Theta values. +- `vega` (list[float]): List of Vega values. + +#### Notes + +- All lists have the same length, allowing you to access option data by index (e.g., `quotes.optionSymbol[0]`, `quotes.bid[0]`, etc.). +- Timestamp fields (`expiration`, `firstTraded`, `updated`) are automatically converted to `datetime.datetime` objects. + + +## OptionsQuotesHumanReadable + +```python +@dataclass +class OptionsQuotesHumanReadable: + Symbol: list[str] + Underlying: list[str] + Expiration_Date: list[datetime.datetime] + Option_Side: list[str] + Strike: list[float | int] + First_Traded: list[datetime.datetime] + Days_To_Expiration: list[int] + Date: list[datetime.datetime] + Bid: list[float] + Bid_Size: list[int] + Mid: list[float] + Ask: list[float] + Ask_Size: list[int] + Last: list[float] + Open_Interest: list[int] + Volume: list[int] + In_The_Money: list[bool] + Intrinsic_Value: list[float] + Extrinsic_Value: list[float] + Underlying_Price: list[float] + IV: list[float] + Delta: list[float] + Gamma: list[float] + Theta: list[float] + Vega: list[float] +``` + +OptionsQuotesHumanReadable represents option quotes in human-readable format with capitalized field names and formatted values. + +#### Properties + +- `Symbol` (list[str]): List of option symbols. +- `Underlying` (list[str]): List of underlying symbols. +- `Expiration_Date` (list[datetime.datetime]): List of expiration dates (automatically converted from timestamps). +- `Option_Side` (list[str]): List of option sides ("call" or "put"). +- `Strike` (list[float | int]): List of strike prices. +- `First_Traded` (list[datetime.datetime]): List of first traded dates (automatically converted from timestamps). +- `Days_To_Expiration` (list[int]): List of days to expiration. +- `Date` (list[datetime.datetime]): List of last update timestamps (automatically converted from timestamps). +- `Bid` (list[float]): List of bid prices. +- `Bid_Size` (list[int]): List of bid sizes. +- `Mid` (list[float]): List of mid prices. +- `Ask` (list[float]): List of ask prices. +- `Ask_Size` (list[int]): List of ask sizes. +- `Last` (list[float]): List of last traded prices. +- `Open_Interest` (list[int]): List of open interest values. +- `Volume` (list[int]): List of trading volumes. +- `In_The_Money` (list[bool]): List indicating if options are in the money. +- `Intrinsic_Value` (list[float]): List of intrinsic values. +- `Extrinsic_Value` (list[float]): List of extrinsic values. +- `Underlying_Price` (list[float]): List of underlying prices. +- `IV` (list[float]): List of implied volatilities. +- `Delta` (list[float]): List of Delta values. +- `Gamma` (list[float]): List of Gamma values. +- `Theta` (list[float]): List of Theta values. +- `Vega` (list[float]): List of Vega values. + +#### Notes + +- All lists have the same length, allowing you to access option data by index (e.g., `quotes.Symbol[0]`, `quotes.Bid[0]`, etc.). +- Timestamp fields (`Expiration_Date`, `First_Traded`, `Date`) are automatically converted to `datetime.datetime` objects. +- Field names use capitalized format with underscores (e.g., `Expiration_Date` instead of `expiration`, `Option_Side` instead of `side`, `Open_Interest` instead of `openInterest`). diff --git a/sdk/python/options/strikes.mdx b/sdk/python/options/strikes.mdx index 27fca9f..af72e0a 100644 --- a/sdk/python/options/strikes.mdx +++ b/sdk/python/options/strikes.mdx @@ -15,7 +15,7 @@ Use the `strikes()` method on the `options` resource to fetch strike prices. The | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with strike prices (default). | -| **INTERNAL** | `OptionsStrikes` or `OptionsStrikesHumanReadable` | Returns an OptionsStrikes object. | +| **INTERNAL** | `OptionsStrikes` or `OptionsStrikesHumanReadable` | Returns an OptionsStrikes object. When `use_human_readable=True`, returns an OptionsStrikesHumanReadable object with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -192,3 +192,51 @@ print(f"Date: {strikes.Date}") + +## OptionsStrikes + +```python +@dataclass +class OptionsStrikes: + s: str + updated: datetime.datetime + # Dynamic fields: expiration dates as keys (e.g., "2024-01-20": list[float]) +``` + +OptionsStrikes represents strike prices for options, with dynamic fields based on expiration dates. Each expiration date becomes a field containing a list of strike prices. + +#### Properties + +- `s` (str): Status indicator ("ok" for successful responses). +- `updated` (datetime.datetime): The time when the data was last updated (automatically converted from timestamp). +- Dynamic fields: Each expiration date (in format "YYYY-MM-DD") becomes a field containing a list of strike prices (list[float]). + +#### Notes + +- The `updated` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. +- Strike prices are organized by expiration date, with each expiration date as a field name. +- Access strikes using `getattr()` or `__dict__` (e.g., `getattr(strikes, "2024-01-20")`). + + +## OptionsStrikesHumanReadable + +```python +@dataclass +class OptionsStrikesHumanReadable: + Date: datetime.datetime + # Dynamic fields: expiration dates as keys (e.g., "2024-01-20": list[float]) +``` + +OptionsStrikesHumanReadable represents strike prices in human-readable format with capitalized field names and formatted values. + +#### Properties + +- `Date` (datetime.datetime): The time when the data was last updated (automatically converted from timestamp). +- Dynamic fields: Each expiration date (in format "YYYY-MM-DD") becomes a field containing a list of strike prices (list[float]). + +#### Notes + +- The `Date` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. +- Strike prices are organized by expiration date, with each expiration date as a field name. +- Access strikes using `getattr()` or `__dict__` (e.g., `getattr(strikes, "2024-01-20")`). +- Field names use capitalized format (e.g., `Date` instead of `updated`). diff --git a/sdk/python/stocks/candles.mdx b/sdk/python/stocks/candles.mdx index 215bed1..d20d86a 100644 --- a/sdk/python/stocks/candles.mdx +++ b/sdk/python/stocks/candles.mdx @@ -15,7 +15,7 @@ Use the `candles()` method on the `stocks` resource to fetch stock candles. The | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with candles data indexed by timestamp (default). | -| **INTERNAL** | `list[StockCandle]` or `list[StockCandlesHumanReadable]` | Returns a list of StockCandle objects or a list of StockCandlesHumanReadable objects. | +| **INTERNAL** | `list[StockCandle]` or `list[StockCandlesHumanReadable]` | Returns a list of StockCandle objects. When `use_human_readable=True`, returns a list of StockCandlesHumanReadable objects with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -260,3 +260,61 @@ for candle in candles: + +## StockCandle + +```python +@dataclass +class StockCandle: + t: datetime.datetime + o: float + h: float + l: float + c: float + v: int +``` + +StockCandle represents a single stock candle (OHLCV data), encapsulating price and volume information for a specific time period. + +#### Properties + +- `t` (datetime.datetime): The timestamp for the candle (automatically converted from Unix timestamp). +- `o` (float): The opening price. +- `h` (float): The highest price. +- `l` (float): The lowest price. +- `c` (float): The closing price. +- `v` (int): The trading volume. + +#### Notes + +- The `t` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. + + +## StockCandlesHumanReadable + +```python +@dataclass +class StockCandlesHumanReadable: + Date: datetime.datetime + Open: float + High: float + Low: float + Close: float + Volume: int +``` + +StockCandlesHumanReadable represents a stock candle in human-readable format with capitalized field names and formatted values. + +#### Properties + +- `Date` (datetime.datetime): The timestamp for the candle (automatically converted from Unix timestamp). +- `Open` (float): The opening price. +- `High` (float): The highest price. +- `Low` (float): The lowest price. +- `Close` (float): The closing price. +- `Volume` (int): The trading volume. + +#### Notes + +- The `Date` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. +- Field names use capitalized format (e.g., `Open` instead of `o`, `Date` instead of `t`). diff --git a/sdk/python/stocks/earnings.mdx b/sdk/python/stocks/earnings.mdx index bd1c93b..3db1861 100644 --- a/sdk/python/stocks/earnings.mdx +++ b/sdk/python/stocks/earnings.mdx @@ -15,7 +15,7 @@ Use the `earnings()` method on the `stocks` resource to fetch earnings data. The | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with earnings data indexed by symbol (default). | -| **INTERNAL** | `StockEarnings` or `StockEarningsHumanReadable` | Returns a StockEarnings object. | +| **INTERNAL** | `StockEarnings` or `StockEarningsHumanReadable` | Returns a StockEarnings object. When `use_human_readable=True`, returns a StockEarningsHumanReadable object with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -207,3 +207,82 @@ print(f"Surprise EPS: {earnings.Surprise_EPS}") + +## StockEarnings + +```python +@dataclass +class StockEarnings: + s: str + symbol: list[str] + fiscalYear: list[int] + fiscalQuarter: list[int] + date: list[datetime.datetime] + reportDate: list[datetime.datetime] + reportTime: list[str] + currency: list[str] + reportedEPS: list[float] + estimatedEPS: list[float] + surpriseEPS: list[float] + surpriseEPSpct: list[float] + updated: list[datetime.datetime] +``` + +StockEarnings represents earnings data for a stock, encapsulating fiscal year, quarter, and EPS information. All lists have the same length, allowing you to access earnings data by index. + +#### Properties + +- `s` (str): Status indicator ("ok" for successful responses). +- `symbol` (list[str]): List of stock symbols. +- `fiscalYear` (list[int]): List of fiscal years. +- `fiscalQuarter` (list[int]): List of fiscal quarters. +- `date` (list[datetime.datetime]): List of earnings dates (automatically converted from timestamps). +- `reportDate` (list[datetime.datetime]): List of report dates (automatically converted from timestamps). +- `reportTime` (list[str]): List of report times. +- `currency` (list[str]): List of currencies. +- `reportedEPS` (list[float]): List of reported earnings per share. +- `estimatedEPS` (list[float]): List of estimated earnings per share. +- `surpriseEPS` (list[float]): List of surprise earnings per share (difference between reported and estimated). +- `surpriseEPSpct` (list[float]): List of surprise EPS percentages. +- `updated` (list[datetime.datetime]): List of last update timestamps (automatically converted from timestamps). + + +## StockEarningsHumanReadable + +```python +@dataclass +class StockEarningsHumanReadable: + Symbol: list[str] + Fiscal_Year: list[int] + Fiscal_Quarter: list[int] + Date: list[datetime.datetime] + Report_Date: list[datetime.datetime] + Report_Time: list[str] + Currency: list[str] + Reported_EPS: list[float] + Estimated_EPS: list[float] + Surprise_EPS: list[float] + Surprise_EPS_Percent: list[float] + Updated: list[datetime.datetime] +``` + +StockEarningsHumanReadable represents earnings data in human-readable format with capitalized field names and formatted values. All lists have the same length, allowing you to access earnings data by index. + +#### Properties + +- `Symbol` (list[str]): List of stock symbols. +- `Fiscal_Year` (list[int]): List of fiscal years. +- `Fiscal_Quarter` (list[int]): List of fiscal quarters. +- `Date` (list[datetime.datetime]): List of earnings dates (automatically converted from timestamps). +- `Report_Date` (list[datetime.datetime]): List of report dates (automatically converted from timestamps). +- `Report_Time` (list[str]): List of report times. +- `Currency` (list[str]): List of currencies. +- `Reported_EPS` (list[float]): List of reported earnings per share. +- `Estimated_EPS` (list[float]): List of estimated earnings per share. +- `Surprise_EPS` (list[float]): List of surprise earnings per share (difference between reported and estimated). +- `Surprise_EPS_Percent` (list[float]): List of surprise EPS percentages. +- `Updated` (list[datetime.datetime]): List of last update timestamps (automatically converted from timestamps). + +#### Notes + +- Field names use capitalized format with underscores (e.g., `Fiscal_Year` instead of `fiscalYear`, `Reported_EPS` instead of `reportedEPS`). diff --git a/sdk/python/stocks/news.mdx b/sdk/python/stocks/news.mdx index b199d1f..9eff1ee 100644 --- a/sdk/python/stocks/news.mdx +++ b/sdk/python/stocks/news.mdx @@ -15,7 +15,7 @@ Use the `news()` method on the `stocks` resource to fetch news articles. The met | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with news articles indexed by symbol (default). | -| **INTERNAL** | `list[StockNews]` or `list[StockNewsHumanReadable]` | Returns a list of StockNews objects. | +| **INTERNAL** | `list[StockNews]` or `list[StockNewsHumanReadable]` | Returns a list of StockNews objects. When `use_human_readable=True`, returns a list of StockNewsHumanReadable objects with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -203,3 +203,61 @@ for news in news_list: + +## StockNews + +```python +@dataclass +class StockNews: + symbol: str + headline: str + content: str + source: str + publicationDate: datetime.datetime + updated: datetime.datetime +``` + +StockNews represents a single news article for a stock, encapsulating headline, content, source, and publication information. + +#### Properties + +- `symbol` (str): The stock symbol. +- `headline` (str): The news headline. +- `content` (str): The news article content. +- `source` (str): The news source. +- `publicationDate` (datetime.datetime): The publication date (automatically converted from timestamp). +- `updated` (datetime.datetime): The time when the news was last updated (automatically converted from timestamp). + +#### Notes + +- The `publicationDate` and `updated` fields are automatically converted to `datetime.datetime` objects from Unix timestamps. + + +## StockNewsHumanReadable + +```python +@dataclass +class StockNewsHumanReadable: + Symbol: str + headline: str + content: str + source: str + publicationDate: datetime.datetime + Date: datetime.datetime +``` + +StockNewsHumanReadable represents a news article in human-readable format with capitalized field names and formatted values. + +#### Properties + +- `Symbol` (str): The stock symbol. +- `headline` (str): The news headline. +- `content` (str): The news article content. +- `source` (str): The news source. +- `publicationDate` (datetime.datetime): The publication date (automatically converted from timestamp). +- `Date` (datetime.datetime): The time when the news was last updated (automatically converted from timestamp). + +#### Notes + +- The `publicationDate` and `Date` fields are automatically converted to `datetime.datetime` objects from Unix timestamps. +- Field names use capitalized format with underscores where applicable (e.g., `Symbol` instead of `symbol`, `Date` instead of `updated`). diff --git a/sdk/python/stocks/prices.mdx b/sdk/python/stocks/prices.mdx index 11c0eb1..40c18ab 100644 --- a/sdk/python/stocks/prices.mdx +++ b/sdk/python/stocks/prices.mdx @@ -15,7 +15,7 @@ Use the `prices()` method on the `stocks` resource to fetch stock prices. The me | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with prices indexed by symbol (default). | -| **INTERNAL** | `list[StockPrice]` or `list[StockPricesHumanReadable]` | Returns a list of StockPrice objects or a list of StockPricesHumanReadable objects. | +| **INTERNAL** | `list[StockPrice]` or `list[StockPricesHumanReadable]` | Returns a list of StockPrice objects. When `use_human_readable=True`, returns a list of StockPricesHumanReadable objects with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -185,3 +185,59 @@ for price in prices: + +## StockPrice + +```python +@dataclass +class StockPrice: + s: str + symbol: str + mid: float + change: float + changepct: float + updated: datetime.datetime +``` + +StockPrice represents a single stock price, encapsulating various details such as prices and timestamps. + +#### Properties + +- `s` (str): Status indicator ("ok" for successful responses). +- `symbol` (str): The stock symbol. +- `mid` (float): The mid price calculated between the ask and bid prices. +- `change` (float): The price change. +- `changepct` (float): The percentage change in price. +- `updated` (datetime.datetime): The time when the price was last updated (automatically converted from timestamp). + +#### Notes + +- The `updated` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. + + +## StockPricesHumanReadable + +```python +@dataclass +class StockPricesHumanReadable: + Symbol: str + Mid: float + Change_Price: float + Change_Percent: float + Date: datetime.datetime +``` + +StockPricesHumanReadable represents a stock price in human-readable format with capitalized field names and formatted values. + +#### Properties + +- `Symbol` (str): The stock symbol. +- `Mid` (float): The mid price calculated between the ask and bid prices. +- `Change_Price` (float): The price change. +- `Change_Percent` (float): The percentage change in price. +- `Date` (datetime.datetime): The time when the price was last updated (automatically converted from timestamp). + +#### Notes + +- The `Date` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. +- Field names use capitalized format with underscores (e.g., `Change_Price` instead of `change`). diff --git a/sdk/python/stocks/quotes.mdx b/sdk/python/stocks/quotes.mdx index 96e1f47..55642ea 100644 --- a/sdk/python/stocks/quotes.mdx +++ b/sdk/python/stocks/quotes.mdx @@ -15,7 +15,7 @@ Use the `quotes()` method on the `stocks` resource to fetch stock quotes. The me | Output Format | Return Type | Description | |---------------|-------------|-------------| | **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with quotes indexed by symbol (default). | -| **INTERNAL** | `list[StockQuote]` or `list[StockQuotesHumanReadable]` | Returns a list of StockQuote objects or a list of StockQuotesHumanReadable objects. | +| **INTERNAL** | `list[StockQuote]` or `list[StockQuotesHumanReadable]` | Returns a list of StockQuote objects. When `use_human_readable=True`, returns a list of StockQuotesHumanReadable objects with capitalized field names. | | **JSON** | `dict` | Returns the raw JSON response as a dictionary. | | **CSV** | `str` | Writes CSV data to file and returns the filename string. | @@ -298,12 +298,6 @@ StockQuote represents a single stock quote, encapsulating various details such a - `volume` (int): The trading volume for the stock. - `updated` (datetime.datetime): The time when the quote was last updated (automatically converted from timestamp). -#### Methods - -- `from_dict(data: dict) -> StockQuote` - - Creates a StockQuote instance from a dictionary. - #### Notes - The `updated` field is automatically converted to a `datetime.datetime` object from a Unix timestamp. @@ -344,12 +338,6 @@ StockQuotesHumanReadable represents a stock quote in human-readable format with - `Volume` (int): The trading volume for the stock. - `Date` (datetime.datetime): The time when the quote was last updated (automatically converted from timestamp). -#### Methods - -- `from_dict(data: dict) -> StockQuotesHumanReadable` - - Creates a StockQuotesHumanReadable instance from a dictionary, handling field name mapping from API format (e.g., "Change $" to "Change_Price"). - #### Notes - The `Date` field is automatically converted to a `datetime.datetime` object from a Unix timestamp.