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