crypticorn 2.16.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 -20
- crypticorn/common/router/admin_router.py +2 -2
- crypticorn/common/router/status_router.py +40 -2
- crypticorn/common/scopes.py +2 -2
- crypticorn/common/warnings.py +7 -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 +1 -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.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/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/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/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 -19
- crypticorn/trade/client/models/tpsl_create.py +6 -19
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +163 -128
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/top_level.txt +0 -0
@@ -11,20 +11,34 @@ Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
|
-
import warnings
|
15
14
|
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
15
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
16
|
from typing_extensions import Annotated
|
18
17
|
|
19
|
-
from pydantic import Field, StrictStr
|
20
|
-
from typing import List
|
21
|
-
from typing_extensions import Annotated
|
22
18
|
from crypticorn.klines.client.models.market_type import MarketType
|
23
19
|
|
24
20
|
from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
|
25
21
|
from crypticorn.klines.client.api_response import ApiResponse
|
26
22
|
from crypticorn.klines.client.rest import RESTResponseType
|
27
23
|
|
24
|
+
# Import async_to_sync for sync methods
|
25
|
+
try:
|
26
|
+
from asgiref.sync import async_to_sync
|
27
|
+
|
28
|
+
_HAS_ASGIREF = True
|
29
|
+
except ImportError:
|
30
|
+
_HAS_ASGIREF = False
|
31
|
+
|
32
|
+
def async_to_sync(async_func):
|
33
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
34
|
+
|
35
|
+
def wrapper(*args, **kwargs):
|
36
|
+
raise ImportError(
|
37
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
38
|
+
)
|
39
|
+
|
40
|
+
return wrapper
|
41
|
+
|
28
42
|
|
29
43
|
class SymbolsApi:
|
30
44
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -33,13 +47,126 @@ class SymbolsApi:
|
|
33
47
|
Do not edit the class manually.
|
34
48
|
"""
|
35
49
|
|
36
|
-
def __init__(self, api_client=None) -> None:
|
50
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
37
51
|
if api_client is None:
|
38
52
|
api_client = ApiClient.get_default()
|
39
53
|
self.api_client = api_client
|
54
|
+
self.is_sync = is_sync
|
55
|
+
|
56
|
+
@validate_call
|
57
|
+
def get_klines_symbols(
|
58
|
+
self,
|
59
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
60
|
+
_request_timeout: Union[
|
61
|
+
None,
|
62
|
+
Annotated[StrictFloat, Field(gt=0)],
|
63
|
+
Tuple[
|
64
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
65
|
+
],
|
66
|
+
] = None,
|
67
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
68
|
+
_content_type: Optional[StrictStr] = None,
|
69
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
70
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
71
|
+
) -> List[str]:
|
72
|
+
"""Symbols"""
|
73
|
+
if self.is_sync:
|
74
|
+
return self._get_klines_symbols_sync(
|
75
|
+
market=market,
|
76
|
+
_request_timeout=_request_timeout,
|
77
|
+
_request_auth=_request_auth,
|
78
|
+
_content_type=_content_type,
|
79
|
+
_headers=_headers,
|
80
|
+
_host_index=_host_index,
|
81
|
+
)
|
82
|
+
|
83
|
+
else:
|
84
|
+
return self._get_klines_symbols_async(
|
85
|
+
market=market,
|
86
|
+
_request_timeout=_request_timeout,
|
87
|
+
_request_auth=_request_auth,
|
88
|
+
_content_type=_content_type,
|
89
|
+
_headers=_headers,
|
90
|
+
_host_index=_host_index,
|
91
|
+
)
|
92
|
+
|
93
|
+
@validate_call
|
94
|
+
def get_klines_symbols_with_http_info(
|
95
|
+
self,
|
96
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
97
|
+
_request_timeout: Union[
|
98
|
+
None,
|
99
|
+
Annotated[StrictFloat, Field(gt=0)],
|
100
|
+
Tuple[
|
101
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
102
|
+
],
|
103
|
+
] = None,
|
104
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
105
|
+
_content_type: Optional[StrictStr] = None,
|
106
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
107
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
108
|
+
) -> ApiResponse[List[str]]:
|
109
|
+
"""Symbols with HTTP info"""
|
110
|
+
if self.is_sync:
|
111
|
+
return self._get_klines_symbols_sync_with_http_info(
|
112
|
+
market=market,
|
113
|
+
_request_timeout=_request_timeout,
|
114
|
+
_request_auth=_request_auth,
|
115
|
+
_content_type=_content_type,
|
116
|
+
_headers=_headers,
|
117
|
+
_host_index=_host_index,
|
118
|
+
)
|
119
|
+
|
120
|
+
else:
|
121
|
+
return self._get_klines_symbols_async_with_http_info(
|
122
|
+
market=market,
|
123
|
+
_request_timeout=_request_timeout,
|
124
|
+
_request_auth=_request_auth,
|
125
|
+
_content_type=_content_type,
|
126
|
+
_headers=_headers,
|
127
|
+
_host_index=_host_index,
|
128
|
+
)
|
40
129
|
|
41
130
|
@validate_call
|
42
|
-
|
131
|
+
def get_klines_symbols_without_preload_content(
|
132
|
+
self,
|
133
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
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
|
+
) -> RESTResponseType:
|
146
|
+
"""Symbols without preloading content"""
|
147
|
+
if self.is_sync:
|
148
|
+
return self._get_klines_symbols_sync_without_preload_content(
|
149
|
+
market=market,
|
150
|
+
_request_timeout=_request_timeout,
|
151
|
+
_request_auth=_request_auth,
|
152
|
+
_content_type=_content_type,
|
153
|
+
_headers=_headers,
|
154
|
+
_host_index=_host_index,
|
155
|
+
)
|
156
|
+
|
157
|
+
else:
|
158
|
+
return self._get_klines_symbols_async_without_preload_content(
|
159
|
+
market=market,
|
160
|
+
_request_timeout=_request_timeout,
|
161
|
+
_request_auth=_request_auth,
|
162
|
+
_content_type=_content_type,
|
163
|
+
_headers=_headers,
|
164
|
+
_host_index=_host_index,
|
165
|
+
)
|
166
|
+
|
167
|
+
# Private async implementation methods
|
168
|
+
@validate_call
|
169
|
+
async def _get_klines_symbols_async(
|
43
170
|
self,
|
44
171
|
market: Annotated[MarketType, Field(description="Market type")],
|
45
172
|
_request_timeout: Union[
|
@@ -103,7 +230,7 @@ class SymbolsApi:
|
|
103
230
|
).data
|
104
231
|
|
105
232
|
@validate_call
|
106
|
-
async def
|
233
|
+
async def _get_klines_symbols_async_with_http_info(
|
107
234
|
self,
|
108
235
|
market: Annotated[MarketType, Field(description="Market type")],
|
109
236
|
_request_timeout: Union[
|
@@ -162,12 +289,11 @@ class SymbolsApi:
|
|
162
289
|
)
|
163
290
|
await response_data.read()
|
164
291
|
return self.api_client.response_deserialize(
|
165
|
-
response_data=response_data,
|
166
|
-
response_types_map=_response_types_map,
|
292
|
+
response_data=response_data, response_types_map=_response_types_map
|
167
293
|
)
|
168
294
|
|
169
295
|
@validate_call
|
170
|
-
async def
|
296
|
+
async def _get_klines_symbols_async_without_preload_content(
|
171
297
|
self,
|
172
298
|
market: Annotated[MarketType, Field(description="Market type")],
|
173
299
|
_request_timeout: Union[
|
@@ -224,7 +350,86 @@ class SymbolsApi:
|
|
224
350
|
response_data = await self.api_client.call_api(
|
225
351
|
*_param, _request_timeout=_request_timeout
|
226
352
|
)
|
227
|
-
return response_data
|
353
|
+
return response_data
|
354
|
+
|
355
|
+
# Private sync implementation methods
|
356
|
+
@validate_call
|
357
|
+
def _get_klines_symbols_sync(
|
358
|
+
self,
|
359
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
360
|
+
_request_timeout: Union[
|
361
|
+
None,
|
362
|
+
Annotated[StrictFloat, Field(gt=0)],
|
363
|
+
Tuple[
|
364
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
365
|
+
],
|
366
|
+
] = None,
|
367
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
368
|
+
_content_type: Optional[StrictStr] = None,
|
369
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
370
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
371
|
+
) -> List[str]:
|
372
|
+
"""Synchronous version of get_klines_symbols"""
|
373
|
+
return async_to_sync(self._get_klines_symbols_async)(
|
374
|
+
market=market,
|
375
|
+
_request_timeout=_request_timeout,
|
376
|
+
_request_auth=_request_auth,
|
377
|
+
_content_type=_content_type,
|
378
|
+
_headers=_headers,
|
379
|
+
_host_index=_host_index,
|
380
|
+
)
|
381
|
+
|
382
|
+
@validate_call
|
383
|
+
def _get_klines_symbols_sync_with_http_info(
|
384
|
+
self,
|
385
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
386
|
+
_request_timeout: Union[
|
387
|
+
None,
|
388
|
+
Annotated[StrictFloat, Field(gt=0)],
|
389
|
+
Tuple[
|
390
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
391
|
+
],
|
392
|
+
] = None,
|
393
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
394
|
+
_content_type: Optional[StrictStr] = None,
|
395
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
396
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
397
|
+
) -> ApiResponse[List[str]]:
|
398
|
+
"""Synchronous version of get_klines_symbols_with_http_info"""
|
399
|
+
return async_to_sync(self._get_klines_symbols_async_with_http_info)(
|
400
|
+
market=market,
|
401
|
+
_request_timeout=_request_timeout,
|
402
|
+
_request_auth=_request_auth,
|
403
|
+
_content_type=_content_type,
|
404
|
+
_headers=_headers,
|
405
|
+
_host_index=_host_index,
|
406
|
+
)
|
407
|
+
|
408
|
+
@validate_call
|
409
|
+
def _get_klines_symbols_sync_without_preload_content(
|
410
|
+
self,
|
411
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
412
|
+
_request_timeout: Union[
|
413
|
+
None,
|
414
|
+
Annotated[StrictFloat, Field(gt=0)],
|
415
|
+
Tuple[
|
416
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
417
|
+
],
|
418
|
+
] = None,
|
419
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
420
|
+
_content_type: Optional[StrictStr] = None,
|
421
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
422
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
423
|
+
) -> RESTResponseType:
|
424
|
+
"""Synchronous version of get_klines_symbols_without_preload_content"""
|
425
|
+
return async_to_sync(self._get_klines_symbols_async_without_preload_content)(
|
426
|
+
market=market,
|
427
|
+
_request_timeout=_request_timeout,
|
428
|
+
_request_auth=_request_auth,
|
429
|
+
_content_type=_content_type,
|
430
|
+
_headers=_headers,
|
431
|
+
_host_index=_host_index,
|
432
|
+
)
|
228
433
|
|
229
434
|
def _get_klines_symbols_serialize(
|
230
435
|
self,
|