crypticorn 2.4.5__py3-none-any.whl → 2.4.7__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 (65) hide show
  1. crypticorn/client.py +1 -1
  2. crypticorn/common/auth.py +7 -9
  3. crypticorn/common/errors.py +6 -1
  4. crypticorn/common/scopes.py +2 -1
  5. crypticorn/common/utils.py +15 -5
  6. crypticorn/klines/main.py +10 -5
  7. crypticorn/metrics/client/models/exchange_mapping.py +4 -2
  8. crypticorn/metrics/client/models/trading_status.py +1 -0
  9. crypticorn/metrics/main.py +5 -4
  10. crypticorn/pay/client/__init__.py +5 -4
  11. crypticorn/pay/client/api/payments_api.py +17 -17
  12. crypticorn/pay/client/api/products_api.py +49 -48
  13. crypticorn/pay/client/models/__init__.py +5 -4
  14. crypticorn/pay/client/models/payment.py +28 -147
  15. crypticorn/pay/client/models/product_create.py +120 -0
  16. crypticorn/pay/client/models/product_read.py +123 -0
  17. crypticorn/pay/client/models/product_sub_read.py +103 -0
  18. crypticorn/pay/client/models/product_update.py +142 -0
  19. crypticorn/trade/client/__init__.py +6 -8
  20. crypticorn/trade/client/api/__init__.py +1 -0
  21. crypticorn/trade/client/api/api_keys_api.py +273 -167
  22. crypticorn/trade/client/api/bots_api.py +226 -140
  23. crypticorn/trade/client/api/exchanges_api.py +51 -31
  24. crypticorn/trade/client/api/futures_trading_panel_api.py +272 -169
  25. crypticorn/trade/client/api/notifications_api.py +323 -200
  26. crypticorn/trade/client/api/orders_api.py +60 -40
  27. crypticorn/trade/client/api/status_api.py +49 -31
  28. crypticorn/trade/client/api/strategies_api.py +223 -137
  29. crypticorn/trade/client/api/trading_actions_api.py +170 -106
  30. crypticorn/trade/client/api_client.py +153 -111
  31. crypticorn/trade/client/api_response.py +3 -2
  32. crypticorn/trade/client/configuration.py +115 -128
  33. crypticorn/trade/client/exceptions.py +21 -25
  34. crypticorn/trade/client/models/__init__.py +6 -8
  35. crypticorn/trade/client/models/action_model.py +54 -108
  36. crypticorn/trade/client/models/api_error_identifier.py +72 -76
  37. crypticorn/trade/client/models/api_error_level.py +11 -9
  38. crypticorn/trade/client/models/api_error_type.py +11 -9
  39. crypticorn/trade/client/models/bot_model.py +36 -57
  40. crypticorn/trade/client/models/bot_status.py +11 -9
  41. crypticorn/trade/client/models/exchange.py +9 -7
  42. crypticorn/trade/client/models/exchange_key_model.py +34 -44
  43. crypticorn/trade/client/models/execution_ids.py +18 -18
  44. crypticorn/trade/client/models/futures_balance.py +27 -43
  45. crypticorn/trade/client/models/futures_trading_action.py +50 -102
  46. crypticorn/trade/client/models/http_validation_error.py +15 -19
  47. crypticorn/trade/client/models/margin_mode.py +9 -7
  48. crypticorn/trade/client/models/market_type.py +9 -7
  49. crypticorn/trade/client/models/notification_model.py +32 -52
  50. crypticorn/trade/client/models/order_model.py +72 -112
  51. crypticorn/trade/client/models/order_status.py +12 -10
  52. crypticorn/trade/client/models/post_futures_action.py +16 -20
  53. crypticorn/trade/client/models/strategy_exchange_info.py +16 -15
  54. crypticorn/trade/client/models/strategy_model_input.py +33 -61
  55. crypticorn/trade/client/models/strategy_model_output.py +33 -61
  56. crypticorn/trade/client/models/tpsl.py +25 -39
  57. crypticorn/trade/client/models/trading_action_type.py +11 -9
  58. crypticorn/trade/client/models/validation_error.py +18 -24
  59. crypticorn/trade/client/models/validation_error_loc_inner.py +16 -37
  60. crypticorn/trade/client/rest.py +38 -23
  61. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/METADATA +13 -2
  62. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/RECORD +65 -61
  63. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/WHEEL +0 -0
  64. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/entry_points.txt +0 -0
  65. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/top_level.txt +0 -0
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- Trading API
4
+ Trading API
5
5
 
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  import warnings
@@ -39,6 +39,7 @@ class TradingActionsApi:
39
39
  api_client = ApiClient.get_default()
