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
 
@@ -17,7 +17,15 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
20
+ from pydantic import (
21
+ BaseModel,
22
+ ConfigDict,
23
+ Field,
24
+ StrictBool,
25
+ StrictFloat,
26
+ StrictInt,
27
+ StrictStr,
28
+ )
21
29
  from typing import Any, ClassVar, Dict, List, Optional, Union
22
30
  from typing_extensions import Annotated
23
31
  from crypticorn.trade.client.models.margin_mode import MarginMode
@@ -27,10 +35,12 @@ from crypticorn.trade.client.models.trading_action_type import TradingActionType
27
35
  from typing import Optional, Set
28
36
  from typing_extensions import Self
29
37
 
38
+
30
39
  class ActionModel(BaseModel):
31
40
  """
32
41
  ActionModel
33
- """ # noqa: E501
42
+ """ # noqa: E501
43
+
34
44
  created_at: Optional[StrictInt] = None
35
45
  updated_at: Optional[StrictInt] = None
36
46
  id: Optional[StrictStr] = None
@@ -40,17 +50,47 @@ class ActionModel(BaseModel):
40
50
  action_type: TradingActionType = Field(description="The type of action.")
41
51
  market_type: MarketType = Field(description="The type of market the action is for.")
42
52
  strategy_id: StrictStr = Field(description="UID for the strategy.")
43
- symbol: StrictStr = Field(description="Trading symbol or asset pair in format: 'symbol/quote_currency' (see market service for valid symbols)")
53
+ symbol: StrictStr = Field(
54
+ description="Trading symbol or asset pair in format: 'symbol/quote_currency' (see market service for valid symbols)"
55
+ )
44
56
  is_limit: Optional[StrictBool] = None
45
57
  limit_price: Optional[Union[StrictFloat, StrictInt]] = None
46
- allocation: Optional[Union[Annotated[float, Field(le=1.0, strict=True)], Annotated[int, Field(le=1, strict=True)]]] = Field(default=None, description="How much of bot's balance to use for the order (for open actions). How much of the reference open order (open_order_execution_id) to close (for close actions). 0=0%, 1=100%.")
58
+ allocation: Optional[
59
+ Union[
60
+ Annotated[float, Field(le=1.0, strict=True)],
61
+ Annotated[int, Field(le=1, strict=True)],
62
+ ]
63
+ ] = Field(
64
+ default=None,
65
+ description="How much of bot's balance to use for the order (for open actions). How much of the reference open order (open_order_execution_id) to close (for close actions). 0=0%, 1=100%.",
66
+ )
47
67
  take_profit: Optional[List[TPSL]] = None
48
68
  stop_loss: Optional[List[TPSL]] = None
49
69
  expiry_timestamp: Optional[StrictInt] = None
50
70
  position_id: Optional[StrictStr] = None
51
71
  leverage: Optional[Annotated[int, Field(strict=True, ge=1)]]
52
72
  margin_mode: Optional[MarginMode] = None
53
- __properties: ClassVar[List[str]] = ["created_at", "updated_at", "id", "execution_id", "open_order_execution_id", "client_order_id", "action_type", "market_type", "strategy_id", "symbol", "is_limit", "limit_price", "allocation", "take_profit", "stop_loss", "expiry_timestamp", "position_id", "leverage", "margin_mode"]
73
+ __properties: ClassVar[List[str]] = [
74
+ "created_at",
75
+ "updated_at",
76
+ "id",
77
+ "execution_id",
78
+ "open_order_execution_id",
79
+ "client_order_id",
80
+ "action_type",
81
+ "market_type",
82
+ "strategy_id",
83
+ "symbol",
84
+ "is_limit",
85
+ "limit_price",
86
+ "allocation",
87
+ "take_profit",
88
+ "stop_loss",
89
+ "expiry_timestamp",
90
+ "position_id",
91
+ "leverage",
92
+ "margin_mode",
93
+ ]
54
94
 
55
95
  model_config = ConfigDict(
56
96
  populate_by_name=True,
@@ -58,7 +98,6 @@ class ActionModel(BaseModel):
58
98
  protected_namespaces=(),
59
99
  )
60
100
 
61
-
62
101
  def to_str(self) -> str:
63
102
  """Returns the string representation of the model using alias"""
64
103
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -83,8 +122,7 @@ class ActionModel(BaseModel):
83
122
  were set at model initialization. Other fields with value `None`
84
123
  are ignored.
85
124
  """
