crypticorn 2.15.0__py3-none-any.whl → 2.17.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/__init__.py +2 -2
- crypticorn/auth/client/api/admin_api.py +397 -13
- crypticorn/auth/client/api/auth_api.py +3610 -341
- crypticorn/auth/client/api/service_api.py +249 -7
- crypticorn/auth/client/api/user_api.py +2295 -179
- crypticorn/auth/client/api/wallet_api.py +1468 -81
- crypticorn/auth/client/configuration.py +2 -2
- crypticorn/auth/client/models/create_api_key_request.py +2 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
- crypticorn/auth/client/rest.py +23 -4
- crypticorn/auth/main.py +8 -5
- 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 +226 -59
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +45 -14
- crypticorn/common/decorators.py +1 -2
- crypticorn/common/enums.py +0 -2
- crypticorn/common/errors.py +10 -0
- crypticorn/common/metrics.py +30 -0
- crypticorn/common/middleware.py +94 -1
- crypticorn/common/pagination.py +252 -18
- crypticorn/common/router/admin_router.py +2 -2
- crypticorn/common/router/status_router.py +40 -2
- crypticorn/common/scopes.py +2 -0
- crypticorn/common/warnings.py +8 -0
- 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 +2986 -0
- crypticorn/dex/client/api/signals_api.py +1798 -0
- crypticorn/dex/client/api/status_api.py +892 -0
- crypticorn/dex/client/api_client.py +758 -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 +158 -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 +1173 -47
- crypticorn/hive/client/api/data_api.py +499 -17
- crypticorn/hive/client/api/models_api.py +1595 -87
- crypticorn/hive/client/api/status_api.py +397 -16
- crypticorn/hive/client/api_client.py +0 -5
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- 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/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/hive/utils.py +2 -2
- crypticorn/klines/client/api/admin_api.py +1173 -47
- crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
- crypticorn/klines/client/api/funding_rates_api.py +315 -11
- crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
- crypticorn/klines/client/api/status_api.py +397 -16
- crypticorn/klines/client/api/symbols_api.py +216 -11
- crypticorn/klines/client/api/udf_api.py +1268 -51
- crypticorn/klines/client/api_client.py +0 -5
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- 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/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1173 -47
- crypticorn/metrics/client/api/exchanges_api.py +1370 -145
- crypticorn/metrics/client/api/indicators_api.py +622 -17
- crypticorn/metrics/client/api/logs_api.py +296 -11
- crypticorn/metrics/client/api/marketcap_api.py +1207 -67
- crypticorn/metrics/client/api/markets_api.py +343 -11
- crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
- crypticorn/metrics/client/api/status_api.py +397 -16
- crypticorn/metrics/client/api/tokens_api.py +382 -15
- crypticorn/metrics/client/api_client.py +0 -5
- crypticorn/metrics/client/configuration.py +4 -2
- 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/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1585 -57
- crypticorn/pay/client/api/now_payments_api.py +961 -39
- crypticorn/pay/client/api/payments_api.py +562 -17
- crypticorn/pay/client/api/products_api.py +880 -30
- crypticorn/pay/client/api/status_api.py +397 -16
- crypticorn/pay/client/api_client.py +0 -5
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- 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/pay/client/models/scope.py +1 -0
- crypticorn/pay/client/rest.py +23 -4
- crypticorn/pay/main.py +10 -6
- crypticorn/trade/client/__init__.py +11 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1184 -55
- crypticorn/trade/client/api/api_keys_api.py +1678 -162
- crypticorn/trade/client/api/bots_api.py +7563 -187
- crypticorn/trade/client/api/exchanges_api.py +565 -19
- crypticorn/trade/client/api/notifications_api.py +1290 -116
- crypticorn/trade/client/api/orders_api.py +393 -55
- crypticorn/trade/client/api/status_api.py +397 -13
- crypticorn/trade/client/api/strategies_api.py +1133 -77
- crypticorn/trade/client/api/trading_actions_api.py +786 -65
- crypticorn/trade/client/models/__init__.py +11 -0
- crypticorn/trade/client/models/actions_count.py +88 -0
- crypticorn/trade/client/models/api_error_identifier.py +8 -7
- 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.py +6 -1
- crypticorn/trade/client/models/exchange_key.py +1 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/exchange_key_create.py +17 -1
- crypticorn/trade/client/models/exchange_key_update.py +17 -1
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/futures_trading_action.py +6 -28
- crypticorn/trade/client/models/futures_trading_action_create.py +10 -13
- crypticorn/trade/client/models/notification.py +17 -1
- crypticorn/trade/client/models/notification_create.py +18 -2
- crypticorn/trade/client/models/notification_update.py +17 -1
- crypticorn/trade/client/models/order.py +2 -14
- 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/pn_l.py +95 -0
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/spot_balance.py +109 -0
- crypticorn/trade/client/models/spot_trading_action_create.py +4 -1
- crypticorn/trade/client/models/strategy.py +22 -4
- crypticorn/trade/client/models/strategy_create.py +23 -5
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +19 -3
- crypticorn/trade/client/models/tpsl.py +4 -27
- crypticorn/trade/client/models/tpsl_create.py +6 -19
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +167 -132
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.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 Any, List, Optional
|
21
|
-
from
|
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
|
)
|
@@ -31,6 +32,24 @@ from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
|
31
32
|
from crypticorn.trade.client.api_response import ApiResponse
|
32
33
|
from crypticorn.trade.client.rest import RESTResponseType
|
33
34
|
|
35
|
+
# Import async_to_sync for sync methods
|
36
|
+
try:
|
37
|
+
from asgiref.sync import async_to_sync
|
38
|
+
|
39
|
+
_HAS_ASGIREF = True
|
40
|
+
except ImportError:
|
41
|
+
_HAS_ASGIREF = False
|
42
|
+
|
43
|
+
def async_to_sync(async_func):
|
44
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
45
|
+
|
46
|
+
def wrapper(*args, **kwargs):
|
47
|
+
raise ImportError(
|
48
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
49
|
+
)
|
50
|
+
|
51
|
+
return wrapper
|
52
|
+
|
34
53
|
|
35
54
|
class TradingActionsApi:
|
36
55
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -39,16 +58,184 @@ class TradingActionsApi:
|
|
39
58
|
Do not edit the class manually.
|
40
59
|
"""
|
41
60
|
|
42
|
-
def __init__(self, api_client=None) -> None:
|
61
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
43
62
|
if api_client is None:
|
44
63
|
api_client = ApiClient.get_default()
|
45
64
|
self.api_client = api_client
|
65
|
+
self.is_sync = is_sync
|
66
|
+
|
67
|
+
@validate_call
|
68
|
+
def get_actions_count(
|
69
|
+
self,
|
70
|
+
sort_order: Annotated[
|
71
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
72
|
+
] = None,
|
73
|
+
sort_by: Annotated[
|
74
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
75
|
+
] = None,
|
76
|
+
group_by: Annotated[
|
77
|
+
Optional[StrictStr],
|
78
|
+
Field(
|
79
|
+
description="The group by period for the actions count. Defaults to day."
|
80
|
+
),
|
81
|
+
] = None,
|
82
|
+
_request_timeout: Union[
|
83
|
+
None,
|
84
|
+
Annotated[StrictFloat, Field(gt=0)],
|
85
|
+
Tuple[
|
86
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
87
|
+
],
|
88
|
+
] = None,
|
89
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
90
|
+
_content_type: Optional[StrictStr] = None,
|
91
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
92
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
93
|
+
) -> List[ActionsCount]:
|
94
|
+
"""Get Actions Count"""
|
95
|
+
if self.is_sync:
|
96
|
+
return self._get_actions_count_sync(
|
97
|
+
sort_order=sort_order,
|
98
|
+
sort_by=sort_by,
|
99
|
+
group_by=group_by,
|
100
|
+
_request_timeout=_request_timeout,
|
101
|
+
_request_auth=_request_auth,
|
102
|
+
_content_type=_content_type,
|
103
|
+
_headers=_headers,
|
104
|
+
_host_index=_host_index,
|
105
|
+
)
|
106
|
+
|
107
|
+
else:
|
108
|
+
return self._get_actions_count_async(
|
109
|
+
sort_order=sort_order,
|
110
|
+
sort_by=sort_by,
|
111
|
+
group_by=group_by,
|
112
|
+
_request_timeout=_request_timeout,
|
113
|
+
_request_auth=_request_auth,
|
114
|
+
_content_type=_content_type,
|
115
|
+
_headers=_headers,
|
116
|
+
_host_index=_host_index,
|
117
|
+
)
|
118
|
+
|
119
|
+
@validate_call
|
120
|
+
def get_actions_count_with_http_info(
|
121
|
+
self,
|
122
|
+
sort_order: Annotated[
|
123
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
124
|
+
] = None,
|
125
|
+
sort_by: Annotated[
|
126
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
127
|
+
] = None,
|
128
|
+
group_by: Annotated[
|
129
|
+
Optional[StrictStr],
|
130
|
+
Field(
|
131
|
+
description="The group by period for the actions count. Defaults to day."
|
132
|
+
),
|
133
|
+
] = None,
|
134
|
+
_request_timeout: Union[
|
135
|
+
None,
|
136
|
+
Annotated[StrictFloat, Field(gt=0)],
|
137
|
+
Tuple[
|
138
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
139
|
+
],
|
140
|
+
] = None,
|
141
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
142
|
+
_content_type: Optional[StrictStr] = None,
|
143
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
144
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
145
|
+
) -> ApiResponse[List[ActionsCount]]:
|
146
|
+
"""Get Actions Count with HTTP info"""
|
147
|
+
if self.is_sync:
|
148
|
+
return self._get_actions_count_sync_with_http_info(
|
149
|
+
sort_order=sort_order,
|
150
|
+
sort_by=sort_by,
|
151
|
+
group_by=group_by,
|
152
|
+
_request_timeout=_request_timeout,
|
153
|
+
_request_auth=_request_auth,
|
154
|
+
_content_type=_content_type,
|
155
|
+
_headers=_headers,
|
156
|
+
_host_index=_host_index,
|
157
|
+
)
|
158
|
+
|
159
|
+
else:
|
160
|
+
return self._get_actions_count_async_with_http_info(
|
161
|
+
sort_order=sort_order,
|
162
|
+
sort_by=sort_by,
|
163
|
+
group_by=group_by,
|
164
|
+
_request_timeout=_request_timeout,
|
165
|
+
_request_auth=_request_auth,
|
166
|
+
_content_type=_content_type,
|
167
|
+
_headers=_headers,
|
168
|
+
_host_index=_host_index,
|
169
|
+
)
|
170
|
+
|
171
|
+
@validate_call
|
172
|
+
def get_actions_count_without_preload_content(
|
173
|
+
self,
|
174
|
+
sort_order: Annotated[
|
175
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
176
|
+
] = None,
|
177
|
+
sort_by: Annotated[
|
178
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
179
|
+
] = None,
|
180
|
+
group_by: Annotated[
|
181
|
+
Optional[StrictStr],
|
182
|
+
Field(
|
183
|
+
description="The group by period for the actions count. Defaults to day."
|
184
|
+
),
|
185
|
+
] = None,
|
186
|
+
_request_timeout: Union[
|
187
|
+
None,
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
189
|
+
Tuple[
|
190
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
191
|
+
],
|
192
|
+
] = None,
|
193
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
194
|
+
_content_type: Optional[StrictStr] = None,
|
195
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
196
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
197
|
+
) -> RESTResponseType:
|
198
|
+
"""Get Actions Count without preloading content"""
|
199
|
+
if self.is_sync:
|
200
|
+
return self._get_actions_count_sync_without_preload_content(
|
201
|
+
sort_order=sort_order,
|
202
|
+
sort_by=sort_by,
|
203
|
+
group_by=group_by,
|
204
|
+
_request_timeout=_request_timeout,
|
205
|
+
_request_auth=_request_auth,
|
206
|
+
_content_type=_content_type,
|
207
|
+
_headers=_headers,
|
208
|
+
_host_index=_host_index,
|
209
|
+
)
|
210
|
+
|
211
|
+
else:
|
212
|
+
return self._get_actions_count_async_without_preload_content(
|
213
|
+
sort_order=sort_order,
|
214
|
+
sort_by=sort_by,
|
215
|
+
group_by=group_by,
|
216
|
+
_request_timeout=_request_timeout,
|
217
|
+
_request_auth=_request_auth,
|
218
|
+
_content_type=_content_type,
|
219
|
+
_headers=_headers,
|
220
|
+
_host_index=_host_index,
|
221
|
+
)
|
46
222
|
|
223
|
+
# Private async implementation methods
|
47
224
|
@validate_call
|
48
|
-
async def
|
225
|
+
async def _get_actions_count_async(
|
49
226
|
self,
|
50
|
-
|
51
|
-
|
227
|
+
sort_order: Annotated[
|
228
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
229
|
+
] = None,
|
230
|
+
sort_by: Annotated[
|
231
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
232
|
+
] = None,
|
233
|
+
group_by: Annotated[
|
234
|
+
Optional[StrictStr],
|
235
|
+
Field(
|
236
|
+
description="The group by period for the actions count. Defaults to day."
|
237
|
+
),
|
238
|
+
] = None,
|
52
239
|
_request_timeout: Union[
|
53
240
|
None,
|
54
241
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -60,14 +247,17 @@ class TradingActionsApi:
|
|
60
247
|
_content_type: Optional[StrictStr] = None,
|
61
248
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
62
249
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
63
|
-
) -> List[
|
64
|
-
"""Get Actions
|
250
|
+
) -> List[ActionsCount]:
|
251
|
+
"""Get Actions Count
|
65
252
|
|
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`..
|
66
254
|
|
67
|
-
:param
|
68
|
-
:type
|
69
|
-
:param
|
70
|
-
:type
|
255
|
+
:param sort_order: The order to sort by
|
256
|
+
:type sort_order: str
|
257
|
+
:param sort_by: The field to sort by
|
258
|
+
:type sort_by: str
|
259
|
+
:param group_by: The group by period for the actions count. Defaults to day.
|
260
|
+
:type group_by: str
|
71
261
|
:param _request_timeout: timeout setting for this request. If one
|
72
262
|
number provided, it will be total request
|
73
263
|
timeout. It can also be a pair (tuple) of
|
@@ -90,9 +280,10 @@ class TradingActionsApi:
|
|
90
280
|
:return: Returns the result object.
|
91
281
|
""" # noqa: E501
|
92
282
|
|
93
|
-
_param = self.
|
94
|
-
|
95
|
-
|
283
|
+
_param = self._get_actions_count_serialize(
|
284
|
+
sort_order=sort_order,
|
285
|
+
sort_by=sort_by,
|
286
|
+
group_by=group_by,
|
96
287
|
_request_auth=_request_auth,
|
97
288
|
_content_type=_content_type,
|
98
289
|
_headers=_headers,
|
@@ -100,7 +291,7 @@ class TradingActionsApi:
|
|
100
291
|
)
|
101
292
|
|
102
293
|
_response_types_map: Dict[str, Optional[str]] = {
|
103
|
-
"200": "List[
|
294
|
+
"200": "List[ActionsCount]",
|
104
295
|
}
|
105
296
|
response_data = await self.api_client.call_api(
|
106
297
|
*_param, _request_timeout=_request_timeout
|
@@ -112,10 +303,20 @@ class TradingActionsApi:
|
|
112
303
|
).data
|
113
304
|
|
114
305
|
@validate_call
|
115
|
-
async def
|
306
|
+
async def _get_actions_count_async_with_http_info(
|
116
307
|
self,
|
117
|
-
|
118
|
-
|
308
|
+
sort_order: Annotated[
|
309
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
310
|
+
] = None,
|
311
|
+
sort_by: Annotated[
|
312
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
313
|
+
] = None,
|
314
|
+
group_by: Annotated[
|
315
|
+
Optional[StrictStr],
|
316
|
+
Field(
|
317
|
+
description="The group by period for the actions count. Defaults to day."
|
318
|
+
),
|
319
|
+
] = None,
|
119
320
|
_request_timeout: Union[
|
120
321
|
None,
|
121
322
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -127,14 +328,17 @@ class TradingActionsApi:
|
|
127
328
|
_content_type: Optional[StrictStr] = None,
|
128
329
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
129
330
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
130
|
-
) -> ApiResponse[List[
|
131
|
-
"""Get Actions
|
331
|
+
) -> ApiResponse[List[ActionsCount]]:
|
332
|
+
"""Get Actions Count
|
132
333
|
|
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`..
|
133
335
|
|
134
|
-
:param
|
135
|
-
:type
|
136
|
-
:param
|
137
|
-
:type
|
336
|
+
:param sort_order: The order to sort by
|
337
|
+
:type sort_order: str
|
338
|
+
:param sort_by: The field to sort by
|
339
|
+
:type sort_by: str
|
340
|
+
:param group_by: The group by period for the actions count. Defaults to day.
|
341
|
+
:type group_by: str
|
138
342
|
:param _request_timeout: timeout setting for this request. If one
|
139
343
|
number provided, it will be total request
|
140
344
|
timeout. It can also be a pair (tuple) of
|
@@ -157,9 +361,10 @@ class TradingActionsApi:
|
|
157
361
|
:return: Returns the result object.
|
158
362
|
""" # noqa: E501
|
159
363
|
|
160
|
-
_param = self.
|
161
|
-
|
162
|
-
|
364
|
+
_param = self._get_actions_count_serialize(
|
365
|
+
sort_order=sort_order,
|
366
|
+
sort_by=sort_by,
|
367
|
+
group_by=group_by,
|
163
368
|
_request_auth=_request_auth,
|
164
369
|
_content_type=_content_type,
|
165
370
|
_headers=_headers,
|
@@ -167,22 +372,31 @@ class TradingActionsApi:
|
|
167
372
|
)
|
168
373
|
|
169
374
|
_response_types_map: Dict[str, Optional[str]] = {
|
170
|
-
"200": "List[
|
375
|
+
"200": "List[ActionsCount]",
|
171
376
|
}
|
172
377
|
response_data = await self.api_client.call_api(
|
173
378
|
*_param, _request_timeout=_request_timeout
|
174
379
|
)
|
175
380
|
await response_data.read()
|
176
381
|
return self.api_client.response_deserialize(
|
177
|
-
response_data=response_data,
|
178
|
-
response_types_map=_response_types_map,
|
382
|
+
response_data=response_data, response_types_map=_response_types_map
|
179
383
|
)
|
180
384
|
|
181
385
|
@validate_call
|
182
|
-
async def
|
386
|
+
async def _get_actions_count_async_without_preload_content(
|
183
387
|
self,
|
184
|
-
|
185
|
-
|
388
|
+
sort_order: Annotated[
|
389
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
390
|
+
] = None,
|
391
|
+
sort_by: Annotated[
|
392
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
393
|
+
] = None,
|
394
|
+
group_by: Annotated[
|
395
|
+
Optional[StrictStr],
|
396
|
+
Field(
|
397
|
+
description="The group by period for the actions count. Defaults to day."
|
398
|
+
),
|
399
|
+
] = None,
|
186
400
|
_request_timeout: Union[
|
187
401
|
None,
|
188
402
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -195,13 +409,16 @@ class TradingActionsApi:
|
|
195
409
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
196
410
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
197
411
|
) -> RESTResponseType:
|
198
|
-
"""Get Actions
|
412
|
+
"""Get Actions Count
|
199
413
|
|
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`..
|
200
415
|
|
201
|
-
:param
|
202
|
-
:type
|
203
|
-
:param
|
204
|
-
:type
|
416
|
+
:param sort_order: The order to sort by
|
417
|
+
:type sort_order: str
|
418
|
+
:param sort_by: The field to sort by
|
419
|
+
:type sort_by: str
|
420
|
+
:param group_by: The group by period for the actions count. Defaults to day.
|
421
|
+
:type group_by: str
|
205
422
|
:param _request_timeout: timeout setting for this request. If one
|
206
423
|
number provided, it will be total request
|
207
424
|
timeout. It can also be a pair (tuple) of
|
@@ -224,9 +441,10 @@ class TradingActionsApi:
|
|
224
441
|
:return: Returns the result object.
|
225
442
|
""" # noqa: E501
|
226
443
|
|
227
|
-
_param = self.
|
228
|
-
|
229
|
-
|
444
|
+
_param = self._get_actions_count_serialize(
|
445
|
+
sort_order=sort_order,
|
446
|
+
sort_by=sort_by,
|
447
|
+
group_by=group_by,
|
230
448
|
_request_auth=_request_auth,
|
231
449
|
_content_type=_content_type,
|
232
450
|
_headers=_headers,
|
@@ -234,17 +452,136 @@ class TradingActionsApi:
|
|
234
452
|
)
|
235
453
|
|
236
454
|
_response_types_map: Dict[str, Optional[str]] = {
|
237
|
-
"200": "List[
|
455
|
+
"200": "List[ActionsCount]",
|
238
456
|
}
|
239
457
|
response_data = await self.api_client.call_api(
|
240
458
|
*_param, _request_timeout=_request_timeout
|
241
459
|
)
|
242
|
-
return response_data
|
460
|
+
return response_data
|
461
|
+
|
462
|
+
# Private sync implementation methods
|
463
|
+
@validate_call
|
464
|
+
def _get_actions_count_sync(
|
465
|
+
self,
|
466
|
+
sort_order: Annotated[
|
467
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
468
|
+
] = None,
|
469
|
+
sort_by: Annotated[
|
470
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
471
|
+
] = None,
|
472
|
+
group_by: Annotated[
|
473
|
+
Optional[StrictStr],
|
474
|
+
Field(
|
475
|
+
description="The group by period for the actions count. Defaults to day."
|
476
|
+
),
|
477
|
+
] = None,
|
478
|
+
_request_timeout: Union[
|
479
|
+
None,
|
480
|
+
Annotated[StrictFloat, Field(gt=0)],
|
481
|
+
Tuple[
|
482
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
483
|
+
],
|
484
|
+
] = None,
|
485
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
486
|
+
_content_type: Optional[StrictStr] = None,
|
487
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
488
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
489
|
+
) -> List[ActionsCount]:
|
490
|
+
"""Synchronous version of get_actions_count"""
|
491
|
+
return async_to_sync(self._get_actions_count_async)(
|
492
|
+
sort_order=sort_order,
|
493
|
+
sort_by=sort_by,
|
494
|
+
group_by=group_by,
|
495
|
+
_request_timeout=_request_timeout,
|
496
|
+
_request_auth=_request_auth,
|
497
|
+
_content_type=_content_type,
|
498
|
+
_headers=_headers,
|
499
|
+
_host_index=_host_index,
|
500
|
+
)
|
501
|
+
|
502
|
+
@validate_call
|
503
|
+
def _get_actions_count_sync_with_http_info(
|
504
|
+
self,
|
505
|
+
sort_order: Annotated[
|
506
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
507
|
+
] = None,
|
508
|
+
sort_by: Annotated[
|
509
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
510
|
+
] = None,
|
511
|
+
group_by: Annotated[
|
512
|
+
Optional[StrictStr],
|
513
|
+
Field(
|
514
|
+
description="The group by period for the actions count. Defaults to day."
|
515
|
+
),
|
516
|
+
] = None,
|
517
|
+
_request_timeout: Union[
|
518
|
+
None,
|
519
|
+
Annotated[StrictFloat, Field(gt=0)],
|
520
|
+
Tuple[
|
521
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
522
|
+
],
|
523
|
+
] = None,
|
524
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
525
|
+
_content_type: Optional[StrictStr] = None,
|
526
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
527
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
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)(
|
531
|
+
sort_order=sort_order,
|
532
|
+
sort_by=sort_by,
|
533
|
+
group_by=group_by,
|
534
|
+
_request_timeout=_request_timeout,
|
535
|
+
_request_auth=_request_auth,
|
536
|
+
_content_type=_content_type,
|
537
|
+
_headers=_headers,
|
538
|
+
_host_index=_host_index,
|
539
|
+
)
|
243
540
|
|
244
|
-
|
541
|
+
@validate_call
|
542
|
+
def _get_actions_count_sync_without_preload_content(
|
245
543
|
self,
|
246
|
-
|
247
|
-
|
544
|
+
sort_order: Annotated[
|
545
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
546
|
+
] = None,
|
547
|
+
sort_by: Annotated[
|
548
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
549
|
+
] = None,
|
550
|
+
group_by: Annotated[
|
551
|
+
Optional[StrictStr],
|
552
|
+
Field(
|
553
|
+
description="The group by period for the actions count. Defaults to day."
|
554
|
+
),
|
555
|
+
] = None,
|
556
|
+
_request_timeout: Union[
|
557
|
+
None,
|
558
|
+
Annotated[StrictFloat, Field(gt=0)],
|
559
|
+
Tuple[
|
560
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
561
|
+
],
|
562
|
+
] = None,
|
563
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
564
|
+
_content_type: Optional[StrictStr] = None,
|
565
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
566
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
567
|
+
) -> RESTResponseType:
|
568
|
+
"""Synchronous version of get_actions_count_without_preload_content"""
|
569
|
+
return async_to_sync(self._get_actions_count_async_without_preload_content)(
|
570
|
+
sort_order=sort_order,
|
571
|
+
sort_by=sort_by,
|
572
|
+
group_by=group_by,
|
573
|
+
_request_timeout=_request_timeout,
|
574
|
+
_request_auth=_request_auth,
|
575
|
+
_content_type=_content_type,
|
576
|
+
_headers=_headers,
|
577
|
+
_host_index=_host_index,
|
578
|
+
)
|
579
|
+
|
580
|
+
def _get_actions_count_serialize(
|
581
|
+
self,
|
582
|
+
sort_order,
|
583
|
+
sort_by,
|
584
|
+
group_by,
|
248
585
|
_request_auth,
|
249
586
|
_content_type,
|
250
587
|
_headers,
|
@@ -266,13 +603,17 @@ class TradingActionsApi:
|
|
266
603
|
|
267
604
|
# process the path parameters
|
268
605
|
# process the query parameters
|
269
|
-
if
|
606
|
+
if sort_order is not None:
|
607
|
+
|
608
|
+
_query_params.append(("sort_order", sort_order))
|
270
609
|
|
271
|
-
|
610
|
+
if sort_by is not None:
|
272
611
|
|
273
|
-
|
612
|
+
_query_params.append(("sort_by", sort_by))
|
274
613
|
|
275
|
-
|
614
|
+
if group_by is not None:
|
615
|
+
|
616
|
+
_query_params.append(("group_by", group_by))
|
276
617
|
|
277
618
|
# process the header parameters
|
278
619
|
# process the form parameters
|
@@ -285,11 +626,11 @@ class TradingActionsApi:
|
|
285
626
|
)
|
286
627
|
|
287
628
|
# authentication setting
|
288
|
-
_auth_settings: List[str] = ["HTTPBearer"]
|
629
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
289
630
|
|
290
631
|
return self.api_client.param_serialize(
|
291
632
|
method="GET",
|
292
|
-
resource_path="/actions",
|
633
|
+
resource_path="/actions/count",
|
293
634
|
path_params=_path_params,
|
294
635
|
query_params=_query_params,
|
295
636
|
header_params=_header_params,
|
@@ -303,7 +644,119 @@ class TradingActionsApi:
|
|
303
644
|
)
|
304
645
|
|
305
646
|
@validate_call
|
306
|
-
|
647
|
+
def post_futures_action(
|
648
|
+
self,
|
649
|
+
futures_trading_action_create: FuturesTradingActionCreate,
|
650
|
+
_request_timeout: Union[
|
651
|
+
None,
|
652
|
+
Annotated[StrictFloat, Field(gt=0)],
|
653
|
+
Tuple[
|
654
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
655
|
+
],
|
656
|
+
] = None,
|
657
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
658
|
+
_content_type: Optional[StrictStr] = None,
|
659
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
660
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
661
|
+
) -> PostFuturesAction:
|
662
|
+
"""Post Futures Action"""
|
663
|
+
if self.is_sync:
|
664
|
+
return self._post_futures_action_sync(
|
665
|
+
futures_trading_action_create=futures_trading_action_create,
|
666
|
+
_request_timeout=_request_timeout,
|
667
|
+
_request_auth=_request_auth,
|
668
|
+
_content_type=_content_type,
|
669
|
+
_headers=_headers,
|
670
|
+
_host_index=_host_index,
|
671
|
+
)
|
672
|
+
|
673
|
+
else:
|
674
|
+
return self._post_futures_action_async(
|
675
|
+
futures_trading_action_create=futures_trading_action_create,
|
676
|
+
_request_timeout=_request_timeout,
|
677
|
+
_request_auth=_request_auth,
|
678
|
+
_content_type=_content_type,
|
679
|
+
_headers=_headers,
|
680
|
+
_host_index=_host_index,
|
681
|
+
)
|
682
|
+
|
683
|
+
@validate_call
|
684
|
+
def post_futures_action_with_http_info(
|
685
|
+
self,
|
686
|
+
futures_trading_action_create: FuturesTradingActionCreate,
|
687
|
+
_request_timeout: Union[
|
688
|
+
None,
|
689
|
+
Annotated[StrictFloat, Field(gt=0)],
|
690
|
+
Tuple[
|
691
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
692
|
+
],
|
693
|
+
] = None,
|
694
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
695
|
+
_content_type: Optional[StrictStr] = None,
|
696
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
697
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
698
|
+
) -> ApiResponse[PostFuturesAction]:
|
699
|
+
"""Post Futures Action with HTTP info"""
|
700
|
+
if self.is_sync:
|
701
|
+
return self._post_futures_action_sync_with_http_info(
|
702
|
+
futures_trading_action_create=futures_trading_action_create,
|
703
|
+
_request_timeout=_request_timeout,
|
704
|
+
_request_auth=_request_auth,
|
705
|
+
_content_type=_content_type,
|
706
|
+
_headers=_headers,
|
707
|
+
_host_index=_host_index,
|
708
|
+
)
|
709
|
+
|
710
|
+
else:
|
711
|
+
return self._post_futures_action_async_with_http_info(
|
712
|
+
futures_trading_action_create=futures_trading_action_create,
|
713
|
+
_request_timeout=_request_timeout,
|
714
|
+
_request_auth=_request_auth,
|
715
|
+
_content_type=_content_type,
|
716
|
+
_headers=_headers,
|
717
|
+
_host_index=_host_index,
|
718
|
+
)
|
719
|
+
|
720
|
+
@validate_call
|
721
|
+
def post_futures_action_without_preload_content(
|
722
|
+
self,
|
723
|
+
futures_trading_action_create: FuturesTradingActionCreate,
|
724
|
+
_request_timeout: Union[
|
725
|
+
None,
|
726
|
+
Annotated[StrictFloat, Field(gt=0)],
|
727
|
+
Tuple[
|
728
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
729
|
+
],
|
730
|
+
] = None,
|
731
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
732
|
+
_content_type: Optional[StrictStr] = None,
|
733
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
734
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
735
|
+
) -> RESTResponseType:
|
736
|
+
"""Post Futures Action without preloading content"""
|
737
|
+
if self.is_sync:
|
738
|
+
return self._post_futures_action_sync_without_preload_content(
|
739
|
+
futures_trading_action_create=futures_trading_action_create,
|
740
|
+
_request_timeout=_request_timeout,
|
741
|
+
_request_auth=_request_auth,
|
742
|
+
_content_type=_content_type,
|
743
|
+
_headers=_headers,
|
744
|
+
_host_index=_host_index,
|
745
|
+
)
|
746
|
+
|
747
|
+
else:
|
748
|
+
return self._post_futures_action_async_without_preload_content(
|
749
|
+
futures_trading_action_create=futures_trading_action_create,
|
750
|
+
_request_timeout=_request_timeout,
|
751
|
+
_request_auth=_request_auth,
|
752
|
+
_content_type=_content_type,
|
753
|
+
_headers=_headers,
|
754
|
+
_host_index=_host_index,
|
755
|
+
)
|
756
|
+
|
757
|
+
# Private async implementation methods
|
758
|
+
@validate_call
|
759
|
+
async def _post_futures_action_async(
|
307
760
|
self,
|
308
761
|
futures_trading_action_create: FuturesTradingActionCreate,
|
309
762
|
_request_timeout: Union[
|
@@ -367,7 +820,7 @@ class TradingActionsApi:
|
|
367
820
|
).data
|
368
821
|
|
369
822
|
@validate_call
|
370
|
-
async def
|
823
|
+
async def _post_futures_action_async_with_http_info(
|
371
824
|
self,
|
372
825
|
futures_trading_action_create: FuturesTradingActionCreate,
|
373
826
|
_request_timeout: Union[
|
@@ -426,12 +879,11 @@ class TradingActionsApi:
|
|
426
879
|
)
|
427
880
|
await response_data.read()
|
428
881
|
return self.api_client.response_deserialize(
|
429
|
-
response_data=response_data,
|
430
|
-
response_types_map=_response_types_map,
|
882
|
+
response_data=response_data, response_types_map=_response_types_map
|
431
883
|
)
|
432
884
|
|
433
885
|
@validate_call
|
434
|
-
async def
|
886
|
+
async def _post_futures_action_async_without_preload_content(
|
435
887
|
self,
|
436
888
|
futures_trading_action_create: FuturesTradingActionCreate,
|
437
889
|
_request_timeout: Union[
|
@@ -488,7 +940,86 @@ class TradingActionsApi:
|
|
488
940
|
response_data = await self.api_client.call_api(
|
489
941
|
*_param, _request_timeout=_request_timeout
|
490
942
|
)
|
491
|
-
return response_data
|
943
|
+
return response_data
|
944
|
+
|
945
|
+
# Private sync implementation methods
|
946
|
+
@validate_call
|
947
|
+
def _post_futures_action_sync(
|
948
|
+
self,
|
949
|
+
futures_trading_action_create: FuturesTradingActionCreate,
|
950
|
+
_request_timeout: Union[
|
951
|
+
None,
|
952
|
+
Annotated[StrictFloat, Field(gt=0)],
|
953
|
+
Tuple[
|
954
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
955
|
+
],
|
956
|
+
] = None,
|
957
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
958
|
+
_content_type: Optional[StrictStr] = None,
|
959
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
960
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
961
|
+
) -> PostFuturesAction:
|
962
|
+
"""Synchronous version of post_futures_action"""
|
963
|
+
return async_to_sync(self._post_futures_action_async)(
|
964
|
+
futures_trading_action_create=futures_trading_action_create,
|
965
|
+
_request_timeout=_request_timeout,
|
966
|
+
_request_auth=_request_auth,
|
967
|
+
_content_type=_content_type,
|
968
|
+
_headers=_headers,
|
969
|
+
_host_index=_host_index,
|
970
|
+
)
|
971
|
+
|
972
|
+
@validate_call
|
973
|
+
def _post_futures_action_sync_with_http_info(
|
974
|
+
self,
|
975
|
+
futures_trading_action_create: FuturesTradingActionCreate,
|
976
|
+
_request_timeout: Union[
|
977
|
+
None,
|
978
|
+
Annotated[StrictFloat, Field(gt=0)],
|
979
|
+
Tuple[
|
980
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
981
|
+
],
|
982
|
+
] = None,
|
983
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
984
|
+
_content_type: Optional[StrictStr] = None,
|
985
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
986
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
987
|
+
) -> ApiResponse[PostFuturesAction]:
|
988
|
+
"""Synchronous version of post_futures_action_with_http_info"""
|
989
|
+
return async_to_sync(self._post_futures_action_async_with_http_info)(
|
990
|
+
futures_trading_action_create=futures_trading_action_create,
|
991
|
+
_request_timeout=_request_timeout,
|
992
|
+
_request_auth=_request_auth,
|
993
|
+
_content_type=_content_type,
|
994
|
+
_headers=_headers,
|
995
|
+
_host_index=_host_index,
|
996
|
+
)
|
997
|
+
|
998
|
+
@validate_call
|
999
|
+
def _post_futures_action_sync_without_preload_content(
|
1000
|
+
self,
|
1001
|
+
futures_trading_action_create: FuturesTradingActionCreate,
|
1002
|
+
_request_timeout: Union[
|
1003
|
+
None,
|
1004
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1005
|
+
Tuple[
|
1006
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1007
|
+
],
|
1008
|
+
] = None,
|
1009
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1010
|
+
_content_type: Optional[StrictStr] = None,
|
1011
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1012
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1013
|
+
) -> RESTResponseType:
|
1014
|
+
"""Synchronous version of post_futures_action_without_preload_content"""
|
1015
|
+
return async_to_sync(self._post_futures_action_async_without_preload_content)(
|
1016
|
+
futures_trading_action_create=futures_trading_action_create,
|
1017
|
+
_request_timeout=_request_timeout,
|
1018
|
+
_request_auth=_request_auth,
|
1019
|
+
_content_type=_content_type,
|
1020
|
+
_headers=_headers,
|
1021
|
+
_host_index=_host_index,
|
1022
|
+
)
|
492
1023
|
|
493
1024
|
def _post_futures_action_serialize(
|
494
1025
|
self,
|
@@ -555,7 +1086,119 @@ class TradingActionsApi:
|
|
555
1086
|
)
|
556
1087
|
|
557
1088
|
@validate_call
|
558
|
-
|
1089
|
+
def post_spot_action(
|
1090
|
+
self,
|
1091
|
+
spot_trading_action_create: SpotTradingActionCreate,
|
1092
|
+
_request_timeout: Union[
|
1093
|
+
None,
|
1094
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1095
|
+
Tuple[
|
1096
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1097
|
+
],
|
1098
|
+
] = None,
|
1099
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1100
|
+
_content_type: Optional[StrictStr] = None,
|
1101
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1102
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1103
|
+
) -> object:
|
1104
|
+
"""Post Spot Action"""
|
1105
|
+
if self.is_sync:
|
1106
|
+
return self._post_spot_action_sync(
|
1107
|
+
spot_trading_action_create=spot_trading_action_create,
|
1108
|
+
_request_timeout=_request_timeout,
|
1109
|
+
_request_auth=_request_auth,
|
1110
|
+
_content_type=_content_type,
|
1111
|
+
_headers=_headers,
|
1112
|
+
_host_index=_host_index,
|
1113
|
+
)
|
1114
|
+
|
1115
|
+
else:
|
1116
|
+
return self._post_spot_action_async(
|
1117
|
+
spot_trading_action_create=spot_trading_action_create,
|
1118
|
+
_request_timeout=_request_timeout,
|
1119
|
+
_request_auth=_request_auth,
|
1120
|
+
_content_type=_content_type,
|
1121
|
+
_headers=_headers,
|
1122
|
+
_host_index=_host_index,
|
1123
|
+
)
|
1124
|
+
|
1125
|
+
@validate_call
|
1126
|
+
def post_spot_action_with_http_info(
|
1127
|
+
self,
|
1128
|
+
spot_trading_action_create: SpotTradingActionCreate,
|
1129
|
+
_request_timeout: Union[
|
1130
|
+
None,
|
1131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1132
|
+
Tuple[
|
1133
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1134
|
+
],
|
1135
|
+
] = None,
|
1136
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1137
|
+
_content_type: Optional[StrictStr] = None,
|
1138
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1139
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1140
|
+
) -> ApiResponse[object]:
|
1141
|
+
"""Post Spot Action with HTTP info"""
|
1142
|
+
if self.is_sync:
|
1143
|
+
return self._post_spot_action_sync_with_http_info(
|
1144
|
+
spot_trading_action_create=spot_trading_action_create,
|
1145
|
+
_request_timeout=_request_timeout,
|
1146
|
+
_request_auth=_request_auth,
|
1147
|
+
_content_type=_content_type,
|
1148
|
+
_headers=_headers,
|
1149
|
+
_host_index=_host_index,
|
1150
|
+
)
|
1151
|
+
|
1152
|
+
else:
|
1153
|
+
return self._post_spot_action_async_with_http_info(
|
1154
|
+
spot_trading_action_create=spot_trading_action_create,
|
1155
|
+
_request_timeout=_request_timeout,
|
1156
|
+
_request_auth=_request_auth,
|
1157
|
+
_content_type=_content_type,
|
1158
|
+
_headers=_headers,
|
1159
|
+
_host_index=_host_index,
|
1160
|
+
)
|
1161
|
+
|
1162
|
+
@validate_call
|
1163
|
+
def post_spot_action_without_preload_content(
|
1164
|
+
self,
|
1165
|
+
spot_trading_action_create: SpotTradingActionCreate,
|
1166
|
+
_request_timeout: Union[
|
1167
|
+
None,
|
1168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1169
|
+
Tuple[
|
1170
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1171
|
+
],
|
1172
|
+
] = None,
|
1173
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1174
|
+
_content_type: Optional[StrictStr] = None,
|
1175
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1176
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1177
|
+
) -> RESTResponseType:
|
1178
|
+
"""Post Spot Action without preloading content"""
|
1179
|
+
if self.is_sync:
|
1180
|
+
return self._post_spot_action_sync_without_preload_content(
|
1181
|
+
spot_trading_action_create=spot_trading_action_create,
|
1182
|
+
_request_timeout=_request_timeout,
|
1183
|
+
_request_auth=_request_auth,
|
1184
|
+
_content_type=_content_type,
|
1185
|
+
_headers=_headers,
|
1186
|
+
_host_index=_host_index,
|
1187
|
+
)
|
1188
|
+
|
1189
|
+
else:
|
1190
|
+
return self._post_spot_action_async_without_preload_content(
|
1191
|
+
spot_trading_action_create=spot_trading_action_create,
|
1192
|
+
_request_timeout=_request_timeout,
|
1193
|
+
_request_auth=_request_auth,
|
1194
|
+
_content_type=_content_type,
|
1195
|
+
_headers=_headers,
|
1196
|
+
_host_index=_host_index,
|
1197
|
+
)
|
1198
|
+
|
1199
|
+
# Private async implementation methods
|
1200
|
+
@validate_call
|
1201
|
+
async def _post_spot_action_async(
|
559
1202
|
self,
|
560
1203
|
spot_trading_action_create: SpotTradingActionCreate,
|
561
1204
|
_request_timeout: Union[
|
@@ -618,7 +1261,7 @@ class TradingActionsApi:
|
|
618
1261
|
).data
|
619
1262
|
|
620
1263
|
@validate_call
|
621
|
-
async def
|
1264
|
+
async def _post_spot_action_async_with_http_info(
|
622
1265
|
self,
|
623
1266
|
spot_trading_action_create: SpotTradingActionCreate,
|
624
1267
|
_request_timeout: Union[
|
@@ -676,12 +1319,11 @@ class TradingActionsApi:
|
|
676
1319
|
)
|
677
1320
|
await response_data.read()
|
678
1321
|
return self.api_client.response_deserialize(
|
679
|
-
response_data=response_data,
|
680
|
-
response_types_map=_response_types_map,
|
1322
|
+
response_data=response_data, response_types_map=_response_types_map
|
681
1323
|
)
|
682
1324
|
|
683
1325
|
@validate_call
|
684
|
-
async def
|
1326
|
+
async def _post_spot_action_async_without_preload_content(
|
685
1327
|
self,
|
686
1328
|
spot_trading_action_create: SpotTradingActionCreate,
|
687
1329
|
_request_timeout: Union[
|
@@ -737,7 +1379,86 @@ class TradingActionsApi:
|
|
737
1379
|
response_data = await self.api_client.call_api(
|
738
1380
|
*_param, _request_timeout=_request_timeout
|
739
1381
|
)
|
740
|
-
return response_data
|
1382
|
+
return response_data
|
1383
|
+
|
1384
|
+
# Private sync implementation methods
|
1385
|
+
@validate_call
|
1386
|
+
def _post_spot_action_sync(
|
1387
|
+
self,
|
1388
|
+
spot_trading_action_create: SpotTradingActionCreate,
|
1389
|
+
_request_timeout: Union[
|
1390
|
+
None,
|
1391
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1392
|
+
Tuple[
|
1393
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1394
|
+
],
|
1395
|
+
] = None,
|
1396
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1397
|
+
_content_type: Optional[StrictStr] = None,
|
1398
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1399
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1400
|
+
) -> object:
|
1401
|
+
"""Synchronous version of post_spot_action"""
|
1402
|
+
return async_to_sync(self._post_spot_action_async)(
|
1403
|
+
spot_trading_action_create=spot_trading_action_create,
|
1404
|
+
_request_timeout=_request_timeout,
|
1405
|
+
_request_auth=_request_auth,
|
1406
|
+
_content_type=_content_type,
|
1407
|
+
_headers=_headers,
|
1408
|
+
_host_index=_host_index,
|
1409
|
+
)
|
1410
|
+
|
1411
|
+
@validate_call
|
1412
|
+
def _post_spot_action_sync_with_http_info(
|
1413
|
+
self,
|
1414
|
+
spot_trading_action_create: SpotTradingActionCreate,
|
1415
|
+
_request_timeout: Union[
|
1416
|
+
None,
|
1417
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1418
|
+
Tuple[
|
1419
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1420
|
+
],
|
1421
|
+
] = None,
|
1422
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1423
|
+
_content_type: Optional[StrictStr] = None,
|
1424
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1425
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1426
|
+
) -> ApiResponse[object]:
|
1427
|
+
"""Synchronous version of post_spot_action_with_http_info"""
|
1428
|
+
return async_to_sync(self._post_spot_action_async_with_http_info)(
|
1429
|
+
spot_trading_action_create=spot_trading_action_create,
|
1430
|
+
_request_timeout=_request_timeout,
|
1431
|
+
_request_auth=_request_auth,
|
1432
|
+
_content_type=_content_type,
|
1433
|
+
_headers=_headers,
|
1434
|
+
_host_index=_host_index,
|
1435
|
+
)
|
1436
|
+
|
1437
|
+
@validate_call
|
1438
|
+
def _post_spot_action_sync_without_preload_content(
|
1439
|
+
self,
|
1440
|
+
spot_trading_action_create: SpotTradingActionCreate,
|
1441
|
+
_request_timeout: Union[
|
1442
|
+
None,
|
1443
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1444
|
+
Tuple[
|
1445
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1446
|
+
],
|
1447
|
+
] = None,
|
1448
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1449
|
+
_content_type: Optional[StrictStr] = None,
|
1450
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1451
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1452
|
+
) -> RESTResponseType:
|
1453
|
+
"""Synchronous version of post_spot_action_without_preload_content"""
|
1454
|
+
return async_to_sync(self._post_spot_action_async_without_preload_content)(
|
1455
|
+
spot_trading_action_create=spot_trading_action_create,
|
1456
|
+
_request_timeout=_request_timeout,
|
1457
|
+
_request_auth=_request_auth,
|
1458
|
+
_content_type=_content_type,
|
1459
|
+
_headers=_headers,
|
1460
|
+
_host_index=_host_index,
|
1461
|
+
)
|
741
1462
|
|
742
1463
|
def _post_spot_action_serialize(
|
743
1464
|
self,
|