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