40
40
  self.api_client = api_client
41
41
 
42
+
42
43
  @validate_call
43
44
  async def get_actions(
44
45
  self,
@@ -48,8 +49,9 @@ class TradingActionsApi:
48
49
  None,
49
50
  Annotated[StrictFloat, Field(gt=0)],
50
51
  Tuple[
51
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
52
- ],
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
53
55
  ] = None,
54
56
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
55
57
  _content_type: Optional[StrictStr] = None,
@@ -83,7 +85,7 @@ class TradingActionsApi:
83
85
  in the spec for a single request.
84
86
  :type _host_index: int, optional
85
87
  :return: Returns the result object.
86
- """ # noqa: E501
88
+ """ # noqa: E501
87
89
 
88
90
  _param = self._get_actions_serialize(
89
91
  limit=limit,
@@ -91,15 +93,16 @@ class TradingActionsApi:
91
93
  _request_auth=_request_auth,
92
94
  _content_type=_content_type,
93
95
  _headers=_headers,
94
- _host_index=_host_index,
96
+ _host_index=_host_index
95
97
  )
96
98
 
97
99
  _response_types_map: Dict[str, Optional[str]] = {
98
- "200": "List[ActionModel]",
99
- "422": "HTTPValidationError",
100
+ '200': "List[ActionModel]",
101
+ '422': "HTTPValidationError",
100
102
  }
101
103
  response_data = await self.api_client.call_api(
102
- *_param, _request_timeout=_request_timeout
104
+ *_param,
105
+ _request_timeout=_request_timeout
103
106
  )
104
107
  await response_data.read()
105
108
  return self.api_client.response_deserialize(
@@ -107,6 +110,7 @@ class TradingActionsApi:
107
110
  response_types_map=_response_types_map,
108
111
  ).data
109
112
 
113
+
110
114
  @validate_call
111
115
  async def get_actions_with_http_info(
112
116
  self,
@@ -116,8 +120,9 @@ class TradingActionsApi:
116
120
  None,
117
121
  Annotated[StrictFloat, Field(gt=0)],
118
122
  Tuple[
119
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
120
- ],
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Annotated[StrictFloat, Field(gt=0)]
125
+ ]
121
126
  ] = None,
122
127
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
128
  _content_type: Optional[StrictStr] = None,
@@ -151,7 +156,7 @@ class TradingActionsApi:
151
156
  in the spec for a single request.
152
157
  :type _host_index: int, optional
153
158
  :return: Returns the result object.
154
- """ # noqa: E501
159
+ """ # noqa: E501
155
160
 
156
161
  _param = self._get_actions_serialize(
157
162
  limit=limit,
@@ -159,15 +164,16 @@ class TradingActionsApi:
159
164
  _request_auth=_request_auth,
160
165
  _content_type=_content_type,
161
166
  _headers=_headers,
162
- _host_index=_host_index,
167
+ _host_index=_host_index
163
168
  )
164
169
 
165
170
  _response_types_map: Dict[str, Optional[str]] = {
166
- "200": "List[ActionModel]",
167
- "422": "HTTPValidationError",
171
+ '200': "List[ActionModel]",
172
+ '422': "HTTPValidationError",
168
173
  }
169
174
  response_data = await self.api_client.call_api(
170
- *_param, _request_timeout=_request_timeout
175
+ *_param,
176
+ _request_timeout=_request_timeout
171
177
  )
