crypticorn 2.16.0__py3-none-any.whl → 2.17.0rc2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. crypticorn/__init__.py +2 -2
  2. crypticorn/auth/client/api/admin_api.py +415 -13
  3. crypticorn/auth/client/api/auth_api.py +2622 -113
  4. crypticorn/auth/client/api/service_api.py +258 -7
  5. crypticorn/auth/client/api/user_api.py +2485 -270
  6. crypticorn/auth/client/api/wallet_api.py +1518 -77
  7. crypticorn/auth/client/models/create_api_key_request.py +2 -1
  8. crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
  9. crypticorn/auth/client/rest.py +23 -4
  10. crypticorn/auth/main.py +8 -5
  11. crypticorn/client.py +227 -59
  12. crypticorn/common/__init__.py +1 -0
  13. crypticorn/common/metrics.py +18 -0
  14. crypticorn/common/middleware.py +46 -0
  15. crypticorn/common/pagination.py +137 -18
  16. crypticorn/common/router/admin_router.py +12 -2
  17. crypticorn/common/utils.py +2 -1
  18. crypticorn/common/warnings.py +7 -0
  19. crypticorn/hive/client/api/admin_api.py +1234 -51
  20. crypticorn/hive/client/api/data_api.py +517 -13
  21. crypticorn/hive/client/api/models_api.py +1657 -83
  22. crypticorn/hive/client/api/status_api.py +415 -13
  23. crypticorn/hive/client/models/api_error_identifier.py +1 -1
  24. crypticorn/hive/client/rest.py +23 -4
  25. crypticorn/hive/main.py +99 -25
  26. crypticorn/klines/client/api/admin_api.py +1234 -51
  27. crypticorn/klines/client/api/change_in_timeframe_api.py +278 -7
  28. crypticorn/klines/client/api/funding_rates_api.py +324 -7
  29. crypticorn/klines/client/api/ohlcv_data_api.py +399 -7
  30. crypticorn/klines/client/api/status_api.py +415 -13
  31. crypticorn/klines/client/api/symbols_api.py +225 -7
  32. crypticorn/klines/client/api/udf_api.py +1393 -120
  33. crypticorn/klines/client/models/api_error_identifier.py +3 -1
  34. crypticorn/klines/client/rest.py +23 -4
  35. crypticorn/klines/main.py +89 -12
  36. crypticorn/metrics/client/api/admin_api.py +1234 -51
  37. crypticorn/metrics/client/api/exchanges_api.py +1405 -140
  38. crypticorn/metrics/client/api/indicators_api.py +640 -13
  39. crypticorn/metrics/client/api/logs_api.py +305 -7
  40. crypticorn/metrics/client/api/marketcap_api.py +1240 -60
  41. crypticorn/metrics/client/api/markets_api.py +352 -7
  42. crypticorn/metrics/client/api/quote_currencies_api.py +237 -7
  43. crypticorn/metrics/client/api/status_api.py +415 -13
  44. crypticorn/metrics/client/api/tokens_api.py +400 -13
  45. crypticorn/metrics/client/configuration.py +4 -2
  46. crypticorn/metrics/client/rest.py +23 -4
  47. crypticorn/metrics/main.py +113 -19
  48. crypticorn/pay/client/api/admin_api.py +1720 -126
  49. crypticorn/pay/client/api/now_payments_api.py +1013 -42
  50. crypticorn/pay/client/api/payments_api.py +580 -13
  51. crypticorn/pay/client/api/products_api.py +915 -25
  52. crypticorn/pay/client/api/status_api.py +415 -13
  53. crypticorn/pay/client/configuration.py +2 -2
  54. crypticorn/pay/client/models/api_error_identifier.py +7 -7
  55. crypticorn/pay/client/models/scope.py +1 -0
  56. crypticorn/pay/client/rest.py +23 -4
  57. crypticorn/pay/main.py +10 -6
  58. crypticorn/trade/client/__init__.py +2 -1
  59. crypticorn/trade/client/api/__init__.py +0 -1
  60. crypticorn/trade/client/api/admin_api.py +1718 -123
  61. crypticorn/trade/client/api/api_keys_api.py +1596 -103
  62. crypticorn/trade/client/api/bots_api.py +1106 -47
  63. crypticorn/trade/client/api/exchanges_api.py +592 -19
  64. crypticorn/trade/client/api/notifications_api.py +1340 -112
  65. crypticorn/trade/client/api/orders_api.py +240 -7
  66. crypticorn/trade/client/api/status_api.py +415 -13
  67. crypticorn/trade/client/api/strategies_api.py +1170 -69
  68. crypticorn/trade/client/api/trading_actions_api.py +650 -19
  69. crypticorn/trade/client/models/__init__.py +2 -0
  70. crypticorn/trade/client/models/exchange.py +6 -1
  71. crypticorn/trade/client/models/exchange_key_balance.py +111 -0
  72. crypticorn/trade/client/models/futures_balance.py +27 -25
  73. crypticorn/trade/client/models/spot_balance.py +110 -0
  74. crypticorn/trade/client/models/strategy.py +5 -3
  75. crypticorn/trade/client/models/strategy_create.py +6 -4
  76. crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
  77. crypticorn/trade/client/models/strategy_update.py +2 -2
  78. crypticorn/trade/client/rest.py +23 -4
  79. crypticorn/trade/main.py +15 -12
  80. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0rc2.dist-info}/METADATA +65 -20
  81. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0rc2.dist-info}/RECORD +85 -83
  82. crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
  83. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0rc2.dist-info}/WHEEL +0 -0
  84. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0rc2.dist-info}/entry_points.txt +0 -0
  85. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0rc2.dist-info}/licenses/LICENSE +0 -0
  86. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0rc2.dist-info}/top_level.txt +0 -0
@@ -20,6 +20,7 @@ from pydantic import Field, StrictBool, StrictInt, StrictStr
20
20
  from typing import List, Optional
21
21
  from typing_extensions import Annotated
22
22
  from crypticorn.trade.client.models.exchange_key import ExchangeKey
23
+ from crypticorn.trade.client.models.exchange_key_balance import ExchangeKeyBalance
23
24
  from crypticorn.trade.client.models.exchange_key_create import ExchangeKeyCreate
24
25
  from crypticorn.trade.client.models.exchange_key_update import ExchangeKeyUpdate
25
26
 
@@ -27,6 +28,24 @@ from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
27
28
  from crypticorn.trade.client.api_response import ApiResponse
28
29
  from crypticorn.trade.client.rest import RESTResponseType
29
30
 
31
+ # Import async_to_sync for sync methods
32
+ try:
33
+ from asgiref.sync import async_to_sync
34
+
35
+ _HAS_ASGIREF = True
36
+ except ImportError:
37
+ _HAS_ASGIREF = False
38
+
39
+ def async_to_sync(async_func):
40
+ """Fallback decorator that raises an error if asgiref is not available."""
41
+
42
+ def wrapper(*args, **kwargs):
43
+ raise ImportError(
44
+ "asgiref is required for sync methods. Install with: pip install asgiref"
45
+ )
46
+
47
+ return wrapper
48
+
30
49
 
31
50
  class APIKeysApi:
32
51
  """NOTE: This class is auto generated by OpenAPI Generator
@@ -35,13 +54,135 @@ class APIKeysApi:
35
54
  Do not edit the class manually.
36
55
  """
37
56
 
38
- def __init__(self, api_client=None) -> None:
57
+ def __init__(self, api_client=None, is_sync: bool = False) -> None:
39
58
  if api_client is None:
40
59
  api_client = ApiClient.get_default()
41
60
  self.api_client = api_client
