Releases: pbeets/kalshi-trade-rs
Releases · pbeets/kalshi-trade-rs
v0.3.0
What's New
New Features
- QuoteExecuted WebSocket events: New
QuoteExecutedvariant onCommunicationDataenum for quote execution notifications. Previously these were silently dropped on thecommunicationschannel. - UserOrders WebSocket channel: Real-time order update notifications with optional
market_tickersfiltering (requires authentication). - Historical data endpoints: 6 new endpoints for accessing archived markets, candlesticks, fills, and orders beyond the rolling cutoff.
- Fixed-point
_fpfields: Across REST and WebSocket types for precise decimal values without floating-point rounding. - Subaccount support: Extended across orders, RFQs, quotes, fills, settlements, order groups, and balance queries.
- Order group enhancements: New
trigger_order_group(),update_order_group_limit()endpoints and WebSocket lifecycle channel. - Multivariate enrichments: Collection events, associated events, selected-market support for lookups.
- New REST endpoints:
get_api_limits(),get_balance_with_params(),get_order_group_for_subaccount(), and more.
Improvements
- Added
#[serde(default)]toSeriesfields for resilience against API omissions. - Corrected
create_order_groupendpoint path in API docs. - Reduced WebSocket log noise (ping events no longer logged at
infolevel).
Breaking Changes
CommunicationDataenum gained a newQuoteExecutedvariant — exhaustive match arms will need updating.- Version bump from 0.2.0 to 0.3.0.
See CHANGELOG.md for the full list of changes.
v0.2.0
What's Changed
Added
ConnectionLostnow includes asubscriptionsfield containing the channels and markets that were active at the time of disconnection. This enables automatic resubscription after reconnecting.- Fixed-point decimal fields (
*_dollarssuffix) added throughout the API for prices and costs, avoiding floating-point precision issues. - WebSocket sharding support via
CommunicationsShardingfor high-throughput market makers handling RFQ traffic across multiple connections. - Exported
CommunicationData,RfqData,RfqDeletedData,QuoteData, andQuoteAcceptedDatatypes from thewsmodule for easier RFQ event handling. - New
rfq_verifyexample demonstrating read-only RFQ API verification. - RFQ documentation in README with usage examples for creating RFQs, submitting quotes, and streaming events.
Changed
- Breaking:
StreamMessage::ConnectionLostvariant now has two fields:reasonandsubscriptions. Update pattern matches fromConnectionLost { reason }toConnectionLost { reason, .. }orConnectionLost { reason, subscriptions }.
Fixed
- Improved documentation for WebSocket reconnection patterns with examples showing how to use the new
subscriptionsfield.
Full Changelog: v0.1.0...v0.2.0
v0.1.0 - Initial Release
Initial Release
A Rust client for the Kalshi trading API and WebSocket streams.
Features
- REST API client with full endpoint coverage
- WebSocket streaming client with subscription management
- RSA-PSS authentication for secure API access
- Typed
DisconnectReasonenum for connection lifecycle events - Health monitoring with configurable ping/pong timeouts
- Connection strategies:
Simple(fast-fail) andRetry(exponential backoff) - Support for all public and authenticated WebSocket channels
Installation
Add to your Cargo.toml:
[dependencies]
kalshi-trade-rs = "0.1.0"