alpacahq / alpacahq/alpaca-py

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

Ouverte
#490 7 commentaires 1 réaction 1 personne assignée Réclamée par @hiohiohio Voir sur GitHub
Langage dominant
Python
Étoiles
1.5k
Forks
398
Merge moyen
1 j 16 h
PR mergées (30 j)
6

Description

### Is there an existing issue for this?

- [X] 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

```markdown
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?

- [X] 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_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.