172
178
  await response_data.read()
173
179
  return self.api_client.response_deserialize(
@@ -175,6 +181,7 @@ class TradingActionsApi:
175
181
  response_types_map=_response_types_map,
176
182
  )
177
183
 
184
+
178
185
  @validate_call
179
186
  async def get_actions_without_preload_content(
180
187
  self,
@@ -184,8 +191,9 @@ class TradingActionsApi:
184
191
  None,
185
192
  Annotated[StrictFloat, Field(gt=0)],
186
193
  Tuple[
187
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
188
- ],
194
+ Annotated[StrictFloat, Field(gt=0)],
195
+ Annotated[StrictFloat, Field(gt=0)]
196
+ ]
189
197
  ] = None,
190
198
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
191
199
  _content_type: Optional[StrictStr] = None,
@@ -219,7 +227,7 @@ class TradingActionsApi:
219
227
  in the spec for a single request.
220
228
  :type _host_index: int, optional
221
229
  :return: Returns the result object.
222
- """ # noqa: E501
230
+ """ # noqa: E501
223
231
 
224
232
  _param = self._get_actions_serialize(
225
233
  limit=limit,
@@ -227,18 +235,20 @@ class TradingActionsApi:
227
235
  _request_auth=_request_auth,
228
236
  _content_type=_content_type,
229
237
  _headers=_headers,
230
- _host_index=_host_index,
238
+ _host_index=_host_index
231
239
  )
232
240
 
233
241
  _response_types_map: Dict[str, Optional[str]] = {
234
- "200": "List[ActionModel]",
235
- "422": "HTTPValidationError",
242
+ '200': "List[ActionModel]",
243
+ '422': "HTTPValidationError",
236
244
  }
237
245
  response_data = await self.api_client.call_api(
238
- *_param, _request_timeout=_request_timeout
246
+ *_param,
247
+ _request_timeout=_request_timeout
239
248
  )
240
249
  return response_data.response
241
250
 
