oanda-client 1.1.0

An async, provider-native Rust client for OANDA's v20 REST API
Documentation
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
//! OANDA order endpoint contracts.
// Shared imports vary by capability; unused ones are deliberately allowed.
#[allow(unused_imports)]
use crate::Timestamp;
#[allow(unused_imports)]
use crate::ids::*;
#[allow(unused_imports)]
use crate::models::*;
#[allow(unused_imports)]
use crate::{Client, Result};
#[allow(unused_imports)]
use reqwest::Method;
#[allow(unused_imports)]
use rust_decimal::Decimal;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};

/// Request body for `create_order`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateOrderBody {
    /// Specification of the Order to create
    #[serde(rename = "order", default, skip_serializing_if = "Option::is_none")]
    pub order: Option<OrderRequest>,
}

/// Successful response for `create_order`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateOrderResponse {
    /// The Transaction that created the Order specified by the request.
    #[serde(
        rename = "orderCreateTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_create_transaction: Option<Transaction>,
    /// The Transaction that filled the newly created Order. Only provided when the Order was immediately filled.
    #[serde(
        rename = "orderFillTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_fill_transaction: Option<OrderFillTransaction>,
    /// The Transaction that cancelled the newly created Order. Only provided when the Order was immediately
    /// cancelled.
    #[serde(
        rename = "orderCancelTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_cancel_transaction: Option<OrderCancelTransaction>,
    /// The Transaction that reissues the Order. Only provided when the Order is configured to be reissued for
    /// its remaining units after a partial fill and the reissue was successful.
    #[serde(
        rename = "orderReissueTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_reissue_transaction: Option<Transaction>,
    /// The Transaction that rejects the reissue of the Order. Only provided when the Order is configured to be
    /// reissued for its remaining units after a partial fill and the reissue was rejected.
    #[serde(
        rename = "orderReissueRejectTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_reissue_reject_transaction: Option<Transaction>,
    /// The IDs of all Transactions that were created while satisfying the request.
    #[serde(
        rename = "relatedTransactionIDs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub related_transaction_ids: Option<Vec<TransactionID>>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
}

/// Documented rejection fields for `create_order`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct CreateOrderRejection {
    /// The Transaction that rejected the creation of the Order as requested
    #[serde(
        rename = "orderRejectTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_reject_transaction: Option<Transaction>,
    /// The IDs of all Transactions that were created while satisfying the request.
    #[serde(
        rename = "relatedTransactionIDs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub related_transaction_ids: Option<Vec<TransactionID>>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
    /// The code of the error that has occurred. This field may not be returned for some errors.
    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
    pub error_code: Option<String>,
    /// The human-readable description of the error that has occurred.
    #[serde(
        rename = "errorMessage",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub error_message: Option<String>,
}

impl Client {
    /// Create order.
    pub async fn create_order(
        &self,
        account_id: &AccountID,
        body: &CreateOrderBody,
    ) -> std::result::Result<
        crate::ApiResponse<CreateOrderResponse>,
        crate::OperationError<CreateOrderRejection>,
    > {
        let account_id_encoded = crate::client::segment(account_id.as_str());
        let path = format!("/v3/accounts/{account_id_encoded}/orders");
        self.execute(
            Method::POST,
            &path,
            None::<&()>,
            Some(body),
            Some(crate::client::MutationAdmission::Ordinary(account_id)),
            None,
        )
        .await
    }
}

/// Query parameters for `list_orders`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ListOrdersQuery {
    /// List of Order IDs to retrieve
    #[serde(rename = "ids", default, skip_serializing_if = "Option::is_none")]
    pub ids: Option<Vec<OrderID>>,
    /// The state to filter the requested Orders by \[default=PENDING\]
    #[serde(rename = "state", default, skip_serializing_if = "Option::is_none")]
    pub state: Option<OrderStateFilter>,
    /// The instrument to filter the requested orders by
    #[serde(
        rename = "instrument",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub instrument: Option<InstrumentName>,
    /// The maximum number of Orders to return \[default=50, maximum=500\]
    #[serde(rename = "count", default, skip_serializing_if = "Option::is_none")]
    pub count: Option<i64>,
    /// The maximum Order ID to return. If not provided the most recent Orders in the Account are returned
    #[serde(rename = "beforeID", default, skip_serializing_if = "Option::is_none")]
    pub before_id: Option<OrderID>,
}

/// Successful response for `list_orders`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ListOrdersResponse {
    /// The list of Order detail objects
    #[serde(rename = "orders", default, skip_serializing_if = "Option::is_none")]
    pub orders: Option<Vec<Order>>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
}

impl Client {
    /// List orders.
    pub async fn list_orders(
        &self,
        account_id: &AccountID,
        query: Option<&ListOrdersQuery>,
    ) -> std::result::Result<
        crate::ApiResponse<ListOrdersResponse>,
        crate::OperationError<crate::GenericRejection>,
    > {
        let account_id_encoded = crate::client::segment(account_id.as_str());
        let path = format!("/v3/accounts/{account_id_encoded}/orders");
        self.execute(Method::GET, &path, query, None::<&()>, None, None)
            .await
    }
}

