futu_rest/routes/qot/reference/
derivatives.rs1use super::*;
4
5pub async fn get_option_chain(
7 State(state): State<RestState>,
8 Json(body): Json<Value>,
9) -> RawApiResult {
10 adapter::proto_request_raw::<qot_get_option_chain::Request, qot_get_option_chain::Response>(
11 &state,
12 proto_id::QOT_GET_OPTION_CHAIN,
13 Some(body),
14 )
15 .await
16}
17
18pub async fn get_option_quote(
20 State(state): State<RestState>,
21 Json(body): Json<Value>,
22) -> RawApiResult {
23 adapter::proto_request_raw::<qot_get_option_quote::Request, qot_get_option_quote::Response>(
24 &state,
25 proto_id::QOT_GET_OPTION_QUOTE,
26 Some(body),
27 )
28 .await
29}
30
31pub async fn get_option_strategy(
33 State(state): State<RestState>,
34 Json(body): Json<Value>,
35) -> RawApiResult {
36 adapter::proto_request_raw::<
37 qot_get_option_strategy::Request,
38 qot_get_option_strategy::Response,
39 >(&state, proto_id::QOT_GET_OPTION_STRATEGY, Some(body))
40 .await
41}
42
43pub async fn get_option_strategy_analysis(
45 State(state): State<RestState>,
46 Json(body): Json<Value>,
47) -> RawApiResult {
48 adapter::proto_request_raw::<
49 qot_get_option_strategy_analysis::Request,
50 qot_get_option_strategy_analysis::Response,
51 >(
52 &state,
53 proto_id::QOT_GET_OPTION_STRATEGY_ANALYSIS,
54 Some(body),
55 )
56 .await
57}
58
59pub async fn get_option_strategy_spread(
61 State(state): State<RestState>,
62 Json(body): Json<Value>,
63) -> RawApiResult {
64 adapter::proto_request_raw::<
65 qot_get_option_strategy_spread::Request,
66 qot_get_option_strategy_spread::Response,
67 >(&state, proto_id::QOT_GET_OPTION_STRATEGY_SPREAD, Some(body))
68 .await
69}
70
71pub async fn get_warrant(State(state): State<RestState>, Json(body): Json<Value>) -> RawApiResult {
73 adapter::proto_request_raw::<qot_get_warrant::Request, qot_get_warrant::Response>(
74 &state,
75 proto_id::QOT_GET_WARRANT,
76 Some(body),
77 )
78 .await
79}
80
81pub async fn get_option_volatility(
83 State(state): State<RestState>,
84 Json(body): Json<Value>,
85) -> RawApiResult {
86 adapter::proto_request_raw::<
87 qot_get_option_volatility::Request,
88 qot_get_option_volatility::Response,
89 >(&state, proto_id::QOT_GET_OPTION_VOLATILITY, Some(body))
90 .await
91}
92
93pub async fn get_option_exercise_probability(
95 State(state): State<RestState>,
96 Json(body): Json<Value>,
97) -> RawApiResult {
98 adapter::proto_request_raw::<
99 qot_get_option_exercise_probability::Request,
100 qot_get_option_exercise_probability::Response,
101 >(
102 &state,
103 proto_id::QOT_GET_OPTION_EXERCISE_PROBABILITY,
104 Some(body),
105 )
106 .await
107}
108
109pub async fn option_screen(
111 State(state): State<RestState>,
112 Json(body): Json<Value>,
113) -> RawApiResult {
114 adapter::proto_request_raw::<qot_option_screen::Request, qot_option_screen::Response>(
115 &state,
116 proto_id::QOT_OPTION_SCREEN,
117 Some(body),
118 )
119 .await
120}
121
122pub async fn warrant_screen(
124 State(state): State<RestState>,
125 Json(body): Json<Value>,
126) -> RawApiResult {
127 adapter::proto_request_raw::<qot_warrant_screen::Request, qot_warrant_screen::Response>(
128 &state,
129 proto_id::QOT_WARRANT_SCREEN,
130 Some(body),
131 )
132 .await
133}
134
135pub async fn get_option_expiration_date(
137 State(state): State<RestState>,
138 Json(body): Json<Value>,
139) -> RawApiResult {
140 adapter::proto_request_raw::<
141 qot_get_option_expiration_date::Request,
142 qot_get_option_expiration_date::Response,
143 >(&state, proto_id::QOT_GET_OPTION_EXPIRATION_DATE, Some(body))
144 .await
145}