bybit-api 0.1.2

A Rust SDK for the Bybit V5 API - async, type-safe, zero-panic
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
623
624
//! RFQ (Request For Quote) models.

use serde::{Deserialize, Serialize};

/// Accept non-LP quote request parameters.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AcceptNonLpQuoteParams {
    pub rfq_id: String,
}

/// Accept non-LP quote response.
pub type AcceptNonLpQuoteResponse = AcceptNonLpQuoteResult;

/// Accept non-LP quote result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AcceptNonLpQuoteResult {
    pub rfq_id: Option<String>,
}

/// Cancel all quotes request parameters.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelAllQuotesParams {}

/// Cancel all quotes response.
pub type CancelAllQuotesResponse = Vec<CancelAllQuotesResultItem>;

/// Cancel all quotes result item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelAllQuotesResultItem {
    pub rfq_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
    pub code: Option<String>,
    pub msg: Option<String>,
}

/// Cancel all RFQs request parameters.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelAllRfqsParams {}

/// Cancel all RFQs response.
pub type CancelAllRfqsResponse = Vec<CancelAllRfqsResult>;

/// Cancel all RFQs result item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelAllRfqsResult {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub code: Option<String>,
    pub msg: Option<String>,
}

/// Cancel quote request parameters.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelQuoteParams {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub quote_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rfq_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub quote_link_id: Option<String>,
}

/// Cancel quote response.
pub type CancelQuoteResponse = CancelQuoteResult;

/// Cancel quote result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelQuoteResult {
    pub rfq_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
}

/// Cancel RFQ request parameters.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelRfqParams {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rfq_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rfq_link_id: Option<String>,
}

/// Cancel RFQ response.
pub type CancelRfqResponse = CancelRfqResult;

/// Cancel RFQ result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelRfqResult {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
}

/// Create quote request parameters.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateQuoteParams {
    pub rfq_id: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub quote_link_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub anonymous: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub expire_in: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub quote_buy_list: Option<Vec<QuoteLeg>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub quote_sell_list: Option<Vec<QuoteLeg>>,
}

/// Quote leg used in create quote request.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct QuoteLeg {
    pub category: String,
    pub symbol: String,
    pub price: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub qty: Option<String>,
}

/// Create quote response.
pub type CreateQuoteResponse = CreateQuoteResult;

/// Create quote result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateQuoteResult {
    pub rfq_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
    pub expires_at: Option<String>,
    pub desk_code: Option<String>,
    pub status: Option<String>,
}

/// Create RFQ request parameters.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateRfqParams {
    pub counterparties: Vec<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rfq_link_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub anonymous: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub strategy_type: Option<String>,
    pub list: Vec<CreateRfqLeg>,
}

/// RFQ leg used in create RFQ request.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateRfqLeg {
    pub category: String,
    pub symbol: String,
    pub side: String,
    pub qty: String,
}

/// Create RFQ response.
pub type CreateRfqResponse = CreateRfqResult;

/// Create RFQ result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateRfqResult {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub status: Option<String>,
    pub expires_at: Option<String>,
    pub desk_code: Option<String>,
}

/// Execute quote request parameters.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ExecuteQuoteParams {
    pub rfq_id: String,
    pub quote_id: String,
    pub quote_side: String,
}

/// Execute quote response.
pub type ExecuteQuoteResponse = ExecuteQuoteResult;

/// Execute quote result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ExecuteQuoteResult {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub quote_id: Option<String>,
    pub status: Option<String>,
}

/// Get public trades response.
pub type GetPublicTradesResponse = GetPublicTradesResult;

/// Get public trades result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetPublicTradesResult {
    pub cursor: Option<String>,
    pub list: Option<Vec<PublicTrade>>,
}

/// Public trade entry.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PublicTrade {
    pub rfq_id: Option<String>,
    pub strategy_type: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub legs: Option<Vec<PublicTradeLeg>>,
}

/// Public trade leg.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PublicTradeLeg {
    pub category: Option<String>,
    pub symbol: Option<String>,
    pub side: Option<String>,
    pub price: Option<String>,
    pub qty: Option<String>,
    pub mark_price: Option<String>,
}

/// Get quotes realtime response.
pub type GetQuotesRealtimeResponse = GetQuotesRealtimeResult;