251
+
242
252
  def _get_actions_serialize(
243
253
  self,
244
254
  limit,
@@ -251,7 +261,8 @@ class TradingActionsApi:
251
261
 
252
262
  _host = None
253
263
 
254
- _collection_formats: Dict[str, str] = {}
264
+ _collection_formats: Dict[str, str] = {
265
+ }
255
266
 
256
267
  _path_params: Dict[str, str] = {}
257
268
  _query_params: List[Tuple[str, str]] = []
@@ -265,29 +276,36 @@ class TradingActionsApi:
265
276
  # process the path parameters
266
277
  # process the query parameters
267
278
  if limit is not None:
268
-
269
- _query_params.append(("limit", limit))
270
-
279
+
280
+ _query_params.append(('limit', limit))
281
+
271
282
  if offset is not None:
272
-
273
- _query_params.append(("offset", offset))
274
-
283
+
284
+ _query_params.append(('offset', offset))
285
+
275
286
  # process the header parameters
276
287
  # process the form parameters
277
288
  # process the body parameter
278
289
 
290
+
279
291
  # set the HTTP header `Accept`
280
- if "Accept" not in _header_params:
281
- _header_params["Accept"] = self.api_client.select_header_accept(
282
- ["application/json"]
292
+ if 'Accept' not in _header_params:
293
+ _header_params['Accept'] = self.api_client.select_header_accept(
294
+ [
295
+ 'application/json'
296
+ ]
283
297
  )
284
298
 
299
+
285
300
  # authentication setting
286
- _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
301
+ _auth_settings: List[str] = [
302
+ 'APIKeyHeader',
303
+ 'HTTPBearer'
304
+ ]
287
305
 
288
306
  return self.api_client.param_serialize(
289
- method="GET",
290
- resource_path="/actions",
307
+ method='GET',
308
+ resource_path='/actions',
291
309
  path_params=_path_params,
292
310
  query_params=_query_params,
293
311
  header_params=_header_params,
@@ -297,9 +315,12 @@ class TradingActionsApi:
297
315
  auth_settings=_auth_settings,
298
316
  collection_formats=_collection_formats,
299
317
  _host=_host,
300
- _request_auth=_request_auth,
318
+ _request_auth=_request_auth
301
319
  )
302
320
 
321
+
322
+
323
+
303
324
  @validate_call
304
325
  async def post_futures_action(
305
326
  self,
@@ -308,8 +329,9 @@ class TradingActionsApi:
308
329
  None,
309
330
  Annotated[StrictFloat, Field(gt=0)],
310
331
  Tuple[
311
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
312
- ],
332
+ Annotated[StrictFloat, Field(gt=0)],
333
+ Annotated[StrictFloat, Field(gt=0)]
334
+ ]
313
335
  ] = None,
314
336
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
315
337
  _content_type: Optional[StrictStr] = None,
@@ -342,22 +364,23 @@ class TradingActionsApi:
342
364
  in the spec for a single request.
343
365
  :type _host_index: int, optional
344
366
  :return: Returns the result object.
345
- """ # noqa: E501
367
+ """ # noqa: E501
346
368
 
347
369
  _param = self._post_futures_action_serialize(
348
370
  futures_trading_action=futures_trading_action,
349
371
  _request_auth=_request_auth,
350
372
  _content_type=_content_type,
351
373
  _headers=_headers,
352
- _host_index=_host_index,
374
+ _host_index=_host_index
353
375
  )
354
376
 
355
377
  _response_types_map: Dict[str, Optional[str]] = {
356
- "200": "PostFuturesAction",
357
- "422": "HTTPValidationError",
378
+ '200': "PostFuturesAction",
379
+ '422': "HTTPValidationError",
358
380
  }
359
381
  response_data = await self.api_client.call_api(
360
- *_param, _request_timeout=_request_timeout
382
+ *_param,
383
+ _request_timeout=_request_timeout
361
384
  )
362
385
  await response_data.read()
363
386
  return self.api_client.response_deserialize(
@@ -365,6 +388,7 @@ class TradingActionsApi:
365
388
  response_types_map=_response_types_map,
366
389
  ).data
367
390
 
391
+
368
392
  @validate_call
369
393
  async def post_futures_action_with_http_info(
370
394
  self,
@@ -373,8 +397,9 @@ class TradingActionsApi:
373
397
  None,
374
398
  Annotated[StrictFloat, Field(gt=0)],
375
399
  Tuple[
376
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
377
- ],
400
+ Annotated[StrictFloat, Field(gt=0)],
401
+ Annotated[StrictFloat, Field(gt=0)]
402
+ ]
378
403
  ] = None,
379
404
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
380
405
  _content_type: Optional[StrictStr] = None,
@@ -407,22 +432,23 @@ class TradingActionsApi:
407
432
  in the spec for a single request.
408
433
  :type _host_index: int, optional
409
434
  :return: Returns the result object.
410
- """ # noqa: E501
435
+ """ # noqa: E501
411
436
 
412
437
  _param = self._post_futures_action_serialize(
413
438
  futures_trading_action=futures_trading_action,
414
439
  _request_auth=_request_auth,
415
440
  _content_type=_content_type,
416
441
  _headers=_headers,
417
- _host_index=_host_index,
442
+ _host_index=_host_index
418
443
  )
419
444
 
420
445
  _response_types_map: Dict[str, Optional[str]] = {
421
- "200": "PostFuturesAction",
422
- "422": "HTTPValidationError",
446
+ '200': "PostFuturesAction",
447
+ '422': "HTTPValidationError",
423
448
  }
424
449
  response_data = await self.api_client.call_api(
425
- *_param, _request_timeout=_request_timeout
450
+ *_param,
451
+ _request_timeout=_request_timeout
426
452
  )
427
453
  await response_data.read()
428
454
  return self.api_client.response_deserialize(
@@ -430,6 +456,7 @@ class TradingActionsApi:
430
456
  response_types_map=_response_types_map,
431
457
  )
432
458
 
459
+
433
460
  @validate_call
