-
Notifications
You must be signed in to change notification settings - Fork 3
/
get_history_order_list.rs
41 lines (37 loc) · 1.18 KB
/
get_history_order_list.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use futuapi_rs::{
action::{
common::{TrdFilterConditions, TrdHeader},
history_order_list::GetHistoryOrderListRequest,
},
client, Result,
Trd_Common::{OrderStatus, TrdEnv, TrdMarket},
};
#[tokio::main]
pub async fn main() -> Result<()> {
let mut trd_client = client::trd_connect("127.0.0.1:11111").await?;
let resp = trd_client
.get_history_order_list(GetHistoryOrderListRequest::new(
TrdHeader {
trd_env: TrdEnv::TrdEnv_Real,
acc_id: 0,
trd_market: TrdMarket::TrdMarket_US,
},
TrdFilterConditions {
code_list: Vec::new(),
id_list: Vec::new(),
begin_time: None,
end_time: None,
},
vec![
OrderStatus::OrderStatus_Unsubmitted,
OrderStatus::OrderStatus_Unknown,
OrderStatus::OrderStatus_WaitingSubmit,
OrderStatus::OrderStatus_Submitting,
OrderStatus::OrderStatus_Submitted,
OrderStatus::OrderStatus_Filled_Part,
],
))
.await?;
println!("{:?}", resp);
Ok(())
}