/// Successful response for `list_pending_orders`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ListPendingOrdersResponse {
    /// The list of pending Order details
    #[serde(rename = "orders", default, skip_serializing_if = "Option::is_none")]
    pub orders: Option<Vec<Order>>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
}

impl Client {
    /// List pending orders.
    pub async fn list_pending_orders(
        &self,
        account_id: &AccountID,
    ) -> std::result::Result<
        crate::ApiResponse<ListPendingOrdersResponse>,
        crate::OperationError<crate::GenericRejection>,
    > {
        let account_id_encoded = crate::client::segment(account_id.as_str());
        let path = format!("/v3/accounts/{account_id_encoded}/pendingOrders");
        self.execute(Method::GET, &path, None::<&()>, None::<&()>, None, None)
            .await
    }
}

/// Successful response for `order_details`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct OrderDetailsResponse {
    /// The details of the Order requested
    #[serde(rename = "order", default, skip_serializing_if = "Option::is_none")]
    pub order: Option<Order>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
}

impl Client {
    /// Order details.
    pub async fn order_details(
        &self,
        account_id: &AccountID,
        order_specifier: &OrderSpecifier,
    ) -> std::result::Result<
        crate::ApiResponse<OrderDetailsResponse>,
        crate::OperationError<crate::GenericRejection>,
    > {
        let account_id_encoded = crate::client::segment(account_id.as_str());
        let order_specifier_encoded = crate::client::segment(order_specifier.as_str());
        let path = format!("/v3/accounts/{account_id_encoded}/orders/{order_specifier_encoded}");
        self.execute(Method::GET, &path, None::<&()>, None::<&()>, None, None)
            .await
    }
}

/// Request body for `replace_order`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ReplaceOrderBody {
    /// Specification of the replacing Order
    #[serde(rename = "order", default, skip_serializing_if = "Option::is_none")]
    pub order: Option<OrderRequest>,
}

/// Successful response for `replace_order`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ReplaceOrderResponse {
    /// The Transaction that cancelled the Order to be replaced.
    #[serde(
        rename = "orderCancelTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_cancel_transaction: Option<OrderCancelTransaction>,
    /// The Transaction that created the replacing Order as requested.
    #[serde(
        rename = "orderCreateTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_create_transaction: Option<Transaction>,
    /// The Transaction that filled the replacing Order. This is only provided when the replacing Order was
    /// immediately filled.
    #[serde(
        rename = "orderFillTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_fill_transaction: Option<OrderFillTransaction>,
    /// The Transaction that reissues the replacing Order. Only provided when the replacing Order was partially
    /// filled immediately and is configured to be reissued for its remaining units.
    #[serde(
        rename = "orderReissueTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_reissue_transaction: Option<Transaction>,
    /// The Transaction that rejects the reissue of the Order. Only provided when the replacing Order was
    /// partially filled immediately and was configured to be reissued, however the reissue was rejected.
    #[serde(
        rename = "orderReissueRejectTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_reissue_reject_transaction: Option<Transaction>,
    /// The Transaction that cancelled the replacing Order. Only provided when the replacing Order was
    /// immediately cancelled.
    #[serde(
        rename = "replacingOrderCancelTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub replacing_order_cancel_transaction: Option<OrderCancelTransaction>,
    /// The IDs of all Transactions that were created while satisfying the request.
    #[serde(
        rename = "relatedTransactionIDs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub related_transaction_ids: Option<Vec<TransactionID>>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
}

/// Documented rejection fields for `replace_order`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ReplaceOrderRejection {
    /// The Transaction that rejected the creation of the replacing Order
    #[serde(
        rename = "orderRejectTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_reject_transaction: Option<Transaction>,
    /// The IDs of all Transactions that were created while satisfying the request.
    #[serde(
        rename = "relatedTransactionIDs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub related_transaction_ids: Option<Vec<TransactionID>>,
    /// The ID of the most recent Transaction created for the Account.
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
    /// The code of the error that has occurred. This field may not be returned for some errors.
    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
    pub error_code: Option<String>,
    /// The human-readable description of the error that has occurred.
    #[serde(
        rename = "errorMessage",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub error_message: Option<String>,
    /// The Transaction that rejected the cancellation of the Order to be replaced. Only present if the Account
    /// exists.
    #[serde(
        rename = "orderCancelRejectTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_cancel_reject_transaction: Option<Transaction>,
}

impl Client {
    /// Replace order.
    pub async fn replace_order(
        &self,
        account_id: &AccountID,
        order_specifier: &OrderSpecifier,
        body: &ReplaceOrderBody,
        client_request_id: Option<&ClientRequestID>,
    ) -> std::result::Result<
        crate::ApiResponse<ReplaceOrderResponse>,
        crate::OperationError<ReplaceOrderRejection>,
    > {
        let account_id_encoded = crate::client::segment(account_id.as_str());
        let order_specifier_encoded = crate::client::segment(order_specifier.as_str());
        let path = format!("/v3/accounts/{account_id_encoded}/orders/{order_specifier_encoded}");
        self.execute(
            Method::PUT,
            &path,
            None::<&()>,
            Some(body),
            Some(crate::client::MutationAdmission::Ordinary(account_id)),
            client_request_id,
        )
        .await
    }
}

