py_alpaca_api.stock.latest_quote ================================ .. py:module:: py_alpaca_api.stock.latest_quote Classes ------- .. autoapisummary:: py_alpaca_api.stock.latest_quote.Requests py_alpaca_api.stock.latest_quote.QuoteModel py_alpaca_api.stock.latest_quote.LatestQuote Functions --------- .. autoapisummary:: py_alpaca_api.stock.latest_quote.quote_class_from_dict Module Contents --------------- .. py:class:: Requests .. py:method:: request(method: str, url: str, headers: dict[str, str] | None = None, params: dict[str, str | bool | float | int] | None = None, json: dict[str, Any] | None = None, raw_response: bool = False) Execute HTTP request with retry logic. :param method: A string representing the HTTP method to be used in the request. :param url: A string representing the URL to send the request to. :param headers: An optional dictionary containing the headers for the request. :param params: An optional dictionary containing the query parameters for the request. :param json: An optional dictionary containing the JSON payload for the request. :param raw_response: If True, return the raw response object without status checks. Defaults to False. :returns: The response object returned by the server. :raises APIRequestError: If the response status code is not one of the acceptable statuses (200, 204, 207) and raw_response is False. .. py:class:: QuoteModel .. py:attribute:: symbol :type: str .. py:attribute:: timestamp :type: datetime.datetime .. py:attribute:: ask :type: float .. py:attribute:: ask_size :type: int .. py:attribute:: bid :type: float .. py:attribute:: bid_size :type: int .. py:function:: quote_class_from_dict(data_dict: dict) -> QuoteModel :param data_dict: A dictionary containing data for creating an instance of `QuoteModel`. :returns: An instance of `QuoteModel` created using the data from `data_dict`. :raises None.: .. py:class:: LatestQuote(headers: dict[str, str]) .. py:attribute:: BATCH_SIZE :value: 200 .. py:method:: get(symbol: list[str] | str | None, feed: str = 'iex', currency: str = 'USD') -> list[py_alpaca_api.models.quote_model.QuoteModel] | py_alpaca_api.models.quote_model.QuoteModel Get latest quotes for one or more symbols. :param symbol: A string or list of strings representing the stock symbol(s). :param feed: The data feed source. Default is "iex". :param currency: The currency for the quotes. Default is "USD". :returns: A single QuoteModel or list of QuoteModel objects. :raises ValueError: If symbol is None/empty or if feed is invalid.