crypticorn 2.1.4__py3-none-any.whl → 2.1.6__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/client.py +4 -0
- crypticorn/common/errors.py +1 -1
- crypticorn/common/sorter.py +9 -7
- crypticorn/common/urls.py +1 -0
- crypticorn/klines/client/configuration.py +2 -2
- crypticorn/metrics/__init__.py +4 -0
- crypticorn/metrics/client/__init__.py +60 -0
- crypticorn/metrics/client/api/__init__.py +10 -0
- crypticorn/metrics/client/api/exchanges_api.py +1003 -0
- crypticorn/metrics/client/api/health_check_api.py +265 -0
- crypticorn/metrics/client/api/indicators_api.py +680 -0
- crypticorn/metrics/client/api/logs_api.py +356 -0
- crypticorn/metrics/client/api/marketcap_api.py +1315 -0
- crypticorn/metrics/client/api/markets_api.py +618 -0
- crypticorn/metrics/client/api/tokens_api.py +300 -0
- crypticorn/metrics/client/api_client.py +758 -0
- crypticorn/metrics/client/api_response.py +20 -0
- crypticorn/metrics/client/configuration.py +575 -0
- crypticorn/metrics/client/exceptions.py +220 -0
- crypticorn/metrics/client/models/__init__.py +37 -0
- crypticorn/metrics/client/models/base_response_dict.py +106 -0
- crypticorn/metrics/client/models/base_response_health_check_response.py +114 -0
- crypticorn/metrics/client/models/base_response_list_dict.py +106 -0
- crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +118 -0
- crypticorn/metrics/client/models/base_response_list_str.py +106 -0
- crypticorn/metrics/client/models/error_response.py +109 -0
- crypticorn/metrics/client/models/exchange_mapping.py +132 -0
- crypticorn/{trade/client/models/update_notification.py → metrics/client/models/health_check_response.py} +15 -19
- crypticorn/metrics/client/models/http_validation_error.py +99 -0
- crypticorn/metrics/client/models/market.py +35 -0
- crypticorn/metrics/client/models/severity.py +36 -0
- crypticorn/metrics/client/models/validation_error.py +105 -0
- crypticorn/metrics/client/models/validation_error_loc_inner.py +159 -0
- crypticorn/metrics/client/py.typed +0 -0
- crypticorn/metrics/client/rest.py +195 -0
- crypticorn/metrics/main.py +112 -0
- crypticorn/pay/client/api/products_api.py +15 -15
- crypticorn/pay/client/models/now_webhook_payload.py +1 -1
- crypticorn/trade/client/api/futures_trading_panel_api.py +15 -15
- crypticorn/trade/client/models/api_error_identifier.py +49 -47
- crypticorn/trade/client/models/api_error_level.py +2 -2
- {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/METADATA +3 -3
- {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/RECORD +45 -17
- crypticorn/trade/client/models/notification_type.py +0 -37
- crypticorn/trade/client/models/strategy_model.py +0 -158
- {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/WHEEL +0 -0
- {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/top_level.txt +0 -0
@@ -1031,7 +1031,7 @@ class FuturesTradingPanelApi:
|
|
1031
1031
|
async def place_futures_order(
|
1032
1032
|
self,
|
1033
1033
|
key: StrictStr,
|
1034
|
-
|
1034
|
+
body: Dict[str, Any],
|
1035
1035
|
_request_timeout: Union[
|
1036
1036
|
None,
|
1037
1037
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1049,8 +1049,8 @@ class FuturesTradingPanelApi:
|
|
1049
1049
|
|
1050
1050
|
:param key: (required)
|
1051
1051
|
:type key: str
|
1052
|
-
:param
|
1053
|
-
:type
|
1052
|
+
:param body: (required)
|
1053
|
+
:type body: object
|
1054
1054
|
:param _request_timeout: timeout setting for this request. If one
|
1055
1055
|
number provided, it will be total request
|
1056
1056
|
timeout. It can also be a pair (tuple) of
|
@@ -1075,7 +1075,7 @@ class FuturesTradingPanelApi:
|
|
1075
1075
|
|
1076
1076
|
_param = self._place_futures_order_serialize(
|
1077
1077
|
key=key,
|
1078
|
-
|
1078
|
+
body=body,
|
1079
1079
|
_request_auth=_request_auth,
|
1080
1080
|
_content_type=_content_type,
|
1081
1081
|
_headers=_headers,
|
@@ -1099,7 +1099,7 @@ class FuturesTradingPanelApi:
|
|
1099
1099
|
async def place_futures_order_with_http_info(
|
1100
1100
|
self,
|
1101
1101
|
key: StrictStr,
|
1102
|
-
|
1102
|
+
body: Dict[str, Any],
|
1103
1103
|
_request_timeout: Union[
|
1104
1104
|
None,
|
1105
1105
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1117,8 +1117,8 @@ class FuturesTradingPanelApi:
|
|
1117
1117
|
|
1118
1118
|
:param key: (required)
|
1119
1119
|
:type key: str
|
1120
|
-
:param
|
1121
|
-
:type
|
1120
|
+
:param body: (required)
|
1121
|
+
:type body: object
|
1122
1122
|
:param _request_timeout: timeout setting for this request. If one
|
1123
1123
|
number provided, it will be total request
|
1124
1124
|
timeout. It can also be a pair (tuple) of
|
@@ -1143,7 +1143,7 @@ class FuturesTradingPanelApi:
|
|
1143
1143
|
|
1144
1144
|
_param = self._place_futures_order_serialize(
|
1145
1145
|
key=key,
|
1146
|
-
|
1146
|
+
body=body,
|
1147
1147
|
_request_auth=_request_auth,
|
1148
1148
|
_content_type=_content_type,
|
1149
1149
|
_headers=_headers,
|
@@ -1167,7 +1167,7 @@ class FuturesTradingPanelApi:
|
|
1167
1167
|
async def place_futures_order_without_preload_content(
|
1168
1168
|
self,
|
1169
1169
|
key: StrictStr,
|
1170
|
-
|
1170
|
+
body: Dict[str, Any],
|
1171
1171
|
_request_timeout: Union[
|
1172
1172
|
None,
|
1173
1173
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1185,8 +1185,8 @@ class FuturesTradingPanelApi:
|
|
1185
1185
|
|
1186
1186
|
:param key: (required)
|
1187
1187
|
:type key: str
|
1188
|
-
:param
|
1189
|
-
:type
|
1188
|
+
:param body: (required)
|
1189
|
+
:type body: object
|
1190
1190
|
:param _request_timeout: timeout setting for this request. If one
|
1191
1191
|
number provided, it will be total request
|
1192
1192
|
timeout. It can also be a pair (tuple) of
|
@@ -1211,7 +1211,7 @@ class FuturesTradingPanelApi:
|
|
1211
1211
|
|
1212
1212
|
_param = self._place_futures_order_serialize(
|
1213
1213
|
key=key,
|
1214
|
-
|
1214
|
+
body=body,
|
1215
1215
|
_request_auth=_request_auth,
|
1216
1216
|
_content_type=_content_type,
|
1217
1217
|
_headers=_headers,
|
@@ -1230,7 +1230,7 @@ class FuturesTradingPanelApi:
|
|
1230
1230
|
def _place_futures_order_serialize(
|
1231
1231
|
self,
|
1232
1232
|
key,
|
1233
|
-
|
1233
|
+
body,
|
1234
1234
|
_request_auth,
|
1235
1235
|
_content_type,
|
1236
1236
|
_headers,
|
@@ -1259,8 +1259,8 @@ class FuturesTradingPanelApi:
|
|
1259
1259
|
# process the header parameters
|
1260
1260
|
# process the form parameters
|
1261
1261
|
# process the body parameter
|
1262
|
-
if
|
1263
|
-
_body_params =
|
1262
|
+
if body is not None:
|
1263
|
+
_body_params = body
|
1264
1264
|
|
1265
1265
|
# set the HTTP header `Accept`
|
1266
1266
|
if "Accept" not in _header_params:
|
@@ -26,69 +26,71 @@ class ApiErrorIdentifier(str, Enum):
|
|
26
26
|
"""
|
27
27
|
allowed enum values
|
28
28
|
"""
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
API_KEY_ALREADY_EXISTS = "api_key_already_exists"
|
30
|
+
BLACK_SWAN = "black_swan"
|
31
|
+
BOT_ALREADY_DELETED = "bot_already_deleted"
|
32
|
+
BOT_DISABLED = "bot_disabled"
|
33
|
+
BOT_STOPPING_COMPLETED = "bot_stopping_completed"
|
34
|
+
CLIENT_ORDER_ID_ALREADY_EXISTS = "client_order_id_already_exists"
|
35
|
+
INVALID_CONTENT_TYPE = "invalid_content_type"
|
36
|
+
DELETE_BOT_ERROR = "delete_bot_error"
|
37
|
+
EXCHANGE_API_KEY_IN_USE = "exchange_api_key_in_use"
|
38
|
+
EXCHANGE_INVALID_SIGNATURE = "exchange_invalid_signature"
|
39
|
+
EXCHANGE_INVALID_TIMESTAMP = "exchange_invalid_timestamp"
|
40
|
+
EXCHANGE_IP_ADDRESS_IS_NOT_AUTHORIZED = "exchange_ip_address_is_not_authorized"
|
41
|
+
EXCHANGE_SYSTEM_UNDER_MAINTENANCE = "exchange_system_under_maintenance"
|
42
|
+
EXCHANGE_RATE_LIMIT_EXCEEDED = "exchange_rate_limit_exceeded"
|
43
|
+
EXCHANGE_SERVICE_TEMPORARILY_UNAVAILABLE = (
|
44
|
+
"exchange_service_temporarily_unavailable"
|
45
|
+
)
|
46
|
+
EXCHANGE_SYSTEM_IS_BUSY = "exchange_system_is_busy"
|
47
|
+
EXCHANGE_SYSTEM_CONFIGURATION_ERROR = "exchange_system_configuration_error"
|
48
|
+
EXCHANGE_INTERNAL_SYSTEM_ERROR = "exchange_internal_system_error"
|
49
|
+
EXCHANGE_USER_ACCOUNT_IS_FROZEN = "exchange_user_account_is_frozen"
|
34
50
|
INSUFFICIENT_PERMISSIONS_SPOT_AND_FUTURES_REQUIRED = (
|
35
51
|
"insufficient_permissions_spot_and_futures_required"
|
36
52
|
)
|
37
|
-
|
38
|
-
|
53
|
+
HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
|
54
|
+
HTTP_REQUEST_ERROR = "http_request_error"
|
55
|
+
INSUFFICIENT_BALANCE = "insufficient_balance"
|
56
|
+
INSUFFICIENT_MARGIN = "insufficient_margin"
|
57
|
+
INSUFFICIENT_SCOPES = "insufficient_scopes"
|
58
|
+
INVALID_API_KEY = "invalid_api_key"
|
59
|
+
INVALID_BEARER = "invalid_bearer"
|
60
|
+
INVALID_EXCHANGE_API_KEY = "invalid_exchange_api_key"
|
61
|
+
INVALID_MARGIN_MODE = "invalid_margin_mode"
|
39
62
|
INVALID_PARAMETER_PROVIDED = "invalid_parameter_provided"
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
63
|
+
JWT_EXPIRED = "jwt_expired"
|
64
|
+
LEVERAGE_LIMIT_EXCEEDED = "leverage_limit_exceeded"
|
65
|
+
ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = (
|
66
|
+
"order_violates_liquidation_price_constraints"
|
67
|
+
)
|
68
|
+
NO_CREDENTIALS = "no_credentials"
|
69
|
+
OBJECT_NOT_FOUND = "object_not_found"
|
44
70
|
ORDER_IS_ALREADY_FILLED = "order_is_already_filled"
|
45
71
|
ORDER_IS_BEING_PROCESSED = "order_is_being_processed"
|
46
72
|
ORDER_QUANTITY_LIMIT_EXCEEDED = "order_quantity_limit_exceeded"
|
73
|
+
ORDER_DOES_NOT_EXIST = "order_does_not_exist"
|
47
74
|
ORDER_PRICE_IS_INVALID = "order_price_is_invalid"
|
48
|
-
|
49
|
-
|
50
|
-
CLIENT_ORDER_ID_ALREADY_EXISTS = "client_order_id_already_exists"
|
51
|
-
POSITION_DOES_NOT_EXIST = "position_does_not_exist"
|
75
|
+
ORDER_SIZE_TOO_LARGE = "order_size_too_large"
|
76
|
+
ORDER_SIZE_TOO_SMALL = "order_size_too_small"
|
52
77
|
POSITION_LIMIT_EXCEEDED = "position_limit_exceeded"
|
78
|
+
POSITION_DOES_NOT_EXIST = "position_does_not_exist"
|
53
79
|
POSITION_OPENING_TEMPORARILY_SUSPENDED = "position_opening_temporarily_suspended"
|
54
|
-
|
55
|
-
|
56
|
-
LEVERAGE_LIMIT_EXCEEDED = "leverage_limit_exceeded"
|
80
|
+
POST_ONLY_ORDER_WOULD_IMMEDIATELY_MATCH = "post_only_order_would_immediately_match"
|
81
|
+
REQUEST_SCOPE_LIMIT_EXCEEDED = "request_scope_limit_exceeded"
|
57
82
|
RISK_LIMIT_EXCEEDED = "risk_limit_exceeded"
|
58
|
-
ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = (
|
59
|
-
"order_violates_liquidation_price_constraints"
|
60
|
-
)
|
61
|
-
INVALID_MARGIN_MODE = "invalid_margin_mode"
|
62
|
-
INTERNAL_SYSTEM_ERROR = "internal_system_error"
|
63
|
-
SYSTEM_CONFIGURATION_ERROR = "system_configuration_error"
|
64
|
-
SERVICE_TEMPORARILY_UNAVAILABLE = "service_temporarily_unavailable"
|
65
|
-
SYSTEM_IS_BUSY_PLEASE_TRY_AGAIN_LATER = "system_is_busy_please_try_again_later"
|
66
|
-
SYSTEM_UNDER_MAINTENANCE = "system_under_maintenance"
|
67
83
|
RPC_TIMEOUT = "rpc_timeout"
|
68
84
|
SYSTEM_SETTLEMENT_IN_PROCESS = "system_settlement_in_process"
|
69
|
-
|
85
|
+
STRATEGY_DISABLED = "strategy_disabled"
|
86
|
+
SUCCESS = "success"
|
87
|
+
SYMBOL_DOES_NOT_EXIST = "symbol_does_not_exist"
|
70
88
|
TRADING_HAS_BEEN_LOCKED = "trading_has_been_locked"
|
71
|
-
UNKNOWN_ERROR_OCCURRED = "unknown_error_occurred"
|
72
|
-
HTTP_REQUEST_ERROR = "http_request_error"
|
73
|
-
BLACK_SWAN = "black_swan"
|
74
89
|
TRADING_ACTION_EXPIRED = "trading_action_expired"
|
75
90
|
TRADING_ACTION_SKIPPED = "trading_action_skipped"
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
|
80
|
-
API_KEY_ALREADY_EXISTS = "api_key_already_exists"
|
81
|
-
DELETE_BOT_ERROR = "delete_bot_error"
|
82
|
-
JWT_EXPIRED = "jwt_expired"
|
83
|
-
BOT_STOPPING_COMPLETED = "bot_stopping_completed"
|
84
|
-
OBJECT_NOT_FOUND = "object_not_found"
|
85
|
-
STRATEGY_DISABLED = "strategy_disabled"
|
86
|
-
API_KEY_IN_USE_BY_BOTS = "api_key_in_use_by_bots"
|
87
|
-
BOT_ALREADY_DELETED = "bot_already_deleted"
|
88
|
-
INVALID_API_KEY = "invalid_api_key"
|
89
|
-
INVALID_BEARER = "invalid_bearer"
|
90
|
-
NO_CREDENTIALS = "no_credentials"
|
91
|
-
INSUFFICIENT_SCOPES = "insufficient_scopes"
|
91
|
+
TRADING_IS_SUSPENDED = "trading_is_suspended"
|
92
|
+
UNKNOWN_ERROR_OCCURRED = "unknown_error_occurred"
|
93
|
+
REQUESTED_RESOURCE_NOT_FOUND = "requested_resource_not_found"
|
92
94
|
|
93
95
|
@classmethod
|
94
96
|
def from_json(cls, json_str: str) -> Self:
|
@@ -20,15 +20,15 @@ from typing_extensions import Self
|
|
20
20
|
|
21
21
|
class ApiErrorLevel(str, Enum):
|
22
22
|
"""
|
23
|
-
|
23
|
+
API error levels
|
24
24
|
"""
|
25
25
|
|
26
26
|
"""
|
27
27
|
allowed enum values
|
28
28
|
"""
|
29
29
|
ERROR = "error"
|
30
|
-
SUCCESS = "success"
|
31
30
|
INFO = "info"
|
31
|
+
SUCCESS = "success"
|
32
32
|
WARNING = "warning"
|
33
33
|
|
34
34
|
@classmethod
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: crypticorn
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.6
|
4
4
|
Summary: Maximise Your Crypto Trading Profits with AI Predictions
|
5
5
|
Author-email: Crypticorn <timon@crypticorn.com>
|
6
6
|
Project-URL: Homepage, https://crypticorn.com
|
@@ -71,7 +71,7 @@ As of know the library is available in async mode only. There are two was of usi
|
|
71
71
|
|
72
72
|
## With Async Context Protocol
|
73
73
|
```python
|
74
|
-
async with ApiClient(base_url=
|
74
|
+
async with ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key") as client:
|
75
75
|
# json response
|
76
76
|
response = await client.pay.products.get_products_without_preload_content()
|
77
77
|
print(await response.json())
|
@@ -86,7 +86,7 @@ async with ApiClient(base_url="http://localhost", jwt=jwt) as client:
|
|
86
86
|
## Without Async Context Protocol
|
87
87
|
Without the context you need to close the session manually.
|
88
88
|
```python
|
89
|
-
client = ApiClient(base_url=
|
89
|
+
client = ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key")
|
90
90
|
response = asyncio.run(client.hive.models.get_all_models())
|
91
91
|
asyncio.run(client.close())
|
92
92
|
```
|
@@ -1,5 +1,5 @@
|
|
1
1
|
crypticorn/__init__.py,sha256=TL41V09dmtbd2ee07wmOuG9KJJpyvLMPJi5DEd9bDyU,129
|
2
|
-
crypticorn/client.py,sha256=
|
2
|
+
crypticorn/client.py,sha256=mj36LuJH9fF7rb_kKJuifAAepmU1j-jnWqk7a_q4jz4,2058
|
3
3
|
crypticorn/auth/__init__.py,sha256=JAl1tBLK9pYLr_-YKaj581c-c94PWLoqnatTIVAVvMM,81
|
4
4
|
crypticorn/auth/main.py,sha256=ljPuO27VDiOO-jnNycBn96X8UbVHPgOUglj46ib3OjM,1336
|
5
5
|
crypticorn/auth/client/__init__.py,sha256=ziGgrJ7judjAwOaSKF-7lgs1zhE-XEZkMYKD0WUkHfs,4990
|
@@ -57,10 +57,10 @@ crypticorn/auth/client/models/whoami200_response.py,sha256=uehdq5epgeOphhrIR3tbr
|
|
57
57
|
crypticorn/common/__init__.py,sha256=lY87VMTkIEqto6kcEjC1YWsUvT03QuPmXwxCaeWE854,196
|
58
58
|
crypticorn/common/auth.py,sha256=LEnTh2bqbljCdTNJUqTOTo2Q39gEz0JRumF1Z5MHQz0,319
|
59
59
|
crypticorn/common/auth_client.py,sha256=7ICjLRPOIXzEJXW76BgVxkNfi_QjuRdLZBX6TNvTpJE,7588
|
60
|
-
crypticorn/common/errors.py,sha256=
|
60
|
+
crypticorn/common/errors.py,sha256=Yd3zLtrqCe0NvjfqxIHohT48T4yfSi-V4s_WyYAi8t4,12614
|
61
61
|
crypticorn/common/scopes.py,sha256=pRD9RauSRSxVGo8k5b2x66h3Wy2aaVEcluZvu6aMTE0,1418
|
62
|
-
crypticorn/common/sorter.py,sha256=
|
63
|
-
crypticorn/common/urls.py,sha256=
|
62
|
+
crypticorn/common/sorter.py,sha256=DPkQmxDeuti4onCiE8IJZUkTc5WZp1j4dIIc7wN9En0,1167
|
63
|
+
crypticorn/common/urls.py,sha256=6--K5hJjNjVAIxQA9SdT20AZsDjTmFsamHTNabgiCw8,456
|
64
64
|
crypticorn/hive/__init__.py,sha256=hRfTlEzEql4msytdUC_04vfaHzVKG5CGZle1M-9QFgY,81
|
65
65
|
crypticorn/hive/main.py,sha256=RmCYSR0jwmfYWTK89dt79DuGPjEaip9XQs_LWNWr_tc,1036
|
66
66
|
crypticorn/hive/client/__init__.py,sha256=DIj3v16Yq5l6yMPoywrL2sOvQ6ZqpAsSJuhssIp8JFQ,2396
|
@@ -98,7 +98,7 @@ crypticorn/klines/main.py,sha256=Md1VqaFSwlbO9ZY4v8VIBYQr2kuYnsxgfaDpisDFarA,218
|
|
98
98
|
crypticorn/klines/client/__init__.py,sha256=i4zgrQsA1BXPYa0YLnSOrStKk1iJyJw-2KDOtTDdizg,3795
|
99
99
|
crypticorn/klines/client/api_client.py,sha256=Sih490VSmIfdDEq0A_ULlx7HR_e03bExGYta1kZEO7Y,27135
|
100
100
|
crypticorn/klines/client/api_response.py,sha256=WhxwYDSMm6wPixp9CegO8dJzjFxDz3JF1yCq9s0ZqKE,639
|
101
|
-
crypticorn/klines/client/configuration.py,sha256=
|
101
|
+
crypticorn/klines/client/configuration.py,sha256=P6k85BelMIOrjKPPyBel6JKZXgNgG_wy4q6wo1J0_jk,17997
|
102
102
|
crypticorn/klines/client/exceptions.py,sha256=TlbbWk-rYbzR4im1prdyzhVe_btHSeNTRPrvlN8bbik,6735
|
103
103
|
crypticorn/klines/client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
104
104
|
crypticorn/klines/client/rest.py,sha256=KQv_jWLyX6hglTGnkwmyx1lbhxXYLwpOOFxFw-sY5XA,9577
|
@@ -134,6 +134,37 @@ crypticorn/klines/client/models/timeframe.py,sha256=MD4l74KnVeFr2fXJXrR8Wos58_5v
|
|
134
134
|
crypticorn/klines/client/models/udf_config_response.py,sha256=VRBMwoCmtjSooF_TxqcofGmT0JYd0HAVqjGdOWJXeds,5982
|
135
135
|
crypticorn/klines/client/models/validation_error.py,sha256=TMfS5WKx6jSNPdppQA5Yax-r3k0Gn31raWyTZPMsDPg,3509
|
136
136
|
crypticorn/klines/client/models/validation_error_loc_inner.py,sha256=tUClZ2b89NWJWHagBsZ5rlEjiV1vn4sgpAncHKUIZRg,5411
|
137
|
+
crypticorn/metrics/__init__.py,sha256=VT1pPYATCS_t_FFB14xYheb1YVyghFiHAT-RapO3NEY,120
|
138
|
+
crypticorn/metrics/main.py,sha256=HeVj1B-OqeAoSQU1OIMngoSsPwZjBckNb1UC866obtE,3636
|
139
|
+
crypticorn/metrics/client/__init__.py,sha256=9ooMGJCbi9evO8IklEjgRXdVZsuA8d4sTcKhijo7IHs,2799
|
140
|
+
crypticorn/metrics/client/api_client.py,sha256=vP_byGPqgDnmt9nV2YXUiiYWFsJ3HWWi2s81f7gp8vU,27139
|
141
|
+
crypticorn/metrics/client/api_response.py,sha256=WhxwYDSMm6wPixp9CegO8dJzjFxDz3JF1yCq9s0ZqKE,639
|
142
|
+
crypticorn/metrics/client/configuration.py,sha256=vlHI58g76MvBjIYj_lU9T0YiPf5dC_OWW9HHBaQEask,17626
|
143
|
+
crypticorn/metrics/client/exceptions.py,sha256=Hg4u41-JvnlRV5Eu4ZxaFClHP5apqNNbHBFRfE6P3u8,6626
|
144
|
+
crypticorn/metrics/client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
145
|
+
crypticorn/metrics/client/rest.py,sha256=1XJWcgpqjCTmKQkkDASF3IhBu58fSaWRPoalizOO_5c,7160
|
146
|
+
crypticorn/metrics/client/api/__init__.py,sha256=6Oe65QZrPMVsKFm0EozbaSh2bCsjwM7JnamjheerrcM,517
|
147
|
+
crypticorn/metrics/client/api/exchanges_api.py,sha256=A4KTYRcuxTA11vAjn17wgmsvQyzWOw6MDk_6-X6xpCA,41666
|
148
|
+
crypticorn/metrics/client/api/health_check_api.py,sha256=FuGyOWzkOo1mQaI8agGUXMSlwvzEm7MKyDXqwNWjjUM,10600
|
149
|
+
crypticorn/metrics/client/api/indicators_api.py,sha256=6k4mXpOg9MIIjIVYAjpvt8FK2X8P0Rli6x1ETANEeK0,26502
|
150
|
+
crypticorn/metrics/client/api/logs_api.py,sha256=VoLkymPD2yX8yepAfqPSqDxLy--clbgBiZJipX1-M40,14244
|
151
|
+
crypticorn/metrics/client/api/marketcap_api.py,sha256=zx2ypWL15ZecMhm3f9DqupFMzwA3jHApFvsC58RcIQs,52841
|
152
|
+
crypticorn/metrics/client/api/markets_api.py,sha256=92o2Hak9pFeJ7wmkphqEzrjT9gw4gZE49JsE35pO0m4,25304
|
153
|
+
crypticorn/metrics/client/api/tokens_api.py,sha256=tO21gzbvFCQYTrfenVlsDK_YxzEu_ut6VOatryC4Hcc,12057
|
154
|
+
crypticorn/metrics/client/models/__init__.py,sha256=pIOxE1-Ui53O5mR0cHPSd9FjSr9d7WIm8tsrX-a1KkI,1686
|
155
|
+
crypticorn/metrics/client/models/base_response_dict.py,sha256=a1ZcrL_AleMfxwT-zfPYV4cd1LwS-Wz4a9A92CIEFRo,3547
|
156
|
+
crypticorn/metrics/client/models/base_response_health_check_response.py,sha256=hWZJ8WUcLO1Ml7D0uvmSjrhxGxkEOmEPUmjK-rElbSI,4000
|
157
|
+
crypticorn/metrics/client/models/base_response_list_dict.py,sha256=exP8bxgkyhNchQSHwnLBeJFu5FkJstcB5foqctBUfIE,3569
|
158
|
+
crypticorn/metrics/client/models/base_response_list_exchange_mapping.py,sha256=-g0UMGlwwhJuxfcBp0QG60m0bW2ORnyvHyPpPprBSb0,4165
|
159
|
+
crypticorn/metrics/client/models/base_response_list_str.py,sha256=5lp3KqkdDDHqFR-7qWharb-PkzY07J9zRMhLgmOc7uQ,3560
|
160
|
+
crypticorn/metrics/client/models/error_response.py,sha256=_8ph1nXwGgGQ0mlsZZuoBBFYakNeetg-lGn6OrsMsAw,3473
|
161
|
+
crypticorn/metrics/client/models/exchange_mapping.py,sha256=VnWJVALy0pVT5e26XrNykCJBfl4RtRh99xlnkB_cu-g,4376
|
162
|
+
crypticorn/metrics/client/models/health_check_response.py,sha256=aCtQQ9EG9uEYir0Ny-oyIB49Mztn9J_HCEloxk3IvpE,2955
|
163
|
+
crypticorn/metrics/client/models/http_validation_error.py,sha256=LA7UuqNMKxqG7iO_bi1Kgx5mdodtLAgxL5VOdefpgJk,3291
|
164
|
+
crypticorn/metrics/client/models/market.py,sha256=mJBN2REbwvJags4iWgfnyec3XDyJDtGAQClC0LrJAcE,902
|
165
|
+
crypticorn/metrics/client/models/severity.py,sha256=7qCflKy5HPy6EL6Ig3bencZnddnupas9vfxoh1D1fSE,936
|
166
|
+
crypticorn/metrics/client/models/validation_error.py,sha256=yCwcbJ9w7lr_jSgcbsl2C37Zr9h93iAZxdHc7lKqeZs,3401
|
167
|
+
crypticorn/metrics/client/models/validation_error_loc_inner.py,sha256=Rki-HutGR9cicKt_OP2vN-5-ofpvPsmT6VpSYeMfJfI,5302
|
137
168
|
crypticorn/pay/__init__.py,sha256=ux-B-YbNetpTlZTb2fijuGUOEmSm4IB0fYtieGnVDBg,78
|
138
169
|
crypticorn/pay/main.py,sha256=DbwP_DI5Zp3Ow-Fq2khnnb0hOvrpA29e-jeRyrCCbBs,1075
|
139
170
|
crypticorn/pay/client/__init__.py,sha256=-Nk_UoRtKtpbY1-9iP1hUdDczdP6eE3T_Z1wVNhkAZo,2377
|
@@ -146,7 +177,7 @@ crypticorn/pay/client/rest.py,sha256=6ZLCKhRuEMURb6glMbPriHGoN0uspDC_hvlFDKCALxo
|
|
146
177
|
crypticorn/pay/client/api/__init__.py,sha256=vbisPmBd4c5G3_MHAlInKeu1obSr8witdtwxC43BnN8,302
|
147
178
|
crypticorn/pay/client/api/now_payments_api.py,sha256=bdqm_blpCcdYAy0cnl7QbGRajQMtsAjh7FN325Kw5es,32998
|
148
179
|
crypticorn/pay/client/api/payments_api.py,sha256=CguFpYEha5sTOwwDB2hcLPd0KxjP6gIFNvwI-SgoiG8,30358
|
149
|
-
crypticorn/pay/client/api/products_api.py,sha256=
|
180
|
+
crypticorn/pay/client/api/products_api.py,sha256=ecDZ5Y83KpPx5tehTBmbRm-GNJq2I668QjSTqLGF6HE,32947
|
150
181
|
crypticorn/pay/client/api/status_api.py,sha256=8QRvrCSHBRW0n7NlIEA6LDGhsy6Wx4WqPRH81e1X2gs,9928
|
151
182
|
crypticorn/pay/client/models/__init__.py,sha256=W2NnF4IInw7iBNVZnPTkxgxos0l-H1O39ebt--aB-Gk,1515
|
152
183
|
crypticorn/pay/client/models/api_status_res.py,sha256=Dt5g0wvtyIkkVcXyFjXzxokeqZb-Y0rJr_YljjeVcfw,2514
|
@@ -173,7 +204,7 @@ crypticorn/pay/client/models/now_create_invoice_res.py,sha256=xCxAJDXJWFThIeo-om
|
|
173
204
|
crypticorn/pay/client/models/now_fee_structure.py,sha256=aGsxYVU83iAVjzb_ui8Rm5KOA6Py73rkeHEoWt_mLa4,3240
|
174
205
|
crypticorn/pay/client/models/now_payment_model.py,sha256=8HRibX74KMJnXZE3IW8TC00JThmRY3jX9nWnCI16d34,4155
|
175
206
|
crypticorn/pay/client/models/now_payment_status.py,sha256=nvjz7KucgtqmDsLfd3Khg0IK-xtPRgzXuc5hWfSOdRw,975
|
176
|
-
crypticorn/pay/client/models/now_webhook_payload.py,sha256=
|
207
|
+
crypticorn/pay/client/models/now_webhook_payload.py,sha256=2h4qfzw6F0RgTv-8IxO2o2-nC3rM_3QkehYHFBRtm3s,6846
|
177
208
|
crypticorn/pay/client/models/payment.py,sha256=dPt7eMCNcdiZdZ_Mf_4W0tkufz95YJ9Cdyq8IuIQRgE,8797
|
178
209
|
crypticorn/pay/client/models/payment_status.py,sha256=Nr__kC34aCKqSk-Gq3-mt0SI5bOTlKB1uz9hKGj8sSc,897
|
179
210
|
crypticorn/pay/client/models/product.py,sha256=ndBOZ2ED2T37VDpgbdQOG_WqwK2zlOQYnkwuLcgGrC0,2592
|
@@ -197,7 +228,7 @@ crypticorn/trade/client/api/__init__.py,sha256=s6jcukWHyom8Bp9Vj0yrOL37-dNPNvdvM
|
|
197
228
|
crypticorn/trade/client/api/api_keys_api.py,sha256=iATzCULeKgd1rE2Oe8w4vn2ZoSvGJx5KLpD2ZyTs0qY,50862
|
198
229
|
crypticorn/trade/client/api/bots_api.py,sha256=WnrJK7zTGxJhaF6Blps3hXLUo03ud0aN-V3DjOsur20,41988
|
199
230
|
crypticorn/trade/client/api/exchanges_api.py,sha256=PX8yeVZFDWxmsortW0HdphbNtYRYWaLv8nkE8VUmPgg,10166
|
200
|
-
crypticorn/trade/client/api/futures_trading_panel_api.py,sha256=
|
231
|
+
crypticorn/trade/client/api/futures_trading_panel_api.py,sha256=lD_sf4OFg4BGx5LE8sbwriHXRYKCe58b7ExJaoHKfRY,50404
|
201
232
|
crypticorn/trade/client/api/notifications_api.py,sha256=wTwrEj_GxjpxaZNCezKN6BRsI1cgWB3npcNstYZ912E,61442
|
202
233
|
crypticorn/trade/client/api/orders_api.py,sha256=zibuEr3448IefONOEcgti06nxNtJCvi6WYRN7z8Z9mE,11217
|
203
234
|
crypticorn/trade/client/api/status_api.py,sha256=deaW23XWpUMqhFzxO9GqT0MI8ZlAIC_f4ewdPLExBMw,9934
|
@@ -205,8 +236,8 @@ crypticorn/trade/client/api/strategies_api.py,sha256=asNtn8mZDTRu36PGGGHLRtevQ3N
|
|
205
236
|
crypticorn/trade/client/api/trading_actions_api.py,sha256=BfW61jUsOZxhzcYgLLF19hGeSHElarxUeK1Re0q_wpY,32402
|
206
237
|
crypticorn/trade/client/models/__init__.py,sha256=qn31GdssVyCozLVuFZfK11ju9yDwY-Y3okMyn_ZmuRA,2234
|
207
238
|
crypticorn/trade/client/models/action_model.py,sha256=W-6IJl9KgeiBkZc95HH9kdvmmb-vzYtJ-HfKN0YzC_U,10131
|
208
|
-
crypticorn/trade/client/models/api_error_identifier.py,sha256=
|
209
|
-
crypticorn/trade/client/models/api_error_level.py,sha256=
|
239
|
+
crypticorn/trade/client/models/api_error_identifier.py,sha256=X1NwUsJJyIYQuoUVaByZ3msoctJIr9w7dzZZPQ-2h-Y,4136
|
240
|
+
crypticorn/trade/client/models/api_error_level.py,sha256=78zYTqbnUGvbjptf04e6-bpF8nN-YWqGxjGrdwNe4_4,799
|
210
241
|
crypticorn/trade/client/models/api_error_type.py,sha256=ANXQ3lPxQ9Jyh_-Q4ljHFHt5uH6ljBHPzK7SDy7etek,840
|
211
242
|
crypticorn/trade/client/models/api_key_model.py,sha256=CM6BeEc3ctmfLMnRht-_k_WDCjGWreOI7670h4KhhAM,5281
|
212
243
|
crypticorn/trade/client/models/bot_model.py,sha256=t1VetjZs20-ekukHlwBaOwvMiDuZ3-hjQa1V6iaUYtE,5875
|
@@ -219,20 +250,17 @@ crypticorn/trade/client/models/http_validation_error.py,sha256=7rSmsYpBLuxIkCgl2
|
|
219
250
|
crypticorn/trade/client/models/margin_mode.py,sha256=Y02aSytOfvROKDZHrdD2xHOCDbW6tT9YL3fNkDyGIus,767
|
220
251
|
crypticorn/trade/client/models/market_type.py,sha256=38cCEUR_8X0Fbxq6fa1-BagTfEuZ2gsO3kihYs7ngCA,747
|
221
252
|
crypticorn/trade/client/models/notification_model.py,sha256=pZc15SJRWPxGWjrKyEtJFLbBEPe-hBvQX9bOOjFeGQg,5010
|
222
|
-
crypticorn/trade/client/models/notification_type.py,sha256=-mFFlW34BEbhIDP_SuAgDWUGlMggvs1HLB2Q76QIa7I,801
|
223
253
|
crypticorn/trade/client/models/order_model.py,sha256=uAP7WxfiNpqV4qdX0UZxjKf70WaelEAVDJlgVTonc3M,12682
|
224
254
|
crypticorn/trade/client/models/order_status.py,sha256=cCS3aGJmqqVhoZ1JfLS-DeRj5qj-D82AI5OFblhAsik,842
|
225
255
|
crypticorn/trade/client/models/post_futures_action.py,sha256=b2HrhvawLj5zju-DXtUl6Cl9thb03-SkP48OEUIEWX8,3113
|
226
256
|
crypticorn/trade/client/models/strategy_exchange_info.py,sha256=YCxqNTgTM9uYKhkpMdMd3Ol681sIito5h37u94o0uSk,2831
|
227
|
-
crypticorn/trade/client/models/strategy_model.py,sha256=bflR-uWhIvrMjTBv6S0JpCO9NiYh588_vqZnmz-fcm4,5636
|
228
257
|
crypticorn/trade/client/models/strategy_model_input.py,sha256=fRHX4shmmFoTMW9FfASbxS4TqEixDxJ8COiOY99LtxE,5807
|
229
258
|
crypticorn/trade/client/models/strategy_model_output.py,sha256=e2bJnZ7IvWr9ch6cWiZzRy5fZODksgmr6wjbTku1gOM,5811
|
230
259
|
crypticorn/trade/client/models/tpsl.py,sha256=QGPhcgadjxAgyzpRSwlZJg_CDLnKxdZgseSpjNnkogo,4341
|
231
260
|
crypticorn/trade/client/models/trading_action_type.py,sha256=jW0OsNz_ZNXlITxAfh979BH5U12oTXSr6qUVcKcGHhw,847
|
232
|
-
crypticorn/trade/client/models/update_notification.py,sha256=B9QUuVRNpk1e5G8o0WFgIg3inm-OX7KJAJcjVnRzYx8,3046
|
233
261
|
crypticorn/trade/client/models/validation_error.py,sha256=uTkvsKrOAt-21UC0YPqCdRl_OMsuu7uhPtWuwRSYvv0,3228
|
234
262
|
crypticorn/trade/client/models/validation_error_loc_inner.py,sha256=22ql-H829xTBgfxNQZsqd8fS3zQt9tLW1pj0iobo0jY,5131
|
235
|
-
crypticorn-2.1.
|
236
|
-
crypticorn-2.1.
|
237
|
-
crypticorn-2.1.
|
238
|
-
crypticorn-2.1.
|
263
|
+
crypticorn-2.1.6.dist-info/METADATA,sha256=adfjnqk3cy9RW0emSxZkbuoeVNmnQutbmUtfLdElhF0,3138
|
264
|
+
crypticorn-2.1.6.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
265
|
+
crypticorn-2.1.6.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
|
266
|
+
crypticorn-2.1.6.dist-info/RECORD,,
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
FastAPI
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import json
|
17
|
-
from enum import Enum
|
18
|
-
from typing_extensions import Self
|
19
|
-
|
20
|
-
|
21
|
-
class NotificationType(str, Enum):
|
22
|
-
"""
|
23
|
-
NotificationType
|
24
|
-
"""
|
25
|
-
|
26
|
-
"""
|
27
|
-
allowed enum values
|
28
|
-
"""
|
29
|
-
ERROR = "error"
|
30
|
-
SUCCESS = "success"
|
31
|
-
INFO = "info"
|
32
|
-
WARNING = "warning"
|
33
|
-
|
34
|
-
@classmethod
|
35
|
-
def from_json(cls, json_str: str) -> Self:
|
36
|
-
"""Create an instance of NotificationType from a JSON string"""
|
37
|
-
return cls(json.loads(json_str))
|
@@ -1,158 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Trading API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
|
-
from typing_extensions import Annotated
|
23
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
24
|
-
from crypticorn.trade.client.models.strategy_exchange_info import StrategyExchangeInfo
|
25
|
-
from typing import Optional, Set
|
26
|
-
from typing_extensions import Self
|
27
|
-
|
28
|
-
|
29
|
-
class StrategyModel(BaseModel):
|
30
|
-
"""
|
31
|
-
StrategyModel
|
32
|
-
""" # noqa: E501
|
33
|
-
|
34
|
-
created_at: Optional[StrictInt] = None
|
35
|
-
updated_at: Optional[StrictInt] = None
|
36
|
-
id: Optional[StrictStr] = None
|
37
|
-
identifier: StrictStr = Field(
|
38
|
-
description="Unique human readable identifier for the strategy e.g. 'daily_trend_momentum'"
|
39
|
-
)
|
40
|
-
name: StrictStr = Field(description="Name of the strategy")
|
41
|
-
description: StrictStr = Field(description="Description of the strategy")
|
42
|
-
exchanges: List[StrategyExchangeInfo] = Field(
|
43
|
-
description="Exchanges supported by the strategy."
|
44
|
-
)
|
45
|
-
enabled: StrictBool = Field(description="Whether the strategy is enabled")
|
46
|
-
leverage: StrictInt = Field(description="Leverage for the strategy")
|
47
|
-
performance_fee: Union[
|
48
|
-
Annotated[float, Field(le=1.0, strict=True)],
|
49
|
-
Annotated[int, Field(le=1, strict=True)],
|
50
|
-
] = Field(description="Performance fee for the strategy")
|
51
|
-
market_type: MarketType = Field(description="Market of operation of the strategy")
|
52
|
-
__properties: ClassVar[List[str]] = [
|
53
|
-
"created_at",
|
54
|
-
"updated_at",
|
55
|
-
"id",
|
56
|
-
"identifier",
|
57
|
-
"name",
|
58
|
-
"description",
|
59
|
-
"exchanges",
|
60
|
-
"enabled",
|
61
|
-
"leverage",
|
62
|
-
"performance_fee",
|
63
|
-
"market_type",
|
64
|
-
]
|
65
|
-
|
66
|
-
model_config = ConfigDict(
|
67
|
-
populate_by_name=True,
|
68
|
-
validate_assignment=True,
|
69
|
-
protected_namespaces=(),
|
70
|
-
)
|
71
|
-
|
72
|
-
def to_str(self) -> str:
|
73
|
-
"""Returns the string representation of the model using alias"""
|
74
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
75
|
-
|
76
|
-
def to_json(self) -> str:
|
77
|
-
"""Returns the JSON representation of the model using alias"""
|
78
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
79
|
-
return json.dumps(self.to_dict())
|
80
|
-
|
81
|
-
@classmethod
|
82
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
83
|
-
"""Create an instance of StrategyModel from a JSON string"""
|
84
|
-
return cls.from_dict(json.loads(json_str))
|
85
|
-
|
86
|
-
def to_dict(self) -> Dict[str, Any]:
|
87
|
-
"""Return the dictionary representation of the model using alias.
|
88
|
-
|
89
|
-
This has the following differences from calling pydantic's
|
90
|
-
`self.model_dump(by_alias=True)`:
|
91
|
-
|
92
|
-
* `None` is only added to the output dict for nullable fields that
|
93
|
-
were set at model initialization. Other fields with value `None`
|
94
|
-
are ignored.
|
95
|
-
"""
|
96
|
-
excluded_fields: Set[str] = set([])
|
97
|
-
|
98
|
-
_dict = self.model_dump(
|
99
|
-
by_alias=True,
|
100
|
-
exclude=excluded_fields,
|
101
|
-
exclude_none=True,
|
102
|
-
)
|
103
|
-
# override the default output from pydantic by calling `to_dict()` of each item in exchanges (list)
|
104
|
-
_items = []
|
105
|
-
if self.exchanges:
|
106
|
-
for _item_exchanges in self.exchanges:
|
107
|
-
if _item_exchanges:
|
108
|
-
_items.append(_item_exchanges.to_dict())
|
109
|
-
_dict["exchanges"] = _items
|
110
|
-
# set to None if created_at (nullable) is None
|
111
|
-
# and model_fields_set contains the field
|
112
|
-
if self.created_at is None and "created_at" in self.model_fields_set:
|
113
|
-
_dict["created_at"] = None
|
114
|
-
|
115
|
-
# set to None if updated_at (nullable) is None
|
116
|
-
# and model_fields_set contains the field
|
117
|
-
if self.updated_at is None and "updated_at" in self.model_fields_set:
|
118
|
-
_dict["updated_at"] = None
|
119
|
-
|
120
|
-
# set to None if id (nullable) is None
|
121
|
-
# and model_fields_set contains the field
|
122
|
-
if self.id is None and "id" in self.model_fields_set:
|
123
|
-
_dict["id"] = None
|
124
|
-
|
125
|
-
return _dict
|
126
|
-
|
127
|
-
@classmethod
|
128
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
129
|
-
"""Create an instance of StrategyModel from a dict"""
|
130
|
-
if obj is None:
|
131
|
-
return None
|
132
|
-
|
133
|
-
if not isinstance(obj, dict):
|
134
|
-
return cls.model_validate(obj)
|
135
|
-
|
136
|
-
_obj = cls.model_validate(
|
137
|
-
{
|
138
|
-
"created_at": obj.get("created_at"),
|
139
|
-
"updated_at": obj.get("updated_at"),
|
140
|
-
"id": obj.get("id"),
|
141
|
-
"identifier": obj.get("identifier"),
|
142
|
-
"name": obj.get("name"),
|
143
|
-
"description": obj.get("description"),
|
144
|
-
"exchanges": (
|
145
|
-
[
|
146
|
-
StrategyExchangeInfo.from_dict(_item)
|
147
|
-
for _item in obj["exchanges"]
|
148
|
-
]
|
149
|
-
if obj.get("exchanges") is not None
|
150
|
-
else None
|
151
|
-
),
|
152
|
-
"enabled": obj.get("enabled"),
|
153
|
-
"leverage": obj.get("leverage"),
|
154
|
-
"performance_fee": obj.get("performance_fee"),
|
155
|
-
"market_type": obj.get("market_type"),
|
156
|
-
}
|
157
|
-
)
|
158
|
-
return _obj
|
File without changes
|
File without changes
|