diff --git a/c/csrc/include/longport.h b/c/csrc/include/longport.h index e2fed5eaf..8e81260c8 100644 --- a/c/csrc/include/longport.h +++ b/c/csrc/include/longport.h @@ -1640,6 +1640,10 @@ typedef struct lb_push_order_changed_t { * Last price (maybe null) */ const struct lb_decimal_t *last_price; + /** + * Remark message + */ + const char *remark; } lb_push_order_changed_t; typedef void (*lb_order_changed_callback_t)(const struct lb_trade_context_t*, diff --git a/c/src/trade_context/types.rs b/c/src/trade_context/types.rs index d46aca88c..214b89c6d 100644 --- a/c/src/trade_context/types.rs +++ b/c/src/trade_context/types.rs @@ -73,6 +73,8 @@ pub struct CPushOrderChanged { pub last_share: *const CDecimal, /// Last price (maybe null) pub last_price: *const CDecimal, + /// Remark message + pub remark: *const c_char, } pub struct CPushOrderChangedOwned { @@ -100,6 +102,8 @@ pub struct CPushOrderChangedOwned { account_no: CString, last_share: Option, last_price: Option, + /// Remark message + pub remark: CString, } impl From for CPushOrderChangedOwned { @@ -129,6 +133,7 @@ impl From for CPushOrderChangedOwned { account_no, last_share, last_price, + remark, } = order_changed; CPushOrderChangedOwned { side, @@ -155,6 +160,7 @@ impl From for CPushOrderChangedOwned { account_no: account_no.into(), last_share: last_share.map(Into::into), last_price: last_price.map(Into::into), + remark: remark.into(), } } } @@ -188,6 +194,7 @@ impl ToFFI for CPushOrderChangedOwned { account_no, last_share, last_price, + remark, } = self; CPushOrderChanged { side: (*side).into(), @@ -241,6 +248,7 @@ impl ToFFI for CPushOrderChangedOwned { .as_ref() .map(ToFFI::to_ffi_type) .unwrap_or(std::ptr::null()), + remark: remark.to_ffi_type(), } } } diff --git a/cpp/include/types.hpp b/cpp/include/types.hpp index 3f8f93ead..5ec41c1ea 100644 --- a/cpp/include/types.hpp +++ b/cpp/include/types.hpp @@ -1417,6 +1417,8 @@ struct PushOrderChanged std::optional last_share; /// Last price std::optional last_price; + /// Remark message + std::string remark; }; /// Options for get history orders request diff --git a/cpp/src/convert.hpp b/cpp/src/convert.hpp index afd8f04be..96097134f 100644 --- a/cpp/src/convert.hpp +++ b/cpp/src/convert.hpp @@ -1436,6 +1436,7 @@ convert(const lb_push_order_changed_t* info) : std::nullopt, info->last_price ? std::optional{ Decimal(info->last_price) } : std::nullopt, + info->remark, }; } diff --git a/java/javasrc/src/main/java/com/longport/trade/PushOrderChanged.java b/java/javasrc/src/main/java/com/longport/trade/PushOrderChanged.java index fbdd06e6a..e88936d1c 100644 --- a/java/javasrc/src/main/java/com/longport/trade/PushOrderChanged.java +++ b/java/javasrc/src/main/java/com/longport/trade/PushOrderChanged.java @@ -28,6 +28,7 @@ public class PushOrderChanged { private String accountNo; private BigDecimal lastShare; private BigDecimal lastPrice; + private String remark; public OrderSide getSide() { return side; @@ -117,12 +118,16 @@ public String getAccountNo() { return accountNo; } + public BigDecimal getLastShare() { + return lastShare; + } + public BigDecimal getLastPrice() { return lastPrice; } - public BigDecimal getLastShare() { - return lastShare; + public String getRemark() { + return remark; } @Override @@ -134,7 +139,8 @@ public String toString() { + submittedAt + ", updatedAt=" + updatedAt + ", triggerPrice=" + triggerPrice + ", msg=" + msg + ", tag=" + tag + ", triggerStatus=" + triggerStatus + ", triggerAt=" + triggerAt + ", trailingAmount=" + trailingAmount + ", trailingPercent=" + trailingPercent + ", limitOffset=" + limitOffset - + ", accountNo=" + accountNo + ", lastShare=" + lastShare + ", lastPrice=" + lastPrice + "]"; + + ", accountNo=" + accountNo + ", lastShare=" + lastShare + ", lastPrice=" + lastPrice + ", remark=" + + remark + "]"; } } diff --git a/java/src/types/classes.rs b/java/src/types/classes.rs index b4e2a26a4..9001de4d1 100644 --- a/java/src/types/classes.rs +++ b/java/src/types/classes.rs @@ -591,7 +591,8 @@ impl_java_class!( limit_offset, account_no, last_share, - last_price + last_price, + remark ] ); diff --git a/nodejs/index.d.ts b/nodejs/index.d.ts index e9d9a9ed6..b1965cb47 100644 --- a/nodejs/index.d.ts +++ b/nodejs/index.d.ts @@ -1847,7 +1847,7 @@ export class WarrantInfo { /** Quote change rate */ get changeRate(): Decimal /** Quote change */ - get changeVal(): Decimal + get changeValue(): Decimal /** Volume */ get volume(): number /** Turnover */ @@ -2747,6 +2747,8 @@ export class PushOrderChanged { get lastShare(): Decimal | null /** Last price */ get lastPrice(): Decimal | null + /** Remark message */ + get remark(): string } /** Response for submit order request */ export class SubmitOrderResponse { diff --git a/nodejs/src/trade/types.rs b/nodejs/src/trade/types.rs index 842faab2d..8ae0f67e4 100644 --- a/nodejs/src/trade/types.rs +++ b/nodejs/src/trade/types.rs @@ -537,6 +537,8 @@ pub struct PushOrderChanged { /// Last price #[js(opt)] last_price: Option, + /// Remark message + remark: String, } /// Response for submit order request diff --git a/python/pysrc/longport/openapi.pyi b/python/pysrc/longport/openapi.pyi index 084bb64e1..06796f517 100644 --- a/python/pysrc/longport/openapi.pyi +++ b/python/pysrc/longport/openapi.pyi @@ -1439,41 +1439,6 @@ class WarrantStatus: Normal """ -class WarrantType: - """ - Warrant type - """ - - class Unknown(WarrantType): - """ - Unknown - """ - - class Call(WarrantType): - """ - Call - """ - - class Put(WarrantType): - """ - Put - """ - - class Bull(WarrantType): - """ - Bull - """ - - class Bear(WarrantType): - """ - Bear - """ - - class Inline(WarrantType): - """ - Inline - """ - class SortOrderType: """ Sort order type @@ -3674,6 +3639,11 @@ class PushOrderChanged: Last price """ + remark: str + """ + Remark message + """ + class TimeInForceType: """ diff --git a/python/src/trade/types.rs b/python/src/trade/types.rs index f4262a380..1c881869b 100644 --- a/python/src/trade/types.rs +++ b/python/src/trade/types.rs @@ -537,6 +537,8 @@ pub(crate) struct PushOrderChanged { /// Last price #[py(opt)] last_price: Option, + /// Remark message + remark: String, } /// Response for submit order request diff --git a/rust/src/trade/push_types.rs b/rust/src/trade/push_types.rs index 82bc17b63..0888545c8 100644 --- a/rust/src/trade/push_types.rs +++ b/rust/src/trade/push_types.rs @@ -85,6 +85,8 @@ pub struct PushOrderChanged { /// Last price #[serde(with = "serde_utils::decimal_opt_empty_is_none")] pub last_price: Option, + /// Remark message + pub remark: String, } /// Push event