Skip to content

Commit f092d3e

Browse files
committed
chore: bump version to 0.7.1 and update release docs
- Update version to 0.7.1 in Cargo.toml and README.md - Add comprehensive CHANGELOG entry for 0.7.1 release - Improve tests for rithmic_to_unix_nanos_precise with realistic timestamps
1 parent 3945328 commit f092d3e

File tree

4 files changed

+72
-8
lines changed

4 files changed

+72
-8
lines changed

CHANGELOG.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.7.1] - 2026-01-23
11+
12+
### Added
13+
14+
#### New Utility Module (`util`)
15+
- **`InstrumentInfo`**: Parsed instrument reference data from Rithmic
16+
- Converts `ResponseReferenceData` to a structured type via `TryFrom`
17+
- `price_precision()`: Calculate decimal places based on tick size
18+
- `size_precision()`: Returns 0 for futures (whole contracts)
19+
- Fields include: symbol, exchange, name, tick_size, point_value, is_tradable, and more
20+
- **`OrderStatus`**: Order status enum with helper methods
21+
- Parses case-insensitively with common variations ("filled" → Complete, "canceled" → Cancelled)
22+
- `is_terminal()`: Returns true for Complete, Cancelled, Rejected
23+
- `is_active()`: Returns true for Open, Pending, Partial
24+
- Implements `FromStr`, `Display`, `Default` (Unknown)
25+
- **`rithmic_to_unix_nanos(ssboe, usecs)`**: Convert Rithmic timestamps to Unix nanoseconds
26+
- **`rithmic_to_unix_nanos_precise(ssboe, usecs, nsecs)`**: Convert with optional nanosecond precision
27+
28+
#### RithmicResponse Helper Methods
29+
- **`is_error()`**: Returns true if response has an error or connection issue
30+
- **`is_connection_issue()`**: Returns true for ConnectionError, HeartbeatTimeout, ForcedLogout
31+
- **`is_market_data()`**: Returns true for BestBidOffer, LastTrade, DepthByOrder, OrderBook, etc.
32+
33+
#### Optional Serde Support
34+
- Added `serde` feature flag for serialization/deserialization support
35+
- `RithmicEnv` derives `Serialize`/`Deserialize` when enabled with lowercase rename
36+
- Enable with: `rithmic-rs = { version = "0.7.1", features = ["serde"] }`
37+
38+
#### New Example
39+
- **`bracket_order.rs`**: Demonstrates placing bracket orders with typed enums
40+
41+
#### CI/CD
42+
- Added GitHub Actions CI workflow for automated testing
43+
44+
### Fixed
45+
46+
#### Error Handling Improvements
47+
- Replaced `.unwrap()` panics with proper error handling in all plant handles
48+
- `RithmicTickerPlantHandle`: `subscribe`, `unsubscribe`, `get_front_month_contract`, and other methods now handle channel send failures gracefully
49+
- `RithmicOrderPlantHandle`: `place_bracket_order`, `modify_order`, `cancel_order`, and other methods now handle channel send failures gracefully
50+
- `RithmicHistoryPlantHandle`: `load_time_bars`, `load_ticks`, and other methods now handle channel send failures gracefully
51+
- `RithmicPnlPlantHandle`: `subscribe_pnl_updates`, `pnl_position_snapshots`, and other methods now handle channel send failures gracefully
52+
53+
#### Code Quality
54+
- Addressed clippy lints in util module
55+
- Cleaned up util module documentation
56+
1057
## [0.7.0] - 2026-01-08
1158

1259
### Breaking Changes
@@ -524,6 +571,7 @@ Previous stable release. See git history for earlier changes.
524571

525572
## Version History Summary
526573

574+
- **0.7.1** (2026-01-23): New utility module (InstrumentInfo, OrderStatus, timestamp helpers), RithmicResponse helper methods, optional serde support, improved error handling
527575
- **0.7.0** (2026-01-08): Breaking changes - Order types now use enums instead of raw integers, cleaner public API exports
528576
- **0.6.2** (2025-12-20): Expanded plant handle APIs, additional message types, OCO order support, and new sender methods
529577
- **0.6.1** (2025-11-24): Environment-specific configuration variables
@@ -534,7 +582,8 @@ Previous stable release. See git history for earlier changes.
534582
- **0.5.0** (2025-11-16): Major stability and API improvements - Connection strategies, unified config, panic fixes, connection health monitoring
535583
- **0.4.2** (2025-11-15): Previous stable release
536584

537-
[Unreleased]: https://github.com/pbeets/rithmic-rs/compare/v0.7.0...HEAD
585+
[Unreleased]: https://github.com/pbeets/rithmic-rs/compare/v0.7.1...HEAD
586+
[0.7.1]: https://github.com/pbeets/rithmic-rs/compare/v0.7.0...v0.7.1
538587
[0.7.0]: https://github.com/pbeets/rithmic-rs/compare/v0.6.2...v0.7.0
539588
[0.6.2]: https://github.com/pbeets/rithmic-rs/compare/v0.6.1...v0.6.2
540589
[0.6.1]: https://github.com/pbeets/rithmic-rs/compare/v0.6.0...v0.6.1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rithmic-rs"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
description = "Rust client for the Rithmic R | Protocol API to build algo trading systems"
55
license = "MIT OR Apache-2.0"
66
edition = "2024"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Add to your `Cargo.toml`:
1515

1616
```toml
1717
[dependencies]
18-
rithmic-rs = "0.7.0"
18+
rithmic-rs = "0.7.1"
1919
```
2020

2121
Set your environment variables:

src/util/time.rs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,29 @@ mod tests {
6060

6161
#[test]
6262
fn test_rithmic_to_unix_nanos_precise() {
63-
assert_eq!(rithmic_to_unix_nanos_precise(1, 0, None), 1_000_000_000);
63+
// None should match rithmic_to_unix_nanos
6464
assert_eq!(
65-
rithmic_to_unix_nanos_precise(1, 0, Some(123)),
66-
1_000_000_123
65+
rithmic_to_unix_nanos_precise(1_704_067_200, 500_000, None),
66+
rithmic_to_unix_nanos(1_704_067_200, 500_000)
6767
);
68+
69+
// Doc example: 2024-01-01 00:00:00.500000123 UTC
70+
assert_eq!(
71+
rithmic_to_unix_nanos_precise(1_704_067_200, 500_000, Some(123)),
72+
1_704_067_200_500_000_123
73+
);
74+
75+
// Realistic trading timestamp with full precision
76+
// 2024-06-15 14:30:45.123456789 UTC
77+
assert_eq!(
78+
rithmic_to_unix_nanos_precise(1_718_461_845, 123_456, Some(789)),
79+
1_718_461_845_123_456_789
80+
);
81+
82+
// Edge case: max usecs (999999) with nsecs
6883
assert_eq!(
69-
rithmic_to_unix_nanos_precise(1, 500000, Some(456)),
70-
1_500_000_456
84+
rithmic_to_unix_nanos_precise(1_704_067_200, 999_999, Some(999)),
85+
1_704_067_200_999_999_999
7186
);
7287
}
7388
}

0 commit comments

Comments
 (0)