# Getting all assets with alpaca-py

**URL:** <https://forum.alpaca.markets/t/getting-all-assets-with-alpaca-py/11936>\
**Category:** Getting Started with Alpaca\
**Created:** [March 1, 2023, 5:41pm UTC](https://forum.alpaca.markets/t/getting-all-assets-with-alpaca-py/11936 "2023-03-01T17:41:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghanburighan](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@ghanburighan](https://forum.alpaca.markets/u/ghanburighan)\
**Post date:** [March 1, 2023, 5:41pm UTC](https://forum.alpaca.markets/t/getting-all-assets-with-alpaca-py/11936/1 "2023-03-01T17:41:42Z")

</div>

Hi, is there any way to get a list of all assets or all stocks with alpaca-py? It was possible with the REST api but I can’t find the function now. Or is there a way to authenticate and access [https://data.alpaca.markets/v2/assets](https://data.alpaca.markets/v2/assets) ? It only gives me 404 or 403 errors.

Thank you!

---

<div class="post-metadata">

**Author:** ![ghanburighan](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@ghanburighan](https://forum.alpaca.markets/u/ghanburighan)\
**Post date:** [March 1, 2023, 5:53pm UTC](https://forum.alpaca.markets/t/getting-all-assets-with-alpaca-py/11936/2 "2023-03-01T17:53:33Z")

</div>

Okay, I found a solution:

from alpaca.trading.client import TradingClient  
client = TradingClient(api\_key\_paper, api\_secret\_paper)  
assets = client.get(‘/assets’)

For some reason, it only works with paper trading keys and the trading client for me.  
Well, feel free to post a prettier solution!
