crypticorn 2.17.0rc5__py3-none-any.whl → 2.17.0rc7__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/auth/client/api/admin_api.py +6 -24
- crypticorn/auth/client/api/auth_api.py +36 -144
- crypticorn/auth/client/api/service_api.py +3 -12
- crypticorn/auth/client/api/user_api.py +33 -132
- crypticorn/auth/client/api/wallet_api.py +18 -72
- crypticorn/cli/templates/Dockerfile +5 -2
- crypticorn/common/auth.py +30 -0
- crypticorn/common/errors.py +10 -0
- crypticorn/common/pagination.py +1 -1
- crypticorn/common/router/admin_router.py +1 -11
- crypticorn/common/router/status_router.py +30 -2
- crypticorn/common/scopes.py +2 -2
- crypticorn/dex/client/api/admin_api.py +21 -84
- crypticorn/dex/client/api/signals_api.py +9 -36
- crypticorn/dex/client/api/status_api.py +6 -24
- crypticorn/hive/client/api/admin_api.py +18 -72
- crypticorn/hive/client/api/data_api.py +6 -24
- crypticorn/hive/client/api/models_api.py +21 -84
- crypticorn/hive/client/api/status_api.py +6 -24
- crypticorn/klines/client/api/admin_api.py +18 -72
- crypticorn/klines/client/api/change_in_timeframe_api.py +3 -12
- crypticorn/klines/client/api/funding_rates_api.py +3 -12
- crypticorn/klines/client/api/ohlcv_data_api.py +3 -12
- crypticorn/klines/client/api/status_api.py +6 -24
- crypticorn/klines/client/api/symbols_api.py +3 -12
- crypticorn/klines/client/api/udf_api.py +18 -72
- crypticorn/metrics/client/api/admin_api.py +18 -72
- crypticorn/metrics/client/api/exchanges_api.py +12 -48
- crypticorn/metrics/client/api/indicators_api.py +6 -24
- crypticorn/metrics/client/api/logs_api.py +3 -12
- crypticorn/metrics/client/api/marketcap_api.py +12 -48
- crypticorn/metrics/client/api/markets_api.py +3 -12
- crypticorn/metrics/client/api/quote_currencies_api.py +3 -12
- crypticorn/metrics/client/api/status_api.py +6 -24
- crypticorn/metrics/client/api/tokens_api.py +6 -24
- crypticorn/pay/client/api/admin_api.py +21 -84
- crypticorn/pay/client/api/now_payments_api.py +15 -60
- crypticorn/pay/client/api/payments_api.py +6 -24
- crypticorn/pay/client/api/products_api.py +12 -48
- crypticorn/pay/client/api/status_api.py +6 -24
- crypticorn/trade/client/__init__.py +10 -0
- crypticorn/trade/client/api/admin_api.py +21 -84
- crypticorn/trade/client/api/api_keys_api.py +207 -184
- crypticorn/trade/client/api/bots_api.py +2435 -662
- crypticorn/trade/client/api/exchanges_api.py +9 -36
- crypticorn/trade/client/api/notifications_api.py +18 -72
- crypticorn/trade/client/api/orders_api.py +3 -12
- crypticorn/trade/client/api/status_api.py +6 -24
- crypticorn/trade/client/api/strategies_api.py +15 -60
- crypticorn/trade/client/api/trading_actions_api.py +431 -112
- crypticorn/trade/client/configuration.py +2 -2
- crypticorn/trade/client/models/__init__.py +10 -0
- crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
- crypticorn/trade/client/models/paginated_response_union_futures_trading_action_spot_trading_action.py +141 -0
- crypticorn/trade/client/models/paginated_response_union_futures_trading_action_spot_trading_action_data_inner.py +165 -0
- crypticorn/trade/client/models/spot_trading_action.py +207 -0
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc7.dist-info}/METADATA +3 -3
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc7.dist-info}/RECORD +62 -58
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc7.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc7.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc7.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc7.dist-info}/top_level.txt +0 -0
@@ -16,12 +16,15 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
|
-
from pydantic import StrictInt
|
20
|
-
from typing import Any,
|
21
|
-
from
|
19
|
+
from pydantic import Field, StrictInt, StrictStr, field_validator
|
20
|
+
from typing import Any, Optional
|
21
|
+
from typing_extensions import Annotated
|
22
22
|
from crypticorn.trade.client.models.futures_trading_action_create import (
|
23
23
|
FuturesTradingActionCreate,
|
24
24
|
)
|
25
|
+
from crypticorn.trade.client.models.paginated_response_union_futures_trading_action_spot_trading_action import (
|
26
|
+
PaginatedResponseUnionFuturesTradingActionSpotTradingAction,
|
27
|
+
)
|
25
28
|
from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
|
26
29
|
from crypticorn.trade.client.models.spot_trading_action_create import (
|
27
30
|
SpotTradingActionCreate,
|
@@ -66,8 +69,33 @@ class TradingActionsApi:
|
|
66
69
|
@validate_call
|
67
70
|
def get_actions(
|
68
71
|
self,
|
69
|
-
|
70
|
-
|
72
|
+
sort_order: Annotated[
|
73
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
74
|
+
] = None,
|
75
|
+
sort_by: Annotated[
|
76
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
77
|
+
] = None,
|
78
|
+
filter_by: Annotated[
|
79
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
80
|
+
] = None,
|
81
|
+
filter_value: Annotated[
|
82
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
83
|
+
] = None,
|
84
|
+
page: Annotated[
|
85
|
+
Optional[StrictInt], Field(description="The current page number")
|
86
|
+
] = None,
|
87
|
+
page_size: Annotated[
|
88
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
89
|
+
Field(
|
90
|
+
description="The number of items per page. Default is 100, max is 1000."
|
91
|
+
),
|
92
|
+
] = None,
|
93
|
+
user_id: Annotated[
|
94
|
+
Optional[StrictStr],
|
95
|
+
Field(
|
96
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
97
|
+
),
|
98
|
+
] = None,
|
71
99
|
_request_timeout: Union[
|
72
100
|
None,
|
73
101
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -79,15 +107,17 @@ class TradingActionsApi:
|
|
79
107
|
_content_type: Optional[StrictStr] = None,
|
80
108
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
81
109
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
82
|
-
) ->
|
83
|
-
"""Get Actions
|
84
|
-
|
85
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
86
|
-
"""
|
110
|
+
) -> PaginatedResponseUnionFuturesTradingActionSpotTradingAction:
|
111
|
+
"""Get Actions"""
|
87
112
|
if self.is_sync:
|
88
113
|
return self._get_actions_sync(
|
89
|
-
|
90
|
-
|
114
|
+
sort_order=sort_order,
|
115
|
+
sort_by=sort_by,
|
116
|
+
filter_by=filter_by,
|
117
|
+
filter_value=filter_value,
|
118
|
+
page=page,
|
119
|
+
page_size=page_size,
|
120
|
+
user_id=user_id,
|
91
121
|
_request_timeout=_request_timeout,
|
92
122
|
_request_auth=_request_auth,
|
93
123
|
_content_type=_content_type,
|
@@ -97,8 +127,13 @@ class TradingActionsApi:
|
|
97
127
|
|
98
128
|
else:
|
99
129
|
return self._get_actions_async(
|
100
|
-
|
101
|
-
|
130
|
+
sort_order=sort_order,
|
131
|
+
sort_by=sort_by,
|
132
|
+
filter_by=filter_by,
|
133
|
+
filter_value=filter_value,
|
134
|
+
page=page,
|
135
|
+
page_size=page_size,
|
136
|
+
user_id=user_id,
|
102
137
|
_request_timeout=_request_timeout,
|
103
138
|
_request_auth=_request_auth,
|
104
139
|
_content_type=_content_type,
|
@@ -109,8 +144,33 @@ class TradingActionsApi:
|
|
109
144
|
@validate_call
|
110
145
|
def get_actions_with_http_info(
|
111
146
|
self,
|
112
|
-
|
113
|
-
|
147
|
+
sort_order: Annotated[
|
148
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
149
|
+
] = None,
|
150
|
+
sort_by: Annotated[
|
151
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
152
|
+
] = None,
|
153
|
+
filter_by: Annotated[
|
154
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
155
|
+
] = None,
|
156
|
+
filter_value: Annotated[
|
157
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
158
|
+
] = None,
|
159
|
+
page: Annotated[
|
160
|
+
Optional[StrictInt], Field(description="The current page number")
|
161
|
+
] = None,
|
162
|
+
page_size: Annotated[
|
163
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
164
|
+
Field(
|
165
|
+
description="The number of items per page. Default is 100, max is 1000."
|
166
|
+
),
|
167
|
+
] = None,
|
168
|
+
user_id: Annotated[
|
169
|
+
Optional[StrictStr],
|
170
|
+
Field(
|
171
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
172
|
+
),
|
173
|
+
] = None,
|
114
174
|
_request_timeout: Union[
|
115
175
|
None,
|
116
176
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -122,15 +182,17 @@ class TradingActionsApi:
|
|
122
182
|
_content_type: Optional[StrictStr] = None,
|
123
183
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
124
184
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
125
|
-
) -> ApiResponse[
|
126
|
-
"""Get Actions with HTTP info
|
127
|
-
|
128
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
129
|
-
"""
|
185
|
+
) -> ApiResponse[PaginatedResponseUnionFuturesTradingActionSpotTradingAction]:
|
186
|
+
"""Get Actions with HTTP info"""
|
130
187
|
if self.is_sync:
|
131
188
|
return self._get_actions_sync_with_http_info(
|
132
|
-
|
133
|
-
|
189
|
+
sort_order=sort_order,
|
190
|
+
sort_by=sort_by,
|
191
|
+
filter_by=filter_by,
|
192
|
+
filter_value=filter_value,
|
193
|
+
page=page,
|
194
|
+
page_size=page_size,
|
195
|
+
user_id=user_id,
|
134
196
|
_request_timeout=_request_timeout,
|
135
197
|
_request_auth=_request_auth,
|
136
198
|
_content_type=_content_type,
|
@@ -140,8 +202,13 @@ class TradingActionsApi:
|
|
140
202
|
|
141
203
|
else:
|
142
204
|
return self._get_actions_async_with_http_info(
|
143
|
-
|
144
|
-
|
205
|
+
sort_order=sort_order,
|
206
|
+
sort_by=sort_by,
|
207
|
+
filter_by=filter_by,
|
208
|
+
filter_value=filter_value,
|
209
|
+
page=page,
|
210
|
+
page_size=page_size,
|
211
|
+
user_id=user_id,
|
145
212
|
_request_timeout=_request_timeout,
|
146
213
|
_request_auth=_request_auth,
|
147
214
|
_content_type=_content_type,
|
@@ -152,8 +219,33 @@ class TradingActionsApi:
|
|
152
219
|
@validate_call
|
153
220
|
def get_actions_without_preload_content(
|
154
221
|
self,
|
155
|
-
|
156
|
-
|
222
|
+
sort_order: Annotated[
|
223
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
224
|
+
] = None,
|
225
|
+
sort_by: Annotated[
|
226
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
227
|
+
] = None,
|
228
|
+
filter_by: Annotated[
|
229
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
230
|
+
] = None,
|
231
|
+
filter_value: Annotated[
|
232
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
233
|
+
] = None,
|
234
|
+
page: Annotated[
|
235
|
+
Optional[StrictInt], Field(description="The current page number")
|
236
|
+
] = None,
|
237
|
+
page_size: Annotated[
|
238
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
239
|
+
Field(
|
240
|
+
description="The number of items per page. Default is 100, max is 1000."
|
241
|
+
),
|
242
|
+
] = None,
|
243
|
+
user_id: Annotated[
|
244
|
+
Optional[StrictStr],
|
245
|
+
Field(
|
246
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
247
|
+
),
|
248
|
+
] = None,
|
157
249
|
_request_timeout: Union[
|
158
250
|
None,
|
159
251
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -166,14 +258,16 @@ class TradingActionsApi:
|
|
166
258
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
167
259
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
168
260
|
) -> RESTResponseType:
|
169
|
-
"""Get Actions without preloading content
|
170
|
-
|
171
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
172
|
-
"""
|
261
|
+
"""Get Actions without preloading content"""
|
173
262
|
if self.is_sync:
|
174
263
|
return self._get_actions_sync_without_preload_content(
|
175
|
-
|
176
|
-
|
264
|
+
sort_order=sort_order,
|
265
|
+
sort_by=sort_by,
|
266
|
+
filter_by=filter_by,
|
267
|
+
filter_value=filter_value,
|
268
|
+
page=page,
|
269
|
+
page_size=page_size,
|
270
|
+
user_id=user_id,
|
177
271
|
_request_timeout=_request_timeout,
|
178
272
|
_request_auth=_request_auth,
|
179
273
|
_content_type=_content_type,
|
@@ -183,8 +277,13 @@ class TradingActionsApi:
|
|
183
277
|
|
184
278
|
else:
|
185
279
|
return self._get_actions_async_without_preload_content(
|
186
|
-
|
187
|
-
|
280
|
+
sort_order=sort_order,
|
281
|
+
sort_by=sort_by,
|
282
|
+
filter_by=filter_by,
|
283
|
+
filter_value=filter_value,
|
284
|
+
page=page,
|
285
|
+
page_size=page_size,
|
286
|
+
user_id=user_id,
|
188
287
|
_request_timeout=_request_timeout,
|
189
288
|
_request_auth=_request_auth,
|
190
289
|
_content_type=_content_type,
|
@@ -196,8 +295,33 @@ class TradingActionsApi:
|
|
196
295
|
@validate_call
|
197
296
|
async def _get_actions_async(
|
198
297
|
self,
|
199
|
-
|
200
|
-
|
298
|
+
sort_order: Annotated[
|
299
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
300
|
+
] = None,
|
301
|
+
sort_by: Annotated[
|
302
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
303
|
+
] = None,
|
304
|
+
filter_by: Annotated[
|
305
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
306
|
+
] = None,
|
307
|
+
filter_value: Annotated[
|
308
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
309
|
+
] = None,
|
310
|
+
page: Annotated[
|
311
|
+
Optional[StrictInt], Field(description="The current page number")
|
312
|
+
] = None,
|
313
|
+
page_size: Annotated[
|
314
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
315
|
+
Field(
|
316
|
+
description="The number of items per page. Default is 100, max is 1000."
|
317
|
+
),
|
318
|
+
] = None,
|
319
|
+
user_id: Annotated[
|
320
|
+
Optional[StrictStr],
|
321
|
+
Field(
|
322
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
323
|
+
),
|
324
|
+
] = None,
|
201
325
|
_request_timeout: Union[
|
202
326
|
None,
|
203
327
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -209,14 +333,25 @@ class TradingActionsApi:
|
|
209
333
|
_content_type: Optional[StrictStr] = None,
|
210
334
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
211
335
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
212
|
-
) ->
|
336
|
+
) -> PaginatedResponseUnionFuturesTradingActionSpotTradingAction:
|
213
337
|
"""Get Actions
|
214
338
|
|
215
|
-
|
216
|
-
|
217
|
-
:
|
218
|
-
:
|
219
|
-
:
|
339
|
+
Get all trading actions
|
340
|
+
|
341
|
+
:param sort_order: The order to sort by
|
342
|
+
:type sort_order: str
|
343
|
+
:param sort_by: The field to sort by
|
344
|
+
:type sort_by: str
|
345
|
+
:param filter_by: The field to filter by
|
346
|
+
:type filter_by: str
|
347
|
+
:param filter_value: The value to filter with
|
348
|
+
:type filter_value: str
|
349
|
+
:param page: The current page number
|
350
|
+
:type page: int
|
351
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
352
|
+
:type page_size: int
|
353
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
354
|
+
:type user_id: str
|
220
355
|
:param _request_timeout: timeout setting for this request. If one
|
221
356
|
number provided, it will be total request
|
222
357
|
timeout. It can also be a pair (tuple) of
|
@@ -240,8 +375,13 @@ class TradingActionsApi:
|
|
240
375
|
""" # noqa: E501
|
241
376
|
|
242
377
|
_param = self._get_actions_serialize(
|
243
|
-
|
244
|
-
|
378
|
+
sort_order=sort_order,
|
379
|
+
sort_by=sort_by,
|
380
|
+
filter_by=filter_by,
|
381
|
+
filter_value=filter_value,
|
382
|
+
page=page,
|
383
|
+
page_size=page_size,
|
384
|
+
user_id=user_id,
|
245
385
|
_request_auth=_request_auth,
|
246
386
|
_content_type=_content_type,
|
247
387
|
_headers=_headers,
|
@@ -249,7 +389,7 @@ class TradingActionsApi:
|
|
249
389
|
)
|
250
390
|
|
251
391
|
_response_types_map: Dict[str, Optional[str]] = {
|
252
|
-
"200": "
|
392
|
+
"200": "PaginatedResponseUnionFuturesTradingActionSpotTradingAction",
|
253
393
|
}
|
254
394
|
response_data = await self.api_client.call_api(
|
255
395
|
*_param, _request_timeout=_request_timeout
|
@@ -263,8 +403,33 @@ class TradingActionsApi:
|
|
263
403
|
@validate_call
|
264
404
|
async def _get_actions_async_with_http_info(
|
265
405
|
self,
|
266
|
-
|
267
|
-
|
406
|
+
sort_order: Annotated[
|
407
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
408
|
+
] = None,
|
409
|
+
sort_by: Annotated[
|
410
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
411
|
+
] = None,
|
412
|
+
filter_by: Annotated[
|
413
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
414
|
+
] = None,
|
415
|
+
filter_value: Annotated[
|
416
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
417
|
+
] = None,
|
418
|
+
page: Annotated[
|
419
|
+
Optional[StrictInt], Field(description="The current page number")
|
420
|
+
] = None,
|
421
|
+
page_size: Annotated[
|
422
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
423
|
+
Field(
|
424
|
+
description="The number of items per page. Default is 100, max is 1000."
|
425
|
+
),
|
426
|
+
] = None,
|
427
|
+
user_id: Annotated[
|
428
|
+
Optional[StrictStr],
|
429
|
+
Field(
|
430
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
431
|
+
),
|
432
|
+
] = None,
|
268
433
|
_request_timeout: Union[
|
269
434
|
None,
|
270
435
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -276,14 +441,25 @@ class TradingActionsApi:
|
|
276
441
|
_content_type: Optional[StrictStr] = None,
|
277
442
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
278
443
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
279
|
-
) -> ApiResponse[
|
444
|
+
) -> ApiResponse[PaginatedResponseUnionFuturesTradingActionSpotTradingAction]:
|
280
445
|
"""Get Actions
|
281
446
|
|
282
|
-
|
283
|
-
|
284
|
-
:
|
285
|
-
:
|
286
|
-
:
|
447
|
+
Get all trading actions
|
448
|
+
|
449
|
+
:param sort_order: The order to sort by
|
450
|
+
:type sort_order: str
|
451
|
+
:param sort_by: The field to sort by
|
452
|
+
:type sort_by: str
|
453
|
+
:param filter_by: The field to filter by
|
454
|
+
:type filter_by: str
|
455
|
+
:param filter_value: The value to filter with
|
456
|
+
:type filter_value: str
|
457
|
+
:param page: The current page number
|
458
|
+
:type page: int
|
459
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
460
|
+
:type page_size: int
|
461
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
462
|
+
:type user_id: str
|
287
463
|
:param _request_timeout: timeout setting for this request. If one
|
288
464
|
number provided, it will be total request
|
289
465
|
timeout. It can also be a pair (tuple) of
|
@@ -307,8 +483,13 @@ class TradingActionsApi:
|
|
307
483
|
""" # noqa: E501
|
308
484
|
|
309
485
|
_param = self._get_actions_serialize(
|
310
|
-
|
311
|
-
|
486
|
+
sort_order=sort_order,
|
487
|
+
sort_by=sort_by,
|
488
|
+
filter_by=filter_by,
|
489
|
+
filter_value=filter_value,
|
490
|
+
page=page,
|
491
|
+
page_size=page_size,
|
492
|
+
user_id=user_id,
|
312
493
|
_request_auth=_request_auth,
|
313
494
|
_content_type=_content_type,
|
314
495
|
_headers=_headers,
|
@@ -316,7 +497,7 @@ class TradingActionsApi:
|
|
316
497
|
)
|
317
498
|
|
318
499
|
_response_types_map: Dict[str, Optional[str]] = {
|
319
|
-
"200": "
|
500
|
+
"200": "PaginatedResponseUnionFuturesTradingActionSpotTradingAction",
|
320
501
|
}
|
321
502
|
response_data = await self.api_client.call_api(
|
322
503
|
*_param, _request_timeout=_request_timeout
|
@@ -329,8 +510,33 @@ class TradingActionsApi:
|
|
329
510
|
@validate_call
|
330
511
|
async def _get_actions_async_without_preload_content(
|
331
512
|
self,
|
332
|
-
|
333
|
-
|
513
|
+
sort_order: Annotated[
|
514
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
515
|
+
] = None,
|
516
|
+
sort_by: Annotated[
|
517
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
518
|
+
] = None,
|
519
|
+
filter_by: Annotated[
|
520
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
521
|
+
] = None,
|
522
|
+
filter_value: Annotated[
|
523
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
524
|
+
] = None,
|
525
|
+
page: Annotated[
|
526
|
+
Optional[StrictInt], Field(description="The current page number")
|
527
|
+
] = None,
|
528
|
+
page_size: Annotated[
|
529
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
530
|
+
Field(
|
531
|
+
description="The number of items per page. Default is 100, max is 1000."
|
532
|
+
),
|
533
|
+
] = None,
|
534
|
+
user_id: Annotated[
|
535
|
+
Optional[StrictStr],
|
536
|
+
Field(
|
537
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
538
|
+
),
|
539
|
+
] = None,
|
334
540
|
_request_timeout: Union[
|
335
541
|
None,
|
336
542
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -345,11 +551,22 @@ class TradingActionsApi:
|
|
345
551
|
) -> RESTResponseType:
|
346
552
|
"""Get Actions
|
347
553
|
|
348
|
-
|
349
|
-
|
350
|
-
:
|
351
|
-
:
|
352
|
-
:
|
554
|
+
Get all trading actions
|
555
|
+
|
556
|
+
:param sort_order: The order to sort by
|
557
|
+
:type sort_order: str
|
558
|
+
:param sort_by: The field to sort by
|
559
|
+
:type sort_by: str
|
560
|
+
:param filter_by: The field to filter by
|
561
|
+
:type filter_by: str
|
562
|
+
:param filter_value: The value to filter with
|
563
|
+
:type filter_value: str
|
564
|
+
:param page: The current page number
|
565
|
+
:type page: int
|
566
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
567
|
+
:type page_size: int
|
568
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
569
|
+
:type user_id: str
|
353
570
|
:param _request_timeout: timeout setting for this request. If one
|
354
571
|
number provided, it will be total request
|
355
572
|
timeout. It can also be a pair (tuple) of
|
@@ -373,8 +590,13 @@ class TradingActionsApi:
|
|
373
590
|
""" # noqa: E501
|
374
591
|
|
375
592
|
_param = self._get_actions_serialize(
|
376
|
-
|
377
|
-
|
593
|
+
sort_order=sort_order,
|
594
|
+
sort_by=sort_by,
|
595
|
+
filter_by=filter_by,
|
596
|
+
filter_value=filter_value,
|
597
|
+
page=page,
|
598
|
+
page_size=page_size,
|
599
|
+
user_id=user_id,
|
378
600
|
_request_auth=_request_auth,
|
379
601
|
_content_type=_content_type,
|
380
602
|
_headers=_headers,
|
@@ -382,7 +604,7 @@ class TradingActionsApi:
|
|
382
604
|
)
|
383
605
|
|
384
606
|
_response_types_map: Dict[str, Optional[str]] = {
|
385
|
-
"200": "
|
607
|
+
"200": "PaginatedResponseUnionFuturesTradingActionSpotTradingAction",
|
386
608
|
}
|
387
609
|
response_data = await self.api_client.call_api(
|
388
610
|
*_param, _request_timeout=_request_timeout
|
@@ -393,8 +615,33 @@ class TradingActionsApi:
|
|
393
615
|
@validate_call
|
394
616
|
def _get_actions_sync(
|
395
617
|
self,
|
396
|
-
|
397
|
-
|
618
|
+
sort_order: Annotated[
|
619
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
620
|
+
] = None,
|
621
|
+
sort_by: Annotated[
|
622
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
623
|
+
] = None,
|
624
|
+
filter_by: Annotated[
|
625
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
626
|
+
] = None,
|
627
|
+
filter_value: Annotated[
|
628
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
629
|
+
] = None,
|
630
|
+
page: Annotated[
|
631
|
+
Optional[StrictInt], Field(description="The current page number")
|
632
|
+
] = None,
|
633
|
+
page_size: Annotated[
|
634
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
635
|
+
Field(
|
636
|
+
description="The number of items per page. Default is 100, max is 1000."
|
637
|
+
),
|
638
|
+
] = None,
|
639
|
+
user_id: Annotated[
|
640
|
+
Optional[StrictStr],
|
641
|
+
Field(
|
642
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
643
|
+
),
|
644
|
+
] = None,
|
398
645
|
_request_timeout: Union[
|
399
646
|
None,
|
400
647
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -406,11 +653,16 @@ class TradingActionsApi:
|
|
406
653
|
_content_type: Optional[StrictStr] = None,
|
407
654
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
408
655
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
409
|
-
) ->
|
656
|
+
) -> PaginatedResponseUnionFuturesTradingActionSpotTradingAction:
|
410
657
|
"""Synchronous version of get_actions"""
|
411
658
|
return async_to_sync(self._get_actions_async)(
|
412
|
-
|
413
|
-
|
659
|
+
sort_order=sort_order,
|
660
|
+
sort_by=sort_by,
|
661
|
+
filter_by=filter_by,
|
662
|
+
filter_value=filter_value,
|
663
|
+
page=page,
|
664
|
+
page_size=page_size,
|
665
|
+
user_id=user_id,
|
414
666
|
_request_timeout=_request_timeout,
|
415
667
|
_request_auth=_request_auth,
|
416
668
|
_content_type=_content_type,
|
@@ -421,8 +673,33 @@ class TradingActionsApi:
|
|
421
673
|
@validate_call
|
422
674
|
def _get_actions_sync_with_http_info(
|
423
675
|
self,
|
424
|
-
|
425
|
-
|
676
|
+
sort_order: Annotated[
|
677
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
678
|
+
] = None,
|
679
|
+
sort_by: Annotated[
|
680
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
681
|
+
] = None,
|
682
|
+
filter_by: Annotated[
|
683
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
684
|
+
] = None,
|
685
|
+
filter_value: Annotated[
|
686
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
687
|
+
] = None,
|
688
|
+
page: Annotated[
|
689
|
+
Optional[StrictInt], Field(description="The current page number")
|
690
|
+
] = None,
|
691
|
+
page_size: Annotated[
|
692
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
693
|
+
Field(
|
694
|
+
description="The number of items per page. Default is 100, max is 1000."
|
695
|
+
),
|
696
|
+
] = None,
|
697
|
+
user_id: Annotated[
|
698
|
+
Optional[StrictStr],
|
699
|
+
Field(
|
700
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
701
|
+
),
|
702
|
+
] = None,
|
426
703
|
_request_timeout: Union[
|
427
704
|
None,
|
428
705
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -434,11 +711,16 @@ class TradingActionsApi:
|
|
434
711
|
_content_type: Optional[StrictStr] = None,
|
435
712
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
436
713
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
437
|
-
) -> ApiResponse[
|
714
|
+
) -> ApiResponse[PaginatedResponseUnionFuturesTradingActionSpotTradingAction]:
|
438
715
|
"""Synchronous version of get_actions_with_http_info"""
|
439
716
|
return async_to_sync(self._get_actions_async_with_http_info)(
|
440
|
-
|
441
|
-
|
717
|
+
sort_order=sort_order,
|
718
|
+
sort_by=sort_by,
|
719
|
+
filter_by=filter_by,
|
720
|
+
filter_value=filter_value,
|
721
|
+
page=page,
|
722
|
+
page_size=page_size,
|
723
|
+
user_id=user_id,
|
442
724
|
_request_timeout=_request_timeout,
|
443
725
|
_request_auth=_request_auth,
|
444
726
|
_content_type=_content_type,
|
@@ -449,8 +731,33 @@ class TradingActionsApi:
|
|
449
731
|
@validate_call
|
450
732
|
def _get_actions_sync_without_preload_content(
|
451
733
|
self,
|
452
|
-
|
453
|
-
|
734
|
+
sort_order: Annotated[
|
735
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
736
|
+
] = None,
|
737
|
+
sort_by: Annotated[
|
738
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
739
|
+
] = None,
|
740
|
+
filter_by: Annotated[
|
741
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
742
|
+
] = None,
|
743
|
+
filter_value: Annotated[
|
744
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
745
|
+
] = None,
|
746
|
+
page: Annotated[
|
747
|
+
Optional[StrictInt], Field(description="The current page number")
|
748
|
+
] = None,
|
749
|
+
page_size: Annotated[
|
750
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
751
|
+
Field(
|
752
|
+
description="The number of items per page. Default is 100, max is 1000."
|
753
|
+
),
|
754
|
+
] = None,
|
755
|
+
user_id: Annotated[
|
756
|
+
Optional[StrictStr],
|
757
|
+
Field(
|
758
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
759
|
+
),
|
760
|
+
] = None,
|
454
761
|
_request_timeout: Union[
|
455
762
|
None,
|
456
763
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -465,8 +772,13 @@ class TradingActionsApi:
|
|
465
772
|
) -> RESTResponseType:
|
466
773
|
"""Synchronous version of get_actions_without_preload_content"""
|
467
774
|
return async_to_sync(self._get_actions_async_without_preload_content)(
|
468
|
-
|
469
|
-
|
775
|
+
sort_order=sort_order,
|
776
|
+
sort_by=sort_by,
|
777
|
+
filter_by=filter_by,
|
778
|
+
filter_value=filter_value,
|
779
|
+
page=page,
|
780
|
+
page_size=page_size,
|
781
|
+
user_id=user_id,
|
470
782
|
_request_timeout=_request_timeout,
|
471
783
|
_request_auth=_request_auth,
|
472
784
|
_content_type=_content_type,
|
@@ -476,8 +788,13 @@ class TradingActionsApi:
|
|
476
788
|
|
477
789
|
def _get_actions_serialize(
|
478
790
|
self,
|
479
|
-
|
480
|
-
|
791
|
+
sort_order,
|
792
|
+
sort_by,
|
793
|
+
filter_by,
|
794
|
+
filter_value,
|
795
|
+
page,
|
796
|
+
page_size,
|
797
|
+
user_id,
|
481
798
|
_request_auth,
|
482
799
|
_content_type,
|
483
800
|
_headers,
|
@@ -499,13 +816,33 @@ class TradingActionsApi:
|
|
499
816
|
|
500
817
|
# process the path parameters
|
501
818
|
# process the query parameters
|
502
|
-
if
|
819
|
+
if sort_order is not None:
|
820
|
+
|
821
|
+
_query_params.append(("sort_order", sort_order))
|
822
|
+
|
823
|
+
if sort_by is not None:
|
824
|
+
|
825
|
+
_query_params.append(("sort_by", sort_by))
|
826
|
+
|
827
|
+
if filter_by is not None:
|
828
|
+
|
829
|
+
_query_params.append(("filter_by", filter_by))
|
830
|
+
|
831
|
+
if filter_value is not None:
|
832
|
+
|
833
|
+
_query_params.append(("filter_value", filter_value))
|
503
834
|
|
504
|
-
|
835
|
+
if page is not None:
|
505
836
|
|
506
|
-
|
837
|
+
_query_params.append(("page", page))
|
507
838
|
|
508
|
-
|
839
|
+
if page_size is not None:
|
840
|
+
|
841
|
+
_query_params.append(("page_size", page_size))
|
842
|
+
|
843
|
+
if user_id is not None:
|
844
|
+
|
845
|
+
_query_params.append(("user_id", user_id))
|
509
846
|
|
510
847
|
# process the header parameters
|
511
848
|
# process the form parameters
|
@@ -518,7 +855,7 @@ class TradingActionsApi:
|
|
518
855
|
)
|
519
856
|
|
520
857
|
# authentication setting
|
521
|
-
_auth_settings: List[str] = ["HTTPBearer"]
|
858
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
522
859
|
|
523
860
|
return self.api_client.param_serialize(
|
524
861
|
method="GET",
|
@@ -551,10 +888,7 @@ class TradingActionsApi:
|
|
551
888
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
552
889
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
553
890
|
) -> PostFuturesAction:
|
554
|
-
"""Post Futures Action
|
555
|
-
|
556
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
557
|
-
"""
|
891
|
+
"""Post Futures Action"""
|
558
892
|
if self.is_sync:
|
559
893
|
return self._post_futures_action_sync(
|
560
894
|
futures_trading_action_create=futures_trading_action_create,
|
@@ -591,10 +925,7 @@ class TradingActionsApi:
|
|
591
925
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
592
926
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
593
927
|
) -> ApiResponse[PostFuturesAction]:
|
594
|
-
"""Post Futures Action with HTTP info
|
595
|
-
|
596
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
597
|
-
"""
|
928
|
+
"""Post Futures Action with HTTP info"""
|
598
929
|
if self.is_sync:
|
599
930
|
return self._post_futures_action_sync_with_http_info(
|
600
931
|
futures_trading_action_create=futures_trading_action_create,
|
@@ -631,10 +962,7 @@ class TradingActionsApi:
|
|
631
962
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
632
963
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
633
964
|
) -> RESTResponseType:
|
634
|
-
"""Post Futures Action without preloading content
|
635
|
-
|
636
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
637
|
-
"""
|
965
|
+
"""Post Futures Action without preloading content"""
|
638
966
|
if self.is_sync:
|
639
967
|
return self._post_futures_action_sync_without_preload_content(
|
640
968
|
futures_trading_action_create=futures_trading_action_create,
|
@@ -1002,10 +1330,7 @@ class TradingActionsApi:
|
|
1002
1330
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1003
1331
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1004
1332
|
) -> object:
|
1005
|
-
"""Post Spot Action
|
1006
|
-
|
1007
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
1008
|
-
"""
|
1333
|
+
"""Post Spot Action"""
|
1009
1334
|
if self.is_sync:
|
1010
1335
|
return self._post_spot_action_sync(
|
1011
1336
|
spot_trading_action_create=spot_trading_action_create,
|
@@ -1042,10 +1367,7 @@ class TradingActionsApi:
|
|
1042
1367
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1043
1368
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1044
1369
|
) -> ApiResponse[object]:
|
1045
|
-
"""Post Spot Action with HTTP info
|
1046
|
-
|
1047
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
1048
|
-
"""
|
1370
|
+
"""Post Spot Action with HTTP info"""
|
1049
1371
|
if self.is_sync:
|
1050
1372
|
return self._post_spot_action_sync_with_http_info(
|
1051
1373
|
spot_trading_action_create=spot_trading_action_create,
|
@@ -1082,10 +1404,7 @@ class TradingActionsApi:
|
|
1082
1404
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1083
1405
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1084
1406
|
) -> RESTResponseType:
|
1085
|
-
"""Post Spot Action without preloading content
|
1086
|
-
|
1087
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
1088
|
-
"""
|
1407
|
+
"""Post Spot Action without preloading content"""
|
1089
1408
|
if self.is_sync:
|
1090
1409
|
return self._post_spot_action_sync_without_preload_content(
|
1091
1410
|
spot_trading_action_create=spot_trading_action_create,
|