Skip to content

UUID from TradingClient.get_all_assets does not match UUID from TradingClient.get_all_positions() [Bug]:  #490

@jose-main-sequence

Description

@jose-main-sequence

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When i request TradingClient.get_all_assets() Bitcoin to USD with symbol BTC/USD has a uid 276e2673764b4ab6a611caf665ca6340, however when i query my position in th paper account I get BTCUSD with UUID of 64bbff5159d64b3c935113ad85e3c752. Also symbol is BTCUSD rather than BTC/USD

Expected Behavior

The expected behavior should be consistent UUID and symbols from

SDK Version I encountered this issue in

alpaca-py==0.28.0

Steps To Reproduce

trading_client = TradingClient(api_key, secret_key)
search_params = GetAssetsRequest(asset_class=asset_class, status="active")
assets = trading_client.get_all_assets(search_params)
target_asset=[a for a in assets if a.symbol=="BTC/USD"][0]

#get positions
positions = trading_client.get_all_positions()
assert len([p for p in positions if p.asset_id.hex==target_asset.id.hex])>0

Filled out the Steps to Reproduce section?

  • I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

Anything else?

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions