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.
Files changed (65) hide show
  1. crypticorn/client.py +1 -1
  2. crypticorn/common/auth.py +7 -9
  3. crypticorn/common/errors.py +6 -1
  4. crypticorn/common/scopes.py +2 -1
  5. crypticorn/common/utils.py +15 -5
  6. crypticorn/klines/main.py +10 -5
  7. crypticorn/metrics/client/models/exchange_mapping.py +4 -2
  8. crypticorn/metrics/client/models/trading_status.py +1 -0
  9. crypticorn/metrics/main.py +5 -4
  10. crypticorn/pay/client/__init__.py +5 -4
  11. crypticorn/pay/client/api/payments_api.py +17 -17
  12. crypticorn/pay/client/api/products_api.py +49 -48
  13. crypticorn/pay/client/models/__init__.py +5 -4
  14. crypticorn/pay/client/models/payment.py +28 -147
  15. crypticorn/pay/client/models/product_create.py +120 -0
  16. crypticorn/pay/client/models/product_read.py +123 -0
  17. crypticorn/pay/client/models/product_sub_read.py +103 -0
  18. crypticorn/pay/client/models/product_update.py +142 -0
  19. crypticorn/trade/client/__init__.py +6 -8
  20. crypticorn/trade/client/api/__init__.py +1 -0
  21. crypticorn/trade/client/api/api_keys_api.py +273 -167
  22. crypticorn/trade/client/api/bots_api.py +226 -140
  23. crypticorn/trade/client/api/exchanges_api.py +51 -31
  24. crypticorn/trade/client/api/futures_trading_panel_api.py +272 -169
  25. crypticorn/trade/client/api/notifications_api.py +323 -200
  26. crypticorn/trade/client/api/orders_api.py +60 -40
  27. crypticorn/trade/client/api/status_api.py +49 -31
  28. crypticorn/trade/client/api/strategies_api.py +223 -137
  29. crypticorn/trade/client/api/trading_actions_api.py +170 -106
  30. crypticorn/trade/client/api_client.py +153 -111
  31. crypticorn/trade/client/api_response.py +3 -2
  32. crypticorn/trade/client/configuration.py +115 -128
  33. crypticorn/trade/client/exceptions.py +21 -25
  34. crypticorn/trade/client/models/__init__.py +6 -8
  35. crypticorn/trade/client/models/action_model.py +54 -108
  36. crypticorn/trade/client/models/api_error_identifier.py +72 -76
  37. crypticorn/trade/client/models/api_error_level.py +11 -9
  38. crypticorn/trade/client/models/api_error_type.py +11 -9
  39. crypticorn/trade/client/models/bot_model.py +36 -57
  40. crypticorn/trade/client/models/bot_status.py +11 -9
  41. crypticorn/trade/client/models/exchange.py +9 -7
  42. crypticorn/trade/client/models/exchange_key_model.py +34 -44
  43. crypticorn/trade/client/models/execution_ids.py +18 -18
  44. crypticorn/trade/client/models/futures_balance.py +27 -43
  45. crypticorn/trade/client/models/futures_trading_action.py +50 -102
  46. crypticorn/trade/client/models/http_validation_error.py +15 -19
  47. crypticorn/trade/client/models/margin_mode.py +9 -7
  48. crypticorn/trade/client/models/market_type.py +9 -7
  49. crypticorn/trade/client/models/notification_model.py +32 -52
  50. crypticorn/trade/client/models/order_model.py +72 -112
  51. crypticorn/trade/client/models/order_status.py +12 -10
  52. crypticorn/trade/client/models/post_futures_action.py +16 -20
  53. crypticorn/trade/client/models/strategy_exchange_info.py +16 -15
  54. crypticorn/trade/client/models/strategy_model_input.py +33 -61
  55. crypticorn/trade/client/models/strategy_model_output.py +33 -61
  56. crypticorn/trade/client/models/tpsl.py +25 -39
  57. crypticorn/trade/client/models/trading_action_type.py +11 -9
  58. crypticorn/trade/client/models/validation_error.py +18 -24
  59. crypticorn/trade/client/models/validation_error_loc_inner.py +16 -37
  60. crypticorn/trade/client/rest.py +38 -23
  61. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/METADATA +13 -2
  62. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/RECORD +65 -61
  63. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/WHEEL +0 -0
  64. {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/entry_points.txt +0 -0
  65. {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
 
@@ -28,12 +28,10 @@ from crypticorn.trade.client.models.trading_action_type import TradingActionType
28
28
  from typing import Optional, Set
29
29
  from typing_extensions import Self
30
30
 
31
-
32
31
  class OrderModel(BaseModel):
33
32
  """
34
33
  Response model for orders. All optional as the model is built step by step.
35
- """ # noqa: E501
36
-
34
+ """ # noqa: E501
37
35
  created_at: Optional[StrictInt] = None
38
36
  updated_at: Optional[StrictInt] = None
39
37
  id: Optional[StrictStr] = None
@@ -58,40 +56,10 @@ class OrderModel(BaseModel):
58
56
  filled_qty: Optional[Union[StrictFloat, StrictInt]] = None
59
57
  fee: Optional[Union[StrictFloat, StrictInt]] = None
60
58
  leverage: Optional[Union[StrictFloat, StrictInt]] = None
61
- order_details: Optional[Any] = Field(
62
- default=None, description="Exchange specific details of the order"
63
- )
59
+ order_details: Optional[Any] = Field(default=None, description="Exchange specific details of the order")
64
60
  pnl: Optional[Union[StrictFloat, StrictInt]] = None
65
61
  order_time: Optional[StrictInt] = None
66
- __properties: ClassVar[List[str]] = [
67
- "created_at",
68
- "updated_at",
69
- "id",
70
- "trading_action_id",
71
- "execution_id",
72
- "exchange_order_id",
73
- "position_id",
74
- "api_key_id",
75
- "user_id",
76
- "bot_id",
77
- "client_order_id",
78
- "exchange",
79
- "symbol",
80
- "common_symbol",
81
- "price",
82
- "action_type",
83
- "market_type",
84
- "margin_mode",
85
- "status_code",
86
- "status",
87
- "filled_perc",
88
- "filled_qty",
89
- "fee",
90
- "leverage",
91
- "order_details",
92
- "pnl",
93
- "order_time",
94
- ]
62
+ __properties: ClassVar[List[str]] = ["created_at", "updated_at", "id", "trading_action_id", "execution_id", "exchange_order_id", "position_id", "api_key_id", "user_id", "bot_id", "client_order_id", "exchange", "symbol", "common_symbol", "price", "action_type", "market_type", "margin_mode", "status_code", "status", "filled_perc", "filled_qty", "fee", "leverage", "order_details", "pnl", "order_time"]
95
63
 
96
64
  model_config = ConfigDict(
97
65
  populate_by_name=True,
@@ -99,6 +67,7 @@ class OrderModel(BaseModel):
99
67
  protected_namespaces=(),
100
68
  )
101
69
 
70
+
102
71
  def to_str(self) -> str:
103
72
  """Returns the string representation of the model using alias"""
104
73
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -123,7 +92,8 @@ class OrderModel(BaseModel):
123
92
  were set at model initialization. Other fields with value `None`
124
93
  are ignored.
125
94
  """
126
- excluded_fields: Set[str] = set([])
95
+ excluded_fields: Set[str] = set([
96
+ ])
127
97
 
128
98
  _dict = self.model_dump(
129
99
  by_alias=True,
@@ -132,147 +102,141 @@ class OrderModel(BaseModel):
132
102
  )
133
103
  # override the default output from pydantic by calling `to_dict()` of order_details
134
104
  if self.order_details:
135
- _dict["order_details"] = self.order_details.to_dict()
105
+ _dict['order_details'] = self.order_details.to_dict()
136
106
  # set to None if created_at (nullable) is None
137
107
  # and model_fields_set contains the field
138
108
  if self.created_at is None and "created_at" in self.model_fields_set:
139
- _dict["created_at"] = None
109
+ _dict['created_at'] = None
140
110
 
141
111
  # set to None if updated_at (nullable) is None
142
112
  # and model_fields_set contains the field
143
113
  if self.updated_at is None and "updated_at" in self.model_fields_set:
144
- _dict["updated_at"] = None
114
+ _dict['updated_at'] = None
145
115
 
146
116
  # set to None if id (nullable) is None
147
117
  # and model_fields_set contains the field
148
118
  if self.id is None and "id" in self.model_fields_set:
149
- _dict["id"] = None
119
+ _dict['id'] = None
150
120
 
151
121
  # set to None if trading_action_id (nullable) is None
152
122
  # and model_fields_set contains the field
153
- if (
154
- self.trading_action_id is None
155
- and "trading_action_id" in self.model_fields_set
156
- ):
157
- _dict["trading_action_id"] = None
123
+ if self.trading_action_id is None and "trading_action_id" in self.model_fields_set:
124
+ _dict['trading_action_id'] = None
158
125
 
159
126
  # set to None if execution_id (nullable) is None
160
127
  # and model_fields_set contains the field
161
128
  if self.execution_id is None and "execution_id" in self.model_fields_set:
162
- _dict["execution_id"] = None
129
+ _dict['execution_id'] = None
163
130
 
164
131
  # set to None if exchange_order_id (nullable) is None
165
132
  # and model_fields_set contains the field
166
- if (
167
- self.exchange_order_id is None
168
- and "exchange_order_id" in self.model_fields_set
169
- ):
170
- _dict["exchange_order_id"] = None
133
+ if self.exchange_order_id is None and "exchange_order_id" in self.model_fields_set:
134
+ _dict['exchange_order_id'] = None
171
135
 
172
136
  # set to None if position_id (nullable) is None
173
137
  # and model_fields_set contains the field
174
138
  if self.position_id is None and "position_id" in self.model_fields_set:
175
- _dict["position_id"] = None
139
+ _dict['position_id'] = None
176
140
 
177
141
  # set to None if api_key_id (nullable) is None
178
142
  # and model_fields_set contains the field
179
143
  if self.api_key_id is None and "api_key_id" in self.model_fields_set:
180
- _dict["api_key_id"] = None
144
+ _dict['api_key_id'] = None
181
145
 
182
146
  # set to None if user_id (nullable) is None
183
147
  # and model_fields_set contains the field
184
148
  if self.user_id is None and "user_id" in self.model_fields_set:
185
- _dict["user_id"] = None
149
+ _dict['user_id'] = None
186
150
 
187
151
  # set to None if bot_id (nullable) is None
188
152
  # and model_fields_set contains the field
189
153
  if self.bot_id is None and "bot_id" in self.model_fields_set:
190
- _dict["bot_id"] = None
154
+ _dict['bot_id'] = None
191
155
 
192
156
  # set to None if client_order_id (nullable) is None
193
157
  # and model_fields_set contains the field
194
158
  if self.client_order_id is None and "client_order_id" in self.model_fields_set:
195
- _dict["client_order_id"] = None
159
+ _dict['client_order_id'] = None
196
160
 
197
161
  # set to None if exchange (nullable) is None
198
162
  # and model_fields_set contains the field
199
163
  if self.exchange is None and "exchange" in self.model_fields_set:
200
- _dict["exchange"] = None
164
+ _dict['exchange'] = None
201
165
 
202
166
  # set to None if symbol (nullable) is None
203
167
  # and model_fields_set contains the field
204
168
  if self.symbol is None and "symbol" in self.model_fields_set:
205
- _dict["symbol"] = None
169
+ _dict['symbol'] = None
206
170
 
207
171
  # set to None if common_symbol (nullable) is None
208
172
  # and model_fields_set contains the field
209
173
  if self.common_symbol is None and "common_symbol" in self.model_fields_set:
210
- _dict["common_symbol"] = None
174
+ _dict['common_symbol'] = None
211
175
 
212
176
  # set to None if price (nullable) is None
213
177
  # and model_fields_set contains the field
214
178
  if self.price is None and "price" in self.model_fields_set:
215
- _dict["price"] = None
179
+ _dict['price'] = None
216
180
 
217
181
  # set to None if action_type (nullable) is None
218
182
  # and model_fields_set contains the field
219
183
  if self.action_type is None and "action_type" in self.model_fields_set:
220
- _dict["action_type"] = None
184
+ _dict['action_type'] = None
221
185
 
222
186
  # set to None if market_type (nullable) is None
223
187
  # and model_fields_set contains the field
224
188
  if self.market_type is None and "market_type" in self.model_fields_set:
225
- _dict["market_type"] = None
189
+ _dict['market_type'] = None
226
190
 
227
191
  # set to None if margin_mode (nullable) is None
228
192
  # and model_fields_set contains the field
229
193
  if self.margin_mode is None and "margin_mode" in self.model_fields_set:
230
- _dict["margin_mode"] = None
194
+ _dict['margin_mode'] = None
231
195
 
232
196
  # set to None if status_code (nullable) is None
233
197
  # and model_fields_set contains the field
234
198
  if self.status_code is None and "status_code" in self.model_fields_set:
235
- _dict["status_code"] = None
199
+ _dict['status_code'] = None
236
200
 
237
201
  # set to None if status (nullable) is None
238
202
  # and model_fields_set contains the field
239
203
  if self.status is None and "status" in self.model_fields_set:
240
- _dict["status"] = None
204
+ _dict['status'] = None
241
205
 
242
206
  # set to None if filled_perc (nullable) is None
243
207
  # and model_fields_set contains the field
244
208
  if self.filled_perc is None and "filled_perc" in self.model_fields_set:
245
- _dict["filled_perc"] = None
209
+ _dict['filled_perc'] = None
246
210
 
247
211
  # set to None if filled_qty (nullable) is None
248
212
  # and model_fields_set contains the field
249
213
  if self.filled_qty is None and "filled_qty" in self.model_fields_set:
250
- _dict["filled_qty"] = None
214
+ _dict['filled_qty'] = None
251
215
 
252
216
  # set to None if fee (nullable) is None
253
217
  # and model_fields_set contains the field
254
218
  if self.fee is None and "fee" in self.model_fields_set:
255
- _dict["fee"] = None
219
+ _dict['fee'] = None
256
220
 
257
221
  # set to None if leverage (nullable) is None
258
222
  # and model_fields_set contains the field
259
223
  if self.leverage is None and "leverage" in self.model_fields_set:
260
- _dict["leverage"] = None
224
+ _dict['leverage'] = None
261
225
 
262
226
  # set to None if order_details (nullable) is None
263
227
  # and model_fields_set contains the field
264
228
  if self.order_details is None and "order_details" in self.model_fields_set:
265
- _dict["order_details"] = None
229
+ _dict['order_details'] = None
266
230
 
267
231
  # set to None if pnl (nullable) is None
268
232
  # and model_fields_set contains the field
269
233
  if self.pnl is None and "pnl" in self.model_fields_set:
270
- _dict["pnl"] = None
234
+ _dict['pnl'] = None
271
235
 
272
236
  # set to None if order_time (nullable) is None
273
237
  # and model_fields_set contains the field
274
238
  if self.order_time is None and "order_time" in self.model_fields_set:
275
- _dict["order_time"] = None
239
+ _dict['order_time'] = None
276
240
 
277
241
  return _dict
278
242
 
@@ -285,39 +249,35 @@ class OrderModel(BaseModel):
285
249
  if not isinstance(obj, dict):
286
250
  return cls.model_validate(obj)
287
251
 
288
- _obj = cls.model_validate(
289
- {
290
- "created_at": obj.get("created_at"),
291
- "updated_at": obj.get("updated_at"),
292
- "id": obj.get("id"),
293
- "trading_action_id": obj.get("trading_action_id"),
294
- "execution_id": obj.get("execution_id"),
295
- "exchange_order_id": obj.get("exchange_order_id"),
296
- "position_id": obj.get("position_id"),
297
- "api_key_id": obj.get("api_key_id"),
298
- "user_id": obj.get("user_id"),
299
- "bot_id": obj.get("bot_id"),
300
- "client_order_id": obj.get("client_order_id"),
301
- "exchange": obj.get("exchange"),
302
- "symbol": obj.get("symbol"),
303
- "common_symbol": obj.get("common_symbol"),
304
- "price": obj.get("price"),
305
- "action_type": obj.get("action_type"),
306
- "market_type": obj.get("market_type"),
307
- "margin_mode": obj.get("margin_mode"),
308
- "status_code": obj.get("status_code"),
309
- "status": obj.get("status"),
310
- "filled_perc": obj.get("filled_perc"),
311
- "filled_qty": obj.get("filled_qty"),
312
- "fee": obj.get("fee"),
313
- "leverage": obj.get("leverage"),
314
- "order_details": (
315
- AnyOf.from_dict(obj["order_details"])
316
- if obj.get("order_details") is not None
317
- else None
318
- ),
319
- "pnl": obj.get("pnl"),
320
- "order_time": obj.get("order_time"),
321
- }
322
- )
252
+ _obj = cls.model_validate({
253
+ "created_at": obj.get("created_at"),
254
+ "updated_at": obj.get("updated_at"),
255
+ "id": obj.get("id"),
256
+ "trading_action_id": obj.get("trading_action_id"),
257
+ "execution_id": obj.get("execution_id"),
258
+ "exchange_order_id": obj.get("exchange_order_id"),
259
+ "position_id": obj.get("position_id"),
260
+ "api_key_id": obj.get("api_key_id"),
261
+ "user_id": obj.get("user_id"),
262
+ "bot_id": obj.get("bot_id"),
263
+ "client_order_id": obj.get("client_order_id"),
264
+ "exchange": obj.get("exchange"),
265
+ "symbol": obj.get("symbol"),
266
+ "common_symbol": obj.get("common_symbol"),
267
+ "price": obj.get("price"),
268
+ "action_type": obj.get("action_type"),
269
+ "market_type": obj.get("market_type"),
270
+ "margin_mode": obj.get("margin_mode"),
271
+ "status_code": obj.get("status_code"),
272
+ "status": obj.get("status"),
273
+ "filled_perc": obj.get("filled_perc"),
274
+ "filled_qty": obj.get("filled_qty"),
275
+ "fee": obj.get("fee"),
276
+ "leverage": obj.get("leverage"),
277
+ "order_details": AnyOf.from_dict(obj["order_details"]) if obj.get("order_details") is not None else None,
278
+ "pnl": obj.get("pnl"),
279
+ "order_time": obj.get("order_time")
280
+ })
323
281
  return _obj
282
+
283
+
@@ -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
 
@@ -26,13 +26,15 @@ class OrderStatus(str, Enum):
26
26
  """
27
27
  allowed enum values
28
28
  """
29
- NEW = "new"
30
- FILLED = "filled"
31
- PARTIALLY_FILLED = "partially_filled"
32
- CANCELLED = "cancelled"
33
- FAILED = "failed"
29
+ NEW = 'new'
30
+ FILLED = 'filled'
31
+ PARTIALLY_FILLED = 'partially_filled'
32
+ CANCELLED = 'cancelled'
33
+ FAILED = 'failed'
34
34
 
35
35
  @classmethod
36
36
  def from_json(cls, json_str: str) -> Self:
37
37
  """Create an instance of OrderStatus from a JSON string"""
38
38
  return cls(json.loads(json_str))
39
+
40
+
@@ -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
 
@@ -23,12 +23,10 @@ from crypticorn.trade.client.models.execution_ids import ExecutionIds
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
-
27
26
  class PostFuturesAction(BaseModel):
28
27
  """
29
28
  PostFuturesAction
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  id: StrictStr = Field(description="Action ID.")
33
31
  execution_ids: ExecutionIds = Field(description="Execution IDs for the action.")
34
32
  __properties: ClassVar[List[str]] = ["id", "execution_ids"]
@@ -39,6 +37,7 @@ class PostFuturesAction(BaseModel):
39
37
  protected_namespaces=(),
40
38
  )
41
39
 
40
+
42
41
  def to_str(self) -> str:
43
42
  """Returns the string representation of the model using alias"""
44
43
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -63,7 +62,8 @@ class PostFuturesAction(BaseModel):
63
62
  were set at model initialization. Other fields with value `None`
64
63
  are ignored.
65
64
  """
66
- excluded_fields: Set[str] = set([])
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
67
 
68
68
  _dict = self.model_dump(
69
69
  by_alias=True,
@@ -72,7 +72,7 @@ class PostFuturesAction(BaseModel):
72
72
  )
73
73
  # override the default output from pydantic by calling `to_dict()` of execution_ids
74
74
  if self.execution_ids:
75
- _dict["execution_ids"] = self.execution_ids.to_dict()
75
+ _dict['execution_ids'] = self.execution_ids.to_dict()
76
76
  return _dict
77
77
 
78
78
  @classmethod
@@ -84,14 +84,10 @@ class PostFuturesAction(BaseModel):
84
84
  if not isinstance(obj, dict):
85
85
  return cls.model_validate(obj)
86
86
 
87
- _obj = cls.model_validate(
88
- {
89
- "id": obj.get("id"),
90
- "execution_ids": (
91
- ExecutionIds.from_dict(obj["execution_ids"])
92
- if obj.get("execution_ids") is not None
93
- else None
94
- ),
95
- }
96
- )
87
+ _obj = cls.model_validate({
88
+ "id": obj.get("id"),
89
+ "execution_ids": ExecutionIds.from_dict(obj["execution_ids"]) if obj.get("execution_ids") is not None else None
90
+ })
97
91
  return _obj
92
+
93
+
@@ -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
 
@@ -23,16 +23,12 @@ from crypticorn.trade.client.models.exchange import Exchange
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
-
27
26
  class StrategyExchangeInfo(BaseModel):
28
27
  """
29
28
  StrategyExchangeInfo
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  exchange: Exchange = Field(description="Exchange name. Of type Exchange")
33
- min_amount: Union[StrictFloat, StrictInt] = Field(
34
- description="Minimum amount for the strategy on the exchange"
35
- )
31
+ min_amount: Union[StrictFloat, StrictInt] = Field(description="Minimum amount for the strategy on the exchange")
36
32
  __properties: ClassVar[List[str]] = ["exchange", "min_amount"]
37
33
 
38
34
  model_config = ConfigDict(
@@ -41,6 +37,7 @@ class StrategyExchangeInfo(BaseModel):
41
37
  protected_namespaces=(),
42
38
  )
43
39
 
40
+
44
41
  def to_str(self) -> str:
45
42
  """Returns the string representation of the model using alias"""
46
43
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -65,7 +62,8 @@ class StrategyExchangeInfo(BaseModel):
65
62
  were set at model initialization. Other fields with value `None`
66
63
  are ignored.
67
64
  """
68
- excluded_fields: Set[str] = set([])
65
+ excluded_fields: Set[str] = set([
66
+ ])
69
67
 
70
68
  _dict = self.model_dump(
71
69
  by_alias=True,
@@ -83,7 +81,10 @@ class StrategyExchangeInfo(BaseModel):
83
81
  if not isinstance(obj, dict):
84
82
  return cls.model_validate(obj)
85
83
 
86
- _obj = cls.model_validate(
87
- {"exchange": obj.get("exchange"), "min_amount": obj.get("min_amount")}
88
- )
84
+ _obj = cls.model_validate({
85
+ "exchange": obj.get("exchange"),
86
+ "min_amount": obj.get("min_amount")
87
+ })
89
88
  return _obj
89
+
90
+