Skip to content

Commit 768cc7b

Browse files
committed
fix(python): register missing types in quote and trade modules
Add add_class registrations for 14 types defined in types.rs but missing from mod.rs: SubmitOrderResponse, CashInfo, AccountBalance, CashFlowDirection, CashFlow, FundPositionsResponse, FundPositionChannel, FundPosition, StockPositionsResponse, StockPositionChannel, StockPosition (trade), and CapitalDistribution, Subscription, OptionDirection, QuotePackageDetail (quote).
1 parent d1f845d commit 768cc7b

3 files changed

Lines changed: 22 additions & 7 deletions

File tree

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ resolver = "3"
33
members = ["rust", "python", "nodejs", "java", "c", "mcp"]
44

55
[workspace.package]
6-
version = "4.0.0"
6+
version = "4.0.1"
77
edition = "2024"
88

99
[profile.release]
1010
lto = true
1111

1212
[workspace.dependencies]
13-
longbridge-wscli = { path = "rust/crates/wsclient", version = "4.0.0" }
14-
longbridge-httpcli = { path = "rust/crates/httpclient", version = "4.0.0" }
15-
longbridge-proto = { path = "rust/crates/proto", version = "4.0.0" }
16-
longbridge-candlesticks = { path = "rust/crates/candlesticks", version = "4.0.0" }
17-
longbridge-oauth = { path = "rust/crates/oauth", version = "4.0.0" }
18-
longbridge = { path = "rust", version = "4.0.0" }
13+
longbridge-wscli = { path = "rust/crates/wsclient", version = "4.0.1" }
14+
longbridge-httpcli = { path = "rust/crates/httpclient", version = "4.0.1" }
15+
longbridge-proto = { path = "rust/crates/proto", version = "4.0.1" }
16+
longbridge-candlesticks = { path = "rust/crates/candlesticks", version = "4.0.1" }
17+
longbridge-oauth = { path = "rust/crates/oauth", version = "4.0.1" }
18+
longbridge = { path = "rust", version = "4.0.1" }
1919

2020
tokio = "1.47.1"
2121
tokio-tungstenite = "0.27.0"

python/src/quote/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ pub(crate) fn register_types(parent: &Bound<PyModule>) -> PyResult<()> {
5858
parent.add_class::<types::MarketTradingDays>()?;
5959
parent.add_class::<types::CapitalFlowLine>()?;
6060
parent.add_class::<types::CapitalDistributionResponse>()?;
61+
parent.add_class::<types::CapitalDistribution>()?;
6162
parent.add_class::<types::SecurityBoard>()?;
63+
parent.add_class::<types::Subscription>()?;
64+
parent.add_class::<types::OptionDirection>()?;
65+
parent.add_class::<types::QuotePackageDetail>()?;
6266

6367
parent.add_class::<context::QuoteContext>()?;
6468
parent.add_class::<context_async::AsyncQuoteContext>()?;

python/src/trade/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ pub(crate) fn register_types(parent: &Bound<PyModule>) -> PyResult<()> {
2929
parent.add_class::<types::BalanceType>()?;
3030
parent.add_class::<types::EstimateMaxPurchaseQuantityResponse>()?;
3131
parent.add_class::<types::FrozenTransactionFee>()?;
32+
parent.add_class::<types::SubmitOrderResponse>()?;
33+
parent.add_class::<types::CashInfo>()?;
34+
parent.add_class::<types::AccountBalance>()?;
35+
parent.add_class::<types::CashFlowDirection>()?;
36+
parent.add_class::<types::CashFlow>()?;
37+
parent.add_class::<types::FundPositionsResponse>()?;
38+
parent.add_class::<types::FundPositionChannel>()?;
39+
parent.add_class::<types::FundPosition>()?;
40+
parent.add_class::<types::StockPositionsResponse>()?;
41+
parent.add_class::<types::StockPositionChannel>()?;
42+
parent.add_class::<types::StockPosition>()?;
3243

3344
parent.add_class::<context::TradeContext>()?;
3445
parent.add_class::<context_async::AsyncTradeContext>()?;

0 commit comments

Comments
 (0)