Error when getting positions - crypto position


Since I have a crypto position in my portfolio. I get an error bc the exchange “CRYPTO” isn’t listed in class AssetExchange.

I added it, but Alpaca should fix this.

Kind regards,

File “C:\Users\k\Downloads\WPy\scripts\py\”, line 911, in processSMHstrategy
positions = self.trading_client.get_all_positions()
File “C:\Users\k\Downloads\WPy\python-3.10.5.amd64\lib\site-packages\alpaca\trading\”, line 240, in get_all_positions
return parse_obj_as(List[Position], response)
File “pydantic\”, line 38, in
File “pydantic\”, line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[List[]]
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=[<AssetExchange.AMEX: ‘AMEX’>, <AssetExchange.ARCA: ‘ARCA’>, <AssetExchange.BATS: ‘BATS’>, <AssetExchange.NYSE: ‘NYSE’>, <AssetExchange.NASDAQ: ‘NASDAQ’>, <AssetExchange.NYSEARCA: ‘NYSEARCA’>, <AssetExchange.FTXU: ‘FTXU’>, <AssetExchange.CBSE: ‘CBSE’>, <AssetExchange.GNSS: ‘GNSS’>, <AssetExchange.ERSX: ‘ERSX’>, <AssetExchange.OTC: ‘OTC’>])

Try to upgrade the package to 0.8.2. I has similar issue

1 Like

Thank you! is there a log about changes and bug fixes in new releases?