Requests#

StockBarsRequest#

class alpaca.data.requests.StockBarsRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[Union[datetime, str]] = None, end: Optional[Union[datetime, str]] = None, limit: int = None, timeframe: TimeFrame, adjustment: Adjustment = None, feed: DataFeed = None)#

The request model for retrieving bar data for equities.

See BaseGetBarsRequest for more information on available parameters.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type

Union[str, List[str]]

start#

The beginning of the time interval for desired data.

Type

Optional[datetime]

end#

The end of the time interval for desired data. Defaults to None.

Type

Optional[datetime]

limit#

Upper limit of number of data points to return. Defaults to None.

Type

Optional[int]

adjustment#

The type of corporate action data normalization.

Type

Optional[Adjustment]

feed#

The stock data feed to retrieve from.

Type

Optional[DataFeed]

StockQuotesRequest#

class alpaca.data.requests.StockQuotesRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[Union[datetime, str]] = None, end: Optional[Union[datetime, str]] = None, limit: int = None, feed: DataFeed = None)#

This request class is used to submit a request for stock quote data.

See BaseTimeseriesDataRequest for more information on available parameters.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type

Union[str, List[str]]

start#

The beginning of the time interval for desired data.

Type

Optional[datetime]

end#

The end of the time interval for desired data. Defaults to None.

Type

Optional[datetime]

limit#

Upper limit of number of data points to return. Defaults to None.

Type

Optional[int]

feed#

The stock data feed to retrieve from.

Type

Optional[DataFeed]

StockTradesRequest#

class alpaca.data.requests.StockTradesRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[Union[datetime, str]] = None, end: Optional[Union[datetime, str]] = None, limit: int = None, feed: DataFeed = None)#

This request class is used to submit a request for stock trade data.

See BaseTimeseriesDataRequest for more information on available parameters.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type

Union[str, List[str]]

start#

The beginning of the time interval for desired data.

Type

Optional[datetime]

end#

The end of the time interval for desired data. Defaults to None.

Type

Optional[datetime]

limit#

Upper limit of number of data points to return. Defaults to None.

Type

Optional[int]

feed#

The stock data feed to retrieve from.

Type

Optional[DataFeed]

StockLatestQuoteRequest#

class alpaca.data.requests.StockLatestQuoteRequest(*, symbol_or_symbols: Union[str, List[str]], feed: DataFeed = None)#

This request class is used to submit a request for the latest stock quote data.

See BaseLatestStockDataRequest for more information on available parameters.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type

Union[str, List[str]]

feed#

The stock data feed to retrieve from.

Type

Optional[DataFeed]

StockLatestTradeRequest#

class alpaca.data.requests.StockLatestTradeRequest(*, symbol_or_symbols: Union[str, List[str]], feed: DataFeed = None)#

This request class is used to submit a request for the latest stock trade data.

See BaseLatestStockDataRequest for more information on available parameters.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type

Union[str, List[str]]

feed#

The stock data feed to retrieve from.

Type

Optional[DataFeed]

StockSnapshotRequest#

class alpaca.data.requests.StockSnapshotRequest(*, symbol_or_symbols: Union[str, List[str]], feed: DataFeed = None)#

This request class is used to submit a request for snapshot data for stocks.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type

Union[str, List[str]]

feed#

The stock data feed to retrieve from.

Type

Optional[DataFeed]