61
+ self.is_sync = is_sync
62
+
63
+ @validate_call
64
+ def create_exchange_key(
65
+ self,
66
+ exchange_key_create: ExchangeKeyCreate,
67
+ _request_timeout: Union[
68
+ None,
69
+ Annotated[StrictFloat, Field(gt=0)],
70
+ Tuple[
71
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
72
+ ],
73
+ ] = None,
74
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
75
+ _content_type: Optional[StrictStr] = None,
76
+ _headers: Optional[Dict[StrictStr, Any]] = None,
77
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
78
+ ) -> ExchangeKey:
79
+ """Post Exchange Key
80
+
81
+ This method can work in both sync and async modes based on the is_sync flag.
82
+ """
83
+ if self.is_sync:
84
+ return self._create_exchange_key_sync(
85
+ exchange_key_create=exchange_key_create,
86
+ _request_timeout=_request_timeout,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index,
91
+ )
92
+
93
+ else:
94
+ return self._create_exchange_key_async(
95
+ exchange_key_create=exchange_key_create,
96
+ _request_timeout=_request_timeout,
97
+ _request_auth=_request_auth,
98
+ _content_type=_content_type,
99
+ _headers=_headers,
100
+ _host_index=_host_index,
101
+ )
102
+
103
+ @validate_call
104
+ def create_exchange_key_with_http_info(
105
+ self,
106
+ exchange_key_create: ExchangeKeyCreate,
107
+ _request_timeout: Union[
108
+ None,
109
+ Annotated[StrictFloat, Field(gt=0)],
110
+ Tuple[
111
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
112
+ ],
113
+ ] = None,
114
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
115
+ _content_type: Optional[StrictStr] = None,
116
+ _headers: Optional[Dict[StrictStr, Any]] = None,
117
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
118
+ ) -> ApiResponse[ExchangeKey]:
119
+ """Post Exchange Key with HTTP info
120
+
121
+ This method can work in both sync and async modes based on the is_sync flag.
122
+ """
123
+ if self.is_sync:
124
+ return self._create_exchange_key_sync_with_http_info(
125
+ exchange_key_create=exchange_key_create,
126
+ _request_timeout=_request_timeout,
127
+ _request_auth=_request_auth,
128
+ _content_type=_content_type,
129
+ _headers=_headers,
130
+ _host_index=_host_index,
131
+ )
132
+
133
+ else:
134
+ return self._create_exchange_key_async_with_http_info(
135
+ exchange_key_create=exchange_key_create,
136
+ _request_timeout=_request_timeout,
137
+ _request_auth=_request_auth,
138
+ _content_type=_content_type,
139
+ _headers=_headers,
140
+ _host_index=_host_index,
141
+ )
142
+
143
+ @validate_call
144
+ def create_exchange_key_without_preload_content(
145
+ self,
146
+ exchange_key_create: ExchangeKeyCreate,
147
+ _request_timeout: Union[
148
+ None,
149
+ Annotated[StrictFloat, Field(gt=0)],
150
+ Tuple[
151
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
152
+ ],
153
+ ] = None,
154
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
155
+ _content_type: Optional[StrictStr] = None,
156
+ _headers: Optional[Dict[StrictStr, Any]] = None,
157
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
158
+ ) -> RESTResponseType:
159
+ """Post Exchange Key without preloading content
160
+
161
+ This method can work in both sync and async modes based on the is_sync flag.
162
+ """
163
+ if self.is_sync:
164
+ return self._create_exchange_key_sync_without_preload_content(
165
+ exchange_key_create=exchange_key_create,
166
+ _request_timeout=_request_timeout,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index,
171
+ )
172
+
173
+ else:
174
+ return self._create_exchange_key_async_without_preload_content(
175
+ exchange_key_create=exchange_key_create,
176
+ _request_timeout=_request_timeout,
177
+ _request_auth=_request_auth,
178
+ _content_type=_content_type,
179
+ _headers=_headers,
180
+ _host_index=_host_index,
181
+ )
42
182
 
183
+ # Private async implementation methods
43
184
  @validate_call
