crypticorn 2.4.7__py3-none-any.whl → 2.5.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/cli/init.py +7 -4
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +7 -3
- crypticorn/common/errors.py +21 -0
- crypticorn/common/exceptions.py +83 -0
- crypticorn/common/utils.py +11 -4
- crypticorn/klines/client/__init__.py +10 -3
- crypticorn/klines/client/api/__init__.py +1 -0
- crypticorn/klines/client/api/change_in_timeframe_api.py +331 -0
- crypticorn/klines/client/api/funding_rates_api.py +13 -13
- crypticorn/klines/client/api/health_check_api.py +8 -8
- crypticorn/klines/client/api/ohlcv_data_api.py +38 -26
- crypticorn/klines/client/api/symbols_api.py +26 -20
- crypticorn/klines/client/api/udf_api.py +229 -229
- crypticorn/klines/client/api_client.py +8 -5
- crypticorn/klines/client/configuration.py +80 -37
- crypticorn/klines/client/models/__init__.py +9 -3
- crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +123 -0
- crypticorn/klines/client/models/change_in_timeframe_response.py +86 -0
- crypticorn/klines/client/models/market_type.py +35 -0
- crypticorn/klines/client/models/response_get_udf_history.py +198 -0
- crypticorn/klines/client/rest.py +111 -159
- crypticorn/klines/main.py +32 -22
- crypticorn/metrics/main.py +39 -40
- crypticorn/pay/client/__init__.py +0 -3
- crypticorn/pay/client/api/now_payments_api.py +1 -53
- crypticorn/pay/client/models/__init__.py +0 -3
- crypticorn/pay/client/models/payment.py +3 -3
- crypticorn/pay/client/models/scope.py +6 -1
- crypticorn/trade/client/__init__.py +8 -6
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/api_keys_api.py +167 -273
- crypticorn/trade/client/api/bots_api.py +140 -226
- crypticorn/trade/client/api/exchanges_api.py +31 -51
- crypticorn/trade/client/api/futures_trading_panel_api.py +169 -272
- crypticorn/trade/client/api/notifications_api.py +200 -323
- crypticorn/trade/client/api/orders_api.py +40 -60
- crypticorn/trade/client/api/status_api.py +31 -49
- crypticorn/trade/client/api/strategies_api.py +137 -223
- crypticorn/trade/client/api/trading_actions_api.py +106 -170
- crypticorn/trade/client/api_client.py +111 -153
- crypticorn/trade/client/api_response.py +2 -3
- crypticorn/trade/client/configuration.py +128 -115
- crypticorn/trade/client/exceptions.py +25 -21
- crypticorn/trade/client/models/__init__.py +8 -6
- crypticorn/trade/client/models/action_model.py +108 -54
- crypticorn/trade/client/models/api_error_identifier.py +76 -72
- crypticorn/trade/client/models/api_error_level.py +9 -11
- crypticorn/trade/client/models/api_error_type.py +9 -11
- crypticorn/trade/client/models/bot_model.py +57 -36
- crypticorn/trade/client/models/bot_status.py +9 -11
- crypticorn/trade/client/models/exchange.py +7 -9
- crypticorn/trade/client/models/exchange_key_model.py +43 -32
- crypticorn/trade/client/models/execution_ids.py +18 -18
- crypticorn/trade/client/models/futures_balance.py +43 -27
- crypticorn/trade/client/models/futures_trading_action.py +102 -50
- crypticorn/trade/client/models/http_validation_error.py +19 -15
- crypticorn/trade/client/models/margin_mode.py +7 -9
- crypticorn/trade/client/models/market_type.py +7 -9
- crypticorn/trade/client/models/notification_model.py +52 -32
- crypticorn/trade/client/models/order_model.py +112 -72
- crypticorn/trade/client/models/order_status.py +10 -12
- crypticorn/trade/client/models/post_futures_action.py +20 -16
- crypticorn/trade/client/models/strategy_exchange_info.py +15 -16
- crypticorn/trade/client/models/strategy_model_input.py +61 -33
- crypticorn/trade/client/models/strategy_model_output.py +61 -33
- crypticorn/trade/client/models/tpsl.py +39 -25
- crypticorn/trade/client/models/trading_action_type.py +9 -11
- crypticorn/trade/client/models/validation_error.py +24 -18
- crypticorn/trade/client/models/validation_error_loc_inner.py +37 -16
- crypticorn/trade/client/rest.py +23 -38
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/METADATA +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/RECORD +76 -70
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/WHEEL +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/top_level.txt +0 -0
@@ -1,14 +1,14 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
|
4
|
+
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
|
-
|
11
|
+
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
14
|
import warnings
|
@@ -37,7 +37,6 @@ class OrdersApi:
|
|
37
37
|
api_client = ApiClient.get_default()
|
38
38
|
self.api_client = api_client
|
39
39
|
|
40
|
-
|
41
40
|
@validate_call
|
42
41
|
async def get_orders(
|
43
42
|
self,
|
@@ -47,9 +46,8 @@ class OrdersApi:
|
|
47
46
|
None,
|
48
47
|
Annotated[StrictFloat, Field(gt=0)],
|
49
48
|
Tuple[
|
50
|
-
Annotated[StrictFloat, Field(gt=0)],
|
51
|
-
|
52
|
-
]
|
49
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
50
|
+
],
|
53
51
|
] = None,
|
54
52
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
55
53
|
_content_type: Optional[StrictStr] = None,
|
@@ -83,7 +81,7 @@ class OrdersApi:
|
|
83
81
|
in the spec for a single request.
|
84
82
|
:type _host_index: int, optional
|
85
83
|
:return: Returns the result object.
|
86
|
-
"""
|
84
|
+
""" # noqa: E501
|
87
85
|
|
88
86
|
_param = self._get_orders_serialize(
|
89
87
|
limit=limit,
|
@@ -91,16 +89,15 @@ class OrdersApi:
|
|
91
89
|
_request_auth=_request_auth,
|
92
90
|
_content_type=_content_type,
|
93
91
|
_headers=_headers,
|
94
|
-
_host_index=_host_index
|
92
|
+
_host_index=_host_index,
|
95
93
|
)
|
96
94
|
|
97
95
|
_response_types_map: Dict[str, Optional[str]] = {
|
98
|
-
|
99
|
-
|
96
|
+
"200": "List[OrderModel]",
|
97
|
+
"422": "HTTPValidationError",
|
100
98
|
}
|
101
99
|
response_data = await self.api_client.call_api(
|
102
|
-
*_param,
|
103
|
-
_request_timeout=_request_timeout
|
100
|
+
*_param, _request_timeout=_request_timeout
|
104
101
|
)
|
105
102
|
await response_data.read()
|
106
103
|
return self.api_client.response_deserialize(
|
@@ -108,7 +105,6 @@ class OrdersApi:
|
|
108
105
|
response_types_map=_response_types_map,
|
109
106
|
).data
|
110
107
|
|
111
|
-
|
112
108
|
@validate_call
|
113
109
|
async def get_orders_with_http_info(
|
114
110
|
self,
|
@@ -118,9 +114,8 @@ class OrdersApi:
|
|
118
114
|
None,
|
119
115
|
Annotated[StrictFloat, Field(gt=0)],
|
120
116
|
Tuple[
|
121
|
-
Annotated[StrictFloat, Field(gt=0)],
|
122
|
-
|
123
|
-
]
|
117
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
118
|
+
],
|
124
119
|
] = None,
|
125
120
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
126
121
|
_content_type: Optional[StrictStr] = None,
|
@@ -154,7 +149,7 @@ class OrdersApi:
|
|
154
149
|
in the spec for a single request.
|
155
150
|
:type _host_index: int, optional
|
156
151
|
:return: Returns the result object.
|
157
|
-
"""
|
152
|
+
""" # noqa: E501
|
158
153
|
|
159
154
|
_param = self._get_orders_serialize(
|
160
155
|
limit=limit,
|
@@ -162,16 +157,15 @@ class OrdersApi:
|
|
162
157
|
_request_auth=_request_auth,
|
163
158
|
_content_type=_content_type,
|
164
159
|
_headers=_headers,
|
165
|
-
_host_index=_host_index
|
160
|
+
_host_index=_host_index,
|
166
161
|
)
|
167
162
|
|
168
163
|
_response_types_map: Dict[str, Optional[str]] = {
|
169
|
-
|
170
|
-
|
164
|
+
"200": "List[OrderModel]",
|
165
|
+
"422": "HTTPValidationError",
|
171
166
|
}
|
172
167
|
response_data = await self.api_client.call_api(
|
173
|
-
*_param,
|
174
|
-
_request_timeout=_request_timeout
|
168
|
+
*_param, _request_timeout=_request_timeout
|
175
169
|
)
|
176
170
|
await response_data.read()
|
177
171
|
return self.api_client.response_deserialize(
|
@@ -179,7 +173,6 @@ class OrdersApi:
|
|
179
173
|
response_types_map=_response_types_map,
|
180
174
|
)
|
181
175
|
|
182
|
-
|
183
176
|
@validate_call
|
184
177
|
async def get_orders_without_preload_content(
|
185
178
|
self,
|
@@ -189,9 +182,8 @@ class OrdersApi:
|
|
189
182
|
None,
|
190
183
|
Annotated[StrictFloat, Field(gt=0)],
|
191
184
|
Tuple[
|
192
|
-
Annotated[StrictFloat, Field(gt=0)],
|
193
|
-
|
194
|
-
]
|
185
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
186
|
+
],
|
195
187
|
] = None,
|
196
188
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
197
189
|
_content_type: Optional[StrictStr] = None,
|
@@ -225,7 +217,7 @@ class OrdersApi:
|
|
225
217
|
in the spec for a single request.
|
226
218
|
:type _host_index: int, optional
|
227
219
|
:return: Returns the result object.
|
228
|
-
"""
|
220
|
+
""" # noqa: E501
|
229
221
|
|
230
222
|
_param = self._get_orders_serialize(
|
231
223
|
limit=limit,
|
@@ -233,20 +225,18 @@ class OrdersApi:
|
|
233
225
|
_request_auth=_request_auth,
|
234
226
|
_content_type=_content_type,
|
235
227
|
_headers=_headers,
|
236
|
-
_host_index=_host_index
|
228
|
+
_host_index=_host_index,
|
237
229
|
)
|
238
230
|
|
239
231
|
_response_types_map: Dict[str, Optional[str]] = {
|
240
|
-
|
241
|
-
|
232
|
+
"200": "List[OrderModel]",
|
233
|
+
"422": "HTTPValidationError",
|
242
234
|
}
|
243
235
|
response_data = await self.api_client.call_api(
|
244
|
-
*_param,
|
245
|
-
_request_timeout=_request_timeout
|
236
|
+
*_param, _request_timeout=_request_timeout
|
246
237
|
)
|
247
238
|
return response_data.response
|
248
239
|
|
249
|
-
|
250
240
|
def _get_orders_serialize(
|
251
241
|
self,
|
252
242
|
limit,
|
@@ -259,8 +249,7 @@ class OrdersApi:
|
|
259
249
|
|
260
250
|
_host = None
|
261
251
|
|
262
|
-
_collection_formats: Dict[str, str] = {
|
263
|
-
}
|
252
|
+
_collection_formats: Dict[str, str] = {}
|
264
253
|
|
265
254
|
_path_params: Dict[str, str] = {}
|
266
255
|
_query_params: List[Tuple[str, str]] = []
|
@@ -274,36 +263,29 @@ class OrdersApi:
|
|
274
263
|
# process the path parameters
|
275
264
|
# process the query parameters
|
276
265
|
if limit is not None:
|
277
|
-
|
278
|
-
_query_params.append((
|
279
|
-
|
266
|
+
|
267
|
+
_query_params.append(("limit", limit))
|
268
|
+
|
280
269
|
if offset is not None:
|
281
|
-
|
282
|
-
_query_params.append((
|
283
|
-
|
270
|
+
|
271
|
+
_query_params.append(("offset", offset))
|
272
|
+
|
284
273
|
# process the header parameters
|
285
274
|
# process the form parameters
|
286
275
|
# process the body parameter
|
287
276
|
|
288
|
-
|
289
277
|
# set the HTTP header `Accept`
|
290
|
-
if
|
291
|
-
_header_params[
|
292
|
-
[
|
293
|
-
'application/json'
|
294
|
-
]
|
278
|
+
if "Accept" not in _header_params:
|
279
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
280
|
+
["application/json"]
|
295
281
|
)
|
296
282
|
|
297
|
-
|
298
283
|
# authentication setting
|
299
|
-
_auth_settings: List[str] = [
|
300
|
-
'APIKeyHeader',
|
301
|
-
'HTTPBearer'
|
302
|
-
]
|
284
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
303
285
|
|
304
286
|
return self.api_client.param_serialize(
|
305
|
-
method=
|
306
|
-
resource_path=
|
287
|
+
method="GET",
|
288
|
+
resource_path="/orders",
|
307
289
|
path_params=_path_params,
|
308
290
|
query_params=_query_params,
|
309
291
|
header_params=_header_params,
|
@@ -313,7 +295,5 @@ class OrdersApi:
|
|
313
295
|
auth_settings=_auth_settings,
|
314
296
|
collection_formats=_collection_formats,
|
315
297
|
_host=_host,
|
316
|
-
_request_auth=_request_auth
|
298
|
+
_request_auth=_request_auth,
|
317
299
|
)
|
318
|
-
|
319
|
-
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
|
4
|
+
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
|
-
|
11
|
+
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
14
|
import warnings
|
@@ -35,7 +35,6 @@ class StatusApi:
|
|
35
35
|
api_client = ApiClient.get_default()
|
36
36
|
self.api_client = api_client
|
37
37
|
|
38
|
-
|
39
38
|
@validate_call
|
40
39
|
async def ping(
|
41
40
|
self,
|
@@ -43,9 +42,8 @@ class StatusApi:
|
|
43
42
|
None,
|
44
43
|
Annotated[StrictFloat, Field(gt=0)],
|
45
44
|
Tuple[
|
46
|
-
Annotated[StrictFloat, Field(gt=0)],
|
47
|
-
|
48
|
-
]
|
45
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
46
|
+
],
|
49
47
|
] = None,
|
50
48
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
51
49
|
_content_type: Optional[StrictStr] = None,
|
@@ -75,21 +73,20 @@ class StatusApi:
|
|
75
73
|
in the spec for a single request.
|
76
74
|
:type _host_index: int, optional
|
77
75
|
:return: Returns the result object.
|
78
|
-
"""
|
76
|
+
""" # noqa: E501
|
79
77
|
|
80
78
|
_param = self._ping_serialize(
|
81
79
|
_request_auth=_request_auth,
|
82
80
|
_content_type=_content_type,
|
83
81
|
_headers=_headers,
|
84
|
-
_host_index=_host_index
|
82
|
+
_host_index=_host_index,
|
85
83
|
)
|
86
84
|
|
87
85
|
_response_types_map: Dict[str, Optional[str]] = {
|
88
|
-
|
86
|
+
"200": "object",
|
89
87
|
}
|
90
88
|
response_data = await self.api_client.call_api(
|
91
|
-
*_param,
|
92
|
-
_request_timeout=_request_timeout
|
89
|
+
*_param, _request_timeout=_request_timeout
|
93
90
|
)
|
94
91
|
await response_data.read()
|
95
92
|
return self.api_client.response_deserialize(
|
@@ -97,7 +94,6 @@ class StatusApi:
|
|
97
94
|
response_types_map=_response_types_map,
|
98
95
|
).data
|
99
96
|
|
100
|
-
|
101
97
|
@validate_call
|
102
98
|
async def ping_with_http_info(
|
103
99
|
self,
|
@@ -105,9 +101,8 @@ class StatusApi:
|
|
105
101
|
None,
|
106
102
|
Annotated[StrictFloat, Field(gt=0)],
|
107
103
|
Tuple[
|
108
|
-
Annotated[StrictFloat, Field(gt=0)],
|
109
|
-
|
110
|
-
]
|
104
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
105
|
+
],
|
111
106
|
] = None,
|
112
107
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
113
108
|
_content_type: Optional[StrictStr] = None,
|
@@ -137,21 +132,20 @@ class StatusApi:
|
|
137
132
|
in the spec for a single request.
|
138
133
|
:type _host_index: int, optional
|
139
134
|
:return: Returns the result object.
|
140
|
-
"""
|
135
|
+
""" # noqa: E501
|
141
136
|
|
142
137
|
_param = self._ping_serialize(
|
143
138
|
_request_auth=_request_auth,
|
144
139
|
_content_type=_content_type,
|
145
140
|
_headers=_headers,
|
146
|
-
_host_index=_host_index
|
141
|
+
_host_index=_host_index,
|
147
142
|
)
|
148
143
|
|
149
144
|
_response_types_map: Dict[str, Optional[str]] = {
|
150
|
-
|
145
|
+
"200": "object",
|
151
146
|
}
|
152
147
|
response_data = await self.api_client.call_api(
|
153
|
-
*_param,
|
154
|
-
_request_timeout=_request_timeout
|
148
|
+
*_param, _request_timeout=_request_timeout
|
155
149
|
)
|
156
150
|
await response_data.read()
|
157
151
|
return self.api_client.response_deserialize(
|
@@ -159,7 +153,6 @@ class StatusApi:
|
|
159
153
|
response_types_map=_response_types_map,
|
160
154
|
)
|
161
155
|
|
162
|
-
|
163
156
|
@validate_call
|
164
157
|
async def ping_without_preload_content(
|
165
158
|
self,
|
@@ -167,9 +160,8 @@ class StatusApi:
|
|
167
160
|
None,
|
168
161
|
Annotated[StrictFloat, Field(gt=0)],
|
169
162
|
Tuple[
|
170
|
-
Annotated[StrictFloat, Field(gt=0)],
|
171
|
-
|
172
|
-
]
|
163
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
164
|
+
],
|
173
165
|
] = None,
|
174
166
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
175
167
|
_content_type: Optional[StrictStr] = None,
|
@@ -199,25 +191,23 @@ class StatusApi:
|
|
199
191
|
in the spec for a single request.
|
200
192
|
:type _host_index: int, optional
|
201
193
|
:return: Returns the result object.
|
202
|
-
"""
|
194
|
+
""" # noqa: E501
|
203
195
|
|
204
196
|
_param = self._ping_serialize(
|
205
197
|
_request_auth=_request_auth,
|
206
198
|
_content_type=_content_type,
|
207
199
|
_headers=_headers,
|
208
|
-
_host_index=_host_index
|
200
|
+
_host_index=_host_index,
|
209
201
|
)
|
210
202
|
|
211
203
|
_response_types_map: Dict[str, Optional[str]] = {
|
212
|
-
|
204
|
+
"200": "object",
|
213
205
|
}
|
214
206
|
response_data = await self.api_client.call_api(
|
215
|
-
*_param,
|
216
|
-
_request_timeout=_request_timeout
|
207
|
+
*_param, _request_timeout=_request_timeout
|
217
208
|
)
|
218
209
|
return response_data.response
|
219
210
|
|
220
|
-
|
221
211
|
def _ping_serialize(
|
222
212
|
self,
|
223
213
|
_request_auth,
|
@@ -228,8 +218,7 @@ class StatusApi:
|
|
228
218
|
|
229
219
|
_host = None
|
230
220
|
|
231
|
-
_collection_formats: Dict[str, str] = {
|
232
|
-
}
|
221
|
+
_collection_formats: Dict[str, str] = {}
|
233
222
|
|
234
223
|
_path_params: Dict[str, str] = {}
|
235
224
|
_query_params: List[Tuple[str, str]] = []
|
@@ -246,23 +235,18 @@ class StatusApi:
|
|
246
235
|
# process the form parameters
|
247
236
|
# process the body parameter
|
248
237
|
|
249
|
-
|
250
238
|
# set the HTTP header `Accept`
|
251
|
-
if
|
252
|
-
_header_params[
|
253
|
-
[
|
254
|
-
'application/json'
|
255
|
-
]
|
239
|
+
if "Accept" not in _header_params:
|
240
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
241
|
+
["application/json"]
|
256
242
|
)
|
257
243
|
|
258
|
-
|
259
244
|
# authentication setting
|
260
|
-
_auth_settings: List[str] = [
|
261
|
-
]
|
245
|
+
_auth_settings: List[str] = []
|
262
246
|
|
263
247
|
return self.api_client.param_serialize(
|
264
|
-
method=
|
265
|
-
resource_path=
|
248
|
+
method="GET",
|
249
|
+
resource_path="/",
|
266
250
|
path_params=_path_params,
|
267
251
|
query_params=_query_params,
|
268
252
|
header_params=_header_params,
|
@@ -272,7 +256,5 @@ class StatusApi:
|
|
272
256
|
auth_settings=_auth_settings,
|
273
257
|
collection_formats=_collection_formats,
|
274
258
|
_host=_host,
|
275
|
-
_request_auth=_request_auth
|
259
|
+
_request_auth=_request_auth,
|
276
260
|
)
|
277
|
-
|
278
|
-
|