434
461
  async def post_futures_action_without_preload_content(
435
462
  self,
@@ -438,8 +465,9 @@ class TradingActionsApi:
438
465
  None,
439
466
  Annotated[StrictFloat, Field(gt=0)],
440
467
  Tuple[
441
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
442
- ],
468
+ Annotated[StrictFloat, Field(gt=0)],
469
+ Annotated[StrictFloat, Field(gt=0)]
470
+ ]
443
471
  ] = None,
444
472
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
445
473
  _content_type: Optional[StrictStr] = None,
@@ -472,25 +500,27 @@ class TradingActionsApi:
472
500
  in the spec for a single request.
473
501
  :type _host_index: int, optional
474
502
  :return: Returns the result object.
475
- """ # noqa: E501
503
+ """ # noqa: E501
476
504
 
477
505
  _param = self._post_futures_action_serialize(
478
506
  futures_trading_action=futures_trading_action,
479
507
  _request_auth=_request_auth,
480
508
  _content_type=_content_type,
481
509
  _headers=_headers,
482
- _host_index=_host_index,
510
+ _host_index=_host_index
483
511
  )
484
512
 
485
513
  _response_types_map: Dict[str, Optional[str]] = {
486
- "200": "PostFuturesAction",
487
- "422": "HTTPValidationError",
514
+ '200': "PostFuturesAction",
515
+ '422': "HTTPValidationError",
488
516
  }
489
517
  response_data = await self.api_client.call_api(
490
- *_param, _request_timeout=_request_timeout
518
+ *_param,
519
+ _request_timeout=_request_timeout
491
520
  )
492
521
  return response_data.response
493
522
 
