Requests#

BaseCryptoLatestDataRequest#

class alpaca.data.requests.BaseCryptoLatestDataRequest(*, symbol_or_symbols: Union[str, List[str]])#

A base request object for retrieving the latest data for crypto. You most likely should not use this directly and instead use the asset class specific request objects.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type:

Union[str, List[str]]

CryptoBarsRequest#

class alpaca.data.requests.CryptoBarsRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[datetime] = None, end: Optional[datetime] = None, limit: Optional[int] = None, currency: Optional[SupportedCurrencies] = None, sort: Optional[Sort] = None, timeframe: TimeFrame)#

The request model for retrieving bar data for cryptocurrencies.

See BaseBarsRequest for more information on available parameters.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type:

Union[str, List[str]]

timeframe#

The period over which the bars should be aggregated. (i.e. 5 Min bars, 1 Day bars)

Type:

TimeFrame

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]

sort#

The chronological order of response based on the timestamp. Defaults to ASC.

Type:

Optional[Sort]

CryptoQuoteRequest#

class alpaca.data.requests.CryptoQuoteRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[datetime] = None, end: Optional[datetime] = None, limit: Optional[int] = None, currency: Optional[SupportedCurrencies] = None, sort: Optional[Sort] = None)#

This request class is used to submit a request for crypto 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]

sort#

The chronological order of response based on the timestamp. Defaults to ASC.

Type:

Optional[Sort]

CryptoTradesRequest#

class alpaca.data.requests.CryptoTradesRequest(*, symbol_or_symbols: Union[str, List[str]], start: Optional[datetime] = None, end: Optional[datetime] = None, limit: Optional[int] = None, currency: Optional[SupportedCurrencies] = None, sort: Optional[Sort] = None)#

This request class is used to submit a request for crypto 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]

sort#

The chronological order of response based on the timestamp. Defaults to ASC.

Type:

Optional[Sort]

CryptoLatestQuoteRequest#

class alpaca.data.requests.CryptoLatestQuoteRequest(*, symbol_or_symbols: Union[str, List[str]])#

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

See BaseCryptoLatestDataRequest for more information on available parameters.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type:

Union[str, List[str]]

CryptoLatestTradeRequest#

class alpaca.data.requests.CryptoLatestTradeRequest(*, symbol_or_symbols: Union[str, List[str]])#

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

See BaseCryptoLatestDataRequest for more information on available parameters.

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type:

Union[str, List[str]]

CryptoSnapshotRequest#

class alpaca.data.requests.CryptoSnapshotRequest(*, symbol_or_symbols: Union[str, List[str]])#

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

symbol_or_symbols#

The ticker identifier or list of ticker identifiers.

Type:

Union[str, List[str]]