Open fraschm1998 opened 1 month ago
Or did you do Vec
Yeah, I've struggled on the implementation here. It's somewhat complicated to reassemble the order fields. It's not necessarily clear what information is guaranteed to be included. Working on a fix
Yeah, I've struggled on the implementation here. It's somewhat complicated to reassemble the order fields. It's not necessarily clear what information is guaranteed to be included. Working on a fix
Maybe just replicate the output of the rust-ibapi library on lib.rs?
https://docs.rs/ibapi/latest/ibapi/orders/enum.OrderDataResult.html
Yeah I'll take a look. It looks like their solution is quite "dynamic" (uses lots of Option
Here's the output of an open order:
SECOND Intod2Iter( 12:55:50 [239/1000]
[
"320227571",
"QQQ",
"STK",
"",
"0",
"?",
"",
"SMART",
"USD",
"QQQ",
"NMS",
"BUY",
"100",
"LMT",
"482.21",
"0.0",
"DAY",
"",
"DU5614130",
"",
"0",
"",
"0",
"1462182896",
"0",
"0",
"0",
"",
"1462182896.0/DU5614130/100",
"",
"",
"",
"",
"",
"",
"",
"",
"0",
"",
"-1",
"0",
"",
"",
"",
"",
"",
"2147483647",
"0",
"0",
"0",
"",
"3",
"0",
"0",
"",
"0",
"0",
"",
"0",
"None",
"",
"0",
"",
"",
"",
"?",
"0",
"0",
"",
"0",
"0",
"",
"",
"",
"",
"",
"0",
"0",
"0",
"2147483647",
"2147483647",
"",
"",
"0",
"",
"IB",
"0",
"0",
"",
"0",
"0",
"Submitted",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"",
"",
"",
"",
"",
"0",
"0",
"0",
"None",
"1.7976931348623157E308",
"495.83",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"1.7976931348623157E308",
"0",
"",
"",
"",
"0",
"1",
"0",
"0",
"1",
"",
"",
"0",
"",
"",
"",
"",
"",
"",
],
)
Taken from:
async move {
decode_fields!(
fields =>
order_id @ 1: i64,
);
println!("SECOND {:#?}", fields);
let proxy = deserialize_contract_proxy::<crate::contract::proxy_indicators::HasExchange>(
fields,
)?;
deserialize_contract_proxy
not fully deserializing open_order_msg. Not deserializing whether it's a MKT or LMT order, and if it's a LMT order, the cost. Trying to implement it myself but am confused as to whatorder_types
is supposed to be. You have it set as a default string vec, howver shouldn't it be an OrderType enum between MKT and LMT and other OrderTypes?https://www.interactivebrokers.com/campus/ibkr-api-page/twsapi-doc/#fa-orders
I see you have some of this and am confused as to what it covers.
What I did so far replicated from OrderSide:
executions.rs