/// Get quotes realtime result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetQuotesRealtimeResult {
    pub list: Option<Vec<QuoteRealtimeItem>>,
}

/// Quote realtime item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct QuoteRealtimeItem {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
    pub expires_at: Option<String>,
    pub status: Option<String>,
    pub desk_code: Option<String>,
    pub exec_quote_side: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub quote_buy_list: Option<Vec<QuoteItemLeg>>,
    pub quote_sell_list: Option<Vec<QuoteItemLeg>>,
}

/// Quote item leg (response).
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct QuoteItemLeg {
    pub category: Option<String>,
    pub symbol: Option<String>,
    pub price: Option<String>,
    pub qty: Option<String>,
}

/// Get quotes response.
pub type GetQuotesResponse = GetQuotesResult;

/// Get quotes result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetQuotesResult {
    pub cursor: Option<String>,
    pub list: Option<Vec<QuoteItem>>,
}

/// Quote item (history).
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct QuoteItem {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
    pub expires_at: Option<String>,
    pub desk_code: Option<String>,
    pub status: Option<String>,
    pub exec_quote_side: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub quote_buy_list: Option<Vec<QuoteItemLeg>>,
    pub quote_sell_list: Option<Vec<QuoteItemLeg>>,
}

/// Get RFQ config response.
pub type GetRfqConfigResponse = GetRfqConfigResult;

/// Get RFQ config result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetRfqConfigResult {
    pub desk_code: Option<String>,
    pub max_legs: Option<i32>,
    #[serde(rename = "maxLP")]
    pub max_lp: Option<i32>,
    pub max_active_rfq: Option<i32>,
    pub rfq_expire_time: Option<i32>,
    pub min_limit_qty_spot_order: Option<i64>,
    pub min_limit_qty_contract_order: Option<i64>,
    pub min_limit_qty_option_order: Option<i64>,
    pub strategy_types: Option<Vec<RfqStrategyType>>,
    pub counterparties: Option<Vec<RfqCounterparty>>,
}

/// RFQ strategy type definition.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RfqStrategyType {
    pub strategy_name: Option<String>,
}

/// RFQ counterparty definition.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RfqCounterparty {
    pub trader_name: Option<String>,
    pub desk_code: Option<String>,
    #[serde(rename = "type")]
    pub type_: Option<String>,
}

/// Get RFQs realtime response.
pub type GetRfqsRealtimeResponse = GetRfqsRealtimeResult;

/// Get RFQs realtime result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetRfqsRealtimeResult {
    pub list: Option<Vec<GetRfqsRealtimeItem>>,
}

/// RFQ realtime item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetRfqsRealtimeItem {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub counterparties: Option<Vec<String>>,
    pub expires_at: Option<String>,
    pub strategy_type: Option<String>,
    pub status: Option<String>,
    pub accept_other_quote_status: Option<String>,
    pub desk_code: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub legs: Option<Vec<GetRfqsRealtimeLeg>>,
}

/// RFQ realtime leg.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetRfqsRealtimeLeg {
    pub category: Option<String>,
    pub symbol: Option<String>,
    pub side: Option<String>,
    pub qty: Option<String>,
}

/// Get RFQs response.
pub type GetRfqsResponse = GetRfqsResult;

/// Get RFQs result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetRfqsResult {
    pub cursor: Option<String>,
    pub list: Option<Vec<GetRfqsListItem>>,
}

/// RFQ history list item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetRfqsListItem {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub counterparties: Option<Vec<String>>,
    pub strategy_type: Option<String>,
    pub expires_at: Option<String>,
    pub status: Option<String>,
    pub accept_other_quote_status: Option<String>,
    pub desk_code: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub legs: Option<Vec<GetRfqsLeg>>,
}

/// RFQ history leg.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetRfqsLeg {
    pub category: Option<String>,
    pub symbol: Option<String>,
    pub side: Option<String>,
    pub qty: Option<String>,
}

/// Get trade history response.
pub type GetTradeHistoryResponse = GetTradeHistoryResult;

/// Get trade history result payload.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetTradeHistoryResult {
    pub cursor: Option<String>,
    pub list: Option<Vec<GetTradeHistoryTrade>>,
}

