alpacahq / alpacahq/Alpaca-API

no account updates on submitted orders?

Aperta
#75 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature request
Lingua principale
Nessun dato sulla lingua
Stelle
174
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

(paper trading; v1)

Is it intentional that no account updates are sent when an order is submitted/filled?

According to [the documentation](https://docs.alpaca.markets/api-documentation/web-api/streaming/#account-updates):
> This stream provides clients with updates pertaining to their brokerage accounts at Alpaca, including balance information.

Yet, I don't get an updated when I submit an order and it is filled subsequently. Shouldn't the account balance change when doing that?

When I explicitly retrieve `/v1/account` information I see a difference in cash:
55279.74 USD beforehand, 54987.27 USD now

I have the following code for streaming updates:
```py
import alpaca_trade_api as tradeapi

conn = tradeapi.StreamConn()

@conn.on(r'account_updates')
async def on_account_updates(conn, channel, account):
print('account', account)

# blocks forever
conn.run(['account_updates'])
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.