[Bug]: `StockQuotesRequest` does not work for multiple symbols
- Lingua principale
- Python
- Stelle
- 1.5k
- Fork
- 398
- Merge medio
- 1g 16h
- PR unite (30g)
- 6
Descrizione
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
I'm trying to question `SPY` and `AAPL` the following way:
```
multisymbol_request_params = alp.data.requests.StockQuotesRequest(symbol_or_symbols=["AAPL", "SPY"],
start=timezone.localize(datetime.datetime.strptime("2022-12-02 10:59:00",
'%Y-%m-%d %H:%M:%S')),
end=timezone.localize(datetime.datetime.strptime("2022-12-02 11:01:00",
'%Y-%m-%d %H:%M:%S')),
limit=1)
multisymbol_quotes = stock_client.get_stock_quotes(multisymbol_request_params)
```
and I am getting
```
{ 'AAPL': [ { 'ask_exchange': 'Q',
'ask_price': 146.29,
'ask_size': 2.0,
'bid_exchange': 'Q',
'bid_price': 146.28,
'bid_size': 12.0,
'conditions': ['R'],
'symbol': 'AAPL',
'tape': 'C',
'timestamp': datetime.datetime(2022, 12, 2, 15, 59, 0, 17884, tzinfo=datetime.timezone.utc)}]}
```
### Expected Behavior
I would expect to get both of the tickers. Something like:
```
{ 'AAPL': [ { 'ask_exchange': 'Q',
'ask_price': 146.29,
'ask_size': 2.0,
'bid_exchange': 'Q',
'bid_price': 146.28,
'bid_size': 12.0,
'conditions': ['R'],
'symbol': 'AAPL',
'tape': 'C',
'timestamp': datetime.datetime(2022, 12, 2, 15, 59, 0, 17884, tzinfo=datetime.timezone.utc)}]
'SPY': [ { 'ask_exchange': 'P',
'ask_price': 404.24,
'ask_size': 3.0,
'bid_exchange': 'Z',
'bid_price': 404.23,
'bid_size': 1.0,
'conditions': ['R'],
'symbol': 'SPY',
'tape': 'B',
'timestamp': datetime.datetime(2022, 12, 2, 15, 59, 0, 7392, tzinfo=datetime.timezone.utc)}]
}
```
### SDK Version I encountered this issue in
alpaca-py version v0.6.0
### Steps To Reproduce
```markdown
Please see the above code snippets
```
### 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_
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.