/// Successful response for `cancel_order`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelOrderResponse {
    /// The Transaction that cancelled the Order
    #[serde(
        rename = "orderCancelTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_cancel_transaction: Option<OrderCancelTransaction>,
    /// The IDs of all Transactions that were created while satisfying the request.
    #[serde(
        rename = "relatedTransactionIDs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub related_transaction_ids: Option<Vec<TransactionID>>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
}

/// Documented rejection fields for `cancel_order`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct CancelOrderRejection {
    /// The Transaction that rejected the cancellation of the Order. Only present if the Account exists.
    #[serde(
        rename = "orderCancelRejectTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_cancel_reject_transaction: Option<OrderCancelRejectTransaction>,
    /// The IDs of all Transactions that were created while satisfying the request. Only present if the Account
    /// exists.
    #[serde(
        rename = "relatedTransactionIDs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub related_transaction_ids: Option<Vec<TransactionID>>,
    /// The ID of the most recent Transaction created for the Account. Only present if the Account exists.
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
    /// The code of the error that has occurred. This field may not be returned for some errors.
    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
    pub error_code: Option<String>,
    /// The human-readable description of the error that has occurred.
    #[serde(
        rename = "errorMessage",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub error_message: Option<String>,
}

impl Client {
    /// Cancel order.
    pub async fn cancel_order(
        &self,
        account_id: &AccountID,
        order_specifier: &OrderSpecifier,
        client_request_id: Option<&ClientRequestID>,
    ) -> std::result::Result<
        crate::ApiResponse<CancelOrderResponse>,
        crate::OperationError<CancelOrderRejection>,
    > {
        let account_id_encoded = crate::client::segment(account_id.as_str());
        let order_specifier_encoded = crate::client::segment(order_specifier.as_str());
        let path =
            format!("/v3/accounts/{account_id_encoded}/orders/{order_specifier_encoded}/cancel");
        self.execute(
            Method::PUT,
            &path,
            None::<&()>,
            None::<&()>,
            Some(crate::client::MutationAdmission::Exit(account_id)),
            client_request_id,
        )
        .await
    }
}

/// Request body for `update_order_client_extensions`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpdateOrderClientExtensionsBody {
    /// The Client Extensions to update for the Order. Do not set, modify, or delete clientExtensions if your
    /// account is associated with MT4.
    #[serde(
        rename = "clientExtensions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub client_extensions: Option<ClientExtensions>,
    /// The Client Extensions to update for the Trade created when the Order is filled. Do not set, modify, or
    /// delete clientExtensions if your account is associated with MT4.
    #[serde(
        rename = "tradeClientExtensions",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub trade_client_extensions: Option<ClientExtensions>,
}

/// Successful response for `update_order_client_extensions`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpdateOrderClientExtensionsResponse {
    /// The Transaction that modified the Client Extensions for the Order
    #[serde(
        rename = "orderClientExtensionsModifyTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_client_extensions_modify_transaction: Option<OrderClientExtensionsModifyTransaction>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
    /// The IDs of all Transactions that were created while satisfying the request.
    #[serde(
        rename = "relatedTransactionIDs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub related_transaction_ids: Option<Vec<TransactionID>>,
}

/// Documented rejection fields for `update_order_client_extensions`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct UpdateOrderClientExtensionsRejection {
    /// The Transaction that rejected the modification of the Client Extensions for the Order
    #[serde(
        rename = "orderClientExtensionsModifyRejectTransaction",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub order_client_extensions_modify_reject_transaction:
        Option<OrderClientExtensionsModifyRejectTransaction>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(
        rename = "lastTransactionID",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_transaction_id: Option<TransactionID>,
    /// The IDs of all Transactions that were created while satisfying the request.
    #[serde(
        rename = "relatedTransactionIDs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub related_transaction_ids: Option<Vec<TransactionID>>,
    /// The code of the error that has occurred. This field may not be returned for some errors.
    #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
    pub error_code: Option<String>,
    /// The human-readable description of the error that has occurred.
    #[serde(
        rename = "errorMessage",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub error_message: Option<String>,
}

impl Client {
    /// Update order client extensions.
    pub async fn update_order_client_extensions(
        &self,
        account_id: &AccountID,
        order_specifier: &OrderSpecifier,
        body: &UpdateOrderClientExtensionsBody,
    ) -> std::result::Result<
        crate::ApiResponse<UpdateOrderClientExtensionsResponse>,
        crate::OperationError<UpdateOrderClientExtensionsRejection>,
    > {
        let account_id_encoded = crate::client::segment(account_id.as_str());
        let order_specifier_encoded = crate::client::segment(order_specifier.as_str());
        let path = format!(
            "/v3/accounts/{account_id_encoded}/orders/{order_specifier_encoded}/clientExtensions"
        );
        self.execute(
            Method::PUT,
            &path,
            None::<&()>,
            Some(body),
            Some(crate::client::MutationAdmission::Ordinary(account_id)),
            None,
        )
        .await
    }
}