Announcing kiteticker-async: A Rust crate having async implementation of Kite Connect’s WebSocket Steaming API

Hello TradingQnA Community,

I’m excited to share my new Rust crate - kiteticker-async

kiteticker-async is an async client implementation for Kite Connect WebSocket API.

The official kiteconnect-rs is an unmaintained project compared to the Python or Go implementations. As per this issue, it will not get any further updates from the Zerodha Tech team.

Even though the Kite Connect REST APIs are feature-complete, the Ticker APIs are lagging. Here are some of the issues with Ticker API Rust implementation:

  • It lacks a few updates, which are present in actively maintained Python & Go implementations.

  • It does not parse and serialise quote structures to proper Rust structs and leaves them as untyped JSON values. This is again a departure from how the same is implemented in libraries of typed languages like Go or Java.

  • The design requires the applications to handle the streaming WebSocket messages via callbacks. It is not an idiomatic Rust library design, primarily when the downstream applications rely on modern Rust async concurrency primitives using frameworks like tokio.

This crate is an attempt to address the above issues. The primary goal is to have an async-friendly design following Rust’s async library design principles championed by tokio.

I’m looking forward to hearing your thoughts, suggestions, and contributions.

Cheers!,
Kaushik

Superb work. Thanks a ton for making this. Is it possible to write a threaded program using this? One thread would be managing subscription while the other would be printing ticks to the terminal. If Yes, how does one go about this.