The assets endpoints allow you to view the list of assets available on Alpaca for market data and trading. Keep in mind, some assets are only available for market data and trading them is not yet possible.
Get All Assets#
- TradingClient.get_all_assets(filter: Optional[GetAssetsRequest] = None) List[Asset] #
The assets API serves as the master list of assets available for trade and data consumption from Alpaca. Some assets are not tradable with Alpaca. These assets will be marked with the flag tradable=false.
- TradingClient.get_asset(symbol_or_asset_id: Union[UUID, str]) Asset #
Returns a specific asset by its symbol or asset id. If the specified asset does not exist a 404 error will be thrown.
symbol_or_asset_id (Union[UUID, str]) – The symbol or asset id for the specified asset
The asset if it exists.
- Return type