AI4Finance-Foundation / AI4Finance-Foundation/FinRL

paper_trading/alpaca.py: submitOrder response list never read after thread joins

Ouverte
#1,414 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
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.

Recevez les nouvelles issues par e-mail

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