crypticorn 2.4.6__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.
Files changed (52) hide show
  1. crypticorn/common/auth.py +7 -9
  2. crypticorn/common/errors.py +5 -0
  3. crypticorn/common/utils.py +15 -5
  4. crypticorn/klines/main.py +10 -5
  5. crypticorn/metrics/main.py +5 -4
  6. crypticorn/trade/client/__init__.py +6 -8
  7. crypticorn/trade/client/api/__init__.py +1 -0
  8. crypticorn/trade/client/api/api_keys_api.py +273 -167
  9. crypticorn/trade/client/api/bots_api.py +226 -140
  10. crypticorn/trade/client/api/exchanges_api.py +51 -31
  11. crypticorn/trade/client/api/futures_trading_panel_api.py +272 -169
  12. crypticorn/trade/client/api/notifications_api.py +323 -200
  13. crypticorn/trade/client/api/orders_api.py +60 -40
  14. crypticorn/trade/client/api/status_api.py +49 -31
  15. crypticorn/trade/client/api/strategies_api.py +223 -137
  16. crypticorn/trade/client/api/trading_actions_api.py +170 -106
  17. crypticorn/trade/client/api_client.py +153 -111
  18. crypticorn/trade/client/api_response.py +3 -2
  19. crypticorn/trade/client/configuration.py +115 -128
  20. crypticorn/trade/client/exceptions.py +21 -25
  21. crypticorn/trade/client/models/__init__.py +6 -8
  22. crypticorn/trade/client/models/action_model.py +54 -108
  23. crypticorn/trade/client/models/api_error_identifier.py +72 -76
  24. crypticorn/trade/client/models/api_error_level.py +11 -9
  25. crypticorn/trade/client/models/api_error_type.py +11 -9
  26. crypticorn/trade/client/models/bot_model.py +36 -57
  27. crypticorn/trade/client/models/bot_status.py +11 -9
  28. crypticorn/trade/client/models/exchange.py +9 -7
  29. crypticorn/trade/client/models/exchange_key_model.py +34 -44
  30. crypticorn/trade/client/models/execution_ids.py +18 -18
  31. crypticorn/trade/client/models/futures_balance.py +27 -43
  32. crypticorn/trade/client/models/futures_trading_action.py +50 -102
  33. crypticorn/trade/client/models/http_validation_error.py +15 -19
  34. crypticorn/trade/client/models/margin_mode.py +9 -7
  35. crypticorn/trade/client/models/market_type.py +9 -7
  36. crypticorn/trade/client/models/notification_model.py +32 -52
  37. crypticorn/trade/client/models/order_model.py +72 -112
  38. crypticorn/trade/client/models/order_status.py +12 -10
  39. crypticorn/trade/client/models/post_futures_action.py +16 -20
  40. crypticorn/trade/client/models/strategy_exchange_info.py +16 -15
  41. crypticorn/trade/client/models/strategy_model_input.py +33 -61
  42. crypticorn/trade/client/models/strategy_model_output.py +33 -61
  43. crypticorn/trade/client/models/tpsl.py +25 -39
  44. crypticorn/trade/client/models/trading_action_type.py +11 -9
  45. crypticorn/trade/client/models/validation_error.py +18 -24
  46. crypticorn/trade/client/models/validation_error_loc_inner.py +16 -37
  47. crypticorn/trade/client/rest.py +38 -23
  48. {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/METADATA +8 -2
  49. {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/RECORD +52 -52
  50. {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/WHEEL +0 -0
  51. {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/entry_points.txt +0 -0
  52. {crypticorn-2.4.6.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
@@ -36,6 +36,7 @@ class ExchangesApi:
36
36
  api_client = ApiClient.get_default()
37
37
  self.api_client = api_client
38
38
 
39
+
39
40
  @validate_call
40
41
  async def get_exchanges(
41
42
  self,
@@ -43,8 +44,9 @@ class ExchangesApi:
43
44
  None,
44
45
  Annotated[StrictFloat, Field(gt=0)],
45
46
  Tuple[
46
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
47
- ],
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Annotated[StrictFloat, Field(gt=0)]
49
+ ]
48
50
  ] = None,
49
51
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
50
52
  _content_type: Optional[StrictStr] = None,
@@ -74,20 +76,21 @@ class ExchangesApi:
74
76
  in the spec for a single request.
75
77
  :type _host_index: int, optional
76
78
  :return: Returns the result object.
77
- """ # noqa: E501
79
+ """ # noqa: E501
78
80
 
79
81
  _param = self._get_exchanges_serialize(
80
82
  _request_auth=_request_auth,
81
83
  _content_type=_content_type,
82
84
  _headers=_headers,
83
- _host_index=_host_index,
85
+ _host_index=_host_index
84
86
  )
85
87
 
86
88
  _response_types_map: Dict[str, Optional[str]] = {
87
- "200": "List[Exchange]",
89
+ '200': "List[Exchange]",
88
90
  }
89
91
  response_data = await self.api_client.call_api(
90
- *_param, _request_timeout=_request_timeout
92
+ *_param,
93
+ _request_timeout=_request_timeout
91
94
  )
92
95
  await response_data.read()
93
96
  return self.api_client.response_deserialize(
@@ -95,6 +98,7 @@ class ExchangesApi:
95
98
  response_types_map=_response_types_map,
96
99
  ).data
97
100
 
101
+
98
102
  @validate_call
99
103
  async def get_exchanges_with_http_info(
100
104
  self,
@@ -102,8 +106,9 @@ class ExchangesApi:
102
106
  None,
103
107
  Annotated[StrictFloat, Field(gt=0)],
104
108
  Tuple[
105
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
106
- ],
109
+ Annotated[StrictFloat, Field(gt=0)],
110
+ Annotated[StrictFloat, Field(gt=0)]
111
+ ]
107
112
  ] = None,
108
113
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
109
114
  _content_type: Optional[StrictStr] = None,
@@ -133,20 +138,21 @@ class ExchangesApi:
133
138
  in the spec for a single request.
134
139
  :type _host_index: int, optional
135
140
  :return: Returns the result object.
136
- """ # noqa: E501
141
+ """ # noqa: E501
137
142
 
138
143
  _param = self._get_exchanges_serialize(
139
144
  _request_auth=_request_auth,
140
145
  _content_type=_content_type,
141
146
  _headers=_headers,
142
- _host_index=_host_index,
147
+ _host_index=_host_index
143
148
  )
144
149
 
145
150
  _response_types_map: Dict[str, Optional[str]] = {
146
- "200": "List[Exchange]",
151
+ '200': "List[Exchange]",
147
152
  }
148
153
  response_data = await self.api_client.call_api(
149
- *_param, _request_timeout=_request_timeout
154
+ *_param,
155
+ _request_timeout=_request_timeout
150
156
  )
151
157
  await response_data.read()
152
158
  return self.api_client.response_deserialize(
@@ -154,6 +160,7 @@ class ExchangesApi:
154
160
  response_types_map=_response_types_map,
155
161
  )
156
162
 
163
+
157
164
  @validate_call
158
165
  async def get_exchanges_without_preload_content(
159
166
  self,
@@ -161,8 +168,9 @@ class ExchangesApi:
161
168
  None,
162
169
  Annotated[StrictFloat, Field(gt=0)],
163
170
  Tuple[
164
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
165
- ],
171
+ Annotated[StrictFloat, Field(gt=0)],
172
+ Annotated[StrictFloat, Field(gt=0)]
173
+ ]
166
174
  ] = None,
167
175
  _request_auth: Optional[Dict[StrictStr, Any]] = None,
168
176
  _content_type: Optional[StrictStr] = None,
@@ -192,23 +200,25 @@ class ExchangesApi:
192
200
  in the spec for a single request.
193
201
  :type _host_index: int, optional
194
202
  :return: Returns the result object.
195
- """ # noqa: E501
203
+ """ # noqa: E501
196
204
 
197
205
  _param = self._get_exchanges_serialize(
198
206
  _request_auth=_request_auth,
199
207
  _content_type=_content_type,
200
208
  _headers=_headers,
201
- _host_index=_host_index,
209
+ _host_index=_host_index
202
210
  )
203
211
 
204
212
  _response_types_map: Dict[str, Optional[str]] = {
205
- "200": "List[Exchange]",
213
+ '200': "List[Exchange]",
206
214
  }
207
215
  response_data = await self.api_client.call_api(
208
- *_param, _request_timeout=_request_timeout
216
+ *_param,
217
+ _request_timeout=_request_timeout
209
218
  )
210
219
  return response_data.response
211
220
 
221
+
212
222
  def _get_exchanges_serialize(
213
223
  self,
214
224
  _request_auth,
@@ -219,7 +229,8 @@ class ExchangesApi:
219
229
 
220
230
  _host = None
221
231
 
222
- _collection_formats: Dict[str, str] = {}
232
+ _collection_formats: Dict[str, str] = {
233
+ }
223
234
 
224
235
  _path_params: Dict[str, str] = {}
225
236
  _query_params: List[Tuple[str, str]] = []
@@ -236,18 +247,25 @@ class ExchangesApi:
236
247
  # process the form parameters
237
248
  # process the body parameter
238
249
 
250
+
239
251
  # set the HTTP header `Accept`
240
- if "Accept" not in _header_params:
241
- _header_params["Accept"] = self.api_client.select_header_accept(
242
- ["application/json"]
252
+ if 'Accept' not in _header_params:
253
+ _header_params['Accept'] = self.api_client.select_header_accept(
254
+ [
255
+ 'application/json'
256
+ ]
243
257
  )
244
258
 
259
+
245
260
  # authentication setting
246
- _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
261
+ _auth_settings: List[str] = [
262
+ 'APIKeyHeader',
263
+ 'HTTPBearer'
264
+ ]
247
265
 
248
266
  return self.api_client.param_serialize(
249
- method="GET",
250
- resource_path="/exchanges",
267
+ method='GET',
268
+ resource_path='/exchanges',
251
269
  path_params=_path_params,
252
270
  query_params=_query_params,
253
271
  header_params=_header_params,
@@ -257,5 +275,7 @@ class ExchangesApi:
257
275
  auth_settings=_auth_settings,
258
276
  collection_formats=_collection_formats,
259
277
  _host=_host,
260
- _request_auth=_request_auth,
278
+ _request_auth=_request_auth
261
279
  )
280
+
281
+