Requests#
StockBarsRequest#
- class alpaca.data.requests.StockBarsRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[datetime] = None, end: Optional[datetime] = None, limit: Optional[int] = None, currency: Optional[SupportedCurrencies] = None, timeframe: TimeFrame, adjustment: Optional[Adjustment] = None, feed: Optional[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. Timezone naive inputs assumed to be in UTC.
- Type:
Optional[datetime]
- end#
The end of the time interval for desired data. Defaults to now. Timezone naive inputs assumed to be in UTC.
- 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]
StockQuotesRequest#
- class alpaca.data.requests.StockQuotesRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[datetime] = None, end: Optional[datetime] = None, limit: Optional[int] = None, currency: Optional[SupportedCurrencies] = None, feed: Optional[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. Timezone naive inputs assumed to be in UTC.
- Type:
Optional[datetime]
- end#
The end of the time interval for desired data. Defaults to now. Timezone naive inputs assumed to be in UTC.
- Type:
Optional[datetime]
- limit#
Upper limit of number of data points to return. Defaults to None.
- Type:
Optional[int]
StockTradesRequest#
- class alpaca.data.requests.StockTradesRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[datetime] = None, end: Optional[datetime] = None, limit: Optional[int] = None, currency: Optional[SupportedCurrencies] = None, feed: Optional[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. Timezone naive inputs assumed to be in UTC.
- Type:
Optional[datetime]
- end#
The end of the time interval for desired data. Defaults to now. Timezone naive inputs assumed to be in UTC.
- Type:
Optional[datetime]
- limit#
Upper limit of number of data points to return. Defaults to None.
- Type:
Optional[int]
StockLatestQuoteRequest#
- class alpaca.data.requests.StockLatestQuoteRequest(*, symbol_or_symbols: Union[str, List[str]], feed: Optional[DataFeed] = None, currency: Optional[SupportedCurrencies] = 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]]
StockLatestTradeRequest#
- class alpaca.data.requests.StockLatestTradeRequest(*, symbol_or_symbols: Union[str, List[str]], feed: Optional[DataFeed] = None, currency: Optional[SupportedCurrencies] = 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]]
StockSnapshotRequest#
- class alpaca.data.requests.StockSnapshotRequest(*, symbol_or_symbols: Union[str, List[str]], feed: Optional[DataFeed] = None, currency: Optional[SupportedCurrencies] = 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]]
- currency#
The currency the data should be returned in. Default to USD.
- Type:
Optional[SupportedCurrencies]