523
+
494
524
  def _post_futures_action_serialize(
495
525
  self,
496
526
  futures_trading_action,
@@ -502,7 +532,8 @@ class TradingActionsApi:
502
532
 
503
533
  _host = None
504
534
 
505
- _collection_formats: Dict[str, str] = {}
535
+ _collection_formats: Dict[str, str] = {
536
+ }
506
537
 
507
538
  _path_params: Dict[str, str] = {}
508
539
  _query_params: List[Tuple[str, str]] = []
@@ -521,28 +552,37 @@ class TradingActionsApi:
521
552
  if futures_trading_action is not None:
522
553
  _body_params = futures_trading_action
523
554
 
555
+
524
556
  # set the HTTP header `Accept`
525
- if "Accept" not in _header_params:
526
- _header_params["Accept"] = self.api_client.select_header_accept(
527
- ["application/json"]
557
+ if 'Accept' not in _header_params:
558
+ _header_params['Accept'] = self.api_client.select_header_accept(
559
+ [
560
+ 'application/json'
561
+ ]
528
562
  )
529
563
 
530
564
  # set the HTTP header `Content-Type`
531
565
  if _content_type:
532
- _header_params["Content-Type"] = _content_type
566
+ _header_params['Content-Type'] = _content_type
533
567
  else:
534
- _default_content_type = self.api_client.select_header_content_type(
535
- ["application/json"]
568
+ _default_content_type = (
569
+ self.api_client.select_header_content_type(
570
+ [
571
+ 'application/json'
572
+ ]
573
+ )
536
574
  )
537
575
  if _default_content_type is not None:
538
- _header_params["Content-Type"] = _default_content_type
576
+ _header_params['Content-Type'] = _default_content_type
539
577
 
540
578
  # authentication setting
541
- _auth_settings: List[str] = ["APIKeyHeader"]
579
+ _auth_settings: List[str] = [
580
+ 'APIKeyHeader'
581
+ ]
542
582
 
543
583
  return self.api_client.param_serialize(
544
- method="POST",
545
- resource_path="/actions/futures",
584
+ method='POST',
585
+ resource_path='/actions/futures',
546
586
  path_params=_path_params,
547
587
  query_params=_query_params,
548
588
  header_params=_header_params,
@@ -552,9 +592,12 @@ class TradingActionsApi:
552
592
  auth_settings=_auth_settings,
553
593
  collection_formats=_collection_formats,
554
594
  _host=_host,
555
- _request_auth=_request_auth,
595
+ _request_auth=_request_auth
556
596
  )
557
597
 
598
+
599
+
600
+
558
601
  @validate_call
559
602
  async def post_spot_action(
560
603
  self,
@@ -563,8 +606,9 @@ class TradingActionsApi:
563
606
  None,
564
607
  Annotated[StrictFloat, Field(gt=0)],
565
608
  Tuple[
566
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
567
- ],
609
+ Annotated[StrictFloat, Field(gt=0)],
610
+ Annotated[StrictFloat, Field(gt=0)]
611
+ ]
568
612
  ] = None,
569
613
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
570
614
  _content_type: Optional[StrictStr] = None,
@@ -596,22 +640,23 @@ class TradingActionsApi:
596
640
  in the spec for a single request.
597
641
  :type _host_index: int, optional
598
642
  :return: Returns the result object.
599
- """ # noqa: E501
643
+ """ # noqa: E501
600
644
 
601
645
  _param = self._post_spot_action_serialize(
602
646
  futures_trading_action=futures_trading_action,
603
647
  _request_auth=_request_auth,
604
648
  _content_type=_content_type,
605
649
  _headers=_headers,
606
- _host_index=_host_index,
650
+ _host_index=_host_index
607
651
  )
608
652
 
609
653
  _response_types_map: Dict[str, Optional[str]] = {
610
- "200": "object",
611
- "422": "HTTPValidationError",
654
+ '200': "object",
655
+ '422': "HTTPValidationError",
612
656
  }
613
657
  response_data = await self.api_client.call_api(
614
- *_param, _request_timeout=_request_timeout
658
+ *_param,
659
+ _request_timeout=_request_timeout
615
660
  )
616
661
  await response_data.read()
617
662
  return self.api_client.response_deserialize(
@@ -619,6 +664,7 @@ class TradingActionsApi:
619
664
  response_types_map=_response_types_map,
620
665
  ).data
621
666
 
667
+
622
668
  @validate_call
623
669
  async def post_spot_action_with_http_info(
624
670
  self,
@@ -627,8 +673,9 @@ class TradingActionsApi:
627
673
  None,
628
674
  Annotated[StrictFloat, Field(gt=0)],
629
675
  Tuple[
630
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
631
- ],
676
+ Annotated[StrictFloat, Field(gt=0)],
677
+ Annotated[StrictFloat, Field(gt=0)]
678
+ ]
632
679
  ] = None,
633
680
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
634
681
  _content_type: Optional[StrictStr] = None,
@@ -660,22 +707,23 @@ class TradingActionsApi:
660
707
  in the spec for a single request.
661
708
  :type _host_index: int, optional
662
709
  :return: Returns the result object.
663
- """ # noqa: E501
710
+ """ # noqa: E501
664
711
 
665
712
  _param = self._post_spot_action_serialize(
666
713
  futures_trading_action=futures_trading_action,
667
714
  _request_auth=_request_auth,
668
715
  _content_type=_content_type,
669
716
  _headers=_headers,
670
- _host_index=_host_index,
717
+ _host_index=_host_index
671
718
  )
672
719
 
673
720
  _response_types_map: Dict[str, Optional[str]] = {
674
- "200": "object",
675
- "422": "HTTPValidationError",
721
+ '200': "object",
722
+ '422': "HTTPValidationError",
676
723
  }
677
724
  response_data = await self.api_client.call_api(
678
- *_param, _request_timeout=_request_timeout
725
+ *_param,
726
+ _request_timeout=_request_timeout
679
727
  )
680
728
  await response_data.read()
681
729
  return self.api_client.response_deserialize(
@@ -683,6 +731,7 @@ class TradingActionsApi:
683
731
  response_types_map=_response_types_map,
684
732
  )
685
733
 
734
+
686
735
  @validate_call
687
736
  async def post_spot_action_without_preload_content(
688
737
  self,
@@ -691,8 +740,9 @@ class TradingActionsApi:
691
740
  None,
692
741
  Annotated[StrictFloat, Field(gt=0)],
693
742
  Tuple[
694
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
695
- ],
743
+ Annotated[StrictFloat, Field(gt=0)],
744
+ Annotated[StrictFloat, Field(gt=0)]
745
+ ]
696
746
  ] = None,
