crypticorn 2.17.0rc4__py3-none-any.whl → 2.17.0rc6__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 -26
- crypticorn/auth/client/api/auth_api.py +36 -148
- crypticorn/auth/client/api/service_api.py +3 -16
- crypticorn/auth/client/api/user_api.py +33 -136
- crypticorn/auth/client/api/wallet_api.py +18 -76
- crypticorn/auth/client/api_client.py +0 -5
- 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 +1 -1
- crypticorn/auth/client/models/create_user_request.py +1 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +1 -1
- 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/cli/init.py +1 -1
- crypticorn/cli/templates/.env.docker.temp +3 -0
- crypticorn/cli/templates/.env.example.temp +4 -0
- crypticorn/cli/templates/Dockerfile +5 -2
- crypticorn/client.py +0 -1
- crypticorn/common/auth.py +31 -4
- crypticorn/common/decorators.py +1 -2
- crypticorn/common/enums.py +0 -2
- crypticorn/common/errors.py +10 -0
- crypticorn/common/metrics.py +1 -1
- crypticorn/common/middleware.py +0 -1
- crypticorn/common/pagination.py +116 -24
- crypticorn/common/router/admin_router.py +1 -11
- crypticorn/common/router/status_router.py +33 -2
- crypticorn/common/scopes.py +2 -2
- crypticorn/common/utils.py +1 -2
- crypticorn/dex/__init__.py +6 -0
- crypticorn/dex/client/__init__.py +49 -0
- crypticorn/dex/client/api/__init__.py +6 -0
- crypticorn/dex/client/api/admin_api.py +2983 -0
- crypticorn/dex/client/api/signals_api.py +1794 -0
- crypticorn/dex/client/api/status_api.py +889 -0
- crypticorn/dex/client/api_client.py +753 -0
- crypticorn/dex/client/api_response.py +20 -0
- crypticorn/dex/client/configuration.py +620 -0
- crypticorn/dex/client/exceptions.py +220 -0
- crypticorn/dex/client/models/__init__.py +30 -0
- crypticorn/dex/client/models/api_error_identifier.py +121 -0
- crypticorn/dex/client/models/api_error_level.py +37 -0
- crypticorn/dex/client/models/api_error_type.py +37 -0
- crypticorn/dex/client/models/exception_detail.py +117 -0
- crypticorn/dex/client/models/log_level.py +38 -0
- crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
- crypticorn/dex/client/models/risk.py +86 -0
- crypticorn/dex/client/models/signal_overview_stats.py +156 -0
- crypticorn/dex/client/models/signal_volume.py +84 -0
- crypticorn/dex/client/models/signal_with_token.py +163 -0
- crypticorn/dex/client/models/token_data.py +127 -0
- crypticorn/dex/client/models/token_detail.py +116 -0
- crypticorn/dex/client/py.typed +0 -0
- crypticorn/dex/client/rest.py +217 -0
- crypticorn/dex/main.py +1 -0
- crypticorn/hive/client/api/admin_api.py +18 -75
- crypticorn/hive/client/api/data_api.py +6 -28
- crypticorn/hive/client/api/models_api.py +22 -88
- crypticorn/hive/client/api/status_api.py +6 -27
- crypticorn/hive/client/api_client.py +0 -5
- crypticorn/hive/client/models/coin_info.py +1 -1
- crypticorn/hive/client/models/exception_detail.py +1 -1
- crypticorn/hive/client/models/target_info.py +1 -1
- crypticorn/hive/utils.py +2 -2
- crypticorn/klines/client/api/admin_api.py +18 -75
- crypticorn/klines/client/api/change_in_timeframe_api.py +3 -16
- crypticorn/klines/client/api/funding_rates_api.py +3 -16
- crypticorn/klines/client/api/ohlcv_data_api.py +3 -16
- crypticorn/klines/client/api/status_api.py +6 -27
- crypticorn/klines/client/api/symbols_api.py +3 -16
- crypticorn/klines/client/api/udf_api.py +18 -74
- crypticorn/klines/client/api_client.py +0 -5
- crypticorn/klines/client/models/exception_detail.py +1 -1
- crypticorn/klines/client/models/ohlcv.py +1 -1
- crypticorn/klines/client/models/symbol_group.py +1 -1
- crypticorn/klines/client/models/udf_config.py +1 -1
- crypticorn/metrics/client/api/admin_api.py +18 -75
- crypticorn/metrics/client/api/exchanges_api.py +12 -52
- crypticorn/metrics/client/api/indicators_api.py +6 -28
- crypticorn/metrics/client/api/logs_api.py +3 -16
- crypticorn/metrics/client/api/marketcap_api.py +12 -52
- crypticorn/metrics/client/api/markets_api.py +3 -16
- crypticorn/metrics/client/api/quote_currencies_api.py +3 -16
- crypticorn/metrics/client/api/status_api.py +6 -27
- crypticorn/metrics/client/api/tokens_api.py +6 -26
- crypticorn/metrics/client/api_client.py +0 -5
- crypticorn/metrics/client/models/exception_detail.py +1 -1
- crypticorn/metrics/client/models/exchange_mapping.py +1 -1
- crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
- crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
- crypticorn/metrics/client/models/ohlcv.py +1 -1
- crypticorn/pay/client/api/admin_api.py +21 -87
- crypticorn/pay/client/api/now_payments_api.py +15 -64
- crypticorn/pay/client/api/payments_api.py +6 -28
- crypticorn/pay/client/api/products_api.py +12 -52
- crypticorn/pay/client/api/status_api.py +6 -27
- crypticorn/pay/client/api_client.py +0 -5
- crypticorn/pay/client/models/exception_detail.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
- crypticorn/pay/client/models/product.py +1 -1
- crypticorn/pay/client/models/product_create.py +1 -1
- crypticorn/pay/client/models/product_update.py +1 -1
- crypticorn/trade/client/__init__.py +15 -0
- crypticorn/trade/client/api/admin_api.py +43 -107
- crypticorn/trade/client/api/api_keys_api.py +207 -184
- crypticorn/trade/client/api/bots_api.py +6557 -240
- 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 +220 -115
- 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/models/__init__.py +15 -0
- crypticorn/trade/client/models/bot.py +7 -18
- crypticorn/trade/client/models/bot_create.py +17 -1
- crypticorn/trade/client/models/bot_update.py +17 -1
- crypticorn/trade/client/models/exchange_key_create.py +17 -1
- crypticorn/trade/client/models/exchange_key_update.py +17 -1
- crypticorn/trade/client/models/notification.py +17 -1
- crypticorn/trade/client/models/notification_create.py +17 -1
- crypticorn/trade/client/models/notification_update.py +17 -1
- crypticorn/trade/client/models/orders_count.py +88 -0
- crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
- crypticorn/trade/client/models/paginated_response_order.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/pn_l.py +95 -0
- crypticorn/trade/client/models/spot_trading_action.py +207 -0
- crypticorn/trade/client/models/strategy.py +17 -1
- crypticorn/trade/client/models/strategy_create.py +17 -1
- crypticorn/trade/client/models/strategy_update.py +17 -1
- {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/METADATA +3 -3
- {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/RECORD +151 -116
- {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/top_level.txt +0 -0
@@ -16,9 +16,10 @@ 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
|
19
|
+
from pydantic import Field, StrictStr, field_validator
|
20
20
|
from typing import List, Optional
|
21
|
-
from
|
21
|
+
from typing_extensions import Annotated
|
22
|
+
from crypticorn.trade.client.models.orders_count import OrdersCount
|
22
23
|
|
23
24
|
from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
24
25
|
from crypticorn.trade.client.api_response import ApiResponse
|
@@ -57,10 +58,20 @@ class OrdersApi:
|
|
57
58
|
self.is_sync = is_sync
|
58
59
|
|
59
60
|
@validate_call
|
60
|
-
def
|
61
|
+
def get_orders_count(
|
61
62
|
self,
|
62
|
-
|
63
|
-
|
63
|
+
sort_order: Annotated[
|
64
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
65
|
+
] = None,
|
66
|
+
sort_by: Annotated[
|
67
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
68
|
+
] = None,
|
69
|
+
group_by: Annotated[
|
70
|
+
Optional[StrictStr],
|
71
|
+
Field(
|
72
|
+
description="The group by period for the orders count. Defaults to day."
|
73
|
+
),
|
74
|
+
] = None,
|
64
75
|
_request_timeout: Union[
|
65
76
|
None,
|
66
77
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -72,15 +83,13 @@ class OrdersApi:
|
|
72
83
|
_content_type: Optional[StrictStr] = None,
|
73
84
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
74
85
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
75
|
-
) -> List[
|
76
|
-
"""Get Orders
|
77
|
-
|
78
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
79
|
-
"""
|
86
|
+
) -> List[OrdersCount]:
|
87
|
+
"""Get Orders Count"""
|
80
88
|
if self.is_sync:
|
81
|
-
return self.
|
82
|
-
|
83
|
-
|
89
|
+
return self._get_orders_count_sync(
|
90
|
+
sort_order=sort_order,
|
91
|
+
sort_by=sort_by,
|
92
|
+
group_by=group_by,
|
84
93
|
_request_timeout=_request_timeout,
|
85
94
|
_request_auth=_request_auth,
|
86
95
|
_content_type=_content_type,
|
@@ -89,9 +98,10 @@ class OrdersApi:
|
|
89
98
|
)
|
90
99
|
|
91
100
|
else:
|
92
|
-
return self.
|
93
|
-
|
94
|
-
|
101
|
+
return self._get_orders_count_async(
|
102
|
+
sort_order=sort_order,
|
103
|
+
sort_by=sort_by,
|
104
|
+
group_by=group_by,
|
95
105
|
_request_timeout=_request_timeout,
|
96
106
|
_request_auth=_request_auth,
|
97
107
|
_content_type=_content_type,
|
@@ -100,10 +110,20 @@ class OrdersApi:
|
|
100
110
|
)
|
101
111
|
|
102
112
|
@validate_call
|
103
|
-
def
|
113
|
+
def get_orders_count_with_http_info(
|
104
114
|
self,
|
105
|
-
|
106
|
-
|
115
|
+
sort_order: Annotated[
|
116
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
117
|
+
] = None,
|
118
|
+
sort_by: Annotated[
|
119
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
120
|
+
] = None,
|
121
|
+
group_by: Annotated[
|
122
|
+
Optional[StrictStr],
|
123
|
+
Field(
|
124
|
+
description="The group by period for the orders count. Defaults to day."
|
125
|
+
),
|
126
|
+
] = None,
|
107
127
|
_request_timeout: Union[
|
108
128
|
None,
|
109
129
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -115,15 +135,13 @@ class OrdersApi:
|
|
115
135
|
_content_type: Optional[StrictStr] = None,
|
116
136
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
117
137
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
118
|
-
) -> ApiResponse[List[
|
119
|
-
"""Get Orders with HTTP info
|
120
|
-
|
121
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
122
|
-
"""
|
138
|
+
) -> ApiResponse[List[OrdersCount]]:
|
139
|
+
"""Get Orders Count with HTTP info"""
|
123
140
|
if self.is_sync:
|
124
|
-
return self.
|
125
|
-
|
126
|
-
|
141
|
+
return self._get_orders_count_sync_with_http_info(
|
142
|
+
sort_order=sort_order,
|
143
|
+
sort_by=sort_by,
|
144
|
+
group_by=group_by,
|
127
145
|
_request_timeout=_request_timeout,
|
128
146
|
_request_auth=_request_auth,
|
129
147
|
_content_type=_content_type,
|
@@ -132,9 +150,10 @@ class OrdersApi:
|
|
132
150
|
)
|
133
151
|
|
134
152
|
else:
|
135
|
-
return self.
|
136
|
-
|
137
|
-
|
153
|
+
return self._get_orders_count_async_with_http_info(
|
154
|
+
sort_order=sort_order,
|
155
|
+
sort_by=sort_by,
|
156
|
+
group_by=group_by,
|
138
157
|
_request_timeout=_request_timeout,
|
139
158
|
_request_auth=_request_auth,
|
140
159
|
_content_type=_content_type,
|
@@ -143,10 +162,20 @@ class OrdersApi:
|
|
143
162
|
)
|
144
163
|
|
145
164
|
@validate_call
|
146
|
-
def
|
165
|
+
def get_orders_count_without_preload_content(
|
147
166
|
self,
|
148
|
-
|
149
|
-
|
167
|
+
sort_order: Annotated[
|
168
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
169
|
+
] = None,
|
170
|
+
sort_by: Annotated[
|
171
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
172
|
+
] = None,
|
173
|
+
group_by: Annotated[
|
174
|
+
Optional[StrictStr],
|
175
|
+
Field(
|
176
|
+
description="The group by period for the orders count. Defaults to day."
|
177
|
+
),
|
178
|
+
] = None,
|
150
179
|
_request_timeout: Union[
|
151
180
|
None,
|
152
181
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -159,14 +188,12 @@ class OrdersApi:
|
|
159
188
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
160
189
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
161
190
|
) -> RESTResponseType:
|
162
|
-
"""Get Orders without preloading content
|
163
|
-
|
164
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
165
|
-
"""
|
191
|
+
"""Get Orders Count without preloading content"""
|
166
192
|
if self.is_sync:
|
167
|
-
return self.
|
168
|
-
|
169
|
-
|
193
|
+
return self._get_orders_count_sync_without_preload_content(
|
194
|
+
sort_order=sort_order,
|
195
|
+
sort_by=sort_by,
|
196
|
+
group_by=group_by,
|
170
197
|
_request_timeout=_request_timeout,
|
171
198
|
_request_auth=_request_auth,
|
172
199
|
_content_type=_content_type,
|
@@ -175,9 +202,10 @@ class OrdersApi:
|
|
175
202
|
)
|
176
203
|
|
177
204
|
else:
|
178
|
-
return self.
|
179
|
-
|
180
|
-
|
205
|
+
return self._get_orders_count_async_without_preload_content(
|
206
|
+
sort_order=sort_order,
|
207
|
+
sort_by=sort_by,
|
208
|
+
group_by=group_by,
|
181
209
|
_request_timeout=_request_timeout,
|
182
210
|
_request_auth=_request_auth,
|
183
211
|
_content_type=_content_type,
|
@@ -187,10 +215,20 @@ class OrdersApi:
|
|
187
215
|
|
188
216
|
# Private async implementation methods
|
189
217
|
@validate_call
|
190
|
-
async def
|
218
|
+
async def _get_orders_count_async(
|
191
219
|
self,
|
192
|
-
|
193
|
-
|
220
|
+
sort_order: Annotated[
|
221
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
222
|
+
] = None,
|
223
|
+
sort_by: Annotated[
|
224
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
225
|
+
] = None,
|
226
|
+
group_by: Annotated[
|
227
|
+
Optional[StrictStr],
|
228
|
+
Field(
|
229
|
+
description="The group by period for the orders count. Defaults to day."
|
230
|
+
),
|
231
|
+
] = None,
|
194
232
|
_request_timeout: Union[
|
195
233
|
None,
|
196
234
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -202,15 +240,17 @@ class OrdersApi:
|
|
202
240
|
_content_type: Optional[StrictStr] = None,
|
203
241
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
204
242
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
205
|
-
) -> List[
|
206
|
-
"""Get Orders
|
243
|
+
) -> List[OrdersCount]:
|
244
|
+
"""Get Orders Count
|
207
245
|
|
208
|
-
Get
|
246
|
+
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`..
|
209
247
|
|
210
|
-
:param
|
211
|
-
:type
|
212
|
-
:param
|
213
|
-
:type
|
248
|
+
:param sort_order: The order to sort by
|
249
|
+
:type sort_order: str
|
250
|
+
:param sort_by: The field to sort by
|
251
|
+
:type sort_by: str
|
252
|
+
:param group_by: The group by period for the orders count. Defaults to day.
|
253
|
+
:type group_by: str
|
214
254
|
:param _request_timeout: timeout setting for this request. If one
|
215
255
|
number provided, it will be total request
|
216
256
|
timeout. It can also be a pair (tuple) of
|
@@ -233,9 +273,10 @@ class OrdersApi:
|
|
233
273
|
:return: Returns the result object.
|
234
274
|
""" # noqa: E501
|
235
275
|
|
236
|
-
_param = self.
|
237
|
-
|
238
|
-
|
276
|
+
_param = self._get_orders_count_serialize(
|
277
|
+
sort_order=sort_order,
|
278
|
+
sort_by=sort_by,
|
279
|
+
group_by=group_by,
|
239
280
|
_request_auth=_request_auth,
|
240
281
|
_content_type=_content_type,
|
241
282
|
_headers=_headers,
|
@@ -243,7 +284,7 @@ class OrdersApi:
|
|
243
284
|
)
|
244
285
|
|
245
286
|
_response_types_map: Dict[str, Optional[str]] = {
|
246
|
-
"200": "List[
|
287
|
+
"200": "List[OrdersCount]",
|
247
288
|
}
|
248
289
|
response_data = await self.api_client.call_api(
|
249
290
|
*_param, _request_timeout=_request_timeout
|
@@ -255,10 +296,20 @@ class OrdersApi:
|
|
255
296
|
).data
|
256
297
|
|
257
298
|
@validate_call
|
258
|
-
async def
|
299
|
+
async def _get_orders_count_async_with_http_info(
|
259
300
|
self,
|
260
|
-
|
261
|
-
|
301
|
+
sort_order: Annotated[
|
302
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
303
|
+
] = None,
|
304
|
+
sort_by: Annotated[
|
305
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
306
|
+
] = None,
|
307
|
+
group_by: Annotated[
|
308
|
+
Optional[StrictStr],
|
309
|
+
Field(
|
310
|
+
description="The group by period for the orders count. Defaults to day."
|
311
|
+
),
|
312
|
+
] = None,
|
262
313
|
_request_timeout: Union[
|
263
314
|
None,
|
264
315
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -270,15 +321,17 @@ class OrdersApi:
|
|
270
321
|
_content_type: Optional[StrictStr] = None,
|
271
322
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
272
323
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
273
|
-
) -> ApiResponse[List[
|
274
|
-
"""Get Orders
|
324
|
+
) -> ApiResponse[List[OrdersCount]]:
|
325
|
+
"""Get Orders Count
|
275
326
|
|
276
|
-
Get
|
327
|
+
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`..
|
277
328
|
|
278
|
-
:param
|
279
|
-
:type
|
280
|
-
:param
|
281
|
-
:type
|
329
|
+
:param sort_order: The order to sort by
|
330
|
+
:type sort_order: str
|
331
|
+
:param sort_by: The field to sort by
|
332
|
+
:type sort_by: str
|
333
|
+
:param group_by: The group by period for the orders count. Defaults to day.
|
334
|
+
:type group_by: str
|
282
335
|
:param _request_timeout: timeout setting for this request. If one
|
283
336
|
number provided, it will be total request
|
284
337
|
timeout. It can also be a pair (tuple) of
|
@@ -301,9 +354,10 @@ class OrdersApi:
|
|
301
354
|
:return: Returns the result object.
|
302
355
|
""" # noqa: E501
|
303
356
|
|
304
|
-
_param = self.
|
305
|
-
|
306
|
-
|
357
|
+
_param = self._get_orders_count_serialize(
|
358
|
+
sort_order=sort_order,
|
359
|
+
sort_by=sort_by,
|
360
|
+
group_by=group_by,
|
307
361
|
_request_auth=_request_auth,
|
308
362
|
_content_type=_content_type,
|
309
363
|
_headers=_headers,
|
@@ -311,7 +365,7 @@ class OrdersApi:
|
|
311
365
|
)
|
312
366
|
|
313
367
|
_response_types_map: Dict[str, Optional[str]] = {
|
314
|
-
"200": "List[
|
368
|
+
"200": "List[OrdersCount]",
|
315
369
|
}
|
316
370
|
response_data = await self.api_client.call_api(
|
317
371
|
*_param, _request_timeout=_request_timeout
|
@@ -322,10 +376,20 @@ class OrdersApi:
|
|
322
376
|
)
|
323
377
|
|
324
378
|
@validate_call
|
325
|
-
async def
|
379
|
+
async def _get_orders_count_async_without_preload_content(
|
326
380
|
self,
|
327
|
-
|
328
|
-
|
381
|
+
sort_order: Annotated[
|
382
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
383
|
+
] = None,
|
384
|
+
sort_by: Annotated[
|
385
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
386
|
+
] = None,
|
387
|
+
group_by: Annotated[
|
388
|
+
Optional[StrictStr],
|
389
|
+
Field(
|
390
|
+
description="The group by period for the orders count. Defaults to day."
|
391
|
+
),
|
392
|
+
] = None,
|
329
393
|
_request_timeout: Union[
|
330
394
|
None,
|
331
395
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -338,14 +402,16 @@ class OrdersApi:
|
|
338
402
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
339
403
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
340
404
|
) -> RESTResponseType:
|
341
|
-
"""Get Orders
|
405
|
+
"""Get Orders Count
|
342
406
|
|
343
|
-
Get
|
407
|
+
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`..
|
344
408
|
|
345
|
-
:param
|
346
|
-
:type
|
347
|
-
:param
|
348
|
-
:type
|
409
|
+
:param sort_order: The order to sort by
|
410
|
+
:type sort_order: str
|
411
|
+
:param sort_by: The field to sort by
|
412
|
+
:type sort_by: str
|
413
|
+
:param group_by: The group by period for the orders count. Defaults to day.
|
414
|
+
:type group_by: str
|
349
415
|
:param _request_timeout: timeout setting for this request. If one
|
350
416
|
number provided, it will be total request
|
351
417
|
timeout. It can also be a pair (tuple) of
|
@@ -368,9 +434,10 @@ class OrdersApi:
|
|
368
434
|
:return: Returns the result object.
|
369
435
|
""" # noqa: E501
|
370
436
|
|
371
|
-
_param = self.
|
372
|
-
|
373
|
-
|
437
|
+
_param = self._get_orders_count_serialize(
|
438
|
+
sort_order=sort_order,
|
439
|
+
sort_by=sort_by,
|
440
|
+
group_by=group_by,
|
374
441
|
_request_auth=_request_auth,
|
375
442
|
_content_type=_content_type,
|
376
443
|
_headers=_headers,
|
@@ -378,7 +445,7 @@ class OrdersApi:
|
|
378
445
|
)
|
379
446
|
|
380
447
|
_response_types_map: Dict[str, Optional[str]] = {
|
381
|
-
"200": "List[
|
448
|
+
"200": "List[OrdersCount]",
|
382
449
|
}
|
383
450
|
response_data = await self.api_client.call_api(
|
384
451
|
*_param, _request_timeout=_request_timeout
|
@@ -387,10 +454,20 @@ class OrdersApi:
|
|
387
454
|
|
388
455
|
# Private sync implementation methods
|
389
456
|
@validate_call
|
390
|
-
def
|
457
|
+
def _get_orders_count_sync(
|
391
458
|
self,
|
392
|
-
|
393
|
-
|
459
|
+
sort_order: Annotated[
|
460
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
461
|
+
] = None,
|
462
|
+
sort_by: Annotated[
|
463
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
464
|
+
] = None,
|
465
|
+
group_by: Annotated[
|
466
|
+
Optional[StrictStr],
|
467
|
+
Field(
|
468
|
+
description="The group by period for the orders count. Defaults to day."
|
469
|
+
),
|
470
|
+
] = None,
|
394
471
|
_request_timeout: Union[
|
395
472
|
None,
|
396
473
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -402,11 +479,12 @@ class OrdersApi:
|
|
402
479
|
_content_type: Optional[StrictStr] = None,
|
403
480
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
404
481
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
405
|
-
) -> List[
|
406
|
-
"""Synchronous version of
|
407
|
-
return async_to_sync(self.
|
408
|
-
|
409
|
-
|
482
|
+
) -> List[OrdersCount]:
|
483
|
+
"""Synchronous version of get_orders_count"""
|
484
|
+
return async_to_sync(self._get_orders_count_async)(
|
485
|
+
sort_order=sort_order,
|
486
|
+
sort_by=sort_by,
|
487
|
+
group_by=group_by,
|
410
488
|
_request_timeout=_request_timeout,
|
411
489
|
_request_auth=_request_auth,
|
412
490
|
_content_type=_content_type,
|
@@ -415,10 +493,20 @@ class OrdersApi:
|
|
415
493
|
)
|
416
494
|
|
417
495
|
@validate_call
|
418
|
-
def
|
496
|
+
def _get_orders_count_sync_with_http_info(
|
419
497
|
self,
|
420
|
-
|
421
|
-
|
498
|
+
sort_order: Annotated[
|
499
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
500
|
+
] = None,
|
501
|
+
sort_by: Annotated[
|
502
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
503
|
+
] = None,
|
504
|
+
group_by: Annotated[
|
505
|
+
Optional[StrictStr],
|
506
|
+
Field(
|
507
|
+
description="The group by period for the orders count. Defaults to day."
|
508
|
+
),
|
509
|
+
] = None,
|
422
510
|
_request_timeout: Union[
|
423
511
|
None,
|
424
512
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -430,11 +518,12 @@ class OrdersApi:
|
|
430
518
|
_content_type: Optional[StrictStr] = None,
|
431
519
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
432
520
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
433
|
-
) -> ApiResponse[List[
|
434
|
-
"""Synchronous version of
|
435
|
-
return async_to_sync(self.
|
436
|
-
|
437
|
-
|
521
|
+
) -> ApiResponse[List[OrdersCount]]:
|
522
|
+
"""Synchronous version of get_orders_count_with_http_info"""
|
523
|
+
return async_to_sync(self._get_orders_count_async_with_http_info)(
|
524
|
+
sort_order=sort_order,
|
525
|
+
sort_by=sort_by,
|
526
|
+
group_by=group_by,
|
438
527
|
_request_timeout=_request_timeout,
|
439
528
|
_request_auth=_request_auth,
|
440
529
|
_content_type=_content_type,
|
@@ -443,10 +532,20 @@ class OrdersApi:
|
|
443
532
|
)
|
444
533
|
|
445
534
|
@validate_call
|
446
|
-
def
|
535
|
+
def _get_orders_count_sync_without_preload_content(
|
447
536
|
self,
|
448
|
-
|
449
|
-
|
537
|
+
sort_order: Annotated[
|
538
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
539
|
+
] = None,
|
540
|
+
sort_by: Annotated[
|
541
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
542
|
+
] = None,
|
543
|
+
group_by: Annotated[
|
544
|
+
Optional[StrictStr],
|
545
|
+
Field(
|
546
|
+
description="The group by period for the orders count. Defaults to day."
|
547
|
+
),
|
548
|
+
] = None,
|
450
549
|
_request_timeout: Union[
|
451
550
|
None,
|
452
551
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -459,10 +558,11 @@ class OrdersApi:
|
|
459
558
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
460
559
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
461
560
|
) -> RESTResponseType:
|
462
|
-
"""Synchronous version of
|
463
|
-
return async_to_sync(self.
|
464
|
-
|
465
|
-
|
561
|
+
"""Synchronous version of get_orders_count_without_preload_content"""
|
562
|
+
return async_to_sync(self._get_orders_count_async_without_preload_content)(
|
563
|
+
sort_order=sort_order,
|
564
|
+
sort_by=sort_by,
|
565
|
+
group_by=group_by,
|
466
566
|
_request_timeout=_request_timeout,
|
467
567
|
_request_auth=_request_auth,
|
468
568
|
_content_type=_content_type,
|
@@ -470,10 +570,11 @@ class OrdersApi:
|
|
470
570
|
_host_index=_host_index,
|
471
571
|
)
|
472
572
|
|
473
|
-
def
|
573
|
+
def _get_orders_count_serialize(
|
474
574
|
self,
|
475
|
-
|
476
|
-
|
575
|
+
sort_order,
|
576
|
+
sort_by,
|
577
|
+
group_by,
|
477
578
|
_request_auth,
|
478
579
|
_content_type,
|
479
580
|
_headers,
|
@@ -495,13 +596,17 @@ class OrdersApi:
|
|
495
596
|
|
496
597
|
# process the path parameters
|
497
598
|
# process the query parameters
|
498
|
-
if
|
599
|
+
if sort_order is not None:
|
600
|
+
|
601
|
+
_query_params.append(("sort_order", sort_order))
|
602
|
+
|
603
|
+
if sort_by is not None:
|
499
604
|
|
500
|
-
_query_params.append(("
|
605
|
+
_query_params.append(("sort_by", sort_by))
|
501
606
|
|
502
|
-
if
|
607
|
+
if group_by is not None:
|
503
608
|
|
504
|
-
_query_params.append(("
|
609
|
+
_query_params.append(("group_by", group_by))
|
505
610
|
|
506
611
|
# process the header parameters
|
507
612
|
# process the form parameters
|
@@ -518,7 +623,7 @@ class OrdersApi:
|
|
518
623
|
|
519
624
|
return self.api_client.param_serialize(
|
520
625
|
method="GET",
|
521
|
-
resource_path="/orders",
|
626
|
+
resource_path="/orders/count",
|
522
627
|
path_params=_path_params,
|
523
628
|
query_params=_query_params,
|
524
629
|
header_params=_header_params,
|
@@ -71,10 +71,7 @@ class StatusApi:
|
|
71
71
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
72
72
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
73
73
|
) -> str:
|
74
|
-
"""Time
|
75
|
-
|
76
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
77
|
-
"""
|
74
|
+
"""Time"""
|
78
75
|
if self.is_sync:
|
79
76
|
return self._get_time_sync(
|
80
77
|
type=type,
|
@@ -111,10 +108,7 @@ class StatusApi:
|
|
111
108
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
112
109
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
113
110
|
) -> ApiResponse[str]:
|
114
|
-
"""Time with HTTP info
|
115
|
-
|
116
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
117
|
-
"""
|
111
|
+
"""Time with HTTP info"""
|
118
112
|
if self.is_sync:
|
119
113
|
return self._get_time_sync_with_http_info(
|
120
114
|
type=type,
|
@@ -151,10 +145,7 @@ class StatusApi:
|
|
151
145
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
152
146
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
153
147
|
) -> RESTResponseType:
|
154
|
-
"""Time without preloading content
|
155
|
-
|
156
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
157
|
-
"""
|
148
|
+
"""Time without preloading content"""
|
158
149
|
if self.is_sync:
|
159
150
|
return self._get_time_sync_without_preload_content(
|
160
151
|
type=type,
|
@@ -513,10 +504,7 @@ class StatusApi:
|
|
513
504
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
514
505
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
515
506
|
) -> str:
|
516
|
-
"""Ping
|
517
|
-
|
518
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
519
|
-
"""
|
507
|
+
"""Ping"""
|
520
508
|
if self.is_sync:
|
521
509
|
return self._ping_sync(
|
522
510
|
_request_timeout=_request_timeout,
|
@@ -550,10 +538,7 @@ class StatusApi:
|
|
550
538
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
551
539
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
552
540
|
) -> ApiResponse[str]:
|
553
|
-
"""Ping with HTTP info
|
554
|
-
|
555
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
556
|
-
"""
|
541
|
+
"""Ping with HTTP info"""
|
557
542
|
if self.is_sync:
|
558
543
|
return self._ping_sync_with_http_info(
|
559
544
|
_request_timeout=_request_timeout,
|
@@ -587,10 +572,7 @@ class StatusApi:
|
|
587
572
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
588
573
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
589
574
|
) -> RESTResponseType:
|
590
|
-
"""Ping without preloading content
|
591
|
-
|
592
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
593
|
-
"""
|
575
|
+
"""Ping without preloading content"""
|
594
576
|
if self.is_sync:
|
595
577
|
return self._ping_sync_without_preload_content(
|
596
578
|
_request_timeout=_request_timeout,
|