alpacahq / alpacahq/Alpaca-API

no account updates on submitted orders?

Abierto
#75 5 comentarios 0 reacciones 0 asignados Ver en GitHub
feature request
Lenguaje dominante
Sin datos de lenguaje
Estrellas
174
Forks
17
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

(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'])
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.