crypticorn 2.17.0rc1__py3-none-any.whl → 2.17.0rc3__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 +415 -13
- crypticorn/auth/client/api/auth_api.py +2622 -113
- crypticorn/auth/client/api/service_api.py +258 -7
- crypticorn/auth/client/api/user_api.py +2485 -270
- crypticorn/auth/client/api/wallet_api.py +1518 -77
- 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/client.py +227 -59
- crypticorn/common/__init__.py +0 -1
- crypticorn/common/auth.py +2 -1
- crypticorn/common/metrics.py +4 -6
- crypticorn/common/middleware.py +10 -5
- crypticorn/common/pagination.py +137 -18
- crypticorn/common/router/admin_router.py +1 -1
- crypticorn/common/utils.py +2 -1
- crypticorn/common/warnings.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1234 -51
- crypticorn/hive/client/api/data_api.py +517 -13
- crypticorn/hive/client/api/models_api.py +1657 -83
- crypticorn/hive/client/api/status_api.py +415 -13
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/klines/client/api/admin_api.py +1234 -51
- crypticorn/klines/client/api/change_in_timeframe_api.py +278 -7
- crypticorn/klines/client/api/funding_rates_api.py +324 -7
- crypticorn/klines/client/api/ohlcv_data_api.py +399 -7
- crypticorn/klines/client/api/status_api.py +415 -13
- crypticorn/klines/client/api/symbols_api.py +225 -7
- crypticorn/klines/client/api/udf_api.py +1393 -120
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1234 -51
- crypticorn/metrics/client/api/exchanges_api.py +1405 -140
- crypticorn/metrics/client/api/indicators_api.py +640 -13
- crypticorn/metrics/client/api/logs_api.py +305 -7
- crypticorn/metrics/client/api/marketcap_api.py +1240 -60
- crypticorn/metrics/client/api/markets_api.py +352 -7
- crypticorn/metrics/client/api/quote_currencies_api.py +237 -7
- crypticorn/metrics/client/api/status_api.py +415 -13
- crypticorn/metrics/client/api/tokens_api.py +400 -13
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1720 -126
- crypticorn/pay/client/api/now_payments_api.py +1013 -42
- crypticorn/pay/client/api/payments_api.py +580 -13
- crypticorn/pay/client/api/products_api.py +915 -25
- crypticorn/pay/client/api/status_api.py +415 -13
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- 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 +2 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1718 -123
- crypticorn/trade/client/api/api_keys_api.py +1596 -103
- crypticorn/trade/client/api/bots_api.py +1106 -47
- crypticorn/trade/client/api/exchanges_api.py +592 -19
- crypticorn/trade/client/api/notifications_api.py +1340 -112
- crypticorn/trade/client/api/orders_api.py +240 -7
- crypticorn/trade/client/api/status_api.py +415 -13
- crypticorn/trade/client/api/strategies_api.py +1170 -69
- crypticorn/trade/client/api/trading_actions_api.py +650 -19
- crypticorn/trade/client/models/__init__.py +2 -0
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/spot_balance.py +110 -0
- crypticorn/trade/client/models/strategy.py +5 -3
- crypticorn/trade/client/models/strategy_create.py +6 -4
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +2 -2
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/METADATA +64 -20
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/RECORD +86 -85
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/top_level.txt +0 -0
@@ -27,6 +27,24 @@ from crypticorn.auth.client.api_client import ApiClient, RequestSerialized
|
|
27
27
|
from crypticorn.auth.client.api_response import ApiResponse
|
28
28
|
from crypticorn.auth.client.rest import RESTResponseType
|
29
29
|
|
30
|
+
# Import async_to_sync for sync methods
|
31
|
+
try:
|
32
|
+
from asgiref.sync import async_to_sync
|
33
|
+
|
34
|
+
_HAS_ASGIREF = True
|
35
|
+
except ImportError:
|
36
|
+
_HAS_ASGIREF = False
|
37
|
+
|
38
|
+
def async_to_sync(async_func):
|
39
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
40
|
+
|
41
|
+
def wrapper(*args, **kwargs):
|
42
|
+
raise ImportError(
|
43
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
44
|
+
)
|
45
|
+
|
46
|
+
return wrapper
|
47
|
+
|
30
48
|
|
31
49
|
class ServiceApi:
|
32
50
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -35,13 +53,153 @@ class ServiceApi:
|
|
35
53
|
Do not edit the class manually.
|
36
54
|
"""
|
37
55
|
|
38
|
-
def __init__(self, api_client=None) -> None:
|
56
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
39
57
|
if api_client is None:
|
40
58
|
api_client = ApiClient.get_default()
|
41
59
|
self.api_client = api_client
|
60
|
+
self.is_sync = is_sync
|
61
|
+
|
62
|
+
@validate_call
|
63
|
+
def get_balances_by_email(
|
64
|
+
self,
|
65
|
+
email: StrictStr,
|
66
|
+
x_refresh_token: Annotated[
|
67
|
+
Optional[StrictStr],
|
68
|
+
Field(description="The refresh token for rotating the access token."),
|
69
|
+
] = None,
|
70
|
+
_request_timeout: Union[
|
71
|
+
None,
|
72
|
+
Annotated[StrictFloat, Field(gt=0)],
|
73
|
+
Tuple[
|
74
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
75
|
+
],
|
76
|
+
] = None,
|
77
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
78
|
+
_content_type: Optional[StrictStr] = None,
|
79
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
80
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
81
|
+
) -> ListWallets200ResponseUserValue:
|
82
|
+
"""Get the balances of a user by email
|
83
|
+
|
84
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
85
|
+
"""
|
86
|
+
if self.is_sync:
|
87
|
+
return self._get_balances_by_email_sync(
|
88
|
+
email=email,
|
89
|
+
x_refresh_token=x_refresh_token,
|
90
|
+
_request_timeout=_request_timeout,
|
91
|
+
_request_auth=_request_auth,
|
92
|
+
_content_type=_content_type,
|
93
|
+
_headers=_headers,
|
94
|
+
_host_index=_host_index,
|
95
|
+
)
|
96
|
+
|
97
|
+
else:
|
98
|
+
return self._get_balances_by_email_async(
|
99
|
+
email=email,
|
100
|
+
x_refresh_token=x_refresh_token,
|
101
|
+
_request_timeout=_request_timeout,
|
102
|
+
_request_auth=_request_auth,
|
103
|
+
_content_type=_content_type,
|
104
|
+
_headers=_headers,
|
105
|
+
_host_index=_host_index,
|
106
|
+
)
|
107
|
+
|
108
|
+
@validate_call
|
109
|
+
def get_balances_by_email_with_http_info(
|
110
|
+
self,
|
111
|
+
email: StrictStr,
|
112
|
+
x_refresh_token: Annotated[
|
113
|
+
Optional[StrictStr],
|
114
|
+
Field(description="The refresh token for rotating the access token."),
|
115
|
+
] = None,
|
116
|
+
_request_timeout: Union[
|
117
|
+
None,
|
118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
119
|
+
Tuple[
|
120
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
121
|
+
],
|
122
|
+
] = None,
|
123
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
124
|
+
_content_type: Optional[StrictStr] = None,
|
125
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
126
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
127
|
+
) -> ApiResponse[ListWallets200ResponseUserValue]:
|
128
|
+
"""Get the balances of a user by email with HTTP info
|
129
|
+
|
130
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
131
|
+
"""
|
132
|
+
if self.is_sync:
|
133
|
+
return self._get_balances_by_email_sync_with_http_info(
|
134
|
+
email=email,
|
135
|
+
x_refresh_token=x_refresh_token,
|
136
|
+
_request_timeout=_request_timeout,
|
137
|
+
_request_auth=_request_auth,
|
138
|
+
_content_type=_content_type,
|
139
|
+
_headers=_headers,
|
140
|
+
_host_index=_host_index,
|
141
|
+
)
|
142
|
+
|
143
|
+
else:
|
144
|
+
return self._get_balances_by_email_async_with_http_info(
|
145
|
+
email=email,
|
146
|
+
x_refresh_token=x_refresh_token,
|
147
|
+
_request_timeout=_request_timeout,
|
148
|
+
_request_auth=_request_auth,
|
149
|
+
_content_type=_content_type,
|
150
|
+
_headers=_headers,
|
151
|
+
_host_index=_host_index,
|
152
|
+
)
|
153
|
+
|
154
|
+
@validate_call
|
155
|
+
def get_balances_by_email_without_preload_content(
|
156
|
+
self,
|
157
|
+
email: StrictStr,
|
158
|
+
x_refresh_token: Annotated[
|
159
|
+
Optional[StrictStr],
|
160
|
+
Field(description="The refresh token for rotating the access token."),
|
161
|
+
] = None,
|
162
|
+
_request_timeout: Union[
|
163
|
+
None,
|
164
|
+
Annotated[StrictFloat, Field(gt=0)],
|
165
|
+
Tuple[
|
166
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
167
|
+
],
|
168
|
+
] = None,
|
169
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
170
|
+
_content_type: Optional[StrictStr] = None,
|
171
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
172
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
173
|
+
) -> RESTResponseType:
|
174
|
+
"""Get the balances of a user by email without preloading content
|
175
|
+
|
176
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
177
|
+
"""
|
178
|
+
if self.is_sync:
|
179
|
+
return self._get_balances_by_email_sync_without_preload_content(
|
180
|
+
email=email,
|
181
|
+
x_refresh_token=x_refresh_token,
|
182
|
+
_request_timeout=_request_timeout,
|
183
|
+
_request_auth=_request_auth,
|
184
|
+
_content_type=_content_type,
|
185
|
+
_headers=_headers,
|
186
|
+
_host_index=_host_index,
|
187
|
+
)
|
42
188
|
|
189
|
+
else:
|
190
|
+
return self._get_balances_by_email_async_without_preload_content(
|
191
|
+
email=email,
|
192
|
+
x_refresh_token=x_refresh_token,
|
193
|
+
_request_timeout=_request_timeout,
|
194
|
+
_request_auth=_request_auth,
|
195
|
+
_content_type=_content_type,
|
196
|
+
_headers=_headers,
|
197
|
+
_host_index=_host_index,
|
198
|
+
)
|
199
|
+
|
200
|
+
# Private async implementation methods
|
43
201
|
@validate_call
|
44
|
-
async def
|
202
|
+
async def _get_balances_by_email_async(
|
45
203
|
self,
|
46
204
|
email: StrictStr,
|
47
205
|
x_refresh_token: Annotated[
|
@@ -112,7 +270,7 @@ class ServiceApi:
|
|
112
270
|
).data
|
113
271
|
|
114
272
|
@validate_call
|
115
|
-
async def
|
273
|
+
async def _get_balances_by_email_async_with_http_info(
|
116
274
|
self,
|
117
275
|
email: StrictStr,
|
118
276
|
x_refresh_token: Annotated[
|
@@ -178,12 +336,11 @@ class ServiceApi:
|
|
178
336
|
)
|
179
337
|
await response_data.read()
|
180
338
|
return self.api_client.response_deserialize(
|
181
|
-
response_data=response_data,
|
182
|
-
response_types_map=_response_types_map,
|
339
|
+
response_data=response_data, response_types_map=_response_types_map
|
183
340
|
)
|
184
341
|
|
185
342
|
@validate_call
|
186
|
-
async def
|
343
|
+
async def _get_balances_by_email_async_without_preload_content(
|
187
344
|
self,
|
188
345
|
email: StrictStr,
|
189
346
|
x_refresh_token: Annotated[
|
@@ -247,7 +404,101 @@ class ServiceApi:
|
|
247
404
|
response_data = await self.api_client.call_api(
|
248
405
|
*_param, _request_timeout=_request_timeout
|
249
406
|
)
|
250
|
-
return response_data
|
407
|
+
return response_data
|
408
|
+
|
409
|
+
# Private sync implementation methods
|
410
|
+
@validate_call
|
411
|
+
def _get_balances_by_email_sync(
|
412
|
+
self,
|
413
|
+
email: StrictStr,
|
414
|
+
x_refresh_token: Annotated[
|
415
|
+
Optional[StrictStr],
|
416
|
+
Field(description="The refresh token for rotating the access token."),
|
417
|
+
] = None,
|
418
|
+
_request_timeout: Union[
|
419
|
+
None,
|
420
|
+
Annotated[StrictFloat, Field(gt=0)],
|
421
|
+
Tuple[
|
422
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
423
|
+
],
|
424
|
+
] = None,
|
425
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
426
|
+
_content_type: Optional[StrictStr] = None,
|
427
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
428
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
429
|
+
) -> ListWallets200ResponseUserValue:
|
430
|
+
"""Synchronous version of get_balances_by_email"""
|
431
|
+
return async_to_sync(self._get_balances_by_email_async)(
|
432
|
+
email=email,
|
433
|
+
x_refresh_token=x_refresh_token,
|
434
|
+
_request_timeout=_request_timeout,
|
435
|
+
_request_auth=_request_auth,
|
436
|
+
_content_type=_content_type,
|
437
|
+
_headers=_headers,
|
438
|
+
_host_index=_host_index,
|
439
|
+
)
|
440
|
+
|
441
|
+
@validate_call
|
442
|
+
def _get_balances_by_email_sync_with_http_info(
|
443
|
+
self,
|
444
|
+
email: StrictStr,
|
445
|
+
x_refresh_token: Annotated[
|
446
|
+
Optional[StrictStr],
|
447
|
+
Field(description="The refresh token for rotating the access token."),
|
448
|
+
] = None,
|
449
|
+
_request_timeout: Union[
|
450
|
+
None,
|
451
|
+
Annotated[StrictFloat, Field(gt=0)],
|
452
|
+
Tuple[
|
453
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
454
|
+
],
|
455
|
+
] = None,
|
456
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
457
|
+
_content_type: Optional[StrictStr] = None,
|
458
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
459
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
460
|
+
) -> ApiResponse[ListWallets200ResponseUserValue]:
|
461
|
+
"""Synchronous version of get_balances_by_email_with_http_info"""
|
462
|
+
return async_to_sync(self._get_balances_by_email_async_with_http_info)(
|
463
|
+
email=email,
|
464
|
+
x_refresh_token=x_refresh_token,
|
465
|
+
_request_timeout=_request_timeout,
|
466
|
+
_request_auth=_request_auth,
|
467
|
+
_content_type=_content_type,
|
468
|
+
_headers=_headers,
|
469
|
+
_host_index=_host_index,
|
470
|
+
)
|
471
|
+
|
472
|
+
@validate_call
|
473
|
+
def _get_balances_by_email_sync_without_preload_content(
|
474
|
+
self,
|
475
|
+
email: StrictStr,
|
476
|
+
x_refresh_token: Annotated[
|
477
|
+
Optional[StrictStr],
|
478
|
+
Field(description="The refresh token for rotating the access token."),
|
479
|
+
] = None,
|
480
|
+
_request_timeout: Union[
|
481
|
+
None,
|
482
|
+
Annotated[StrictFloat, Field(gt=0)],
|
483
|
+
Tuple[
|
484
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
485
|
+
],
|
486
|
+
] = None,
|
487
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
488
|
+
_content_type: Optional[StrictStr] = None,
|
489
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
490
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
491
|
+
) -> RESTResponseType:
|
492
|
+
"""Synchronous version of get_balances_by_email_without_preload_content"""
|
493
|
+
return async_to_sync(self._get_balances_by_email_async_without_preload_content)(
|
494
|
+
email=email,
|
495
|
+
x_refresh_token=x_refresh_token,
|
496
|
+
_request_timeout=_request_timeout,
|
497
|
+
_request_auth=_request_auth,
|
498
|
+
_content_type=_content_type,
|
499
|
+
_headers=_headers,
|
500
|
+
_host_index=_host_index,
|
501
|
+
)
|
251
502
|
|
252
503
|
def _get_balances_by_email_serialize(
|
253
504
|
self,
|