/// Trade history entry.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetTradeHistoryTrade {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
    pub quote_side: Option<String>,
    pub strategy_type: Option<String>,
    pub status: Option<String>,
    pub rfq_desk_code: Option<String>,
    pub quote_desk_code: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub legs: Option<Vec<GetTradeHistoryLeg>>,
}

/// Trade history leg.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetTradeHistoryLeg {
    pub category: Option<String>,
    pub order_id: Option<String>,
    pub symbol: Option<String>,
    pub side: Option<String>,
    pub price: Option<String>,
    pub qty: Option<String>,
    pub mark_price: Option<String>,
    pub exec_fee: Option<String>,
    pub exec_id: Option<String>,
    pub result_code: Option<i32>,
    pub result_message: Option<String>,
    pub reject_party: Option<String>,
}

/// Cancel all RFQs result item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelAllRfqsResultItem {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub code: Option<String>,
    pub msg: Option<String>,
}

/// Public trade item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PublicTradeItem {
    pub rfq_id: Option<String>,
    pub strategy_type: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub legs: Option<Vec<PublicTradeLeg>>,
}

/// Strategy type entry.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct StrategyType {
    pub strategy_name: Option<String>,
}

/// Counterparty entry.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Counterparty {
    pub trader_name: Option<String>,
    pub desk_code: Option<String>,
    #[serde(rename = "type")]
    pub type_: Option<String>,
}

/// RFQ realtime item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RfqRealtimeItem {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub counterparties: Option<Vec<String>>,
    pub expires_at: Option<String>,
    pub strategy_type: Option<String>,
    pub status: Option<String>,
    pub accept_other_quote_status: Option<String>,
    pub desk_code: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub legs: Option<Vec<RfqRealtimeLeg>>,
}

/// RFQ realtime leg.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RfqRealtimeLeg {
    pub category: Option<String>,
    pub symbol: Option<String>,
    pub side: Option<String>,
    pub qty: Option<String>,
}

/// RFQ item (history).
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RfqItem {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub counterparties: Option<Vec<String>>,
    pub strategy_type: Option<String>,
    pub expires_at: Option<String>,
    pub status: Option<String>,
    pub accept_other_quote_status: Option<String>,
    pub desk_code: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub legs: Option<Vec<RfqLeg>>,
}

/// RFQ leg (history).
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RfqLeg {
    pub category: Option<String>,
    pub symbol: Option<String>,
    pub side: Option<String>,
    pub qty: Option<String>,
}

/// Trade history item.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TradeHistoryItem {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
    pub quote_side: Option<String>,
    pub strategy_type: Option<String>,
    pub status: Option<String>,
    pub rfq_desk_code: Option<String>,
    pub quote_desk_code: Option<String>,
    pub created_at: Option<String>,
    pub updated_at: Option<String>,
    pub legs: Option<Vec<TradeHistoryLeg>>,
}

/// Trade history leg.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TradeHistoryLeg {
    pub category: Option<String>,
    pub order_id: Option<String>,
    pub symbol: Option<String>,
    pub side: Option<String>,
    pub price: Option<String>,
    pub qty: Option<String>,
    pub mark_price: Option<String>,
    pub exec_fee: Option<String>,
    pub exec_id: Option<String>,
    pub result_code: Option<i32>,
    pub result_message: Option<String>,
    pub reject_party: Option<String>,
}

/// Query parameters for [`crate::BybitClient::get_quotes`].
///
/// All fields are optional; use `..Default::default()` to omit them.
/// Constructed by struct-literal syntax so positional arg-swap bugs
/// (e.g., passing `quote_id` where `rfq_id` was expected) are impossible.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetQuotesParams {
    pub rfq_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
    pub trader_type: Option<String>,
    pub status: Option<String>,
    pub limit: Option<u32>,
    pub cursor: Option<String>,
}

/// Query parameters for [`crate::BybitClient::get_trade_history`].
///
/// All fields are optional; use `..Default::default()` to omit them.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetTradeHistoryParams {
    pub rfq_id: Option<String>,
    pub rfq_link_id: Option<String>,
    pub quote_id: Option<String>,
    pub quote_link_id: Option<String>,
    pub trader_type: Option<String>,
    pub status: Option<String>,
    pub limit: Option<u32>,
    pub cursor: Option<String>,
}