krazkidd / kdeck

Desktop client for Kalshi event trading platform
GNU General Public License v3.0
1 stars 0 forks source link

Add support for Kalshi WebSockets API #10

Open krazkidd opened 3 weeks ago

krazkidd commented 3 weeks ago

Kalshi provides a WebSockets API for real-time, two-way communication. This would be highly beneficial (and arguably necessary) for observing price and portfolio changes. The alternative is frequent polling of the REST API.

There may be limitations with the use of this API and will require careful testing of rate (or channel) limits. It should not in any way be considered a replacement of the REST API, per this quote:

Eventually, we may want to offer a complete trading API through WebSocket, but, for now, you should continue using the REST API for trading, while the WS interface provides a stream of notifications/updates.

While libcurl supports WebSockets, it doesn't seem that cURLpp does so.

Connection state should be displayed in the status bar (see #9).

Dependencies

krazkidd commented 1 week ago

Blocked on #36 and #17 #30 which will refactor the API client code and maybe even change libraries.

EDIT: We are going to add Oat++ in #30.