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