# Crypto get asset error

**URL:** <https://forum.alpaca.markets/t/crypto-get-asset-error/12295>\
**Category:** Getting Started with Alpaca\
**Created:** [April 29, 2023, 4:23am UTC](https://forum.alpaca.markets/t/crypto-get-asset-error/12295 "2023-04-29T04:23:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zepol](https://avatars.discourse-cdn.com/v4/letter/z/f08c70/32.png) [@zepol](https://forum.alpaca.markets/u/zepol)\
**Post date:** [April 29, 2023, 4:23am UTC](https://forum.alpaca.markets/t/crypto-get-asset-error/12295/1 "2023-04-29T04:23:24Z")

</div>

Hey all. Anyone experiencing this error with crypto assets? This example is straight from the documentation and it is no longer working. It was working a few days ago

```auto
from alpaca.trading.client import TradingClient
from alpaca.trading.requests import GetAssetsRequest
from alpaca.trading.enums import AssetClass
from dotenv import load_dotenv
import os
load_dotenv()
API_KEY = os.getenv("APCA_API_KEY_ID", "")
SECRET_KEY = os.getenv("APCA_API_SECRET_KEY", "")

trading_client = TradingClient(API_KEY, SECRET_KEY, paper=True)

# search for crypto assets
search_params = GetAssetsRequest(asset_class=AssetClass.CRYPTO)

assets = trading_client.get_all_assets(search_params)

```

Which give error:

```auto
ValidationError: 46 validation errors for ParsingModel[List[alpaca.trading.models.Asset]]
__root__ -> 0 -> exchange
  value is not a valid enumeration member; permitted: 'AMEX', 'ARCA', 'BATS', 'NYSE', 'NASDAQ', 'NYSEARCA', 'FTXU', 'CBSE', 'GNSS', 'ERSX', 'OTC' (type=type_error.enum; enum_values=[, , , , , , , , , ,])

```

DOCS: [Trading - Alpaca-py](https://alpaca.markets/docs/python-sdk/trading.html#assets)

---

<div class="post-metadata">

**Author:** ![zepol](https://avatars.discourse-cdn.com/v4/letter/z/f08c70/32.png) [@zepol](https://forum.alpaca.markets/u/zepol)\
**Post date:** [April 29, 2023, 9:28am UTC](https://forum.alpaca.markets/t/crypto-get-asset-error/12295/2 "2023-04-29T09:28:01Z")

</div>

Someone from the community was able to help me from Slack. Apparently this was fixed on 0.8.2 so all I had to do was update my alpaca-py version.

---

<div class="post-metadata">

**Author:** ![balefuleidolon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/balefuleidolon/32/5348_2.png) [@balefuleidolon](https://forum.alpaca.markets/u/balefuleidolon)\
**Post date:** [May 1, 2023, 12:46am UTC](https://forum.alpaca.markets/t/crypto-get-asset-error/12295/3 "2023-05-01T00:46:15Z")

</div>

I was getting this error too. For me, it was happening right after making a buy order. After a few hours it would randomly work again. I’ll update alpaca-py and see if it fixes it, thanks for updating your post.
