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.
- crypticorn/cli/init.py +7 -4
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +7 -3
- crypticorn/common/errors.py +21 -0
- crypticorn/common/exceptions.py +83 -0
- crypticorn/common/utils.py +11 -4
- crypticorn/klines/client/__init__.py +10 -3
- crypticorn/klines/client/api/__init__.py +1 -0
- crypticorn/klines/client/api/change_in_timeframe_api.py +331 -0
- crypticorn/klines/client/api/funding_rates_api.py +13 -13
- crypticorn/klines/client/api/health_check_api.py +8 -8
- crypticorn/klines/client/api/ohlcv_data_api.py +38 -26
- crypticorn/klines/client/api/symbols_api.py +26 -20
- crypticorn/klines/client/api/udf_api.py +229 -229
- crypticorn/klines/client/api_client.py +8 -5
- crypticorn/klines/client/configuration.py +80 -37
- crypticorn/klines/client/models/__init__.py +9 -3
- crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +123 -0
- crypticorn/klines/client/models/change_in_timeframe_response.py +86 -0
- crypticorn/klines/client/models/market_type.py +35 -0
- crypticorn/klines/client/models/response_get_udf_history.py +198 -0
- crypticorn/klines/client/rest.py +111 -159
- crypticorn/klines/main.py +32 -22
- crypticorn/metrics/main.py +39 -40
- crypticorn/pay/client/__init__.py +0 -3
- crypticorn/pay/client/api/now_payments_api.py +1 -53
- crypticorn/pay/client/models/__init__.py +0 -3
- crypticorn/pay/client/models/payment.py +3 -3
- crypticorn/pay/client/models/scope.py +6 -1
- crypticorn/trade/client/__init__.py +8 -6
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/api_keys_api.py +167 -273
- crypticorn/trade/client/api/bots_api.py +140 -226
- crypticorn/trade/client/api/exchanges_api.py +31 -51
- crypticorn/trade/client/api/futures_trading_panel_api.py +169 -272
- crypticorn/trade/client/api/notifications_api.py +200 -323
- crypticorn/trade/client/api/orders_api.py +40 -60
- crypticorn/trade/client/api/status_api.py +31 -49
- crypticorn/trade/client/api/strategies_api.py +137 -223
- crypticorn/trade/client/api/trading_actions_api.py +106 -170
- crypticorn/trade/client/api_client.py +111 -153
- crypticorn/trade/client/api_response.py +2 -3
- crypticorn/trade/client/configuration.py +128 -115
- crypticorn/trade/client/exceptions.py +25 -21
- crypticorn/trade/client/models/__init__.py +8 -6
- crypticorn/trade/client/models/action_model.py +108 -54
- crypticorn/trade/client/models/api_error_identifier.py +76 -72
- crypticorn/trade/client/models/api_error_level.py +9 -11
- crypticorn/trade/client/models/api_error_type.py +9 -11
- crypticorn/trade/client/models/bot_model.py +57 -36
- crypticorn/trade/client/models/bot_status.py +9 -11
- crypticorn/trade/client/models/exchange.py +7 -9
- crypticorn/trade/client/models/exchange_key_model.py +43 -32
- crypticorn/trade/client/models/execution_ids.py +18 -18
- crypticorn/trade/client/models/futures_balance.py +43 -27
- crypticorn/trade/client/models/futures_trading_action.py +102 -50
- crypticorn/trade/client/models/http_validation_error.py +19 -15
- crypticorn/trade/client/models/margin_mode.py +7 -9
- crypticorn/trade/client/models/market_type.py +7 -9
- crypticorn/trade/client/models/notification_model.py +52 -32
- crypticorn/trade/client/models/order_model.py +112 -72
- crypticorn/trade/client/models/order_status.py +10 -12
- crypticorn/trade/client/models/post_futures_action.py +20 -16
- crypticorn/trade/client/models/strategy_exchange_info.py +15 -16
- crypticorn/trade/client/models/strategy_model_input.py +61 -33
- crypticorn/trade/client/models/strategy_model_output.py +61 -33
- crypticorn/trade/client/models/tpsl.py +39 -25
- crypticorn/trade/client/models/trading_action_type.py +9 -11
- crypticorn/trade/client/models/validation_error.py +24 -18
- crypticorn/trade/client/models/validation_error_loc_inner.py +37 -16
- crypticorn/trade/client/rest.py +23 -38
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/METADATA +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/RECORD +76 -70
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/WHEEL +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/entry_points.txt +0 -0
- {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
|
-
|
4
|
+
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
|
-
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
101
|
-
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
172
|
-
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
243
|
-
|
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((
|
281
|
-
|
268
|
+
|
269
|
+
_query_params.append(("limit", limit))
|
270
|
+
|
282
271
|
if offset is not None:
|
283
|
-
|
284
|
-
_query_params.append((
|
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
|
293
|
-
_header_params[
|
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=
|
308
|
-
resource_path=
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
379
|
-
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
447
|
-
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
515
|
-
|
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
|
558
|
-
_header_params[
|
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[
|
532
|
+
_header_params["Content-Type"] = _content_type
|
567
533
|
else:
|
568
|
-
_default_content_type = (
|
569
|
-
|
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[
|
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=
|
585
|
-
resource_path=
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
655
|
-
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
722
|
-
|
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
|
-
|
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
|
-
"""
|
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
|
-
|
789
|
-
|
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
|
832
|
-
_header_params[
|
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[
|
784
|
+
_header_params["Content-Type"] = _content_type
|
841
785
|
else:
|
842
|
-
_default_content_type = (
|
843
|
-
|
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[
|
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=
|
859
|
-
resource_path=
|
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
|
-
|