crypticorn 2.17.0rc6__py3-none-any.whl → 2.18.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/auth/client/api/admin_api.py +2 -0
- crypticorn/auth/client/api/auth_api.py +1417 -545
- crypticorn/auth/client/api/service_api.py +4 -0
- crypticorn/auth/client/api/user_api.py +4 -0
- crypticorn/auth/client/api/wallet_api.py +4 -0
- crypticorn/auth/client/api_client.py +5 -0
- crypticorn/auth/client/configuration.py +2 -2
- crypticorn/auth/client/models/add_wallet_request.py +1 -1
- crypticorn/auth/client/models/authorize_user_request.py +1 -1
- crypticorn/auth/client/models/create_api_key_request.py +3 -3
- crypticorn/auth/client/models/create_user_request.py +1 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +3 -3
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +1 -1
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +1 -1
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +1 -1
- crypticorn/auth/client/models/list_wallets200_response_data_inner.py +1 -1
- crypticorn/auth/client/models/logout_default_response.py +1 -1
- crypticorn/auth/client/models/oauth_callback200_response_user.py +1 -1
- crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +1 -1
- crypticorn/auth/client/models/rotate_tokens200_response.py +1 -1
- crypticorn/auth/client/models/token_info200_response.py +1 -1
- crypticorn/auth/client/models/update_user_request.py +1 -1
- crypticorn/auth/client/models/user_by_username200_response.py +1 -1
- crypticorn/auth/client/models/verify200_response.py +1 -1
- crypticorn/auth/client/models/verify_email200_response_auth.py +1 -1
- crypticorn/auth/client/models/verify_email200_response_auth_auth.py +1 -1
- crypticorn/auth/client/models/whoami200_response.py +1 -1
- crypticorn/common/__init__.py +11 -11
- crypticorn/common/auth.py +109 -57
- crypticorn/common/decorators.py +1 -1
- crypticorn/common/enums.py +1 -0
- crypticorn/common/errors.py +7 -21
- crypticorn/common/exceptions.py +33 -17
- crypticorn/common/logging.py +5 -4
- crypticorn/common/metrics.py +17 -5
- crypticorn/common/middleware.py +61 -12
- crypticorn/common/mixins.py +2 -1
- crypticorn/common/pagination.py +3 -2
- crypticorn/common/router/admin_router.py +17 -6
- crypticorn/common/router/status_router.py +3 -29
- crypticorn/common/utils.py +6 -6
- crypticorn/common/warnings.py +1 -0
- crypticorn/dex/client/api/admin_api.py +3 -0
- crypticorn/dex/client/api/signals_api.py +27 -23
- crypticorn/dex/client/api/status_api.py +3 -0
- crypticorn/dex/client/api_client.py +5 -0
- crypticorn/dex/client/configuration.py +2 -2
- crypticorn/dex/client/models/exception_detail.py +1 -1
- crypticorn/dex/client/models/paginated_response_signal_with_token.py +1 -1
- crypticorn/dex/client/models/signal_overview_stats.py +4 -2
- crypticorn/dex/client/models/signal_volume.py +4 -4
- crypticorn/dex/client/models/signal_with_token.py +2 -2
- crypticorn/dex/client/models/token_detail.py +1 -1
- crypticorn/klines/main.py +1 -1
- crypticorn/metrics/main.py +1 -1
- crypticorn/trade/client/__init__.py +1 -7
- crypticorn/trade/client/api/admin_api.py +0 -402
- crypticorn/trade/client/api/trading_actions_api.py +86 -315
- crypticorn/trade/client/models/__init__.py +1 -7
- crypticorn/trade/client/models/actions_count.py +88 -0
- crypticorn/trade/client/models/api_error_identifier.py +1 -0
- crypticorn/trade/client/models/exchange_key.py +1 -1
- crypticorn/trade/client/models/exchange_key_balance.py +1 -1
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/notification_create.py +1 -1
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/spot_balance.py +6 -7
- crypticorn/trade/client/models/tpsl.py +4 -19
- crypticorn/trade/client/models/tpsl_create.py +6 -19
- {crypticorn-2.17.0rc6.dist-info → crypticorn-2.18.0.dist-info}/METADATA +1 -1
- {crypticorn-2.17.0rc6.dist-info → crypticorn-2.18.0.dist-info}/RECORD +75 -77
- crypticorn/trade/client/models/paginated_response_union_futures_trading_action_spot_trading_action.py +0 -141
- crypticorn/trade/client/models/paginated_response_union_futures_trading_action_spot_trading_action_data_inner.py +0 -165
- crypticorn/trade/client/models/spot_trading_action.py +0 -207
- {crypticorn-2.17.0rc6.dist-info → crypticorn-2.18.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc6.dist-info → crypticorn-2.18.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc6.dist-info → crypticorn-2.18.0.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc6.dist-info → crypticorn-2.18.0.dist-info}/top_level.txt +0 -0
@@ -16,15 +16,13 @@ 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 Field,
|
20
|
-
from typing import Any, Optional
|
19
|
+
from pydantic import Field, StrictStr, field_validator
|
20
|
+
from typing import Any, List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
+
from crypticorn.trade.client.models.actions_count import ActionsCount
|
22
23
|
from crypticorn.trade.client.models.futures_trading_action_create import (
|
23
24
|
FuturesTradingActionCreate,
|
24
25
|
)
|
25
|
-
from crypticorn.trade.client.models.paginated_response_union_futures_trading_action_spot_trading_action import (
|
26
|
-
PaginatedResponseUnionFuturesTradingActionSpotTradingAction,
|
27
|
-
)
|
28
26
|
from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
|
29
27
|
from crypticorn.trade.client.models.spot_trading_action_create import (
|
30
28
|
SpotTradingActionCreate,
|
@@ -67,7 +65,7 @@ class TradingActionsApi:
|
|
67
65
|
self.is_sync = is_sync
|
68
66
|
|
69
67
|
@validate_call
|
70
|
-
def
|
68
|
+
def get_actions_count(
|
71
69
|
self,
|
72
70
|
sort_order: Annotated[
|
73
71
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -75,25 +73,10 @@ class TradingActionsApi:
|
|
75
73
|
sort_by: Annotated[
|
76
74
|
Optional[StrictStr], Field(description="The field to sort by")
|
77
75
|
] = None,
|
78
|
-
|
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[
|
76
|
+
group_by: Annotated[
|
94
77
|
Optional[StrictStr],
|
95
78
|
Field(
|
96
|
-
description="The
|
79
|
+
description="The group by period for the actions count. Defaults to day."
|
97
80
|
),
|
98
81
|
] = None,
|
99
82
|
_request_timeout: Union[
|
@@ -107,17 +90,13 @@ class TradingActionsApi:
|
|
107
90
|
_content_type: Optional[StrictStr] = None,
|
108
91
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
109
92
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
110
|
-
) ->
|
111
|
-
"""Get Actions"""
|
93
|
+
) -> List[ActionsCount]:
|
94
|
+
"""Get Actions Count"""
|
112
95
|
if self.is_sync:
|
113
|
-
return self.
|
96
|
+
return self._get_actions_count_sync(
|
114
97
|
sort_order=sort_order,
|
115
98
|
sort_by=sort_by,
|
116
|
-
|
117
|
-
filter_value=filter_value,
|
118
|
-
page=page,
|
119
|
-
page_size=page_size,
|
120
|
-
user_id=user_id,
|
99
|
+
group_by=group_by,
|
121
100
|
_request_timeout=_request_timeout,
|
122
101
|
_request_auth=_request_auth,
|
123
102
|
_content_type=_content_type,
|
@@ -126,14 +105,10 @@ class TradingActionsApi:
|
|
126
105
|
)
|
127
106
|
|
128
107
|
else:
|
129
|
-
return self.
|
108
|
+
return self._get_actions_count_async(
|
130
109
|
sort_order=sort_order,
|
131
110
|
sort_by=sort_by,
|
132
|
-
|
133
|
-
filter_value=filter_value,
|
134
|
-
page=page,
|
135
|
-
page_size=page_size,
|
136
|
-
user_id=user_id,
|
111
|
+
group_by=group_by,
|
137
112
|
_request_timeout=_request_timeout,
|
138
113
|
_request_auth=_request_auth,
|
139
114
|
_content_type=_content_type,
|
@@ -142,7 +117,7 @@ class TradingActionsApi:
|
|
142
117
|
)
|
143
118
|
|
144
119
|
@validate_call
|
145
|
-
def
|
120
|
+
def get_actions_count_with_http_info(
|
146
121
|
self,
|
147
122
|
sort_order: Annotated[
|
148
123
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -150,25 +125,10 @@ class TradingActionsApi:
|
|
150
125
|
sort_by: Annotated[
|
151
126
|
Optional[StrictStr], Field(description="The field to sort by")
|
152
127
|
] = None,
|
153
|
-
|
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[
|
128
|
+
group_by: Annotated[
|
169
129
|
Optional[StrictStr],
|
170
130
|
Field(
|
171
|
-
description="The
|
131
|
+
description="The group by period for the actions count. Defaults to day."
|
172
132
|
),
|
173
133
|
] = None,
|
174
134
|
_request_timeout: Union[
|
@@ -182,17 +142,13 @@ class TradingActionsApi:
|
|
182
142
|
_content_type: Optional[StrictStr] = None,
|
183
143
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
184
144
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
185
|
-
) -> ApiResponse[
|
186
|
-
"""Get Actions with HTTP info"""
|
145
|
+
) -> ApiResponse[List[ActionsCount]]:
|
146
|
+
"""Get Actions Count with HTTP info"""
|
187
147
|
if self.is_sync:
|
188
|
-
return self.
|
148
|
+
return self._get_actions_count_sync_with_http_info(
|
189
149
|
sort_order=sort_order,
|
190
150
|
sort_by=sort_by,
|
191
|
-
|
192
|
-
filter_value=filter_value,
|
193
|
-
page=page,
|
194
|
-
page_size=page_size,
|
195
|
-
user_id=user_id,
|
151
|
+
group_by=group_by,
|
196
152
|
_request_timeout=_request_timeout,
|
197
153
|
_request_auth=_request_auth,
|
198
154
|
_content_type=_content_type,
|
@@ -201,14 +157,10 @@ class TradingActionsApi:
|
|
201
157
|
)
|
202
158
|
|
203
159
|
else:
|
204
|
-
return self.
|
160
|
+
return self._get_actions_count_async_with_http_info(
|
205
161
|
sort_order=sort_order,
|
206
162
|
sort_by=sort_by,
|
207
|
-
|
208
|
-
filter_value=filter_value,
|
209
|
-
page=page,
|
210
|
-
page_size=page_size,
|
211
|
-
user_id=user_id,
|
163
|
+
group_by=group_by,
|
212
164
|
_request_timeout=_request_timeout,
|
213
165
|
_request_auth=_request_auth,
|
214
166
|
_content_type=_content_type,
|
@@ -217,7 +169,7 @@ class TradingActionsApi:
|
|
217
169
|
)
|
218
170
|
|
219
171
|
@validate_call
|
220
|
-
def
|
172
|
+
def get_actions_count_without_preload_content(
|
221
173
|
self,
|
222
174
|
sort_order: Annotated[
|
223
175
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -225,25 +177,10 @@ class TradingActionsApi:
|
|
225
177
|
sort_by: Annotated[
|
226
178
|
Optional[StrictStr], Field(description="The field to sort by")
|
227
179
|
] = None,
|
228
|
-
|
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[
|
180
|
+
group_by: Annotated[
|
244
181
|
Optional[StrictStr],
|
245
182
|
Field(
|
246
|
-
description="The
|
183
|
+
description="The group by period for the actions count. Defaults to day."
|
247
184
|
),
|
248
185
|
] = None,
|
249
186
|
_request_timeout: Union[
|
@@ -258,16 +195,12 @@ class TradingActionsApi:
|
|
258
195
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
259
196
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
260
197
|
) -> RESTResponseType:
|
261
|
-
"""Get Actions without preloading content"""
|
198
|
+
"""Get Actions Count without preloading content"""
|
262
199
|
if self.is_sync:
|
263
|
-
return self.
|
200
|
+
return self._get_actions_count_sync_without_preload_content(
|
264
201
|
sort_order=sort_order,
|
265
202
|
sort_by=sort_by,
|
266
|
-
|
267
|
-
filter_value=filter_value,
|
268
|
-
page=page,
|
269
|
-
page_size=page_size,
|
270
|
-
user_id=user_id,
|
203
|
+
group_by=group_by,
|
271
204
|
_request_timeout=_request_timeout,
|
272
205
|
_request_auth=_request_auth,
|
273
206
|
_content_type=_content_type,
|
@@ -276,14 +209,10 @@ class TradingActionsApi:
|
|
276
209
|
)
|
277
210
|
|
278
211
|
else:
|
279
|
-
return self.
|
212
|
+
return self._get_actions_count_async_without_preload_content(
|
280
213
|
sort_order=sort_order,
|
281
214
|
sort_by=sort_by,
|
282
|
-
|
283
|
-
filter_value=filter_value,
|
284
|
-
page=page,
|
285
|
-
page_size=page_size,
|
286
|
-
user_id=user_id,
|
215
|
+
group_by=group_by,
|
287
216
|
_request_timeout=_request_timeout,
|
288
217
|
_request_auth=_request_auth,
|
289
218
|
_content_type=_content_type,
|
@@ -293,7 +222,7 @@ class TradingActionsApi:
|
|
293
222
|
|
294
223
|
# Private async implementation methods
|
295
224
|
@validate_call
|
296
|
-
async def
|
225
|
+
async def _get_actions_count_async(
|
297
226
|
self,
|
298
227
|
sort_order: Annotated[
|
299
228
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -301,25 +230,10 @@ class TradingActionsApi:
|
|
301
230
|
sort_by: Annotated[
|
302
231
|
Optional[StrictStr], Field(description="The field to sort by")
|
303
232
|
] = None,
|
304
|
-
|
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[
|
233
|
+
group_by: Annotated[
|
320
234
|
Optional[StrictStr],
|
321
235
|
Field(
|
322
|
-
description="The
|
236
|
+
description="The group by period for the actions count. Defaults to day."
|
323
237
|
),
|
324
238
|
] = None,
|
325
239
|
_request_timeout: Union[
|
@@ -333,25 +247,17 @@ class TradingActionsApi:
|
|
333
247
|
_content_type: Optional[StrictStr] = None,
|
334
248
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
335
249
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
336
|
-
) ->
|
337
|
-
"""Get Actions
|
250
|
+
) -> List[ActionsCount]:
|
251
|
+
"""Get Actions Count
|
338
252
|
|
339
|
-
Get all
|
253
|
+
Get the number of orders for all users by day, week, month, or year. The default sort is `timestamp` and the default order is `asc`..
|
340
254
|
|
341
255
|
:param sort_order: The order to sort by
|
342
256
|
:type sort_order: str
|
343
257
|
:param sort_by: The field to sort by
|
344
258
|
:type sort_by: str
|
345
|
-
:param
|
346
|
-
:type
|
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
|
259
|
+
:param group_by: The group by period for the actions count. Defaults to day.
|
260
|
+
:type group_by: str
|
355
261
|
:param _request_timeout: timeout setting for this request. If one
|
356
262
|
number provided, it will be total request
|
357
263
|
timeout. It can also be a pair (tuple) of
|
@@ -374,14 +280,10 @@ class TradingActionsApi:
|
|
374
280
|
:return: Returns the result object.
|
375
281
|
""" # noqa: E501
|
376
282
|
|
377
|
-
_param = self.
|
283
|
+
_param = self._get_actions_count_serialize(
|
378
284
|
sort_order=sort_order,
|
379
285
|
sort_by=sort_by,
|
380
|
-
|
381
|
-
filter_value=filter_value,
|
382
|
-
page=page,
|
383
|
-
page_size=page_size,
|
384
|
-
user_id=user_id,
|
286
|
+
group_by=group_by,
|
385
287
|
_request_auth=_request_auth,
|
386
288
|
_content_type=_content_type,
|
387
289
|
_headers=_headers,
|
@@ -389,7 +291,7 @@ class TradingActionsApi:
|
|
389
291
|
)
|
390
292
|
|
391
293
|
_response_types_map: Dict[str, Optional[str]] = {
|
392
|
-
"200": "
|
294
|
+
"200": "List[ActionsCount]",
|
393
295
|
}
|
394
296
|
response_data = await self.api_client.call_api(
|
395
297
|
*_param, _request_timeout=_request_timeout
|
@@ -401,7 +303,7 @@ class TradingActionsApi:
|
|
401
303
|
).data
|
402
304
|
|
403
305
|
@validate_call
|
404
|
-
async def
|
306
|
+
async def _get_actions_count_async_with_http_info(
|
405
307
|
self,
|
406
308
|
sort_order: Annotated[
|
407
309
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -409,25 +311,10 @@ class TradingActionsApi:
|
|
409
311
|
sort_by: Annotated[
|
410
312
|
Optional[StrictStr], Field(description="The field to sort by")
|
411
313
|
] = None,
|
412
|
-
|
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[
|
314
|
+
group_by: Annotated[
|
428
315
|
Optional[StrictStr],
|
429
316
|
Field(
|
430
|
-
description="The
|
317
|
+
description="The group by period for the actions count. Defaults to day."
|
431
318
|
),
|
432
319
|
] = None,
|
433
320
|
_request_timeout: Union[
|
@@ -441,25 +328,17 @@ class TradingActionsApi:
|
|
441
328
|
_content_type: Optional[StrictStr] = None,
|
442
329
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
443
330
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
444
|
-
) -> ApiResponse[
|
445
|
-
"""Get Actions
|
331
|
+
) -> ApiResponse[List[ActionsCount]]:
|
332
|
+
"""Get Actions Count
|
446
333
|
|
447
|
-
Get all
|
334
|
+
Get the number of orders for all users by day, week, month, or year. The default sort is `timestamp` and the default order is `asc`..
|
448
335
|
|
449
336
|
:param sort_order: The order to sort by
|
450
337
|
:type sort_order: str
|
451
338
|
:param sort_by: The field to sort by
|
452
339
|
:type sort_by: str
|
453
|
-
:param
|
454
|
-
:type
|
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
|
340
|
+
:param group_by: The group by period for the actions count. Defaults to day.
|
341
|
+
:type group_by: str
|
463
342
|
:param _request_timeout: timeout setting for this request. If one
|
464
343
|
number provided, it will be total request
|
465
344
|
timeout. It can also be a pair (tuple) of
|
@@ -482,14 +361,10 @@ class TradingActionsApi:
|
|
482
361
|
:return: Returns the result object.
|
483
362
|
""" # noqa: E501
|
484
363
|
|
485
|
-
_param = self.
|
364
|
+
_param = self._get_actions_count_serialize(
|
486
365
|
sort_order=sort_order,
|
487
366
|
sort_by=sort_by,
|
488
|
-
|
489
|
-
filter_value=filter_value,
|
490
|
-
page=page,
|
491
|
-
page_size=page_size,
|
492
|
-
user_id=user_id,
|
367
|
+
group_by=group_by,
|
493
368
|
_request_auth=_request_auth,
|
494
369
|
_content_type=_content_type,
|
495
370
|
_headers=_headers,
|
@@ -497,7 +372,7 @@ class TradingActionsApi:
|
|
497
372
|
)
|
498
373
|
|
499
374
|
_response_types_map: Dict[str, Optional[str]] = {
|
500
|
-
"200": "
|
375
|
+
"200": "List[ActionsCount]",
|
501
376
|
}
|
502
377
|
response_data = await self.api_client.call_api(
|
503
378
|
*_param, _request_timeout=_request_timeout
|
@@ -508,7 +383,7 @@ class TradingActionsApi:
|
|
508
383
|
)
|
509
384
|
|
510
385
|
@validate_call
|
511
|
-
async def
|
386
|
+
async def _get_actions_count_async_without_preload_content(
|
512
387
|
self,
|
513
388
|
sort_order: Annotated[
|
514
389
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -516,25 +391,10 @@ class TradingActionsApi:
|
|
516
391
|
sort_by: Annotated[
|
517
392
|
Optional[StrictStr], Field(description="The field to sort by")
|
518
393
|
] = None,
|
519
|
-
|
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[
|
394
|
+
group_by: Annotated[
|
535
395
|
Optional[StrictStr],
|
536
396
|
Field(
|
537
|
-
description="The
|
397
|
+
description="The group by period for the actions count. Defaults to day."
|
538
398
|
),
|
539
399
|
] = None,
|
540
400
|
_request_timeout: Union[
|
@@ -549,24 +409,16 @@ class TradingActionsApi:
|
|
549
409
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
550
410
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
551
411
|
) -> RESTResponseType:
|
552
|
-
"""Get Actions
|
412
|
+
"""Get Actions Count
|
553
413
|
|
554
|
-
Get all
|
414
|
+
Get the number of orders for all users by day, week, month, or year. The default sort is `timestamp` and the default order is `asc`..
|
555
415
|
|
556
416
|
:param sort_order: The order to sort by
|
557
417
|
:type sort_order: str
|
558
418
|
:param sort_by: The field to sort by
|
559
419
|
:type sort_by: str
|
560
|
-
:param
|
561
|
-
:type
|
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
|
420
|
+
:param group_by: The group by period for the actions count. Defaults to day.
|
421
|
+
:type group_by: str
|
570
422
|
:param _request_timeout: timeout setting for this request. If one
|
571
423
|
number provided, it will be total request
|
572
424
|
timeout. It can also be a pair (tuple) of
|
@@ -589,14 +441,10 @@ class TradingActionsApi:
|
|
589
441
|
:return: Returns the result object.
|
590
442
|
""" # noqa: E501
|
591
443
|
|
592
|
-
_param = self.
|
444
|
+
_param = self._get_actions_count_serialize(
|
593
445
|
sort_order=sort_order,
|
594
446
|
sort_by=sort_by,
|
595
|
-
|
596
|
-
filter_value=filter_value,
|
597
|
-
page=page,
|
598
|
-
page_size=page_size,
|
599
|
-
user_id=user_id,
|
447
|
+
group_by=group_by,
|
600
448
|
_request_auth=_request_auth,
|
601
449
|
_content_type=_content_type,
|
602
450
|
_headers=_headers,
|
@@ -604,7 +452,7 @@ class TradingActionsApi:
|
|
604
452
|
)
|
605
453
|
|
606
454
|
_response_types_map: Dict[str, Optional[str]] = {
|
607
|
-
"200": "
|
455
|
+
"200": "List[ActionsCount]",
|
608
456
|
}
|
609
457
|
response_data = await self.api_client.call_api(
|
610
458
|
*_param, _request_timeout=_request_timeout
|
@@ -613,7 +461,7 @@ class TradingActionsApi:
|
|
613
461
|
|
614
462
|
# Private sync implementation methods
|
615
463
|
@validate_call
|
616
|
-
def
|
464
|
+
def _get_actions_count_sync(
|
617
465
|
self,
|
618
466
|
sort_order: Annotated[
|
619
467
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -621,25 +469,10 @@ class TradingActionsApi:
|
|
621
469
|
sort_by: Annotated[
|
622
470
|
Optional[StrictStr], Field(description="The field to sort by")
|
623
471
|
] = None,
|
624
|
-
|
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[
|
472
|
+
group_by: Annotated[
|
640
473
|
Optional[StrictStr],
|
641
474
|
Field(
|
642
|
-
description="The
|
475
|
+
description="The group by period for the actions count. Defaults to day."
|
643
476
|
),
|
644
477
|
] = None,
|
645
478
|
_request_timeout: Union[
|
@@ -653,16 +486,12 @@ class TradingActionsApi:
|
|
653
486
|
_content_type: Optional[StrictStr] = None,
|
654
487
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
655
488
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
656
|
-
) ->
|
657
|
-
"""Synchronous version of
|
658
|
-
return async_to_sync(self.
|
489
|
+
) -> List[ActionsCount]:
|
490
|
+
"""Synchronous version of get_actions_count"""
|
491
|
+
return async_to_sync(self._get_actions_count_async)(
|
659
492
|
sort_order=sort_order,
|
660
493
|
sort_by=sort_by,
|
661
|
-
|
662
|
-
filter_value=filter_value,
|
663
|
-
page=page,
|
664
|
-
page_size=page_size,
|
665
|
-
user_id=user_id,
|
494
|
+
group_by=group_by,
|
666
495
|
_request_timeout=_request_timeout,
|
667
496
|
_request_auth=_request_auth,
|
668
497
|
_content_type=_content_type,
|
@@ -671,7 +500,7 @@ class TradingActionsApi:
|
|
671
500
|
)
|
672
501
|
|
673
502
|
@validate_call
|
674
|
-
def
|
503
|
+
def _get_actions_count_sync_with_http_info(
|
675
504
|
self,
|
676
505
|
sort_order: Annotated[
|
677
506
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -679,25 +508,10 @@ class TradingActionsApi:
|
|
679
508
|
sort_by: Annotated[
|
680
509
|
Optional[StrictStr], Field(description="The field to sort by")
|
681
510
|
] = None,
|
682
|
-
|
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[
|
511
|
+
group_by: Annotated[
|
698
512
|
Optional[StrictStr],
|
699
513
|
Field(
|
700
|
-
description="The
|
514
|
+
description="The group by period for the actions count. Defaults to day."
|
701
515
|
),
|
702
516
|
] = None,
|
703
517
|
_request_timeout: Union[
|
@@ -711,16 +525,12 @@ class TradingActionsApi:
|
|
711
525
|
_content_type: Optional[StrictStr] = None,
|
712
526
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
713
527
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
714
|
-
) -> ApiResponse[
|
715
|
-
"""Synchronous version of
|
716
|
-
return async_to_sync(self.
|
528
|
+
) -> ApiResponse[List[ActionsCount]]:
|
529
|
+
"""Synchronous version of get_actions_count_with_http_info"""
|
530
|
+
return async_to_sync(self._get_actions_count_async_with_http_info)(
|
717
531
|
sort_order=sort_order,
|
718
532
|
sort_by=sort_by,
|
719
|
-
|
720
|
-
filter_value=filter_value,
|
721
|
-
page=page,
|
722
|
-
page_size=page_size,
|
723
|
-
user_id=user_id,
|
533
|
+
group_by=group_by,
|
724
534
|
_request_timeout=_request_timeout,
|
725
535
|
_request_auth=_request_auth,
|
726
536
|
_content_type=_content_type,
|
@@ -729,7 +539,7 @@ class TradingActionsApi:
|
|
729
539
|
)
|
730
540
|
|
731
541
|
@validate_call
|
732
|
-
def
|
542
|
+
def _get_actions_count_sync_without_preload_content(
|
733
543
|
self,
|
734
544
|
sort_order: Annotated[
|
735
545
|
Optional[StrictStr], Field(description="The order to sort by")
|
@@ -737,25 +547,10 @@ class TradingActionsApi:
|
|
737
547
|
sort_by: Annotated[
|
738
548
|
Optional[StrictStr], Field(description="The field to sort by")
|
739
549
|
] = None,
|
740
|
-
|
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[
|
550
|
+
group_by: Annotated[
|
756
551
|
Optional[StrictStr],
|
757
552
|
Field(
|
758
|
-
description="The
|
553
|
+
description="The group by period for the actions count. Defaults to day."
|
759
554
|
),
|
760
555
|
] = None,
|
761
556
|
_request_timeout: Union[
|
@@ -770,15 +565,11 @@ class TradingActionsApi:
|
|
770
565
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
771
566
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
772
567
|
) -> RESTResponseType:
|
773
|
-
"""Synchronous version of
|
774
|
-
return async_to_sync(self.
|
568
|
+
"""Synchronous version of get_actions_count_without_preload_content"""
|
569
|
+
return async_to_sync(self._get_actions_count_async_without_preload_content)(
|
775
570
|
sort_order=sort_order,
|
776
571
|
sort_by=sort_by,
|
777
|
-
|
778
|
-
filter_value=filter_value,
|
779
|
-
page=page,
|
780
|
-
page_size=page_size,
|
781
|
-
user_id=user_id,
|
572
|
+
group_by=group_by,
|
782
573
|
_request_timeout=_request_timeout,
|
783
574
|
_request_auth=_request_auth,
|
784
575
|
_content_type=_content_type,
|
@@ -786,15 +577,11 @@ class TradingActionsApi:
|
|
786
577
|
_host_index=_host_index,
|
787
578
|
)
|
788
579
|
|
789
|
-
def
|
580
|
+
def _get_actions_count_serialize(
|
790
581
|
self,
|
791
582
|
sort_order,
|
792
583
|
sort_by,
|
793
|
-
|
794
|
-
filter_value,
|
795
|
-
page,
|
796
|
-
page_size,
|
797
|
-
user_id,
|
584
|
+
group_by,
|
798
585
|
_request_auth,
|
799
586
|
_content_type,
|
800
587
|
_headers,
|
@@ -824,25 +611,9 @@ class TradingActionsApi:
|
|
824
611
|
|
825
612
|
_query_params.append(("sort_by", sort_by))
|
826
613
|
|
827
|
-
if
|
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))
|
834
|
-
|
835
|
-
if page is not None:
|
836
|
-
|
837
|
-
_query_params.append(("page", page))
|
838
|
-
|
839
|
-
if page_size is not None:
|
840
|
-
|
841
|
-
_query_params.append(("page_size", page_size))
|
842
|
-
|
843
|
-
if user_id is not None:
|
614
|
+
if group_by is not None:
|
844
615
|
|
845
|
-
_query_params.append(("
|
616
|
+
_query_params.append(("group_by", group_by))
|
846
617
|
|
847
618
|
# process the header parameters
|
848
619
|
# process the form parameters
|
@@ -859,7 +630,7 @@ class TradingActionsApi:
|
|
859
630
|
|
860
631
|
return self.api_client.param_serialize(
|
861
632
|
method="GET",
|
862
|
-
resource_path="/actions",
|
633
|
+
resource_path="/actions/count",
|
863
634
|
path_params=_path_params,
|
864
635
|
query_params=_query_params,
|
865
636
|
header_params=_header_params,
|