44
- async def create_exchange_key(
185
+ async def _create_exchange_key_async(
45
186
  self,
46
187
  exchange_key_create: ExchangeKeyCreate,
47
188
  _request_timeout: Union[
@@ -105,7 +246,7 @@ class APIKeysApi:
105
246
  ).data
106
247
 
107
248
  @validate_call
108
- async def create_exchange_key_with_http_info(
249
+ async def _create_exchange_key_async_with_http_info(
109
250
  self,
110
251
  exchange_key_create: ExchangeKeyCreate,
111
252
  _request_timeout: Union[
@@ -164,12 +305,11 @@ class APIKeysApi:
164
305
  )
165
306
  await response_data.read()
166
307
  return self.api_client.response_deserialize(
167
- response_data=response_data,
168
- response_types_map=_response_types_map,
308
+ response_data=response_data, response_types_map=_response_types_map
169
309
  )
170
310
 
171
311
  @validate_call
172
- async def create_exchange_key_without_preload_content(
312
+ async def _create_exchange_key_async_without_preload_content(
173
313
  self,
174
314
  exchange_key_create: ExchangeKeyCreate,
175
315
  _request_timeout: Union[
@@ -226,7 +366,86 @@ class APIKeysApi:
226
366
  response_data = await self.api_client.call_api(
227
367
  *_param, _request_timeout=_request_timeout
228
368
  )
229
- return response_data.response
369
+ return response_data
370
+
371
+ # Private sync implementation methods
372
+ @validate_call
373
+ def _create_exchange_key_sync(
374
+ self,
375
+ exchange_key_create: ExchangeKeyCreate,
376
+ _request_timeout: Union[
377
+ None,
378
+ Annotated[StrictFloat, Field(gt=0)],
379
+ Tuple[
380
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
381
+ ],
382
+ ] = None,
383
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
384
+ _content_type: Optional[StrictStr] = None,
385
+ _headers: Optional[Dict[StrictStr, Any]] = None,
386
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
387
+ ) -> ExchangeKey:
388
+ """Synchronous version of create_exchange_key"""
389
+ return async_to_sync(self._create_exchange_key_async)(
390
+ exchange_key_create=exchange_key_create,
391
+ _request_timeout=_request_timeout,
392
+ _request_auth=_request_auth,
393
+ _content_type=_content_type,
394
+ _headers=_headers,
395
+ _host_index=_host_index,
396
+ )
397
+
398
+ @validate_call
399
+ def _create_exchange_key_sync_with_http_info(
400
+ self,
401
+ exchange_key_create: ExchangeKeyCreate,
402
+ _request_timeout: Union[
403
+ None,
404
+ Annotated[StrictFloat, Field(gt=0)],
405
+ Tuple[
406
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
407
+ ],
408
+ ] = None,
409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
410
+ _content_type: Optional[StrictStr] = None,
411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
413
+ ) -> ApiResponse[ExchangeKey]:
414
+ """Synchronous version of create_exchange_key_with_http_info"""
415
+ return async_to_sync(self._create_exchange_key_async_with_http_info)(
416
+ exchange_key_create=exchange_key_create,
417
+ _request_timeout=_request_timeout,
418
+ _request_auth=_request_auth,
419
+ _content_type=_content_type,
420
+ _headers=_headers,
421
+ _host_index=_host_index,
422
+ )
423
+
424
+ @validate_call
425
+ def _create_exchange_key_sync_without_preload_content(
426
+ self,
427
+ exchange_key_create: ExchangeKeyCreate,
428
+ _request_timeout: Union[
429
+ None,
430
+ Annotated[StrictFloat, Field(gt=0)],
431
+ Tuple[
432
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
433
+ ],
434
+ ] = None,
435
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
436
+ _content_type: Optional[StrictStr] = None,
437
+ _headers: Optional[Dict[StrictStr, Any]] = None,
438
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
439
+ ) -> RESTResponseType:
440
+ """Synchronous version of create_exchange_key_without_preload_content"""
441
+ return async_to_sync(self._create_exchange_key_async_without_preload_content)(
442
+ exchange_key_create=exchange_key_create,
443
+ _request_timeout=_request_timeout,
444
+ _request_auth=_request_auth,
445
+ _content_type=_content_type,
446
+ _headers=_headers,
447
+ _host_index=_host_index,
448
+ )
230
449
 
231
450
  def _create_exchange_key_serialize(
232
451
  self,
@@ -293,7 +512,128 @@ class APIKeysApi:
293
512
  )
294
513
 
295
514
  @validate_call
296
- async def delete_exchange_key(
515
+ def delete_exchange_key(
516
+ self,
517
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
518
+ _request_timeout: Union[
519
+ None,
520
+ Annotated[StrictFloat, Field(gt=0)],
521
+ Tuple[
522
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
523
+ ],
524
+ ] = None,
525
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
526
+ _content_type: Optional[StrictStr] = None,
527
+ _headers: Optional[Dict[StrictStr, Any]] = None,
528
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
529
+ ) -> None:
530
+ """Delete Exchange Key
531
+
532
+ This method can work in both sync and async modes based on the is_sync flag.
533
+ """
534
+ if self.is_sync:
535
+ return self._delete_exchange_key_sync(
536
+ id=id,
537
+ _request_timeout=_request_timeout,
538
+ _request_auth=_request_auth,
539
+ _content_type=_content_type,
540
+ _headers=_headers,
541
+ _host_index=_host_index,
542
+ )
543
+
544
+ else:
545
+ return self._delete_exchange_key_async(
546
+ id=id,
547
+ _request_timeout=_request_timeout,
548
+ _request_auth=_request_auth,
549
+ _content_type=_content_type,
550
+ _headers=_headers,
551
+ _host_index=_host_index,
552
+ )
553
+
554
+ @validate_call
555
+ def delete_exchange_key_with_http_info(
556
+ self,
557
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
558
+ _request_timeout: Union[
559
+ None,
560
+ Annotated[StrictFloat, Field(gt=0)],
561
+ Tuple[
562
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
563
+ ],
564
+ ] = None,
565
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
566
+ _content_type: Optional[StrictStr] = None,
567
+ _headers: Optional[Dict[StrictStr, Any]] = None,
568
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
569
+ ) -> ApiResponse[None]:
570
+ """Delete Exchange Key with HTTP info
571
+
572
+ This method can work in both sync and async modes based on the is_sync flag.
573
+ """
574
+ if self.is_sync:
575
+ return self._delete_exchange_key_sync_with_http_info(
576
+ id=id,
577
+ _request_timeout=_request_timeout,
578
+ _request_auth=_request_auth,
579
+ _content_type=_content_type,
580
+ _headers=_headers,
581
+ _host_index=_host_index,
582
+ )
583
+
584
+ else:
585
+ return self._delete_exchange_key_async_with_http_info(
586
+ id=id,
587
+ _request_timeout=_request_timeout,
588
+ _request_auth=_request_auth,
589
+ _content_type=_content_type,
590
+ _headers=_headers,
591
+ _host_index=_host_index,
592
+ )
593
+
594
+ @validate_call
595
+ def delete_exchange_key_without_preload_content(
596
+ self,
597
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
598
+ _request_timeout: Union[
599
+ None,
600
+ Annotated[StrictFloat, Field(gt=0)],
601
+ Tuple[
602
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
603
+ ],
604
+ ] = None,
605
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
606
+ _content_type: Optional[StrictStr] = None,
607
+ _headers: Optional[Dict[StrictStr, Any]] = None,
608
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
609
+ ) -> RESTResponseType:
610
+ """Delete Exchange Key without preloading content
611
+
612
+ This method can work in both sync and async modes based on the is_sync flag.
613
+ """
614
+ if self.is_sync:
615
+ return self._delete_exchange_key_sync_without_preload_content(
616
+ id=id,
617
+ _request_timeout=_request_timeout,
618
+ _request_auth=_request_auth,
619
+ _content_type=_content_type,
620
+ _headers=_headers,
621
+ _host_index=_host_index,
622
+ )
623
+
624
+ else:
625
+ return self._delete_exchange_key_async_without_preload_content(
626
+ id=id,
627
+ _request_timeout=_request_timeout,
628
+ _request_auth=_request_auth,
629
+ _content_type=_content_type,
630
+ _headers=_headers,
631
+ _host_index=_host_index,
632
+ )
633
+
634
+ # Private async implementation methods
635
+ @validate_call
636
+ async def _delete_exchange_key_async(
297
637
  self,
298
638
  id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
299
639
  _request_timeout: Union[
@@ -357,7 +697,7 @@ class APIKeysApi:
357
697
  ).data
358
698
 
359
699
  @validate_call
360
- async def delete_exchange_key_with_http_info(
700
+ async def _delete_exchange_key_async_with_http_info(
361
701
  self,
362
702
  id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
363
703
  _request_timeout: Union[
@@ -416,12 +756,11 @@ class APIKeysApi:
416
756
  )
417
757
  await response_data.read()
418
758
  return self.api_client.response_deserialize(
419
- response_data=response_data,
420
- response_types_map=_response_types_map,
759
+ response_data=response_data, response_types_map=_response_types_map
421
760
  )
422
761
 
423
762
  @validate_call
424
- async def delete_exchange_key_without_preload_content(
763
+ async def _delete_exchange_key_async_without_preload_content(
425
764
  self,
426
765
  id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
427
766
  _request_timeout: Union[
@@ -478,66 +817,679 @@ class APIKeysApi:
478
817
  response_data = await self.api_client.call_api(
479
818
  *_param, _request_timeout=_request_timeout
480
819
  )
481
- return response_data.response
482
-
483
- def _delete_exchange_key_serialize(
484
- self,
485
- id,
486
- _request_auth,
487
- _content_type,
488
- _headers,
489
- _host_index,
490
- ) -> RequestSerialized:
491
-
492
- _host = None
493
-
494
- _collection_formats: Dict[str, str] = {}
495
-
496
- _path_params: Dict[str, str] = {}
497
- _query_params: List[Tuple[str, str]] = []
498
- _header_params: Dict[str, Optional[str]] = _headers or {}
499
- _form_params: List[Tuple[str, str]] = []
500
- _files: Dict[
501
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
502
- ] = {}
503
- _body_params: Optional[bytes] = None
504
-
505
- # process the path parameters
506
- if id is not None:
507
- _path_params["id"] = id
508
- # process the query parameters
509
- # process the header parameters
510
- # process the form parameters
511
- # process the body parameter
512
-
513
- # set the HTTP header `Accept`
514
- if "Accept" not in _header_params:
515
- _header_params["Accept"] = self.api_client.select_header_accept(
516
- ["application/json"]
517
- )
518
-
519
- # authentication setting
520
- _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
521
-
522
- return self.api_client.param_serialize(
523
- method="DELETE",
524
- resource_path="/api-keys/{id}",
525
- path_params=_path_params,
526
- query_params=_query_params,
527
- header_params=_header_params,
528
- body=_body_params,
529
- post_params=_form_params,
530
- files=_files,
531
- auth_settings=_auth_settings,
532
- collection_formats=_collection_formats,
533
- _host=_host,
534
- _request_auth=_request_auth,
535
- )
820
+ return response_data
536
821
 
822
+ # Private sync implementation methods
537
823
  @validate_call
538
- async def get_exchange_key_by_id(
824
+ def _delete_exchange_key_sync(
539
825
  self,
540
- id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
826
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
827
+ _request_timeout: Union[
828
+ None,
829
+ Annotated[StrictFloat, Field(gt=0)],
830
+ Tuple[
831
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
832
+ ],
833
+ ] = None,
834
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
835
+ _content_type: Optional[StrictStr] = None,
836
+ _headers: Optional[Dict[StrictStr, Any]] = None,
837
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
838
+ ) -> None:
839
+ """Synchronous version of delete_exchange_key"""
840
+ return async_to_sync(self._delete_exchange_key_async)(
841
+ id=id,
842
+ _request_timeout=_request_timeout,
843
+ _request_auth=_request_auth,
844
+ _content_type=_content_type,
845
+ _headers=_headers,
846
+ _host_index=_host_index,
847
+ )
848
+
849
+ @validate_call
850
+ def _delete_exchange_key_sync_with_http_info(
851
+ self,
852
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
853
+ _request_timeout: Union[
854
+ None,
855
+ Annotated[StrictFloat, Field(gt=0)],
856
+ Tuple[
857
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
858
+ ],
859
+ ] = None,
860
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
861
+ _content_type: Optional[StrictStr] = None,
862
+ _headers: Optional[Dict[StrictStr, Any]] = None,
863
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
864
+ ) -> ApiResponse[None]:
865
+ """Synchronous version of delete_exchange_key_with_http_info"""
866
+ return async_to_sync(self._delete_exchange_key_async_with_http_info)(
867
+ id=id,
868
+ _request_timeout=_request_timeout,
869
+ _request_auth=_request_auth,
870
+ _content_type=_content_type,
871
+ _headers=_headers,
872
+ _host_index=_host_index,
873
+ )
874
+
875
+ @validate_call
876
+ def _delete_exchange_key_sync_without_preload_content(
877
+ self,
878
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
879
+ _request_timeout: Union[
880
+ None,
881
+ Annotated[StrictFloat, Field(gt=0)],
882
+ Tuple[
883
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
884
+ ],
885
+ ] = None,
886
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
887
+ _content_type: Optional[StrictStr] = None,
888
+ _headers: Optional[Dict[StrictStr, Any]] = None,
889
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
890
+ ) -> RESTResponseType:
891
+ """Synchronous version of delete_exchange_key_without_preload_content"""
892
+ return async_to_sync(self._delete_exchange_key_async_without_preload_content)(
893
+ id=id,
894
+ _request_timeout=_request_timeout,
895
+ _request_auth=_request_auth,
896
+ _content_type=_content_type,
897
+ _headers=_headers,
898
+ _host_index=_host_index,
899
+ )
900
+
901
+ def _delete_exchange_key_serialize(
902
+ self,
903
+ id,
904
+ _request_auth,
905
+ _content_type,
906
+ _headers,
907
+ _host_index,
908
+ ) -> RequestSerialized:
909
+
910
+ _host = None
911
+
912
+ _collection_formats: Dict[str, str] = {}
913
+
914
+ _path_params: Dict[str, str] = {}
915
+ _query_params: List[Tuple[str, str]] = []
916
+ _header_params: Dict[str, Optional[str]] = _headers or {}
917
+ _form_params: List[Tuple[str, str]] = []
918
+ _files: Dict[
919
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
920
+ ] = {}
921
+ _body_params: Optional[bytes] = None
922
+
923
+ # process the path parameters
924
+ if id is not None:
925
+ _path_params["id"] = id
926
+ # process the query parameters
927
+ # process the header parameters
928
+ # process the form parameters
929
+ # process the body parameter
930
+
931
+ # set the HTTP header `Accept`
932
+ if "Accept" not in _header_params:
933
+ _header_params["Accept"] = self.api_client.select_header_accept(
934
+ ["application/json"]
935
+ )
936
+
937
+ # authentication setting
938
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
939
+
940
+ return self.api_client.param_serialize(
941
+ method="DELETE",
942
+ resource_path="/api-keys/{id}",
943
+ path_params=_path_params,
944
+ query_params=_query_params,
945
+ header_params=_header_params,
946
+ body=_body_params,
947
+ post_params=_form_params,
948
+ files=_files,
949
+ auth_settings=_auth_settings,
950
+ collection_formats=_collection_formats,
951
+ _host=_host,
952
+ _request_auth=_request_auth,
953
+ )
954
+
955
+ @validate_call
956
+ def get_exchange_key_balances(
957
+ self,
958
+ _request_timeout: Union[
959
+ None,
960
+ Annotated[StrictFloat, Field(gt=0)],
961
+ Tuple[
962
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
963
+ ],
964
+ ] = None,
965
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
966
+ _content_type: Optional[StrictStr] = None,
967
+ _headers: Optional[Dict[StrictStr, Any]] = None,
968
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
969
+ ) -> List[ExchangeKeyBalance]:
970
+ """Get Exchange Key Balances
971
+
972
+ This method can work in both sync and async modes based on the is_sync flag.
973
+ """
974
+ if self.is_sync:
975
+ return self._get_exchange_key_balances_sync(
976
+ _request_timeout=_request_timeout,
977
+ _request_auth=_request_auth,
978
+ _content_type=_content_type,
979
+ _headers=_headers,
980
+ _host_index=_host_index,
981
+ )
982
+
983
+ else:
984
+ return self._get_exchange_key_balances_async(
985
+ _request_timeout=_request_timeout,
986
+ _request_auth=_request_auth,
987
+ _content_type=_content_type,
988
+ _headers=_headers,
989
+ _host_index=_host_index,
990
+ )
991
+
992
+ @validate_call
993
+ def get_exchange_key_balances_with_http_info(
994
+ self,
995
+ _request_timeout: Union[
996
+ None,
997
+ Annotated[StrictFloat, Field(gt=0)],
998
+ Tuple[
999
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1000
+ ],
1001
+ ] = None,
1002
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1003
+ _content_type: Optional[StrictStr] = None,
1004
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1005
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1006
+ ) -> ApiResponse[List[ExchangeKeyBalance]]:
1007
+ """Get Exchange Key Balances with HTTP info
1008
+
1009
+ This method can work in both sync and async modes based on the is_sync flag.
1010
+ """
1011
+ if self.is_sync:
1012
+ return self._get_exchange_key_balances_sync_with_http_info(
1013
+ _request_timeout=_request_timeout,
1014
+ _request_auth=_request_auth,
1015
+ _content_type=_content_type,
1016
+ _headers=_headers,
1017
+ _host_index=_host_index,
1018
+ )
1019
+
1020
+ else:
1021
+ return self._get_exchange_key_balances_async_with_http_info(
1022
+ _request_timeout=_request_timeout,
1023
+ _request_auth=_request_auth,
1024
+ _content_type=_content_type,
1025
+ _headers=_headers,
1026
+ _host_index=_host_index,
1027
+ )
1028
+
1029
+ @validate_call
1030
+ def get_exchange_key_balances_without_preload_content(
1031
+ self,
1032
+ _request_timeout: Union[
1033
+ None,
1034
+ Annotated[StrictFloat, Field(gt=0)],
1035
+ Tuple[
1036
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1037
+ ],
1038
+ ] = None,
1039
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1040
+ _content_type: Optional[StrictStr] = None,
1041
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1042
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1043
+ ) -> RESTResponseType:
1044
+ """Get Exchange Key Balances without preloading content
1045
+
1046
+ This method can work in both sync and async modes based on the is_sync flag.
1047
+ """
1048
+ if self.is_sync:
1049
+ return self._get_exchange_key_balances_sync_without_preload_content(
1050
+ _request_timeout=_request_timeout,
1051
+ _request_auth=_request_auth,
1052
+ _content_type=_content_type,
1053
+ _headers=_headers,
1054
+ _host_index=_host_index,
1055
+ )
1056
+
1057
+ else:
1058
+ return self._get_exchange_key_balances_async_without_preload_content(
1059
+ _request_timeout=_request_timeout,
1060
+ _request_auth=_request_auth,
1061
+ _content_type=_content_type,
1062
+ _headers=_headers,
1063
+ _host_index=_host_index,
1064
+ )
1065
+
1066
+ # Private async implementation methods
1067
+ @validate_call
1068
+ async def _get_exchange_key_balances_async(
1069
+ self,
1070
+ _request_timeout: Union[
1071
+ None,
1072
+ Annotated[StrictFloat, Field(gt=0)],
1073
+ Tuple[
1074
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1075
+ ],
1076
+ ] = None,
1077
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1078
+ _content_type: Optional[StrictStr] = None,
1079
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1080
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1081
+ ) -> List[ExchangeKeyBalance]:
1082
+ """Get Exchange Key Balances
1083
+
1084
+ Get the balances of all exchange keys.
1085
+
1086
+ :param _request_timeout: timeout setting for this request. If one
1087
+ number provided, it will be total request
1088
+ timeout. It can also be a pair (tuple) of
1089
+ (connection, read) timeouts.
1090
+ :type _request_timeout: int, tuple(int, int), optional
1091
+ :param _request_auth: set to override the auth_settings for an a single
1092
+ request; this effectively ignores the
1093
+ authentication in the spec for a single request.
1094
+ :type _request_auth: dict, optional
1095
+ :param _content_type: force content-type for the request.
1096
+ :type _content_type: str, Optional
1097
+ :param _headers: set to override the headers for a single
1098
+ request; this effectively ignores the headers
1099
+ in the spec for a single request.
1100
+ :type _headers: dict, optional
1101
+ :param _host_index: set to override the host_index for a single
1102
+ request; this effectively ignores the host_index
1103
+ in the spec for a single request.
1104
+ :type _host_index: int, optional
1105
+ :return: Returns the result object.
1106
+ """ # noqa: E501
1107
+
1108
+ _param = self._get_exchange_key_balances_serialize(
1109
+ _request_auth=_request_auth,
1110
+ _content_type=_content_type,
1111
+ _headers=_headers,
1112
+ _host_index=_host_index,
1113
+ )
1114
+
1115
+ _response_types_map: Dict[str, Optional[str]] = {
1116
+ "200": "List[ExchangeKeyBalance]",
1117
+ }
1118
+ response_data = await self.api_client.call_api(
1119
+ *_param, _request_timeout=_request_timeout
1120
+ )
1121
+ await response_data.read()
1122
+ return self.api_client.response_deserialize(
1123
+ response_data=response_data,
1124
+ response_types_map=_response_types_map,
1125
+ ).data
1126
+
1127
+ @validate_call
1128
+ async def _get_exchange_key_balances_async_with_http_info(
1129
+ self,
1130
+ _request_timeout: Union[
1131
+ None,
1132
+ Annotated[StrictFloat, Field(gt=0)],
1133
+ Tuple[
1134
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1135
+ ],
1136
+ ] = None,
1137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1138
+ _content_type: Optional[StrictStr] = None,
1139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1141
+ ) -> ApiResponse[List[ExchangeKeyBalance]]:
1142
+ """Get Exchange Key Balances
1143
+
1144
+ Get the balances of all exchange keys.
1145
+
1146
+ :param _request_timeout: timeout setting for this request. If one
1147
+ number provided, it will be total request
1148
+ timeout. It can also be a pair (tuple) of
1149
+ (connection, read) timeouts.
1150
+ :type _request_timeout: int, tuple(int, int), optional
1151
+ :param _request_auth: set to override the auth_settings for an a single
1152
+ request; this effectively ignores the
1153
+ authentication in the spec for a single request.
1154
+ :type _request_auth: dict, optional
1155
+ :param _content_type: force content-type for the request.
1156
+ :type _content_type: str, Optional
1157
+ :param _headers: set to override the headers for a single
1158
+ request; this effectively ignores the headers
1159
+ in the spec for a single request.
1160
+ :type _headers: dict, optional
1161
+ :param _host_index: set to override the host_index for a single
1162
+ request; this effectively ignores the host_index
1163
+ in the spec for a single request.
1164
+ :type _host_index: int, optional
1165
+ :return: Returns the result object.
1166
+ """ # noqa: E501
1167
+
1168
+ _param = self._get_exchange_key_balances_serialize(
1169
+ _request_auth=_request_auth,
1170
+ _content_type=_content_type,
1171
+ _headers=_headers,
1172
+ _host_index=_host_index,
1173
+ )
1174
+
1175
+ _response_types_map: Dict[str, Optional[str]] = {
1176
+ "200": "List[ExchangeKeyBalance]",
1177
+ }
1178
+ response_data = await self.api_client.call_api(
1179
+ *_param, _request_timeout=_request_timeout
1180
+ )
1181
+ await response_data.read()
1182
+ return self.api_client.response_deserialize(
1183
+ response_data=response_data, response_types_map=_response_types_map
1184
+ )
1185
+
1186
+ @validate_call
1187
+ async def _get_exchange_key_balances_async_without_preload_content(
1188
+ self,
1189
+ _request_timeout: Union[
1190
+ None,
1191
+ Annotated[StrictFloat, Field(gt=0)],
1192
+ Tuple[
1193
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1194
+ ],
1195
+ ] = None,
1196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1197
+ _content_type: Optional[StrictStr] = None,
1198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1200
+ ) -> RESTResponseType:
1201
+ """Get Exchange Key Balances
1202
+
1203
+ Get the balances of all exchange keys.
1204
+
1205
+ :param _request_timeout: timeout setting for this request. If one
1206
+ number provided, it will be total request
1207
+ timeout. It can also be a pair (tuple) of
1208
+ (connection, read) timeouts.
1209
+ :type _request_timeout: int, tuple(int, int), optional
1210
+ :param _request_auth: set to override the auth_settings for an a single
1211
+ request; this effectively ignores the
1212
+ authentication in the spec for a single request.
1213
+ :type _request_auth: dict, optional
1214
+ :param _content_type: force content-type for the request.
1215
+ :type _content_type: str, Optional
1216
+ :param _headers: set to override the headers for a single
1217
+ request; this effectively ignores the headers
1218
+ in the spec for a single request.
1219
+ :type _headers: dict, optional
1220
+ :param _host_index: set to override the host_index for a single
1221
+ request; this effectively ignores the host_index
1222
+ in the spec for a single request.
1223
+ :type _host_index: int, optional
1224
+ :return: Returns the result object.
1225
+ """ # noqa: E501
1226
+
1227
+ _param = self._get_exchange_key_balances_serialize(
1228
+ _request_auth=_request_auth,
1229
+ _content_type=_content_type,
1230
+ _headers=_headers,
1231
+ _host_index=_host_index,
1232
+ )
1233
+
1234
+ _response_types_map: Dict[str, Optional[str]] = {
1235
+ "200": "List[ExchangeKeyBalance]",
1236
+ }
1237
+ response_data = await self.api_client.call_api(
1238
+ *_param, _request_timeout=_request_timeout
1239
+ )
1240
+ return response_data
1241
+
1242
+ # Private sync implementation methods
1243
+ @validate_call
1244
+ def _get_exchange_key_balances_sync(
1245
+ self,
1246
+ _request_timeout: Union[
1247
+ None,
1248
+ Annotated[StrictFloat, Field(gt=0)],
1249
+ Tuple[
1250
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1251
+ ],
1252
+ ] = None,
1253
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1254
+ _content_type: Optional[StrictStr] = None,
1255
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1256
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1257
+ ) -> List[ExchangeKeyBalance]:
1258
+ """Synchronous version of get_exchange_key_balances"""
1259
+ return async_to_sync(self._get_exchange_key_balances_async)(
1260
+ _request_timeout=_request_timeout,
1261
+ _request_auth=_request_auth,
1262
+ _content_type=_content_type,
1263
+ _headers=_headers,
1264
+ _host_index=_host_index,
1265
+ )
1266
+
1267
+ @validate_call
1268
+ def _get_exchange_key_balances_sync_with_http_info(
1269
+ self,
1270
+ _request_timeout: Union[
1271
+ None,
1272
+ Annotated[StrictFloat, Field(gt=0)],
1273
+ Tuple[
1274
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1275
+ ],
1276
+ ] = None,
1277
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1278
+ _content_type: Optional[StrictStr] = None,
1279
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1280
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1281
+ ) -> ApiResponse[List[ExchangeKeyBalance]]:
1282
+ """Synchronous version of get_exchange_key_balances_with_http_info"""
1283
+ return async_to_sync(self._get_exchange_key_balances_async_with_http_info)(
1284
+ _request_timeout=_request_timeout,
1285
+ _request_auth=_request_auth,
1286
+ _content_type=_content_type,
1287
+ _headers=_headers,
1288
+ _host_index=_host_index,
1289
+ )
1290
+
1291
+ @validate_call
1292
+ def _get_exchange_key_balances_sync_without_preload_content(
1293
+ self,
1294
+ _request_timeout: Union[
1295
+ None,
1296
+ Annotated[StrictFloat, Field(gt=0)],
1297
+ Tuple[
1298
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1299
+ ],
1300
+ ] = None,
1301
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1302
+ _content_type: Optional[StrictStr] = None,
1303
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1304
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1305
+ ) -> RESTResponseType:
1306
+ """Synchronous version of get_exchange_key_balances_without_preload_content"""
1307
+ return async_to_sync(
1308
+ self._get_exchange_key_balances_async_without_preload_content
1309
+ )(
1310
+ _request_timeout=_request_timeout,
1311
+ _request_auth=_request_auth,
1312
+ _content_type=_content_type,
1313
+ _headers=_headers,
1314
+ _host_index=_host_index,
1315
+ )
1316
+
1317
+ def _get_exchange_key_balances_serialize(
1318
+ self,
1319
+ _request_auth,
1320
+ _content_type,
1321
+ _headers,
1322
+ _host_index,
1323
+ ) -> RequestSerialized:
1324
+
1325
+ _host = None
1326
+
1327
+ _collection_formats: Dict[str, str] = {}
1328
+
1329
+ _path_params: Dict[str, str] = {}
1330
+ _query_params: List[Tuple[str, str]] = []
1331
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1332
+ _form_params: List[Tuple[str, str]] = []
1333
+ _files: Dict[
1334
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1335
+ ] = {}
1336
+ _body_params: Optional[bytes] = None
1337
+
1338
+ # process the path parameters
1339
+ # process the query parameters
1340
+ # process the header parameters
1341
+ # process the form parameters
1342
+ # process the body parameter
1343
+
1344
+ # set the HTTP header `Accept`
1345
+ if "Accept" not in _header_params:
1346
+ _header_params["Accept"] = self.api_client.select_header_accept(
1347
+ ["application/json"]
1348
+ )
1349
+
1350
+ # authentication setting
1351
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1352
+
1353
+ return self.api_client.param_serialize(
1354
+ method="GET",
1355
+ resource_path="/api-keys/balances",
1356
+ path_params=_path_params,
1357
+ query_params=_query_params,
1358
+ header_params=_header_params,
1359
+ body=_body_params,
1360
+ post_params=_form_params,
1361
+ files=_files,
1362
+ auth_settings=_auth_settings,
1363
+ collection_formats=_collection_formats,
1364
+ _host=_host,
1365
+ _request_auth=_request_auth,
1366
+ )
1367
+
1368
+ @validate_call
1369
+ def get_exchange_key_by_id(
1370
+ self,
1371
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
1372
+ _request_timeout: Union[
1373
+ None,
1374
+ Annotated[StrictFloat, Field(gt=0)],
1375
+ Tuple[
1376
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1377
+ ],
1378
+ ] = None,
1379
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1380
+ _content_type: Optional[StrictStr] = None,
1381
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1382
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1383
+ ) -> ExchangeKey:
1384
+ """Get Exchange Key By Id
1385
+
1386
+ This method can work in both sync and async modes based on the is_sync flag.
1387
+ """
1388
+ if self.is_sync:
1389
+ return self._get_exchange_key_by_id_sync(
1390
+ id=id,
1391
+ _request_timeout=_request_timeout,
1392
+ _request_auth=_request_auth,
1393
+ _content_type=_content_type,
1394
+ _headers=_headers,
1395
+ _host_index=_host_index,
1396
+ )
1397
+
1398
+ else:
1399
+ return self._get_exchange_key_by_id_async(
1400
+ id=id,
1401
+ _request_timeout=_request_timeout,
1402
+ _request_auth=_request_auth,
1403
+ _content_type=_content_type,
1404
+ _headers=_headers,
1405
+ _host_index=_host_index,
1406
+ )
1407
+
1408
+ @validate_call
1409
+ def get_exchange_key_by_id_with_http_info(
1410
+ self,
1411
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
1412
+ _request_timeout: Union[
1413
+ None,
1414
+ Annotated[StrictFloat, Field(gt=0)],
1415
+ Tuple[
1416
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1417
+ ],
1418
+ ] = None,
1419
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1420
+ _content_type: Optional[StrictStr] = None,
1421
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1422
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1423
+ ) -> ApiResponse[ExchangeKey]:
1424
+ """Get Exchange Key By Id with HTTP info
1425
+
1426
+ This method can work in both sync and async modes based on the is_sync flag.
1427
+ """
1428
+ if self.is_sync:
1429
+ return self._get_exchange_key_by_id_sync_with_http_info(
1430
+ id=id,
1431
+ _request_timeout=_request_timeout,
1432
+ _request_auth=_request_auth,
1433
+ _content_type=_content_type,
1434
+ _headers=_headers,
1435
+ _host_index=_host_index,
1436
+ )
1437
+
1438
+ else:
1439
+ return self._get_exchange_key_by_id_async_with_http_info(
1440
+ id=id,
1441
+ _request_timeout=_request_timeout,
1442
+ _request_auth=_request_auth,
1443
+ _content_type=_content_type,
1444
+ _headers=_headers,
1445
+ _host_index=_host_index,
1446
+ )
1447
+
1448
+ @validate_call
1449
+ def get_exchange_key_by_id_without_preload_content(
1450
+ self,
1451
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
1452
+ _request_timeout: Union[
1453
+ None,
1454
+ Annotated[StrictFloat, Field(gt=0)],
1455
+ Tuple[
1456
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1457
+ ],
1458
+ ] = None,
1459
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1460
+ _content_type: Optional[StrictStr] = None,
1461
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1462
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1463
+ ) -> RESTResponseType:
1464
+ """Get Exchange Key By Id without preloading content
1465
+
1466
+ This method can work in both sync and async modes based on the is_sync flag.
1467
+ """
1468
+ if self.is_sync:
1469
+ return self._get_exchange_key_by_id_sync_without_preload_content(
1470
+ id=id,
1471
+ _request_timeout=_request_timeout,
1472
+ _request_auth=_request_auth,
1473
+ _content_type=_content_type,
1474
+ _headers=_headers,
1475
+ _host_index=_host_index,
1476
+ )
1477
+
1478
+ else:
1479
+ return self._get_exchange_key_by_id_async_without_preload_content(
1480
+ id=id,
1481
+ _request_timeout=_request_timeout,
1482
+ _request_auth=_request_auth,
1483
+ _content_type=_content_type,
1484
+ _headers=_headers,
1485
+ _host_index=_host_index,
1486
+ )
1487
+
1488
+ # Private async implementation methods
1489
+ @validate_call
1490
+ async def _get_exchange_key_by_id_async(
1491
+ self,
1492
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
541
1493
  _request_timeout: Union[
542
1494
  None,
543
1495
  Annotated[StrictFloat, Field(gt=0)],
@@ -599,7 +1551,7 @@ class APIKeysApi:
599
1551
  ).data
600
1552
 
601
1553
  @validate_call
602
- async def get_exchange_key_by_id_with_http_info(
1554
+ async def _get_exchange_key_by_id_async_with_http_info(
603
1555
  self,
604
1556
  id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
605
1557
  _request_timeout: Union[
@@ -658,12 +1610,11 @@ class APIKeysApi:
658
1610
  )
659
1611
  await response_data.read()
660
1612
  return self.api_client.response_deserialize(
661
- response_data=response_data,
662
- response_types_map=_response_types_map,
1613
+ response_data=response_data, response_types_map=_response_types_map
663
1614
  )
664
1615
 
665
1616
  @validate_call
666
- async def get_exchange_key_by_id_without_preload_content(
1617
+ async def _get_exchange_key_by_id_async_without_preload_content(
667
1618
  self,
668
1619
  id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
669
1620
  _request_timeout: Union[
@@ -720,7 +1671,88 @@ class APIKeysApi:
720
1671
  response_data = await self.api_client.call_api(
721
1672
  *_param, _request_timeout=_request_timeout
722
1673
  )
723
- return response_data.response
1674
+ return response_data
1675
+
1676
+ # Private sync implementation methods
1677
+ @validate_call
1678
+ def _get_exchange_key_by_id_sync(
1679
+ self,
1680
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
1681
+ _request_timeout: Union[
1682
+ None,
1683
+ Annotated[StrictFloat, Field(gt=0)],
1684
+ Tuple[
1685
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1686
+ ],
1687
+ ] = None,
1688
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1689
+ _content_type: Optional[StrictStr] = None,
1690
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1691
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1692
+ ) -> ExchangeKey:
1693
+ """Synchronous version of get_exchange_key_by_id"""
1694
+ return async_to_sync(self._get_exchange_key_by_id_async)(
1695
+ id=id,
1696
+ _request_timeout=_request_timeout,
1697
+ _request_auth=_request_auth,
1698
+ _content_type=_content_type,
1699
+ _headers=_headers,
1700
+ _host_index=_host_index,
1701
+ )
1702
+
1703
+ @validate_call
1704
+ def _get_exchange_key_by_id_sync_with_http_info(
1705
+ self,
1706
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
1707
+ _request_timeout: Union[
1708
+ None,
1709
+ Annotated[StrictFloat, Field(gt=0)],
1710
+ Tuple[
1711
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1712
+ ],
1713
+ ] = None,
1714
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1715
+ _content_type: Optional[StrictStr] = None,
1716
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1717
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1718
+ ) -> ApiResponse[ExchangeKey]:
1719
+ """Synchronous version of get_exchange_key_by_id_with_http_info"""
1720
+ return async_to_sync(self._get_exchange_key_by_id_async_with_http_info)(
1721
+ id=id,
1722
+ _request_timeout=_request_timeout,
1723
+ _request_auth=_request_auth,
1724
+ _content_type=_content_type,
1725
+ _headers=_headers,
1726
+ _host_index=_host_index,
1727
+ )
1728
+
1729
+ @validate_call
1730
+ def _get_exchange_key_by_id_sync_without_preload_content(
1731
+ self,
1732
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
1733
+ _request_timeout: Union[
1734
+ None,
1735
+ Annotated[StrictFloat, Field(gt=0)],
1736
+ Tuple[
1737
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1738
+ ],
1739
+ ] = None,
1740
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1741
+ _content_type: Optional[StrictStr] = None,
1742
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1743
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1744
+ ) -> RESTResponseType:
1745
+ """Synchronous version of get_exchange_key_by_id_without_preload_content"""
1746
+ return async_to_sync(
1747
+ self._get_exchange_key_by_id_async_without_preload_content
1748
+ )(
1749
+ id=id,
1750
+ _request_timeout=_request_timeout,
1751
+ _request_auth=_request_auth,
1752
+ _content_type=_content_type,
1753
+ _headers=_headers,
1754
+ _host_index=_host_index,
1755
+ )
724
1756
 
725
1757
  def _get_exchange_key_by_id_serialize(
726
1758
  self,
@@ -758,26 +1790,174 @@ class APIKeysApi:
758
1790
  ["application/json"]
759
1791
  )
760
1792
 
761
- # authentication setting
762
- _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
763
-
764
- return self.api_client.param_serialize(
765
- method="GET",
766
- resource_path="/api-keys/{id}",
767
- path_params=_path_params,
768
- query_params=_query_params,
769
- header_params=_header_params,
770
- body=_body_params,
771
- post_params=_form_params,
772
- files=_files,
773
- auth_settings=_auth_settings,
774
- collection_formats=_collection_formats,
775
- _host=_host,
776
- _request_auth=_request_auth,
777
- )
1793
+ # authentication setting
1794
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1795
+
1796
+ return self.api_client.param_serialize(
1797
+ method="GET",
1798
+ resource_path="/api-keys/{id}",
1799
+ path_params=_path_params,
1800
+ query_params=_query_params,
1801
+ header_params=_header_params,
1802
+ body=_body_params,
1803
+ post_params=_form_params,
1804
+ files=_files,
1805
+ auth_settings=_auth_settings,
1806
+ collection_formats=_collection_formats,
1807
+ _host=_host,
1808
+ _request_auth=_request_auth,
1809
+ )
1810
+
1811
+ @validate_call
1812
+ def get_exchange_keys(
1813
+ self,
1814
+ limit: Optional[StrictInt] = None,
1815
+ offset: Optional[StrictInt] = None,
1816
+ include_deleted: Annotated[
1817
+ Optional[StrictBool],
1818
+ Field(description="Whether to include deleted API keys."),
1819
+ ] = None,
1820
+ _request_timeout: Union[
1821
+ None,
1822
+ Annotated[StrictFloat, Field(gt=0)],
1823
+ Tuple[
1824
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1825
+ ],
1826
+ ] = None,
1827
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1828
+ _content_type: Optional[StrictStr] = None,
1829
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1830
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1831
+ ) -> List[ExchangeKey]:
1832
+ """Get Exchange Keys
1833
+
1834
+ This method can work in both sync and async modes based on the is_sync flag.
1835
+ """
1836
+ if self.is_sync:
1837
+ return self._get_exchange_keys_sync(
1838
+ limit=limit,
1839
+ offset=offset,
1840
+ include_deleted=include_deleted,
1841
+ _request_timeout=_request_timeout,
1842
+ _request_auth=_request_auth,
1843
+ _content_type=_content_type,
1844
+ _headers=_headers,
1845
+ _host_index=_host_index,
1846
+ )
1847
+
1848
+ else:
1849
+ return self._get_exchange_keys_async(
1850
+ limit=limit,
1851
+ offset=offset,
1852
+ include_deleted=include_deleted,
1853
+ _request_timeout=_request_timeout,
1854
+ _request_auth=_request_auth,
1855
+ _content_type=_content_type,
1856
+ _headers=_headers,
1857
+ _host_index=_host_index,
1858
+ )
1859
+
1860
+ @validate_call
1861
+ def get_exchange_keys_with_http_info(
1862
+ self,
1863
+ limit: Optional[StrictInt] = None,
1864
+ offset: Optional[StrictInt] = None,
1865
+ include_deleted: Annotated[
1866
+ Optional[StrictBool],
1867
+ Field(description="Whether to include deleted API keys."),
1868
+ ] = None,
1869
+ _request_timeout: Union[
1870
+ None,
1871
+ Annotated[StrictFloat, Field(gt=0)],
1872
+ Tuple[
1873
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1874
+ ],
1875
+ ] = None,
1876
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1877
+ _content_type: Optional[StrictStr] = None,
1878
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1879
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1880
+ ) -> ApiResponse[List[ExchangeKey]]:
1881
+ """Get Exchange Keys with HTTP info
1882
+
1883
+ This method can work in both sync and async modes based on the is_sync flag.
1884
+ """
1885
+ if self.is_sync:
1886
+ return self._get_exchange_keys_sync_with_http_info(
1887
+ limit=limit,
1888
+ offset=offset,
1889
+ include_deleted=include_deleted,
1890
+ _request_timeout=_request_timeout,
1891
+ _request_auth=_request_auth,
1892
+ _content_type=_content_type,
1893
+ _headers=_headers,
1894
+ _host_index=_host_index,
1895
+ )
1896
+
1897
+ else:
1898
+ return self._get_exchange_keys_async_with_http_info(
1899
+ limit=limit,
1900
+ offset=offset,
1901
+ include_deleted=include_deleted,
1902
+ _request_timeout=_request_timeout,
1903
+ _request_auth=_request_auth,
1904
+ _content_type=_content_type,
1905
+ _headers=_headers,
1906
+ _host_index=_host_index,
1907
+ )
1908
+
1909
+ @validate_call
1910
+ def get_exchange_keys_without_preload_content(
1911
+ self,
1912
+ limit: Optional[StrictInt] = None,
1913
+ offset: Optional[StrictInt] = None,
1914
+ include_deleted: Annotated[
1915
+ Optional[StrictBool],
1916
+ Field(description="Whether to include deleted API keys."),
1917
+ ] = None,
1918
+ _request_timeout: Union[
1919
+ None,
1920
+ Annotated[StrictFloat, Field(gt=0)],
1921
+ Tuple[
1922
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1923
+ ],
1924
+ ] = None,
1925
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1926
+ _content_type: Optional[StrictStr] = None,
1927
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1928
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1929
+ ) -> RESTResponseType:
1930
+ """Get Exchange Keys without preloading content
1931
+
1932
+ This method can work in both sync and async modes based on the is_sync flag.
1933
+ """
1934
+ if self.is_sync:
1935
+ return self._get_exchange_keys_sync_without_preload_content(
1936
+ limit=limit,
1937
+ offset=offset,
1938
+ include_deleted=include_deleted,
1939
+ _request_timeout=_request_timeout,
1940
+ _request_auth=_request_auth,
1941
+ _content_type=_content_type,
1942
+ _headers=_headers,
1943
+ _host_index=_host_index,
1944
+ )
1945
+
1946
+ else:
1947
+ return self._get_exchange_keys_async_without_preload_content(
1948
+ limit=limit,
1949
+ offset=offset,
1950
+ include_deleted=include_deleted,
1951
+ _request_timeout=_request_timeout,
1952
+ _request_auth=_request_auth,
1953
+ _content_type=_content_type,
1954
+ _headers=_headers,
1955
+ _host_index=_host_index,
1956
+ )
778
1957
 
1958
+ # Private async implementation methods
779
1959
  @validate_call
780
- async def get_exchange_keys(
1960
+ async def _get_exchange_keys_async(
781
1961
  self,
782
1962
  limit: Optional[StrictInt] = None,
783
1963
  offset: Optional[StrictInt] = None,
@@ -852,7 +2032,7 @@ class APIKeysApi:
852
2032
  ).data
853
2033
 
854
2034
  @validate_call
855
- async def get_exchange_keys_with_http_info(
2035
+ async def _get_exchange_keys_async_with_http_info(
856
2036
  self,
857
2037
  limit: Optional[StrictInt] = None,
858
2038
  offset: Optional[StrictInt] = None,
@@ -922,12 +2102,11 @@ class APIKeysApi:
922
2102
  )
923
2103
  await response_data.read()
924
2104
  return self.api_client.response_deserialize(
925
- response_data=response_data,
926
- response_types_map=_response_types_map,
2105
+ response_data=response_data, response_types_map=_response_types_map
927
2106
  )
928
2107
 
929
2108
  @validate_call
930
- async def get_exchange_keys_without_preload_content(
2109
+ async def _get_exchange_keys_async_without_preload_content(
931
2110
  self,
932
2111
  limit: Optional[StrictInt] = None,
933
2112
  offset: Optional[StrictInt] = None,
@@ -995,7 +2174,107 @@ class APIKeysApi:
995
2174
  response_data = await self.api_client.call_api(
996
2175
  *_param, _request_timeout=_request_timeout
997
2176
  )
998
- return response_data.response
2177
+ return response_data
2178
+
2179
+ # Private sync implementation methods
2180
+ @validate_call
2181
+ def _get_exchange_keys_sync(
2182
+ self,
2183
+ limit: Optional[StrictInt] = None,
2184
+ offset: Optional[StrictInt] = None,
2185
+ include_deleted: Annotated[
2186
+ Optional[StrictBool],
2187
+ Field(description="Whether to include deleted API keys."),
2188
+ ] = None,
2189
+ _request_timeout: Union[
2190
+ None,
2191
+ Annotated[StrictFloat, Field(gt=0)],
2192
+ Tuple[
2193
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2194
+ ],
2195
+ ] = None,
2196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2197
+ _content_type: Optional[StrictStr] = None,
2198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2200
+ ) -> List[ExchangeKey]:
2201
+ """Synchronous version of get_exchange_keys"""
2202
+ return async_to_sync(self._get_exchange_keys_async)(
2203
+ limit=limit,
2204
+ offset=offset,
2205
+ include_deleted=include_deleted,
2206
+ _request_timeout=_request_timeout,
2207
+ _request_auth=_request_auth,
2208
+ _content_type=_content_type,
2209
+ _headers=_headers,
2210
+ _host_index=_host_index,
2211
+ )
2212
+
2213
+ @validate_call
2214
+ def _get_exchange_keys_sync_with_http_info(
2215
+ self,
2216
+ limit: Optional[StrictInt] = None,
2217
+ offset: Optional[StrictInt] = None,
2218
+ include_deleted: Annotated[
2219
+ Optional[StrictBool],
2220
+ Field(description="Whether to include deleted API keys."),
2221
+ ] = None,
2222
+ _request_timeout: Union[
2223
+ None,
2224
+ Annotated[StrictFloat, Field(gt=0)],
2225
+ Tuple[
2226
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2227
+ ],
2228
+ ] = None,
2229
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2230
+ _content_type: Optional[StrictStr] = None,
2231
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2232
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2233
+ ) -> ApiResponse[List[ExchangeKey]]:
2234
+ """Synchronous version of get_exchange_keys_with_http_info"""
2235
+ return async_to_sync(self._get_exchange_keys_async_with_http_info)(
2236
+ limit=limit,
2237
+ offset=offset,
2238
+ include_deleted=include_deleted,
2239
+ _request_timeout=_request_timeout,
2240
+ _request_auth=_request_auth,
2241
+ _content_type=_content_type,
2242
+ _headers=_headers,
2243
+ _host_index=_host_index,
2244
+ )
2245
+
2246
+ @validate_call
2247
+ def _get_exchange_keys_sync_without_preload_content(
2248
+ self,
2249
+ limit: Optional[StrictInt] = None,
2250
+ offset: Optional[StrictInt] = None,
2251
+ include_deleted: Annotated[
2252
+ Optional[StrictBool],
2253
+ Field(description="Whether to include deleted API keys."),
2254
+ ] = None,
2255
+ _request_timeout: Union[
2256
+ None,
2257
+ Annotated[StrictFloat, Field(gt=0)],
2258
+ Tuple[
2259
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2260
+ ],
2261
+ ] = None,
2262
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2263
+ _content_type: Optional[StrictStr] = None,
2264
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2265
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2266
+ ) -> RESTResponseType:
2267
+ """Synchronous version of get_exchange_keys_without_preload_content"""
2268
+ return async_to_sync(self._get_exchange_keys_async_without_preload_content)(
2269
+ limit=limit,
2270
+ offset=offset,
2271
+ include_deleted=include_deleted,
2272
+ _request_timeout=_request_timeout,
2273
+ _request_auth=_request_auth,
2274
+ _content_type=_content_type,
2275
+ _headers=_headers,
2276
+ _host_index=_host_index,
2277
+ )
999
2278
 
1000
2279
  def _get_exchange_keys_serialize(
1001
2280
  self,
@@ -1064,7 +2343,137 @@ class APIKeysApi:
1064
2343
  )
1065
2344
 
1066
2345
  @validate_call
1067
- async def update_exchange_key(
2346
+ def update_exchange_key(
2347
+ self,
2348
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
2349
+ exchange_key_update: ExchangeKeyUpdate,
2350
+ _request_timeout: Union[
2351
+ None,
2352
+ Annotated[StrictFloat, Field(gt=0)],
2353
+ Tuple[
2354
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2355
+ ],
2356
+ ] = None,
2357
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2358
+ _content_type: Optional[StrictStr] = None,
2359
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2360
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2361
+ ) -> ExchangeKey:
2362
+ """Put Exchange Key
2363
+
2364
+ This method can work in both sync and async modes based on the is_sync flag.
2365
+ """
2366
+ if self.is_sync:
2367
+ return self._update_exchange_key_sync(
2368
+ id=id,
2369
+ exchange_key_update=exchange_key_update,
2370
+ _request_timeout=_request_timeout,
2371
+ _request_auth=_request_auth,
2372
+ _content_type=_content_type,
2373
+ _headers=_headers,
2374
+ _host_index=_host_index,
2375
+ )
2376
+
2377
+ else:
2378
+ return self._update_exchange_key_async(
2379
+ id=id,
2380
+ exchange_key_update=exchange_key_update,
2381
+ _request_timeout=_request_timeout,
2382
+ _request_auth=_request_auth,
2383
+ _content_type=_content_type,
2384
+ _headers=_headers,
2385
+ _host_index=_host_index,
2386
+ )
2387
+
2388
+ @validate_call
2389
+ def update_exchange_key_with_http_info(
2390
+ self,
2391
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
2392
+ exchange_key_update: ExchangeKeyUpdate,
2393
+ _request_timeout: Union[
2394
+ None,
2395
+ Annotated[StrictFloat, Field(gt=0)],
2396
+ Tuple[
2397
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2398
+ ],
2399
+ ] = None,
2400
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2401
+ _content_type: Optional[StrictStr] = None,
2402
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2403
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2404
+ ) -> ApiResponse[ExchangeKey]:
2405
+ """Put Exchange Key with HTTP info
2406
+
2407
+ This method can work in both sync and async modes based on the is_sync flag.
2408
+ """
2409
+ if self.is_sync:
2410
+ return self._update_exchange_key_sync_with_http_info(
2411
+ id=id,
2412
+ exchange_key_update=exchange_key_update,
2413
+ _request_timeout=_request_timeout,
2414
+ _request_auth=_request_auth,
2415
+ _content_type=_content_type,
2416
+ _headers=_headers,
2417
+ _host_index=_host_index,
2418
+ )
2419
+
2420
+ else:
2421
+ return self._update_exchange_key_async_with_http_info(
2422
+ id=id,
2423
+ exchange_key_update=exchange_key_update,
2424
+ _request_timeout=_request_timeout,
2425
+ _request_auth=_request_auth,
2426
+ _content_type=_content_type,
2427
+ _headers=_headers,
2428
+ _host_index=_host_index,
2429
+ )
2430
+
2431
+ @validate_call
2432
+ def update_exchange_key_without_preload_content(
2433
+ self,
2434
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
2435
+ exchange_key_update: ExchangeKeyUpdate,
2436
+ _request_timeout: Union[
2437
+ None,
2438
+ Annotated[StrictFloat, Field(gt=0)],
2439
+ Tuple[
2440
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2441
+ ],
2442
+ ] = None,
2443
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2444
+ _content_type: Optional[StrictStr] = None,
2445
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2446
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2447
+ ) -> RESTResponseType:
2448
+ """Put Exchange Key without preloading content
2449
+
2450
+ This method can work in both sync and async modes based on the is_sync flag.
2451
+ """
2452
+ if self.is_sync:
2453
+ return self._update_exchange_key_sync_without_preload_content(
2454
+ id=id,
2455
+ exchange_key_update=exchange_key_update,
2456
+ _request_timeout=_request_timeout,
2457
+ _request_auth=_request_auth,
2458
+ _content_type=_content_type,
2459
+ _headers=_headers,
2460
+ _host_index=_host_index,
2461
+ )
2462
+
2463
+ else:
2464
+ return self._update_exchange_key_async_without_preload_content(
2465
+ id=id,
2466
+ exchange_key_update=exchange_key_update,
2467
+ _request_timeout=_request_timeout,
2468
+ _request_auth=_request_auth,
2469
+ _content_type=_content_type,
2470
+ _headers=_headers,
2471
+ _host_index=_host_index,
2472
+ )
2473
+
2474
+ # Private async implementation methods
2475
+ @validate_call
2476
+ async def _update_exchange_key_async(
1068
2477
  self,
1069
2478
  id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
1070
2479
  exchange_key_update: ExchangeKeyUpdate,
@@ -1132,7 +2541,7 @@ class APIKeysApi:
1132
2541
  ).data
1133
2542
 
1134
2543
  @validate_call
1135
- async def update_exchange_key_with_http_info(
2544
+ async def _update_exchange_key_async_with_http_info(
1136
2545
  self,
1137
2546
  id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
1138
2547
  exchange_key_update: ExchangeKeyUpdate,
@@ -1195,12 +2604,11 @@ class APIKeysApi:
1195
2604
  )
1196
2605
  await response_data.read()
1197
2606
  return self.api_client.response_deserialize(
1198
- response_data=response_data,
1199
- response_types_map=_response_types_map,
2607
+ response_data=response_data, response_types_map=_response_types_map
1200
2608
  )
1201
2609
 
1202
2610
  @validate_call
1203
- async def update_exchange_key_without_preload_content(
2611
+ async def _update_exchange_key_async_without_preload_content(
1204
2612
  self,
1205
2613
  id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
1206
2614
  exchange_key_update: ExchangeKeyUpdate,
@@ -1261,7 +2669,92 @@ class APIKeysApi:
1261
2669
  response_data = await self.api_client.call_api(
1262
2670
  *_param, _request_timeout=_request_timeout
1263
2671
  )
1264
- return response_data.response
2672
+ return response_data
2673
+
2674
+ # Private sync implementation methods
2675
+ @validate_call
2676
+ def _update_exchange_key_sync(
2677
+ self,
2678
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
2679
+ exchange_key_update: ExchangeKeyUpdate,
2680
+ _request_timeout: Union[
2681
+ None,
2682
+ Annotated[StrictFloat, Field(gt=0)],
2683
+ Tuple[
2684
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2685
+ ],
2686
+ ] = None,
2687
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2688
+ _content_type: Optional[StrictStr] = None,
2689
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2690
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2691
+ ) -> ExchangeKey:
2692
+ """Synchronous version of update_exchange_key"""
2693
+ return async_to_sync(self._update_exchange_key_async)(
2694
+ id=id,
2695
+ exchange_key_update=exchange_key_update,
2696
+ _request_timeout=_request_timeout,
2697
+ _request_auth=_request_auth,
2698
+ _content_type=_content_type,
2699
+ _headers=_headers,
2700
+ _host_index=_host_index,
2701
+ )
2702
+
2703
+ @validate_call
2704
+ def _update_exchange_key_sync_with_http_info(
2705
+ self,
2706
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
2707
+ exchange_key_update: ExchangeKeyUpdate,
2708
+ _request_timeout: Union[
2709
+ None,
2710
+ Annotated[StrictFloat, Field(gt=0)],
2711
+ Tuple[
2712
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2713
+ ],
2714
+ ] = None,
2715
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2716
+ _content_type: Optional[StrictStr] = None,
2717
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2718
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2719
+ ) -> ApiResponse[ExchangeKey]:
2720
+ """Synchronous version of update_exchange_key_with_http_info"""
2721
+ return async_to_sync(self._update_exchange_key_async_with_http_info)(
2722
+ id=id,
2723
+ exchange_key_update=exchange_key_update,
2724
+ _request_timeout=_request_timeout,
2725
+ _request_auth=_request_auth,
2726
+ _content_type=_content_type,
2727
+ _headers=_headers,
2728
+ _host_index=_host_index,
2729
+ )
2730
+
2731
+ @validate_call
2732
+ def _update_exchange_key_sync_without_preload_content(
2733
+ self,
2734
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
2735
+ exchange_key_update: ExchangeKeyUpdate,
2736
+ _request_timeout: Union[
2737
+ None,
2738
+ Annotated[StrictFloat, Field(gt=0)],
2739
+ Tuple[
2740
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2741
+ ],
2742
+ ] = None,
2743
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2744
+ _content_type: Optional[StrictStr] = None,
2745
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2746
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2747
+ ) -> RESTResponseType:
2748
+ """Synchronous version of update_exchange_key_without_preload_content"""
2749
+ return async_to_sync(self._update_exchange_key_async_without_preload_content)(
2750
+ id=id,
2751
+ exchange_key_update=exchange_key_update,
2752
+ _request_timeout=_request_timeout,
2753
+ _request_auth=_request_auth,
2754
+ _content_type=_content_type,
2755
+ _headers=_headers,
2756
+ _host_index=_host_index,
2757
+ )
1265
2758
 
1266
2759
  def _update_exchange_key_serialize(
1267
2760
  self,