697
747
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
698
748
  _content_type: Optional[StrictStr] = None,
@@ -724,25 +774,27 @@ class TradingActionsApi:
724
774
  in the spec for a single request.
725
775
  :type _host_index: int, optional
726
776
  :return: Returns the result object.
727
- """ # noqa: E501
777
+ """ # noqa: E501
728
778
 
729
779
  _param = self._post_spot_action_serialize(
730
780
  futures_trading_action=futures_trading_action,
731
781
  _request_auth=_request_auth,
732
782
  _content_type=_content_type,
733
783
  _headers=_headers,
734
- _host_index=_host_index,
784
+ _host_index=_host_index
735
785
  )
736
786
 
737
787
  _response_types_map: Dict[str, Optional[str]] = {
738
- "200": "object",
739
- "422": "HTTPValidationError",
788
+ '200': "object",
789
+ '422': "HTTPValidationError",
740
790
  }
741
791
  response_data = await self.api_client.call_api(
742
- *_param, _request_timeout=_request_timeout
792
+ *_param,
793
+ _request_timeout=_request_timeout
743
794
  )
744
795
  return response_data.response
745
796
 
797
+
746
798
  def _post_spot_action_serialize(
747
799
  self,
748
800
  futures_trading_action,
@@ -754,7 +806,8 @@ class TradingActionsApi:
754
806
 
755
807
  _host = None
756
808
 
757
- _collection_formats: Dict[str, str] = {}
809
+ _collection_formats: Dict[str, str] = {
810
+ }
758
811
 
759
812
  _path_params: Dict[str, str] = {}
760
813
  _query_params: List[Tuple[str, str]] = []
@@ -773,28 +826,37 @@ class TradingActionsApi:
773
826
  if futures_trading_action is not None:
774
827
  _body_params = futures_trading_action
775
828
 
829
+
776
830
  # set the HTTP header `Accept`
777
- if "Accept" not in _header_params:
778
- _header_params["Accept"] = self.api_client.select_header_accept(
779
- ["application/json"]
831
+ if 'Accept' not in _header_params:
832
+ _header_params['Accept'] = self.api_client.select_header_accept(
833
+ [
834
+ 'application/json'
835
+ ]
780
836
  )
781
837
 
782
838
  # set the HTTP header `Content-Type`
783
839
  if _content_type:
784
- _header_params["Content-Type"] = _content_type
840
+ _header_params['Content-Type'] = _content_type
785
841
  else:
786
- _default_content_type = self.api_client.select_header_content_type(
787
- ["application/json"]
842
+ _default_content_type = (
843
+ self.api_client.select_header_content_type(
844
+ [
845
+ 'application/json'
846
+ ]
847
+ )
788
848
  )
789
849
  if _default_content_type is not None:
790
- _header_params["Content-Type"] = _default_content_type
850
+ _header_params['Content-Type'] = _default_content_type
791
851
 
792
852
  # authentication setting
793
- _auth_settings: List[str] = ["APIKeyHeader"]
853
+ _auth_settings: List[str] = [
854
+ 'APIKeyHeader'
855
+ ]
794
856
 
795
857
  return self.api_client.param_serialize(
796
- method="POST",
797
- resource_path="/actions/spot",
858
+ method='POST',
859
+ resource_path='/actions/spot',
798
860
  path_params=_path_params,
799
861
  query_params=_query_params,
800
862
  header_params=_header_params,
@@ -804,5 +866,7 @@ class TradingActionsApi:
804
866
  auth_settings=_auth_settings,
805
867
  collection_formats=_collection_formats,
806
868
  _host=_host,
807
- _request_auth=_request_auth,
869
+ _request_auth=_request_auth
808
870
  )
871
+
872
+