alpacahq / alpacahq/Alpaca-API

no account updates on submitted orders?

Open
#75 5 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
No language data
Stars
174
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.