86
- excluded_fields: Set[str] = set([
87
- ])
125
+ excluded_fields: Set[str] = set([])
88
126
 
89
127
  _dict = self.model_dump(
90
128
  by_alias=True,
@@ -97,83 +135,89 @@ class ActionModel(BaseModel):
97
135
  for _item_take_profit in self.take_profit:
98
136
  if _item_take_profit:
99
137
  _items.append(_item_take_profit.to_dict())
100
- _dict['take_profit'] = _items
138
+ _dict["take_profit"] = _items
101
139
  # override the default output from pydantic by calling `to_dict()` of each item in stop_loss (list)
102
140
  _items = []
103
141
  if self.stop_loss:
104
142
  for _item_stop_loss in self.stop_loss:
105
143
  if _item_stop_loss:
106
144
  _items.append(_item_stop_loss.to_dict())
107
- _dict['stop_loss'] = _items
145
+ _dict["stop_loss"] = _items
108
146
  # set to None if created_at (nullable) is None
109
147
  # and model_fields_set contains the field
110
148
  if self.created_at is None and "created_at" in self.model_fields_set:
111
- _dict['created_at'] = None
149
+ _dict["created_at"] = None
112
150
 
113
151
  # set to None if updated_at (nullable) is None
114
152
  # and model_fields_set contains the field
115
153
  if self.updated_at is None and "updated_at" in self.model_fields_set:
116
- _dict['updated_at'] = None
154
+ _dict["updated_at"] = None
117
155
 
118
156
  # set to None if id (nullable) is None
119
157
  # and model_fields_set contains the field
120
158
  if self.id is None and "id" in self.model_fields_set:
121
- _dict['id'] = None
159
+ _dict["id"] = None
122
160
 
123
161
  # set to None if execution_id (nullable) is None
124
162
  # and model_fields_set contains the field
125
163
  if self.execution_id is None and "execution_id" in self.model_fields_set:
126
- _dict['execution_id'] = None
164
+ _dict["execution_id"] = None
127
165
 
128
166
  # set to None if open_order_execution_id (nullable) is None
129
167
  # and model_fields_set contains the field
130
- if self.open_order_execution_id is None and "open_order_execution_id" in self.model_fields_set:
131
- _dict['open_order_execution_id'] = None
168
+ if (
169
+ self.open_order_execution_id is None
170
+ and "open_order_execution_id" in self.model_fields_set
171
+ ):
172
+ _dict["open_order_execution_id"] = None
132
173
 
133
174
  # set to None if client_order_id (nullable) is None
134
175
  # and model_fields_set contains the field
135
176
  if self.client_order_id is None and "client_order_id" in self.model_fields_set:
136
- _dict['client_order_id'] = None
177
+ _dict["client_order_id"] = None
137
178
 
138
179
  # set to None if is_limit (nullable) is None
139
180
  # and model_fields_set contains the field
140
181
  if self.is_limit is None and "is_limit" in self.model_fields_set:
141
- _dict['is_limit'] = None
182
+ _dict["is_limit"] = None
142
183
 
143
184
  # set to None if limit_price (nullable) is None
144
185
  # and model_fields_set contains the field
145
186
  if self.limit_price is None and "limit_price" in self.model_fields_set:
146
- _dict['limit_price'] = None
187
+ _dict["limit_price"] = None
147
188
 
148
189
  # set to None if take_profit (nullable) is None
149
190
  # and model_fields_set contains the field
150
191
  if self.take_profit is None and "take_profit" in self.model_fields_set:
151
- _dict['take_profit'] = None
192
+ _dict["take_profit"] = None
152
193
 
153
194
  # set to None if stop_loss (nullable) is None
154
195
  # and model_fields_set contains the field
155
196
  if self.stop_loss is None and "stop_loss" in self.model_fields_set:
156
- _dict['stop_loss'] = None
197
+ _dict["stop_loss"] = None
157
198
 
158
199
  # set to None if expiry_timestamp (nullable) is None
159
200
  # and model_fields_set contains the field
160
- if self.expiry_timestamp is None and "expiry_timestamp" in self.model_fields_set:
161
- _dict['expiry_timestamp'] = None
201
+ if (
202
+ self.expiry_timestamp is None
203
+ and "expiry_timestamp" in self.model_fields_set
204
+ ):
205
+ _dict["expiry_timestamp"] = None
162
206
 
163
207
  # set to None if position_id (nullable) is None
164
208
  # and model_fields_set contains the field
165
209
  if self.position_id is None and "position_id" in self.model_fields_set:
166
- _dict['position_id'] = None
210
+ _dict["position_id"] = None
167
211
 
168
212
  # set to None if leverage (nullable) is None
169
213
  # and model_fields_set contains the field
170
214
  if self.leverage is None and "leverage" in self.model_fields_set:
171
- _dict['leverage'] = None
215
+ _dict["leverage"] = None
172
216
 
173
217
  # set to None if margin_mode (nullable) is None
174
218
  # and model_fields_set contains the field
175
219
  if self.margin_mode is None and "margin_mode" in self.model_fields_set:
176
- _dict['margin_mode'] = None
220
+ _dict["margin_mode"] = None
177
221
 
178
222
  return _dict
179
223
 
@@ -186,27 +230,37 @@ class ActionModel(BaseModel):
186
230
  if not isinstance(obj, dict):
187
231
  return cls.model_validate(obj)
188
232
 
189
- _obj = cls.model_validate({
190
- "created_at": obj.get("created_at"),
191
- "updated_at": obj.get("updated_at"),
192
- "id": obj.get("id"),
193
- "execution_id": obj.get("execution_id"),
194
- "open_order_execution_id": obj.get("open_order_execution_id"),
195
- "client_order_id": obj.get("client_order_id"),
196
- "action_type": obj.get("action_type"),
197
- "market_type": obj.get("market_type"),
198
- "strategy_id": obj.get("strategy_id"),
199
- "symbol": obj.get("symbol"),
200
- "is_limit": obj.get("is_limit"),
201
- "limit_price": obj.get("limit_price"),
202
- "allocation": obj.get("allocation"),
203
- "take_profit": [TPSL.from_dict(_item) for _item in obj["take_profit"]] if obj.get("take_profit") is not None else None,
204
- "stop_loss": [TPSL.from_dict(_item) for _item in obj["stop_loss"]] if obj.get("stop_loss") is not None else None,
205
- "expiry_timestamp": obj.get("expiry_timestamp"),
206
- "position_id": obj.get("position_id"),
207
- "leverage": obj.get("leverage") if obj.get("leverage") is not None else 1,
208
- "margin_mode": obj.get("margin_mode")
209
- })
233
+ _obj = cls.model_validate(
234
+ {
235
+ "created_at": obj.get("created_at"),
236
+ "updated_at": obj.get("updated_at"),
237
+ "id": obj.get("id"),
238
+ "execution_id": obj.get("execution_id"),
239
+ "open_order_execution_id": obj.get("open_order_execution_id"),
240
+ "client_order_id": obj.get("client_order_id"),
241
+ "action_type": obj.get("action_type"),
242
+ "market_type": obj.get("market_type"),
243
+ "strategy_id": obj.get("strategy_id"),
244
+ "symbol": obj.get("symbol"),
245
+ "is_limit": obj.get("is_limit"),
246
+ "limit_price": obj.get("limit_price"),
247
+ "allocation": obj.get("allocation"),
248
+ "take_profit": (
249
+ [TPSL.from_dict(_item) for _item in obj["take_profit"]]
250
+ if obj.get("take_profit") is not None
251
+ else None
252
+ ),
253
+ "stop_loss": (
254
+ [TPSL.from_dict(_item) for _item in obj["stop_loss"]]
255
+ if obj.get("stop_loss") is not None
256
+ else None
257
+ ),
258
+ "expiry_timestamp": obj.get("expiry_timestamp"),
259
+ "position_id": obj.get("position_id"),
260
+ "leverage": (
261
+ obj.get("leverage") if obj.get("leverage") is not None else 1
262
+ ),
263
+ "margin_mode": obj.get("margin_mode"),
264
+ }
265
+ )
210
266
  return _obj
211
-
212
-
@@ -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,75 +26,79 @@ class ApiErrorIdentifier(str, Enum):
26
26
  """
27
27
  allowed enum values
28
28
  """
29
- ALLOCATION_BELOW_CURRENT_EXPOSURE = 'allocation_below_current_exposure'
30
- ALLOCATION_BELOW_MIN_AMOUNT = 'allocation_below_min_amount'
31
- BLACK_SWAN = 'black_swan'
32
- BOT_ALREADY_DELETED = 'bot_already_deleted'
33
- BOT_DISABLED = 'bot_disabled'
34
- BOT_STOPPING_COMPLETED = 'bot_stopping_completed'
35
- CLIENT_ORDER_ID_ALREADY_EXISTS = 'client_order_id_already_exists'
36
- INVALID_CONTENT_TYPE = 'invalid_content_type'
37
- DELETE_BOT_ERROR = 'delete_bot_error'
38
- EXCHANGE_INVALID_SIGNATURE = 'exchange_invalid_signature'
39
- EXCHANGE_INVALID_TIMESTAMP = 'exchange_invalid_timestamp'
40
- EXCHANGE_IP_ADDRESS_IS_NOT_AUTHORIZED = 'exchange_ip_address_is_not_authorized'
41
- EXCHANGE_KEY_ALREADY_EXISTS = 'exchange_key_already_exists'
42
- EXCHANGE_KEY_IN_USE = 'exchange_key_in_use'
43
- EXCHANGE_SYSTEM_UNDER_MAINTENANCE = 'exchange_system_under_maintenance'
44
- EXCHANGE_RATE_LIMIT_EXCEEDED = 'exchange_rate_limit_exceeded'
45
- INSUFFICIENT_PERMISSIONS_SPOT_AND_FUTURES_REQUIRED = 'insufficient_permissions_spot_and_futures_required'
46
- EXCHANGE_SERVICE_TEMPORARILY_UNAVAILABLE = 'exchange_service_temporarily_unavailable'
47
- EXCHANGE_SYSTEM_IS_BUSY = 'exchange_system_is_busy'
48
- EXCHANGE_SYSTEM_CONFIGURATION_ERROR = 'exchange_system_configuration_error'
49
- EXCHANGE_INTERNAL_SYSTEM_ERROR = 'exchange_internal_system_error'
50
- EXCHANGE_USER_ACCOUNT_IS_FROZEN = 'exchange_user_account_is_frozen'
51
- HEDGE_MODE_NOT_ACTIVE = 'hedge_mode_not_active'
52
- HTTP_REQUEST_ERROR = 'http_request_error'
53
- INSUFFICIENT_BALANCE = 'insufficient_balance'
54
- INSUFFICIENT_MARGIN = 'insufficient_margin'
55
- INSUFFICIENT_SCOPES = 'insufficient_scopes'
56
- INVALID_API_KEY = 'invalid_api_key'
57
- INVALID_BEARER = 'invalid_bearer'
58
- INVALID_EXCHANGE_KEY = 'invalid_exchange_key'
59
- INVALID_MARGIN_MODE = 'invalid_margin_mode'
60
- INVALID_PARAMETER_PROVIDED = 'invalid_parameter_provided'
61
- JWT_EXPIRED = 'jwt_expired'
62
- LEVERAGE_LIMIT_EXCEEDED = 'leverage_limit_exceeded'
63
- ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = 'order_violates_liquidation_price_constraints'
64
- NO_CREDENTIALS = 'no_credentials'
65
- NOW_API_DOWN = 'now_api_down'
66
- OBJECT_NOT_FOUND = 'object_not_found'
67
- OBJECT_ALREADY_EXISTS = 'object_already_exists'
68
- ORDER_IS_ALREADY_FILLED = 'order_is_already_filled'
69
- ORDER_IS_BEING_PROCESSED = 'order_is_being_processed'
70
- ORDER_QUANTITY_LIMIT_EXCEEDED = 'order_quantity_limit_exceeded'
71
- ORDER_DOES_NOT_EXIST = 'order_does_not_exist'
72
- ORDER_PRICE_IS_INVALID = 'order_price_is_invalid'
73
- ORDER_SIZE_TOO_LARGE = 'order_size_too_large'
74
- ORDER_SIZE_TOO_SMALL = 'order_size_too_small'
75
- POSITION_LIMIT_EXCEEDED = 'position_limit_exceeded'
76
- POSITION_DOES_NOT_EXIST = 'position_does_not_exist'
77
- POSITION_OPENING_TEMPORARILY_SUSPENDED = 'position_opening_temporarily_suspended'
78
- POST_ONLY_ORDER_WOULD_IMMEDIATELY_MATCH = 'post_only_order_would_immediately_match'
79
- REQUEST_SCOPE_LIMIT_EXCEEDED = 'request_scope_limit_exceeded'
80
- RISK_LIMIT_EXCEEDED = 'risk_limit_exceeded'
81
- RPC_TIMEOUT = 'rpc_timeout'
82
- SYSTEM_SETTLEMENT_IN_PROCESS = 'system_settlement_in_process'
83
- STRATEGY_DISABLED = 'strategy_disabled'
84
- STRATEGY_LEVERAGE_MISMATCH = 'strategy_leverage_mismatch'
85
- STRATEGY_NOT_SUPPORTING_EXCHANGE = 'strategy_not_supporting_exchange'
86
- SUCCESS = 'success'
87
- SYMBOL_DOES_NOT_EXIST = 'symbol_does_not_exist'
88
- TRADING_ACTION_EXPIRED = 'trading_action_expired'
89
- TRADING_ACTION_SKIPPED = 'trading_action_skipped'
90
- TRADING_HAS_BEEN_LOCKED = 'trading_has_been_locked'
91
- TRADING_IS_SUSPENDED = 'trading_is_suspended'
92
- UNKNOWN_ERROR_OCCURRED = 'unknown_error_occurred'
93
- REQUESTED_RESOURCE_NOT_FOUND = 'requested_resource_not_found'
29
+ ALLOCATION_BELOW_CURRENT_EXPOSURE = "allocation_below_current_exposure"
30
+ ALLOCATION_BELOW_MIN_AMOUNT = "allocation_below_min_amount"
31
+ BLACK_SWAN = "black_swan"
32
+ BOT_ALREADY_DELETED = "bot_already_deleted"
33
+ BOT_DISABLED = "bot_disabled"
34
+ BOT_STOPPING_COMPLETED = "bot_stopping_completed"
35
+ CLIENT_ORDER_ID_ALREADY_EXISTS = "client_order_id_already_exists"
36
+ INVALID_CONTENT_TYPE = "invalid_content_type"
37
+ DELETE_BOT_ERROR = "delete_bot_error"
38
+ EXCHANGE_INVALID_SIGNATURE = "exchange_invalid_signature"
39
+ EXCHANGE_INVALID_TIMESTAMP = "exchange_invalid_timestamp"
40
+ EXCHANGE_IP_ADDRESS_IS_NOT_AUTHORIZED = "exchange_ip_address_is_not_authorized"
41
+ EXCHANGE_KEY_ALREADY_EXISTS = "exchange_key_already_exists"
42
+ EXCHANGE_KEY_IN_USE = "exchange_key_in_use"
43
+ EXCHANGE_SYSTEM_UNDER_MAINTENANCE = "exchange_system_under_maintenance"
44
+ EXCHANGE_RATE_LIMIT_EXCEEDED = "exchange_rate_limit_exceeded"
45
+ INSUFFICIENT_PERMISSIONS_SPOT_AND_FUTURES_REQUIRED = (
46
+ "insufficient_permissions_spot_and_futures_required"
47
+ )
48
+ EXCHANGE_SERVICE_TEMPORARILY_UNAVAILABLE = (
49
+ "exchange_service_temporarily_unavailable"
50
+ )
51
+ EXCHANGE_SYSTEM_IS_BUSY = "exchange_system_is_busy"
52
+ EXCHANGE_SYSTEM_CONFIGURATION_ERROR = "exchange_system_configuration_error"
53
+ EXCHANGE_INTERNAL_SYSTEM_ERROR = "exchange_internal_system_error"
54
+ EXCHANGE_USER_ACCOUNT_IS_FROZEN = "exchange_user_account_is_frozen"
55
+ HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
56
+ HTTP_REQUEST_ERROR = "http_request_error"
57
+ INSUFFICIENT_BALANCE = "insufficient_balance"
58
+ INSUFFICIENT_MARGIN = "insufficient_margin"
59
+ INSUFFICIENT_SCOPES = "insufficient_scopes"
60
+ INVALID_API_KEY = "invalid_api_key"
61
+ INVALID_BEARER = "invalid_bearer"
62
+ INVALID_EXCHANGE_KEY = "invalid_exchange_key"
63
+ INVALID_MARGIN_MODE = "invalid_margin_mode"
64
+ INVALID_PARAMETER_PROVIDED = "invalid_parameter_provided"
65
+ JWT_EXPIRED = "jwt_expired"
66
+ LEVERAGE_LIMIT_EXCEEDED = "leverage_limit_exceeded"
67
+ ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = (
68
+ "order_violates_liquidation_price_constraints"
69
+ )
70
+ NO_CREDENTIALS = "no_credentials"
71
+ NOW_API_DOWN = "now_api_down"
72
+ OBJECT_NOT_FOUND = "object_not_found"
73
+ OBJECT_ALREADY_EXISTS = "object_already_exists"
74
+ ORDER_IS_ALREADY_FILLED = "order_is_already_filled"
75
+ ORDER_IS_BEING_PROCESSED = "order_is_being_processed"
76
+ ORDER_QUANTITY_LIMIT_EXCEEDED = "order_quantity_limit_exceeded"
77
+ ORDER_DOES_NOT_EXIST = "order_does_not_exist"
78
+ ORDER_PRICE_IS_INVALID = "order_price_is_invalid"
79
+ ORDER_SIZE_TOO_LARGE = "order_size_too_large"
80
+ ORDER_SIZE_TOO_SMALL = "order_size_too_small"
81
+ POSITION_LIMIT_EXCEEDED = "position_limit_exceeded"
82
+ POSITION_DOES_NOT_EXIST = "position_does_not_exist"
83
+ POSITION_OPENING_TEMPORARILY_SUSPENDED = "position_opening_temporarily_suspended"
84
+ POST_ONLY_ORDER_WOULD_IMMEDIATELY_MATCH = "post_only_order_would_immediately_match"
85
+ REQUEST_SCOPE_LIMIT_EXCEEDED = "request_scope_limit_exceeded"
86
+ RISK_LIMIT_EXCEEDED = "risk_limit_exceeded"
87
+ RPC_TIMEOUT = "rpc_timeout"
88
+ SYSTEM_SETTLEMENT_IN_PROCESS = "system_settlement_in_process"
89
+ STRATEGY_DISABLED = "strategy_disabled"
90
+ STRATEGY_LEVERAGE_MISMATCH = "strategy_leverage_mismatch"
91
+ STRATEGY_NOT_SUPPORTING_EXCHANGE = "strategy_not_supporting_exchange"
92
+ SUCCESS = "success"
93
+ SYMBOL_DOES_NOT_EXIST = "symbol_does_not_exist"
94
+ TRADING_ACTION_EXPIRED = "trading_action_expired"
95
+ TRADING_ACTION_SKIPPED = "trading_action_skipped"
96
+ TRADING_HAS_BEEN_LOCKED = "trading_has_been_locked"
97
+ TRADING_IS_SUSPENDED = "trading_is_suspended"
98
+ UNKNOWN_ERROR_OCCURRED = "unknown_error_occurred"
99
+ REQUESTED_RESOURCE_NOT_FOUND = "requested_resource_not_found"
94
100
 
95
101
  @classmethod
96
102
  def from_json(cls, json_str: str) -> Self:
97
103
  """Create an instance of ApiErrorIdentifier from a JSON string"""
98
104
  return cls(json.loads(json_str))
99
-
100
-
@@ -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,14 +26,12 @@ class ApiErrorLevel(str, Enum):
26
26
  """
27
27
  allowed enum values
28
28
  """
29
- ERROR = 'error'
30
- INFO = 'info'
31
- SUCCESS = 'success'
32
- WARNING = 'warning'
29
+ ERROR = "error"
30
+ INFO = "info"
31
+ SUCCESS = "success"
32
+ WARNING = "warning"
33
33
 
34
34
  @classmethod
35
35
  def from_json(cls, json_str: str) -> Self:
36
36
  """Create an instance of ApiErrorLevel from a JSON string"""
37
37
  return cls(json.loads(json_str))
38
-
39
-
@@ -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,14 +26,12 @@ class ApiErrorType(str, Enum):
26
26
  """
27
27
  allowed enum values
28
28
  """
29
- USER_ERROR = 'user error'
30
- EXCHANGE_ERROR = 'exchange error'
31
- SERVER_ERROR = 'server error'
32
- NO_ERROR = 'no error'
29
+ USER_ERROR = "user error"
30
+ EXCHANGE_ERROR = "exchange error"
31
+ SERVER_ERROR = "server error"
32
+ NO_ERROR = "no error"
33
33
 
34
34
  @classmethod
35
35
  def from_json(cls, json_str: str) -> Self:
36
36
  """Create an instance of ApiErrorType from a JSON string"""
37
37
  return cls(json.loads(json_str))
38
-
39
-