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
@@ -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, StrictInt, StrictStr
|
20
|
-
from typing import Any, Dict, Optional
|
21
|
-
from typing_extensions import Annotated
|
22
18
|
from crypticorn.metrics.client.models.market_type import MarketType
|
23
19
|
|
24
20
|
from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
|
25
21
|
from crypticorn.metrics.client.api_response import ApiResponse
|
26
22
|
from crypticorn.metrics.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 IndicatorsApi:
|
30
44
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -33,13 +47,180 @@ class IndicatorsApi:
|
|
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_ker_indicator(
|
58
|
+
self,
|
59
|
+
symbol: Annotated[
|
60
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
61
|
+
],
|
62
|
+
market: Annotated[
|
63
|
+
Optional[MarketType], Field(description="Market. Defaults to futures.")
|
64
|
+
] = None,
|
65
|
+
period: Annotated[
|
66
|
+
Optional[StrictInt], Field(description="KER indicator period")
|
67
|
+
] = None,
|
68
|
+
timestamp: Annotated[
|
69
|
+
Optional[StrictInt],
|
70
|
+
Field(description="Timestamp for which to fetch KER indicator"),
|
71
|
+
] = None,
|
72
|
+
_request_timeout: Union[
|
73
|
+
None,
|
74
|
+
Annotated[StrictFloat, Field(gt=0)],
|
75
|
+
Tuple[
|
76
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
77
|
+
],
|
78
|
+
] = None,
|
79
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
80
|
+
_content_type: Optional[StrictStr] = None,
|
81
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
82
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
83
|
+
) -> Dict[str, object]:
|
84
|
+
"""Get Ker Indicator"""
|
85
|
+
if self.is_sync:
|
86
|
+
return self._get_ker_indicator_sync(
|
87
|
+
symbol=symbol,
|
88
|
+
market=market,
|
89
|
+
period=period,
|
90
|
+
timestamp=timestamp,
|
91
|
+
_request_timeout=_request_timeout,
|
92
|
+
_request_auth=_request_auth,
|
93
|
+
_content_type=_content_type,
|
94
|
+
_headers=_headers,
|
95
|
+
_host_index=_host_index,
|
96
|
+
)
|
97
|
+
|
98
|
+
else:
|
99
|
+
return self._get_ker_indicator_async(
|
100
|
+
symbol=symbol,
|
101
|
+
market=market,
|
102
|
+
period=period,
|
103
|
+
timestamp=timestamp,
|
104
|
+
_request_timeout=_request_timeout,
|
105
|
+
_request_auth=_request_auth,
|
106
|
+
_content_type=_content_type,
|
107
|
+
_headers=_headers,
|
108
|
+
_host_index=_host_index,
|
109
|
+
)
|
110
|
+
|
111
|
+
@validate_call
|
112
|
+
def get_ker_indicator_with_http_info(
|
113
|
+
self,
|
114
|
+
symbol: Annotated[
|
115
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
116
|
+
],
|
117
|
+
market: Annotated[
|
118
|
+
Optional[MarketType], Field(description="Market. Defaults to futures.")
|
119
|
+
] = None,
|
120
|
+
period: Annotated[
|
121
|
+
Optional[StrictInt], Field(description="KER indicator period")
|
122
|
+
] = None,
|
123
|
+
timestamp: Annotated[
|
124
|
+
Optional[StrictInt],
|
125
|
+
Field(description="Timestamp for which to fetch KER indicator"),
|
126
|
+
] = None,
|
127
|
+
_request_timeout: Union[
|
128
|
+
None,
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
130
|
+
Tuple[
|
131
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
132
|
+
],
|
133
|
+
] = None,
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
138
|
+
) -> ApiResponse[Dict[str, object]]:
|
139
|
+
"""Get Ker Indicator with HTTP info"""
|
140
|
+
if self.is_sync:
|
141
|
+
return self._get_ker_indicator_sync_with_http_info(
|
142
|
+
symbol=symbol,
|
143
|
+
market=market,
|
144
|
+
period=period,
|
145
|
+
timestamp=timestamp,
|
146
|
+
_request_timeout=_request_timeout,
|
147
|
+
_request_auth=_request_auth,
|
148
|
+
_content_type=_content_type,
|
149
|
+
_headers=_headers,
|
150
|
+
_host_index=_host_index,
|
151
|
+
)
|
152
|
+
|
153
|
+
else:
|
154
|
+
return self._get_ker_indicator_async_with_http_info(
|
155
|
+
symbol=symbol,
|
156
|
+
market=market,
|
157
|
+
period=period,
|
158
|
+
timestamp=timestamp,
|
159
|
+
_request_timeout=_request_timeout,
|
160
|
+
_request_auth=_request_auth,
|
161
|
+
_content_type=_content_type,
|
162
|
+
_headers=_headers,
|
163
|
+
_host_index=_host_index,
|
164
|
+
)
|
165
|
+
|
166
|
+
@validate_call
|
167
|
+
def get_ker_indicator_without_preload_content(
|
168
|
+
self,
|
169
|
+
symbol: Annotated[
|
170
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
171
|
+
],
|
172
|
+
market: Annotated[
|
173
|
+
Optional[MarketType], Field(description="Market. Defaults to futures.")
|
174
|
+
] = None,
|
175
|
+
period: Annotated[
|
176
|
+
Optional[StrictInt], Field(description="KER indicator period")
|
177
|
+
] = None,
|
178
|
+
timestamp: Annotated[
|
179
|
+
Optional[StrictInt],
|
180
|
+
Field(description="Timestamp for which to fetch KER indicator"),
|
181
|
+
] = None,
|
182
|
+
_request_timeout: Union[
|
183
|
+
None,
|
184
|
+
Annotated[StrictFloat, Field(gt=0)],
|
185
|
+
Tuple[
|
186
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
187
|
+
],
|
188
|
+
] = None,
|
189
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
190
|
+
_content_type: Optional[StrictStr] = None,
|
191
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
192
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
193
|
+
) -> RESTResponseType:
|
194
|
+
"""Get Ker Indicator without preloading content"""
|
195
|
+
if self.is_sync:
|
196
|
+
return self._get_ker_indicator_sync_without_preload_content(
|
197
|
+
symbol=symbol,
|
198
|
+
market=market,
|
199
|
+
period=period,
|
200
|
+
timestamp=timestamp,
|
201
|
+
_request_timeout=_request_timeout,
|
202
|
+
_request_auth=_request_auth,
|
203
|
+
_content_type=_content_type,
|
204
|
+
_headers=_headers,
|
205
|
+
_host_index=_host_index,
|
206
|
+
)
|
40
207
|
|
208
|
+
else:
|
209
|
+
return self._get_ker_indicator_async_without_preload_content(
|
210
|
+
symbol=symbol,
|
211
|
+
market=market,
|
212
|
+
period=period,
|
213
|
+
timestamp=timestamp,
|
214
|
+
_request_timeout=_request_timeout,
|
215
|
+
_request_auth=_request_auth,
|
216
|
+
_content_type=_content_type,
|
217
|
+
_headers=_headers,
|
218
|
+
_host_index=_host_index,
|
219
|
+
)
|
220
|
+
|
221
|
+
# Private async implementation methods
|
41
222
|
@validate_call
|
42
|
-
async def
|
223
|
+
async def _get_ker_indicator_async(
|
43
224
|
self,
|
44
225
|
symbol: Annotated[
|
45
226
|
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
@@ -124,7 +305,7 @@ class IndicatorsApi:
|
|
124
305
|
).data
|
125
306
|
|
126
307
|
@validate_call
|
127
|
-
async def
|
308
|
+
async def _get_ker_indicator_async_with_http_info(
|
128
309
|
self,
|
129
310
|
symbol: Annotated[
|
130
311
|
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
@@ -204,12 +385,11 @@ class IndicatorsApi:
|
|
204
385
|
)
|
205
386
|
await response_data.read()
|
206
387
|
return self.api_client.response_deserialize(
|
207
|
-
response_data=response_data,
|
208
|
-
response_types_map=_response_types_map,
|
388
|
+
response_data=response_data, response_types_map=_response_types_map
|
209
389
|
)
|
210
390
|
|
211
391
|
@validate_call
|
212
|
-
async def
|
392
|
+
async def _get_ker_indicator_async_without_preload_content(
|
213
393
|
self,
|
214
394
|
symbol: Annotated[
|
215
395
|
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
@@ -287,7 +467,131 @@ class IndicatorsApi:
|
|
287
467
|
response_data = await self.api_client.call_api(
|
288
468
|
*_param, _request_timeout=_request_timeout
|
289
469
|
)
|
290
|
-
return response_data
|
470
|
+
return response_data
|
471
|
+
|
472
|
+
# Private sync implementation methods
|
473
|
+
@validate_call
|
474
|
+
def _get_ker_indicator_sync(
|
475
|
+
self,
|
476
|
+
symbol: Annotated[
|
477
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
478
|
+
],
|
479
|
+
market: Annotated[
|
480
|
+
Optional[MarketType], Field(description="Market. Defaults to futures.")
|
481
|
+
] = None,
|
482
|
+
period: Annotated[
|
483
|
+
Optional[StrictInt], Field(description="KER indicator period")
|
484
|
+
] = None,
|
485
|
+
timestamp: Annotated[
|
486
|
+
Optional[StrictInt],
|
487
|
+
Field(description="Timestamp for which to fetch KER indicator"),
|
488
|
+
] = None,
|
489
|
+
_request_timeout: Union[
|
490
|
+
None,
|
491
|
+
Annotated[StrictFloat, Field(gt=0)],
|
492
|
+
Tuple[
|
493
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
494
|
+
],
|
495
|
+
] = None,
|
496
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
497
|
+
_content_type: Optional[StrictStr] = None,
|
498
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
499
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
500
|
+
) -> Dict[str, object]:
|
501
|
+
"""Synchronous version of get_ker_indicator"""
|
502
|
+
return async_to_sync(self._get_ker_indicator_async)(
|
503
|
+
symbol=symbol,
|
504
|
+
market=market,
|
505
|
+
period=period,
|
506
|
+
timestamp=timestamp,
|
507
|
+
_request_timeout=_request_timeout,
|
508
|
+
_request_auth=_request_auth,
|
509
|
+
_content_type=_content_type,
|
510
|
+
_headers=_headers,
|
511
|
+
_host_index=_host_index,
|
512
|
+
)
|
513
|
+
|
514
|
+
@validate_call
|
515
|
+
def _get_ker_indicator_sync_with_http_info(
|
516
|
+
self,
|
517
|
+
symbol: Annotated[
|
518
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
519
|
+
],
|
520
|
+
market: Annotated[
|
521
|
+
Optional[MarketType], Field(description="Market. Defaults to futures.")
|
522
|
+
] = None,
|
523
|
+
period: Annotated[
|
524
|
+
Optional[StrictInt], Field(description="KER indicator period")
|
525
|
+
] = None,
|
526
|
+
timestamp: Annotated[
|
527
|
+
Optional[StrictInt],
|
528
|
+
Field(description="Timestamp for which to fetch KER indicator"),
|
529
|
+
] = None,
|
530
|
+
_request_timeout: Union[
|
531
|
+
None,
|
532
|
+
Annotated[StrictFloat, Field(gt=0)],
|
533
|
+
Tuple[
|
534
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
535
|
+
],
|
536
|
+
] = None,
|
537
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
538
|
+
_content_type: Optional[StrictStr] = None,
|
539
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
540
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
541
|
+
) -> ApiResponse[Dict[str, object]]:
|
542
|
+
"""Synchronous version of get_ker_indicator_with_http_info"""
|
543
|
+
return async_to_sync(self._get_ker_indicator_async_with_http_info)(
|
544
|
+
symbol=symbol,
|
545
|
+
market=market,
|
546
|
+
period=period,
|
547
|
+
timestamp=timestamp,
|
548
|
+
_request_timeout=_request_timeout,
|
549
|
+
_request_auth=_request_auth,
|
550
|
+
_content_type=_content_type,
|
551
|
+
_headers=_headers,
|
552
|
+
_host_index=_host_index,
|
553
|
+
)
|
554
|
+
|
555
|
+
@validate_call
|
556
|
+
def _get_ker_indicator_sync_without_preload_content(
|
557
|
+
self,
|
558
|
+
symbol: Annotated[
|
559
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
560
|
+
],
|
561
|
+
market: Annotated[
|
562
|
+
Optional[MarketType], Field(description="Market. Defaults to futures.")
|
563
|
+
] = None,
|
564
|
+
period: Annotated[
|
565
|
+
Optional[StrictInt], Field(description="KER indicator period")
|
566
|
+
] = None,
|
567
|
+
timestamp: Annotated[
|
568
|
+
Optional[StrictInt],
|
569
|
+
Field(description="Timestamp for which to fetch KER indicator"),
|
570
|
+
] = None,
|
571
|
+
_request_timeout: Union[
|
572
|
+
None,
|
573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
574
|
+
Tuple[
|
575
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
576
|
+
],
|
577
|
+
] = None,
|
578
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
579
|
+
_content_type: Optional[StrictStr] = None,
|
580
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
581
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
582
|
+
) -> RESTResponseType:
|
583
|
+
"""Synchronous version of get_ker_indicator_without_preload_content"""
|
584
|
+
return async_to_sync(self._get_ker_indicator_async_without_preload_content)(
|
585
|
+
symbol=symbol,
|
586
|
+
market=market,
|
587
|
+
period=period,
|
588
|
+
timestamp=timestamp,
|
589
|
+
_request_timeout=_request_timeout,
|
590
|
+
_request_auth=_request_auth,
|
591
|
+
_content_type=_content_type,
|
592
|
+
_headers=_headers,
|
593
|
+
_host_index=_host_index,
|
594
|
+
)
|
291
595
|
|
292
596
|
def _get_ker_indicator_serialize(
|
293
597
|
self,
|
@@ -361,7 +665,179 @@ class IndicatorsApi:
|
|
361
665
|
)
|
362
666
|
|
363
667
|
@validate_call
|
364
|
-
|
668
|
+
def get_sma_indicator(
|
669
|
+
self,
|
670
|
+
symbol: Annotated[
|
671
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
672
|
+
],
|
673
|
+
market: Annotated[
|
674
|
+
Optional[MarketType],
|
675
|
+
Field(description="The market type to use for the SMA indicator"),
|
676
|
+
] = None,
|
677
|
+
period: Annotated[
|
678
|
+
Optional[StrictInt],
|
679
|
+
Field(description="The period to use for the SMA indicator"),
|
680
|
+
] = None,
|
681
|
+
timestamp: Annotated[
|
682
|
+
Optional[StrictInt],
|
683
|
+
Field(description="The timestamp for which to fetch the SMA indicator"),
|
684
|
+
] = None,
|
685
|
+
_request_timeout: Union[
|
686
|
+
None,
|
687
|
+
Annotated[StrictFloat, Field(gt=0)],
|
688
|
+
Tuple[
|
689
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
690
|
+
],
|
691
|
+
] = None,
|
692
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
693
|
+
_content_type: Optional[StrictStr] = None,
|
694
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
695
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
696
|
+
) -> Dict[str, object]:
|
697
|
+
"""Get Sma Indicator"""
|
698
|
+
if self.is_sync:
|
699
|
+
return self._get_sma_indicator_sync(
|
700
|
+
symbol=symbol,
|
701
|
+
market=market,
|
702
|
+
period=period,
|
703
|
+
timestamp=timestamp,
|
704
|
+
_request_timeout=_request_timeout,
|
705
|
+
_request_auth=_request_auth,
|
706
|
+
_content_type=_content_type,
|
707
|
+
_headers=_headers,
|
708
|
+
_host_index=_host_index,
|
709
|
+
)
|
710
|
+
|
711
|
+
else:
|
712
|
+
return self._get_sma_indicator_async(
|
713
|
+
symbol=symbol,
|
714
|
+
market=market,
|
715
|
+
period=period,
|
716
|
+
timestamp=timestamp,
|
717
|
+
_request_timeout=_request_timeout,
|
718
|
+
_request_auth=_request_auth,
|
719
|
+
_content_type=_content_type,
|
720
|
+
_headers=_headers,
|
721
|
+
_host_index=_host_index,
|
722
|
+
)
|
723
|
+
|
724
|
+
@validate_call
|
725
|
+
def get_sma_indicator_with_http_info(
|
726
|
+
self,
|
727
|
+
symbol: Annotated[
|
728
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
729
|
+
],
|
730
|
+
market: Annotated[
|
731
|
+
Optional[MarketType],
|
732
|
+
Field(description="The market type to use for the SMA indicator"),
|
733
|
+
] = None,
|
734
|
+
period: Annotated[
|
735
|
+
Optional[StrictInt],
|
736
|
+
Field(description="The period to use for the SMA indicator"),
|
737
|
+
] = None,
|
738
|
+
timestamp: Annotated[
|
739
|
+
Optional[StrictInt],
|
740
|
+
Field(description="The timestamp for which to fetch the SMA indicator"),
|
741
|
+
] = None,
|
742
|
+
_request_timeout: Union[
|
743
|
+
None,
|
744
|
+
Annotated[StrictFloat, Field(gt=0)],
|
745
|
+
Tuple[
|
746
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
747
|
+
],
|
748
|
+
] = None,
|
749
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
750
|
+
_content_type: Optional[StrictStr] = None,
|
751
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
752
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
753
|
+
) -> ApiResponse[Dict[str, object]]:
|
754
|
+
"""Get Sma Indicator with HTTP info"""
|
755
|
+
if self.is_sync:
|
756
|
+
return self._get_sma_indicator_sync_with_http_info(
|
757
|
+
symbol=symbol,
|
758
|
+
market=market,
|
759
|
+
period=period,
|
760
|
+
timestamp=timestamp,
|
761
|
+
_request_timeout=_request_timeout,
|
762
|
+
_request_auth=_request_auth,
|
763
|
+
_content_type=_content_type,
|
764
|
+
_headers=_headers,
|
765
|
+
_host_index=_host_index,
|
766
|
+
)
|
767
|
+
|
768
|
+
else:
|
769
|
+
return self._get_sma_indicator_async_with_http_info(
|
770
|
+
symbol=symbol,
|
771
|
+
market=market,
|
772
|
+
period=period,
|
773
|
+
timestamp=timestamp,
|
774
|
+
_request_timeout=_request_timeout,
|
775
|
+
_request_auth=_request_auth,
|
776
|
+
_content_type=_content_type,
|
777
|
+
_headers=_headers,
|
778
|
+
_host_index=_host_index,
|
779
|
+
)
|
780
|
+
|
781
|
+
@validate_call
|
782
|
+
def get_sma_indicator_without_preload_content(
|
783
|
+
self,
|
784
|
+
symbol: Annotated[
|
785
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
786
|
+
],
|
787
|
+
market: Annotated[
|
788
|
+
Optional[MarketType],
|
789
|
+
Field(description="The market type to use for the SMA indicator"),
|
790
|
+
] = None,
|
791
|
+
period: Annotated[
|
792
|
+
Optional[StrictInt],
|
793
|
+
Field(description="The period to use for the SMA indicator"),
|
794
|
+
] = None,
|
795
|
+
timestamp: Annotated[
|
796
|
+
Optional[StrictInt],
|
797
|
+
Field(description="The timestamp for which to fetch the SMA indicator"),
|
798
|
+
] = None,
|
799
|
+
_request_timeout: Union[
|
800
|
+
None,
|
801
|
+
Annotated[StrictFloat, Field(gt=0)],
|
802
|
+
Tuple[
|
803
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
804
|
+
],
|
805
|
+
] = None,
|
806
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
807
|
+
_content_type: Optional[StrictStr] = None,
|
808
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
809
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
810
|
+
) -> RESTResponseType:
|
811
|
+
"""Get Sma Indicator without preloading content"""
|
812
|
+
if self.is_sync:
|
813
|
+
return self._get_sma_indicator_sync_without_preload_content(
|
814
|
+
symbol=symbol,
|
815
|
+
market=market,
|
816
|
+
period=period,
|
817
|
+
timestamp=timestamp,
|
818
|
+
_request_timeout=_request_timeout,
|
819
|
+
_request_auth=_request_auth,
|
820
|
+
_content_type=_content_type,
|
821
|
+
_headers=_headers,
|
822
|
+
_host_index=_host_index,
|
823
|
+
)
|
824
|
+
|
825
|
+
else:
|
826
|
+
return self._get_sma_indicator_async_without_preload_content(
|
827
|
+
symbol=symbol,
|
828
|
+
market=market,
|
829
|
+
period=period,
|
830
|
+
timestamp=timestamp,
|
831
|
+
_request_timeout=_request_timeout,
|
832
|
+
_request_auth=_request_auth,
|
833
|
+
_content_type=_content_type,
|
834
|
+
_headers=_headers,
|
835
|
+
_host_index=_host_index,
|
836
|
+
)
|
837
|
+
|
838
|
+
# Private async implementation methods
|
839
|
+
@validate_call
|
840
|
+
async def _get_sma_indicator_async(
|
365
841
|
self,
|
366
842
|
symbol: Annotated[
|
367
843
|
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
@@ -448,7 +924,7 @@ class IndicatorsApi:
|
|
448
924
|
).data
|
449
925
|
|
450
926
|
@validate_call
|
451
|
-
async def
|
927
|
+
async def _get_sma_indicator_async_with_http_info(
|
452
928
|
self,
|
453
929
|
symbol: Annotated[
|
454
930
|
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
@@ -530,12 +1006,11 @@ class IndicatorsApi:
|
|
530
1006
|
)
|
531
1007
|
await response_data.read()
|
532
1008
|
return self.api_client.response_deserialize(
|
533
|
-
response_data=response_data,
|
534
|
-
response_types_map=_response_types_map,
|
1009
|
+
response_data=response_data, response_types_map=_response_types_map
|
535
1010
|
)
|
536
1011
|
|
537
1012
|
@validate_call
|
538
|
-
async def
|
1013
|
+
async def _get_sma_indicator_async_without_preload_content(
|
539
1014
|
self,
|
540
1015
|
symbol: Annotated[
|
541
1016
|
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
@@ -615,7 +1090,137 @@ class IndicatorsApi:
|
|
615
1090
|
response_data = await self.api_client.call_api(
|
616
1091
|
*_param, _request_timeout=_request_timeout
|
617
1092
|
)
|
618
|
-
return response_data
|
1093
|
+
return response_data
|
1094
|
+
|
1095
|
+
# Private sync implementation methods
|
1096
|
+
@validate_call
|
1097
|
+
def _get_sma_indicator_sync(
|
1098
|
+
self,
|
1099
|
+
symbol: Annotated[
|
1100
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
1101
|
+
],
|
1102
|
+
market: Annotated[
|
1103
|
+
Optional[MarketType],
|
1104
|
+
Field(description="The market type to use for the SMA indicator"),
|
1105
|
+
] = None,
|
1106
|
+
period: Annotated[
|
1107
|
+
Optional[StrictInt],
|
1108
|
+
Field(description="The period to use for the SMA indicator"),
|
1109
|
+
] = None,
|
1110
|
+
timestamp: Annotated[
|
1111
|
+
Optional[StrictInt],
|
1112
|
+
Field(description="The timestamp for which to fetch the SMA indicator"),
|
1113
|
+
] = None,
|
1114
|
+
_request_timeout: Union[
|
1115
|
+
None,
|
1116
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1117
|
+
Tuple[
|
1118
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1119
|
+
],
|
1120
|
+
] = None,
|
1121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1122
|
+
_content_type: Optional[StrictStr] = None,
|
1123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1125
|
+
) -> Dict[str, object]:
|
1126
|
+
"""Synchronous version of get_sma_indicator"""
|
1127
|
+
return async_to_sync(self._get_sma_indicator_async)(
|
1128
|
+
symbol=symbol,
|
1129
|
+
market=market,
|
1130
|
+
period=period,
|
1131
|
+
timestamp=timestamp,
|
1132
|
+
_request_timeout=_request_timeout,
|
1133
|
+
_request_auth=_request_auth,
|
1134
|
+
_content_type=_content_type,
|
1135
|
+
_headers=_headers,
|
1136
|
+
_host_index=_host_index,
|
1137
|
+
)
|
1138
|
+
|
1139
|
+
@validate_call
|
1140
|
+
def _get_sma_indicator_sync_with_http_info(
|
1141
|
+
self,
|
1142
|
+
symbol: Annotated[
|
1143
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
1144
|
+
],
|
1145
|
+
market: Annotated[
|
1146
|
+
Optional[MarketType],
|
1147
|
+
Field(description="The market type to use for the SMA indicator"),
|
1148
|
+
] = None,
|
1149
|
+
period: Annotated[
|
1150
|
+
Optional[StrictInt],
|
1151
|
+
Field(description="The period to use for the SMA indicator"),
|
1152
|
+
] = None,
|
1153
|
+
timestamp: Annotated[
|
1154
|
+
Optional[StrictInt],
|
1155
|
+
Field(description="The timestamp for which to fetch the SMA indicator"),
|
1156
|
+
] = None,
|
1157
|
+
_request_timeout: Union[
|
1158
|
+
None,
|
1159
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1160
|
+
Tuple[
|
1161
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1162
|
+
],
|
1163
|
+
] = None,
|
1164
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1165
|
+
_content_type: Optional[StrictStr] = None,
|
1166
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1167
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1168
|
+
) -> ApiResponse[Dict[str, object]]:
|
1169
|
+
"""Synchronous version of get_sma_indicator_with_http_info"""
|
1170
|
+
return async_to_sync(self._get_sma_indicator_async_with_http_info)(
|
1171
|
+
symbol=symbol,
|
1172
|
+
market=market,
|
1173
|
+
period=period,
|
1174
|
+
timestamp=timestamp,
|
1175
|
+
_request_timeout=_request_timeout,
|
1176
|
+
_request_auth=_request_auth,
|
1177
|
+
_content_type=_content_type,
|
1178
|
+
_headers=_headers,
|
1179
|
+
_host_index=_host_index,
|
1180
|
+
)
|
1181
|
+
|
1182
|
+
@validate_call
|
1183
|
+
def _get_sma_indicator_sync_without_preload_content(
|
1184
|
+
self,
|
1185
|
+
symbol: Annotated[
|
1186
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
1187
|
+
],
|
1188
|
+
market: Annotated[
|
1189
|
+
Optional[MarketType],
|
1190
|
+
Field(description="The market type to use for the SMA indicator"),
|
1191
|
+
] = None,
|
1192
|
+
period: Annotated[
|
1193
|
+
Optional[StrictInt],
|
1194
|
+
Field(description="The period to use for the SMA indicator"),
|
1195
|
+
] = None,
|
1196
|
+
timestamp: Annotated[
|
1197
|
+
Optional[StrictInt],
|
1198
|
+
Field(description="The timestamp for which to fetch the SMA indicator"),
|
1199
|
+
] = None,
|
1200
|
+
_request_timeout: Union[
|
1201
|
+
None,
|
1202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1203
|
+
Tuple[
|
1204
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1205
|
+
],
|
1206
|
+
] = None,
|
1207
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1208
|
+
_content_type: Optional[StrictStr] = None,
|
1209
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1210
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1211
|
+
) -> RESTResponseType:
|
1212
|
+
"""Synchronous version of get_sma_indicator_without_preload_content"""
|
1213
|
+
return async_to_sync(self._get_sma_indicator_async_without_preload_content)(
|
1214
|
+
symbol=symbol,
|
1215
|
+
market=market,
|
1216
|
+
period=period,
|
1217
|
+
timestamp=timestamp,
|
1218
|
+
_request_timeout=_request_timeout,
|
1219
|
+
_request_auth=_request_auth,
|
1220
|
+
_content_type=_content_type,
|
1221
|
+
_headers=_headers,
|
1222
|
+
_host_index=_host_index,
|
1223
|
+
)
|
619
1224
|
|
620
1225
|
def _get_sma_indicator_serialize(
|
621
1226
|
self,
|