alpacahq / Alpaca-API

The Alpaca API is a developer interface for trading operations and market data reception through the Alpaca platform.
https://alpaca.markets/
143 stars 13 forks source link

Feature request: support placing order via websocket #189

Open renzibei opened 3 years ago

renzibei commented 3 years ago

Now the user needs to use the POST method to place/cancel an order. But this can be very slow because a new http connection and tls handshake have to be established from scratch. Is it possible that alpaca can support placing orders though websocket or other stream protocols that keeps the connection so that the latency can be much smaller.

Compared with the improvement that this improvement can bring, the amount of work required is not very large on the premise that the websocket framework has been established. It can improve a lot regarding the latency. Some cryptocurrency exchanges support these features as well.

Hope the opinion can be considered.