AI4Finance-Foundation / AI4Finance-Foundation/FinRL
paper_trading/alpaca.py: submitOrder response list never read after thread joins
- Langage dominant
- Jupyter Notebook
- Étoiles
- 16.3k
- Forks
- 3.5k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
While fixing the threading bug in #1399 (merged in #1410), I noticed that the `respSO` lists passed to each `submitOrder` thread are never read after the threads are joined.
```python
respSO = []
tSubmitOrder = threading.Thread(
target=self.submitOrder,
args=(qty, self.stockUniverse[index], "sell", respSO),
)
tSubmitOrder.start()
threads.append(tSubmitOrder)
```
After `x.join()`, the collected responses in `respSO` are ignored. If `submitOrder` is meant to return order status or fill information through this list, it's being silently discarded. If it's not needed, the parameter could be removed to simplify the code.
Spotted during the #1399 fix.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.