crypticorn 2.2.2__py3-none-any.whl → 2.2.3__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.
@@ -29,11 +29,17 @@ class AuthorizeUserRequest(BaseModel):
29
29
  AuthorizeUserRequest
30
30
  """ # noqa: E501
31
31
 
32
- email: Annotated[str, Field(min_length=1, strict=True)]
33
- password: Annotated[str, Field(min_length=1, strict=True)]
34
- admin: Optional[StrictBool] = None
32
+ email: Annotated[str, Field(min_length=1, strict=True)] = Field(
33
+ description="Email of the user"
34
+ )
35
+ password: Annotated[str, Field(min_length=1, strict=True)] = Field(
36
+ description="Password of the user"
37
+ )
38
+ admin: Optional[StrictBool] = Field(
39
+ default=None, description="Whether the user is an admin"
40
+ )
35
41
  captcha_token: Annotated[str, Field(min_length=1, strict=True)] = Field(
36
- alias="captchaToken"
42
+ description="Captcha token of the authorization request", alias="captchaToken"
37
43
  )
38
44
  __properties: ClassVar[List[str]] = ["email", "password", "admin", "captchaToken"]
39
45
 
@@ -17,16 +17,9 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import (
21
- BaseModel,
22
- ConfigDict,
23
- Field,
24
- StrictFloat,
25
- StrictInt,
26
- StrictStr,
27
- field_validator,
28
- )
29
- from typing import Any, ClassVar, Dict, List, Optional, Union
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
30
23
  from typing_extensions import Annotated
31
24
  from typing import Optional, Set
32
25
  from typing_extensions import Self
@@ -37,12 +30,18 @@ class CreateApiKeyRequest(BaseModel):
37
30
  CreateApiKeyRequest
38
31
  """ # noqa: E501
39
32
 
40
- name: StrictStr
41
- scopes: Annotated[List[StrictStr], Field(min_length=1)]
42
- expires_in: Optional[Union[StrictFloat, StrictInt]] = Field(
43
- default=None, alias="expiresIn"
33
+ name: StrictStr = Field(description="Name of the API key")
34
+ scopes: Annotated[List[StrictStr], Field(min_length=1)] = Field(
35
+ description="Scopes of the API key"
44
36
  )
45
- __properties: ClassVar[List[str]] = ["name", "scopes", "expiresIn"]
37
+ expires_at: Optional[datetime] = Field(
38
+ default=None, description="Expiration time of the API key as a date"
39
+ )
40
+ ip_whitelist: Optional[List[StrictStr]] = Field(
41
+ default=None,
42
+ description="IP addresses that can access the API key. If empty, the API key will be accessible from any IP address.",
43
+ )
44
+ __properties: ClassVar[List[str]] = ["name", "scopes", "expires_at", "ip_whitelist"]
46
45
 
47
46
  @field_validator("scopes")
48
47
  def scopes_validate_enum(cls, value):
@@ -55,8 +54,8 @@ class CreateApiKeyRequest(BaseModel):
55
54
  "write:hive:model",
56
55
  "read:trade:bots",
57
56
  "write:trade:bots",
58
- "read:trade:api_keys",
59
- "write:trade:api_keys",
57
+ "read:trade:exchangekeys",
58
+ "write:trade:exchangekeys",
60
59
  "read:trade:orders",
61
60
  "read:trade:actions",
62
61
  "write:trade:actions",
@@ -76,7 +75,7 @@ class CreateApiKeyRequest(BaseModel):
76
75
  ]
77
76
  ):
78
77
  raise ValueError(
79
- "each list item must be one of ('read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:api_keys', 'write:trade:api_keys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:predictions')"
78
+ "each list item must be one of ('read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:predictions')"
80
79
  )
81
80
  return value
82
81
 
@@ -132,7 +131,8 @@ class CreateApiKeyRequest(BaseModel):
132
131
  {
133
132
  "name": obj.get("name"),
134
133
  "scopes": obj.get("scopes"),
135
- "expiresIn": obj.get("expiresIn"),
134
+ "expires_at": obj.get("expires_at"),
135
+ "ip_whitelist": obj.get("ip_whitelist"),
136
136
  }
137
137
  )
138
138
  return _obj
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
@@ -29,12 +29,18 @@ class GetApiKeys200ResponseInner(BaseModel):
29
29
  GetApiKeys200ResponseInner
30
30
  """ # noqa: E501
31
31
 
32
- id: StrictStr
33
- user_id: StrictStr
34
- scopes: List[StrictStr]
35
- name: StrictStr
36
- expires_at: Optional[datetime] = None
37
- created_at: datetime
32
+ id: StrictStr = Field(description="ID of the API key")
33
+ user_id: StrictStr = Field(description="User ID of the API key")
34
+ scopes: List[StrictStr] = Field(description="Scopes of the API key")
35
+ name: StrictStr = Field(description="Name of the API key")
36
+ expires_at: Optional[datetime] = Field(
37
+ default=None, description="Expiration time of the API key as a date"
38
+ )
39
+ created_at: datetime = Field(description="Creation time of the API key as a date")
40
+ ip_whitelist: Optional[List[StrictStr]] = Field(
41
+ default=None,
42
+ description="IP addresses that can access the API key. If empty, the API key will be accessible from any IP address.",
43
+ )
38
44
  __properties: ClassVar[List[str]] = [
39
45
  "id",
40
46
  "user_id",
@@ -42,6 +48,7 @@ class GetApiKeys200ResponseInner(BaseModel):
42
48
  "name",
43
49
  "expires_at",
44
50
  "created_at",
51
+ "ip_whitelist",
45
52
  ]
46
53
 
47
54
  @field_validator("scopes")
@@ -55,8 +62,8 @@ class GetApiKeys200ResponseInner(BaseModel):
55
62
  "write:hive:model",
56
63
  "read:trade:bots",
57
64
  "write:trade:bots",
58
- "read:trade:api_keys",
59
- "write:trade:api_keys",
65
+ "read:trade:exchangekeys",
66
+ "write:trade:exchangekeys",
60
67
  "read:trade:orders",
61
68
  "read:trade:actions",
62
69
  "write:trade:actions",
@@ -76,7 +83,7 @@ class GetApiKeys200ResponseInner(BaseModel):
76
83
  ]
77
84
  ):
78
85
  raise ValueError(
79
- "each list item must be one of ('read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:api_keys', 'write:trade:api_keys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:predictions')"
86
+ "each list item must be one of ('read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:predictions')"
80
87
  )
81
88
  return value
82
89
 
@@ -136,6 +143,7 @@ class GetApiKeys200ResponseInner(BaseModel):
136
143
  "name": obj.get("name"),
137
144
  "expires_at": obj.get("expires_at"),
138
145
  "created_at": obj.get("created_at"),
146
+ "ip_whitelist": obj.get("ip_whitelist"),
139
147
  }
140
148
  )
141
149
  return _obj
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
@@ -29,12 +29,16 @@ class RefreshTokenInfo200ResponseUserSession(BaseModel):
29
29
  RefreshTokenInfo200ResponseUserSession
30
30
  """ # noqa: E501
31
31
 
32
- id: StrictStr
33
- user_id: StrictStr
34
- token: StrictStr
35
- expires_at: datetime
36
- client_ip: Optional[StrictStr] = None
37
- user_agent: Optional[StrictStr] = None
32
+ id: StrictStr = Field(description="ID of the user session")
33
+ user_id: StrictStr = Field(description="User ID of the user session")
34
+ token: StrictStr = Field(description="Token of the user session")
35
+ expires_at: datetime = Field(description="Expiration time of the user session")
36
+ client_ip: Optional[StrictStr] = Field(
37
+ default=None, description="Client IP address of the user session"
38
+ )
39
+ user_agent: Optional[StrictStr] = Field(
40
+ default=None, description="User agent of the user session"
41
+ )
38
42
  __properties: ClassVar[List[str]] = [
39
43
  "id",
40
44
  "user_id",
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional, Union
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
@@ -28,14 +28,20 @@ class Verify200Response(BaseModel):
28
28
  Verify200Response
29
29
  """ # noqa: E501
30
30
 
31
- iss: Optional[StrictStr] = None
32
- sub: Optional[StrictStr] = None
33
- aud: Optional[StrictStr] = None
34
- exp: Optional[Union[StrictFloat, StrictInt]] = None
35
- nbf: Optional[Union[StrictFloat, StrictInt]] = None
36
- iat: Optional[Union[StrictFloat, StrictInt]] = None
37
- jti: Optional[StrictStr] = None
38
- scopes: Optional[List[StrictStr]] = None
31
+ iss: Optional[StrictStr] = Field(default=None, description="Issuer")
32
+ sub: Optional[StrictStr] = Field(default=None, description="Subject")
33
+ aud: Optional[StrictStr] = Field(default=None, description="Audience")
34
+ exp: Optional[Union[StrictFloat, StrictInt]] = Field(
35
+ default=None, description="Expiration time"
36
+ )
37
+ nbf: Optional[Union[StrictFloat, StrictInt]] = Field(
38
+ default=None, description="Not valid before time"
39
+ )
40
+ iat: Optional[Union[StrictFloat, StrictInt]] = Field(
41
+ default=None, description="Issued at time"
42
+ )
43
+ jti: Optional[StrictStr] = Field(default=None, description="JWT ID")
44
+ scopes: Optional[List[StrictStr]] = Field(default=None, description="Scopes")
39
45
  __properties: ClassVar[List[str]] = [
40
46
  "iss",
41
47
  "sub",
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional, Union
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
@@ -28,14 +28,20 @@ class VerifyEmail200ResponseAuthAuth(BaseModel):
28
28
  VerifyEmail200ResponseAuthAuth
29
29
  """ # noqa: E501
30
30
 
31
- iss: Optional[StrictStr] = None
32
- sub: Optional[StrictStr] = None
33
- aud: Optional[StrictStr] = None
34
- exp: Optional[Union[StrictFloat, StrictInt]] = None
35
- nbf: Optional[Union[StrictFloat, StrictInt]] = None
36
- iat: Optional[Union[StrictFloat, StrictInt]] = None
37
- jti: Optional[StrictStr] = None
38
- scopes: Optional[List[StrictStr]] = None
31
+ iss: Optional[StrictStr] = Field(default=None, description="Issuer")
32
+ sub: Optional[StrictStr] = Field(default=None, description="Subject")
33
+ aud: Optional[StrictStr] = Field(default=None, description="Audience")
34
+ exp: Optional[Union[StrictFloat, StrictInt]] = Field(
35
+ default=None, description="Expiration time"
36
+ )
37
+ nbf: Optional[Union[StrictFloat, StrictInt]] = Field(
38
+ default=None, description="Not valid before time"
39
+ )
40
+ iat: Optional[Union[StrictFloat, StrictInt]] = Field(
41
+ default=None, description="Issued at time"
42
+ )
43
+ jti: Optional[StrictStr] = Field(default=None, description="JWT ID")
44
+ scopes: Optional[List[StrictStr]] = Field(default=None, description="Scopes")
39
45
  __properties: ClassVar[List[str]] = [
40
46
  "iss",
41
47
  "sub",
@@ -1,4 +1,16 @@
1
- from enum import Enum
1
+ from enum import Enum, EnumMeta
2
+ import logging
3
+
4
+ logger = logging.getLogger(__name__)
5
+
6
+
7
+ class Fallback(EnumMeta):
8
+ def __getattr__(cls, name):
9
+ """Fallback to UNKNOWN_ERROR for error codes not yet published to PyPI."""
10
+ logger.warning(
11
+ f"Unknown error code '{name}' - update crypticorn package or check for typos"
12
+ )
13
+ return cls.UNKNOWN_ERROR
2
14
 
3
15
 
4
16
  class ApiErrorType(str, Enum):
@@ -17,7 +29,8 @@ class ApiErrorType(str, Enum):
17
29
  class ApiErrorIdentifier(str, Enum):
18
30
  """API error identifiers"""
19
31
 
20
- API_KEY_ALREADY_EXISTS = "api_key_already_exists"
32
+ ALLOCATION_BELOW_EXPOSURE = "allocation_below_current_exposure"
33
+ ALLOCATION_BELOW_MINIMUM = "allocation_below_min_amount"
21
34
  BLACK_SWAN = "black_swan"
22
35
  BOT_ALREADY_DELETED = "bot_already_deleted"
23
36
  BOT_DISABLED = "bot_disabled"
@@ -25,18 +38,19 @@ class ApiErrorIdentifier(str, Enum):
25
38
  CLIENT_ORDER_ID_REPEATED = "client_order_id_already_exists"
26
39
  CONTENT_TYPE_ERROR = "invalid_content_type"
27
40
  DELETE_BOT_ERROR = "delete_bot_error"
28
- EXCHANGE_API_KEY_IN_USE = "exchange_api_key_in_use"
29
41
  EXCHANGE_INVALID_SIGNATURE = "exchange_invalid_signature"
30
42
  EXCHANGE_INVALID_TIMESTAMP = "exchange_invalid_timestamp"
31
43
  EXCHANGE_IP_RESTRICTED = "exchange_ip_address_is_not_authorized"
44
+ EXCHANGE_KEY_ALREADY_EXISTS = "exchange_key_already_exists"
45
+ EXCHANGE_KEY_IN_USE = "exchange_key_in_use"
32
46
  EXCHANGE_MAINTENANCE = "exchange_system_under_maintenance"
33
47
  EXCHANGE_RATE_LIMIT = "exchange_rate_limit_exceeded"
48
+ EXCHANGE_PERMISSION_DENIED = "insufficient_permissions_spot_and_futures_required"
34
49
  EXCHANGE_SERVICE_UNAVAILABLE = "exchange_service_temporarily_unavailable"
35
50
  EXCHANGE_SYSTEM_BUSY = "exchange_system_is_busy"
36
51
  EXCHANGE_SYSTEM_CONFIG_ERROR = "exchange_system_configuration_error"
37
52
  EXCHANGE_SYSTEM_ERROR = "exchange_internal_system_error"
38
53
  EXCHANGE_USER_FROZEN = "exchange_user_account_is_frozen"
39
- EXCHANGE_PERMISSION_DENIED = "insufficient_permissions_spot_and_futures_required"
40
54
  HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
41
55
  HTTP_ERROR = "http_request_error"
42
56
  INSUFFICIENT_BALANCE = "insufficient_balance"
@@ -51,6 +65,7 @@ class ApiErrorIdentifier(str, Enum):
51
65
  LEVERAGE_EXCEEDED = "leverage_limit_exceeded"
52
66
  LIQUIDATION_PRICE_VIOLATION = "order_violates_liquidation_price_constraints"
53
67
  NO_CREDENTIALS = "no_credentials"
68
+ NOW_API_DOWN = "now_api_down"
54
69
  OBJECT_NOT_FOUND = "object_not_found"
55
70
  ORDER_ALREADY_FILLED = "order_is_already_filled"
56
71
  ORDER_IN_PROCESS = "order_is_being_processed"
@@ -68,11 +83,13 @@ class ApiErrorIdentifier(str, Enum):
68
83
  RPC_TIMEOUT = "rpc_timeout"
69
84
  SETTLEMENT_IN_PROGRESS = "system_settlement_in_process"
70
85
  STRATEGY_DISABLED = "strategy_disabled"
86
+ STRATEGY_LEVERAGE_MISMATCH = "strategy_leverage_mismatch"
87
+ STRATEGY_NOT_SUPPORTING_EXCHANGE = "strategy_not_supporting_exchange"
71
88
  SUCCESS = "success"
72
89
  SYMBOL_NOT_FOUND = "symbol_does_not_exist"
73
- TRADING_LOCKED = "trading_has_been_locked"
74
90
  TRADING_ACTION_EXPIRED = "trading_action_expired"
75
91
  TRADING_ACTION_SKIPPED = "trading_action_skipped"
92
+ TRADING_LOCKED = "trading_has_been_locked"
76
93
  TRADING_SUSPENDED = "trading_is_suspended"
77
94
  UNKNOWN_ERROR = "unknown_error_occurred"
78
95
  URL_NOT_FOUND = "requested_resource_not_found"
@@ -87,11 +104,16 @@ class ApiErrorLevel(str, Enum):
87
104
  WARNING = "warning"
88
105
 
89
106
 
90
- class ApiError(Enum):
107
+ class ApiError(Enum, metaclass=Fallback):
91
108
  """API error codes"""
92
109
 
93
- API_KEY_ALREADY_EXISTS = (
94
- ApiErrorIdentifier.API_KEY_ALREADY_EXISTS,
110
+ ALLOCATION_BELOW_EXPOSURE = (
111
+ ApiErrorIdentifier.ALLOCATION_BELOW_EXPOSURE,
112
+ ApiErrorType.USER_ERROR,
113
+ ApiErrorLevel.ERROR,
114
+ )
115
+ ALLOCATION_BELOW_MINIMUM = (
116
+ ApiErrorIdentifier.ALLOCATION_BELOW_MINIMUM,
95
117
  ApiErrorType.USER_ERROR,
96
118
  ApiErrorLevel.ERROR,
97
119
  )
@@ -145,8 +167,13 @@ class ApiError(Enum):
145
167
  ApiErrorType.SERVER_ERROR,
146
168
  ApiErrorLevel.ERROR,
147
169
  )
148
- EXCHANGE_API_KEY_IN_USE = (
149
- ApiErrorIdentifier.EXCHANGE_API_KEY_IN_USE,
170
+ EXCHANGE_KEY_ALREADY_EXISTS = (
171
+ ApiErrorIdentifier.EXCHANGE_KEY_ALREADY_EXISTS,
172
+ ApiErrorType.USER_ERROR,
173
+ ApiErrorLevel.ERROR,
174
+ )
175
+ EXCHANGE_KEY_IN_USE = (
176
+ ApiErrorIdentifier.EXCHANGE_KEY_IN_USE,
150
177
  ApiErrorType.SERVER_ERROR,
151
178
  ApiErrorLevel.ERROR,
152
179
  )
@@ -155,16 +182,16 @@ class ApiError(Enum):
155
182
  ApiErrorType.EXCHANGE_ERROR,
156
183
  ApiErrorLevel.ERROR,
157
184
  )
158
- EXCHANGE_PERMISSION_DENIED = (
159
- ApiErrorIdentifier.EXCHANGE_PERMISSION_DENIED,
160
- ApiErrorType.USER_ERROR,
161
- ApiErrorLevel.ERROR,
162
- )
163
185
  EXCHANGE_RATE_LIMIT = (
164
186
  ApiErrorIdentifier.EXCHANGE_RATE_LIMIT,
165
187
  ApiErrorType.EXCHANGE_ERROR,
166
188
  ApiErrorLevel.ERROR,
167
189
  )
190
+ EXCHANGE_PERMISSION_DENIED = (
191
+ ApiErrorIdentifier.EXCHANGE_PERMISSION_DENIED,
192
+ ApiErrorType.USER_ERROR,
193
+ ApiErrorLevel.ERROR,
194
+ )
168
195
  EXCHANGE_SERVICE_UNAVAILABLE = (
169
196
  ApiErrorIdentifier.EXCHANGE_SERVICE_UNAVAILABLE,
170
197
  ApiErrorType.EXCHANGE_ERROR,
@@ -260,6 +287,11 @@ class ApiError(Enum):
260
287
  ApiErrorType.USER_ERROR,
261
288
  ApiErrorLevel.ERROR,
262
289
  )
290
+ NOW_API_DOWN = (
291
+ ApiErrorIdentifier.NOW_API_DOWN,
292
+ ApiErrorType.SERVER_ERROR,
293
+ ApiErrorLevel.ERROR,
294
+ )
263
295
  OBJECT_NOT_FOUND = (
264
296
  ApiErrorIdentifier.OBJECT_NOT_FOUND,
265
297
  ApiErrorType.SERVER_ERROR,
@@ -342,7 +374,17 @@ class ApiError(Enum):
342
374
  )
343
375
  STRATEGY_DISABLED = (
344
376
  ApiErrorIdentifier.STRATEGY_DISABLED,
345
- ApiErrorType.SERVER_ERROR,
377
+ ApiErrorType.USER_ERROR,
378
+ ApiErrorLevel.ERROR,
379
+ )
380
+ STRATEGY_LEVERAGE_MISMATCH = (
381
+ ApiErrorIdentifier.STRATEGY_LEVERAGE_MISMATCH,
382
+ ApiErrorType.USER_ERROR,
383
+ ApiErrorLevel.ERROR,
384
+ )
385
+ STRATEGY_NOT_SUPPORTING_EXCHANGE = (
386
+ ApiErrorIdentifier.STRATEGY_NOT_SUPPORTING_EXCHANGE,
387
+ ApiErrorType.USER_ERROR,
346
388
  ApiErrorLevel.ERROR,
347
389
  )
348
390
  SUCCESS = (ApiErrorIdentifier.SUCCESS, ApiErrorType.NO_ERROR, ApiErrorLevel.SUCCESS)
@@ -393,3 +435,8 @@ class ApiError(Enum):
393
435
  @property
394
436
  def level(self) -> ApiErrorLevel:
395
437
  return self.value[2]
438
+
439
+
440
+ assert len(list(ApiErrorIdentifier)) == len(
441
+ list(ApiError)
442
+ ), f"{len(list(ApiErrorIdentifier))} != {len(list(ApiError))}"
@@ -7,6 +7,7 @@ from pydantic.fields import FieldInfo
7
7
 
8
8
  def partial_model(model: Type[BaseModel]) -> Type[BaseModel]:
9
9
  """Marks all fields of a model as optional. Useful for updating models.
10
+ Inherits all fields, docstrings, and the model name.
10
11
 
11
12
  >>> @partial_model
12
13
  >>> class Model(BaseModel):
@@ -29,6 +30,7 @@ def partial_model(model: Type[BaseModel]) -> Type[BaseModel]:
29
30
  model.__name__,
30
31
  __base__=model,
31
32
  __module__=model.__module__,
33
+ __doc__=model.__doc__,
32
34
  **{
33
35
  field_name: make_field_optional(field_info)
34
36
  for field_name, field_info in model.model_fields.items()
@@ -20,8 +20,8 @@ class Scope(StrEnum):
20
20
  # Trade scopes
21
21
  READ_TRADE_BOTS = "read:trade:bots"
22
22
  WRITE_TRADE_BOTS = "write:trade:bots"
23
- READ_TRADE_APIKEYS = "read:trade:api_keys"
24
- WRITE_TRADE_APIKEYS = "write:trade:api_keys"
23
+ READ_TRADE_EXCHANGEKEYS = "read:trade:exchangekeys"
24
+ WRITE_TRADE_EXCHANGEKEYS = "write:trade:exchangekeys"
25
25
  READ_TRADE_ORDERS = "read:trade:orders"
26
26
  READ_TRADE_ACTIONS = "read:trade:actions"
27
27
  WRITE_TRADE_ACTIONS = "write:trade:actions"
@@ -40,5 +40,5 @@ class Scope(StrEnum):
40
40
  READ_PAY_NOW = "read:pay:now"
41
41
  WRITE_PAY_NOW = "write:pay:now"
42
42
 
43
- # Read projections
43
+ # Scopes that can be purchased - these actually exist in the jwt token
44
44
  READ_PREDICTIONS = "read:predictions"
@@ -2,11 +2,11 @@ import re
2
2
  import pyperclip
3
3
 
4
4
 
5
- def sort_api_errors(file_content):
5
+ def sort_api_errors(file_content, class_name="ApiErrorIdentifier"):
6
6
  # Find the start of the ApiError class definition
7
- class_start = file_content.find("class ApiErrorIdentifier(str, Enum):")
7
+ class_start = file_content.find(f"class {class_name}(str, Enum):")
8
8
  if class_start == -1:
9
- return "Could not find ApiErrorIdentifier class"
9
+ return f"Could not find {class_name} class"
10
10
 
11
11
  # Find all enum definitions
12
12
  enum_pattern = r' ([A-Z_]+)\s*=\s*"([a-z_]+)"'
@@ -23,7 +23,7 @@ def sort_api_errors(file_content):
23
23
  sorted_entries = sorted(enum_entries, key=lambda x: x[0])
24
24
 
25
25
  # Reconstruct the class content
26
- class_header = "class ApiErrorIdentifier(str, Enum):\n\n"
26
+ class_header = f"class {class_name}(str, Enum):\n\n"
27
27
  sorted_content = class_header + "\n ".join(entry[1] for entry in sorted_entries)
28
28
 
29
29
  return sorted_content
@@ -34,5 +34,7 @@ if __name__ == "__main__":
34
34
  with open("python/crypticorn/common/errors.py", "r") as f:
35
35
  content = f.read()
36
36
 
37
- sorted_content = sort_api_errors(content)
38
- pyperclip.copy(sorted_content)
37
+ sorted_content = sort_api_errors(content, "ApiErrorIdentifier")
38
+ print(sorted_content)
39
+ sorted_content = sort_api_errors(content, "ApiError")
40
+ print(sorted_content)
@@ -38,7 +38,7 @@ class APIKeysApi:
38
38
  self.api_client = api_client
39
39
 
40
40
  @validate_call
41
- async def create_api_key(
41
+ async def create_exchange_key(
42
42
  self,
43
43
  api_key_model: APIKeyModel,
44
44
  _request_timeout: Union[
@@ -53,7 +53,7 @@ class APIKeysApi:
53
53
  _headers: Optional[Dict[StrictStr, Any]] = None,
54
54
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
55
55
  ) -> object:
56
- """Post Api Key
56
+ """Post Exchange Key
57
57
 
58
58
 
59
59
  :param api_key_model: (required)
@@ -80,7 +80,7 @@ class APIKeysApi:
80
80
  :return: Returns the result object.
81
81
  """ # noqa: E501
82
82
 
83
- _param = self._create_api_key_serialize(
83
+ _param = self._create_exchange_key_serialize(
84
84
  api_key_model=api_key_model,
85
85
  _request_auth=_request_auth,
86
86
  _content_type=_content_type,
@@ -102,7 +102,7 @@ class APIKeysApi:
102
102
  ).data
103
103
 
104
104
  @validate_call
105
- async def create_api_key_with_http_info(
105
+ async def create_exchange_key_with_http_info(
106
106
  self,
107
107
  api_key_model: APIKeyModel,
108
108
  _request_timeout: Union[
@@ -117,7 +117,7 @@ class APIKeysApi:
117
117
  _headers: Optional[Dict[StrictStr, Any]] = None,
118
118
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
119
119
  ) -> ApiResponse[object]:
120
- """Post Api Key
120
+ """Post Exchange Key
121
121
 
122
122
 
123
123
  :param api_key_model: (required)
@@ -144,7 +144,7 @@ class APIKeysApi:
144
144
  :return: Returns the result object.
145
145
  """ # noqa: E501
146
146
 
147
- _param = self._create_api_key_serialize(
147
+ _param = self._create_exchange_key_serialize(
148
148
  api_key_model=api_key_model,
149
149
  _request_auth=_request_auth,
150
150
  _content_type=_content_type,
@@ -166,7 +166,7 @@ class APIKeysApi:
166
166
  )
167
167
 
168
168
  @validate_call
169
- async def create_api_key_without_preload_content(
169
+ async def create_exchange_key_without_preload_content(
170
170
  self,
171
171
  api_key_model: APIKeyModel,
172
172
  _request_timeout: Union[
@@ -181,7 +181,7 @@ class APIKeysApi:
181
181
  _headers: Optional[Dict[StrictStr, Any]] = None,
182
182
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
183
183
  ) -> RESTResponseType:
184
- """Post Api Key
184
+ """Post Exchange Key
185
185
 
186
186
 
187
187
  :param api_key_model: (required)
@@ -208,7 +208,7 @@ class APIKeysApi:
208
208
  :return: Returns the result object.
209
209
  """ # noqa: E501
210
210
 
211
- _param = self._create_api_key_serialize(
211
+ _param = self._create_exchange_key_serialize(
212
212
  api_key_model=api_key_model,
213
213
  _request_auth=_request_auth,
214
214
  _content_type=_content_type,
@@ -225,7 +225,7 @@ class APIKeysApi:
225
225
  )
226
226
  return response_data.response
227
227
 
228
- def _create_api_key_serialize(
228
+ def _create_exchange_key_serialize(
229
229
  self,
230
230
  api_key_model,
231
231
  _request_auth,
@@ -290,7 +290,7 @@ class APIKeysApi:
290
290
  )
291
291
 
292
292
  @validate_call
293
- async def delete_api_key(
293
+ async def delete_exchange_key(
294
294
  self,
295
295
  id: StrictStr,
296
296
  _request_timeout: Union[
@@ -305,7 +305,7 @@ class APIKeysApi:
305
305
  _headers: Optional[Dict[StrictStr, Any]] = None,
306
306
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
307
307
  ) -> object:
308
- """Delete Api Key
308
+ """Delete Exchange Key
309
309
 
310
310
 
311
311
  :param id: (required)
@@ -332,7 +332,7 @@ class APIKeysApi:
332
332
  :return: Returns the result object.
333
333
  """ # noqa: E501
334
334
 
335
- _param = self._delete_api_key_serialize(
335
+ _param = self._delete_exchange_key_serialize(
336
336
  id=id,
337
337
  _request_auth=_request_auth,
338
338
  _content_type=_content_type,
@@ -354,7 +354,7 @@ class APIKeysApi:
354
354
  ).data
355
355
 
356
356
  @validate_call
357
- async def delete_api_key_with_http_info(
357
+ async def delete_exchange_key_with_http_info(
358
358
  self,
359
359
  id: StrictStr,
360
360
  _request_timeout: Union[
@@ -369,7 +369,7 @@ class APIKeysApi:
369
369
  _headers: Optional[Dict[StrictStr, Any]] = None,
370
370
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
371
371
  ) -> ApiResponse[object]:
372
- """Delete Api Key
372
+ """Delete Exchange Key
373
373
 
374
374
 
375
375
  :param id: (required)
@@ -396,7 +396,7 @@ class APIKeysApi:
396
396
  :return: Returns the result object.
397
397
  """ # noqa: E501
398
398
 
399
- _param = self._delete_api_key_serialize(
399
+ _param = self._delete_exchange_key_serialize(
400
400
  id=id,
401
401
  _request_auth=_request_auth,
402
402
  _content_type=_content_type,
@@ -418,7 +418,7 @@ class APIKeysApi:
418
418
  )
419
419
 
420
420
  @validate_call
421
- async def delete_api_key_without_preload_content(
421
+ async def delete_exchange_key_without_preload_content(
422
422
  self,
423
423
  id: StrictStr,
424
424
  _request_timeout: Union[
@@ -433,7 +433,7 @@ class APIKeysApi:
433
433
  _headers: Optional[Dict[StrictStr, Any]] = None,
434
434
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
435
435
  ) -> RESTResponseType:
436
- """Delete Api Key
436
+ """Delete Exchange Key
437
437
 
438
438
 
439
439
  :param id: (required)
@@ -460,7 +460,7 @@ class APIKeysApi:
460
460
  :return: Returns the result object.
461
461
  """ # noqa: E501
462
462
 
463
- _param = self._delete_api_key_serialize(
463
+ _param = self._delete_exchange_key_serialize(
464
464
  id=id,
465
465
  _request_auth=_request_auth,
466
466
  _content_type=_content_type,
@@ -477,7 +477,7 @@ class APIKeysApi:
477
477
  )
478
478
  return response_data.response
479
479
 
480
- def _delete_api_key_serialize(
480
+ def _delete_exchange_key_serialize(
481
481
  self,
482
482
  id,
483
483
  _request_auth,
@@ -532,7 +532,7 @@ class APIKeysApi:
532
532
  )
533
533
 
534
534
  @validate_call
535
- async def get_api_key_by_id(
535
+ async def get_exchange_key_by_id(
536
536
  self,
537
537
  id: StrictStr,
538
538
  _request_timeout: Union[
@@ -547,7 +547,7 @@ class APIKeysApi:
547
547
  _headers: Optional[Dict[StrictStr, Any]] = None,
548
548
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
549
549
  ) -> APIKeyModel:
550
- """Get Api Key By Id
550
+ """Get Exchange Key By Id
551
551
 
552
552
 
553
553
  :param id: (required)
@@ -574,7 +574,7 @@ class APIKeysApi:
574
574
  :return: Returns the result object.
575
575
  """ # noqa: E501
576
576
 
577
- _param = self._get_api_key_by_id_serialize(
577
+ _param = self._get_exchange_key_by_id_serialize(
578
578
  id=id,
579
579
  _request_auth=_request_auth,
580
580
  _content_type=_content_type,
@@ -596,7 +596,7 @@ class APIKeysApi:
596
596
  ).data
597
597
 
598
598
  @validate_call
599
- async def get_api_key_by_id_with_http_info(
599
+ async def get_exchange_key_by_id_with_http_info(
600
600
  self,
601
601
  id: StrictStr,
602
602
  _request_timeout: Union[
@@ -611,7 +611,7 @@ class APIKeysApi:
611
611
  _headers: Optional[Dict[StrictStr, Any]] = None,
612
612
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
613
613
  ) -> ApiResponse[APIKeyModel]:
614
- """Get Api Key By Id
614
+ """Get Exchange Key By Id
615
615
 
616
616
 
617
617
  :param id: (required)
@@ -638,7 +638,7 @@ class APIKeysApi:
638
638
  :return: Returns the result object.
639
639
  """ # noqa: E501
640
640
 
641
- _param = self._get_api_key_by_id_serialize(
641
+ _param = self._get_exchange_key_by_id_serialize(
642
642
  id=id,
643
643
  _request_auth=_request_auth,
644
644
  _content_type=_content_type,
@@ -660,7 +660,7 @@ class APIKeysApi:
660
660
  )
661
661
 
662
662
  @validate_call
663
- async def get_api_key_by_id_without_preload_content(
663
+ async def get_exchange_key_by_id_without_preload_content(
664
664
  self,
665
665
  id: StrictStr,
666
666
  _request_timeout: Union[
@@ -675,7 +675,7 @@ class APIKeysApi:
675
675
  _headers: Optional[Dict[StrictStr, Any]] = None,
676
676
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
677
677
  ) -> RESTResponseType:
678
- """Get Api Key By Id
678
+ """Get Exchange Key By Id
679
679
 
680
680
 
681
681
  :param id: (required)
@@ -702,7 +702,7 @@ class APIKeysApi:
702
702
  :return: Returns the result object.
703
703
  """ # noqa: E501
704
704
 
705
- _param = self._get_api_key_by_id_serialize(
705
+ _param = self._get_exchange_key_by_id_serialize(
706
706
  id=id,
707
707
  _request_auth=_request_auth,
708
708
  _content_type=_content_type,
@@ -719,7 +719,7 @@ class APIKeysApi:
719
719
  )
720
720
  return response_data.response
721
721
 
722
- def _get_api_key_by_id_serialize(
722
+ def _get_exchange_key_by_id_serialize(
723
723
  self,
724
724
  id,
725
725
  _request_auth,
@@ -774,7 +774,7 @@ class APIKeysApi:
774
774
  )
775
775
 
776
776
  @validate_call
777
- async def get_api_keys(
777
+ async def get_exchange_keys(
778
778
  self,
779
779
  limit: Optional[StrictInt] = None,
780
780
  offset: Optional[StrictInt] = None,
@@ -790,7 +790,7 @@ class APIKeysApi:
790
790
  _headers: Optional[Dict[StrictStr, Any]] = None,
791
791
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
792
792
  ) -> List[APIKeyModel]:
793
- """Get Api Keys
793
+ """Get Exchange Keys
794
794
 
795
795
 
796
796
  :param limit:
@@ -819,7 +819,7 @@ class APIKeysApi:
819
819
  :return: Returns the result object.
820
820
  """ # noqa: E501
821
821
 
822
- _param = self._get_api_keys_serialize(
822
+ _param = self._get_exchange_keys_serialize(
823
823
  limit=limit,
824
824
  offset=offset,
825
825
  _request_auth=_request_auth,
@@ -842,7 +842,7 @@ class APIKeysApi:
842
842
  ).data
843
843
 
844
844
  @validate_call
845
- async def get_api_keys_with_http_info(
845
+ async def get_exchange_keys_with_http_info(
846
846
  self,
847
847
  limit: Optional[StrictInt] = None,
848
848
  offset: Optional[StrictInt] = None,
@@ -858,7 +858,7 @@ class APIKeysApi:
858
858
  _headers: Optional[Dict[StrictStr, Any]] = None,
859
859
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
860
860
  ) -> ApiResponse[List[APIKeyModel]]:
861
- """Get Api Keys
861
+ """Get Exchange Keys
862
862
 
863
863
 
864
864
  :param limit:
@@ -887,7 +887,7 @@ class APIKeysApi:
887
887
  :return: Returns the result object.
888
888
  """ # noqa: E501
889
889
 
890
- _param = self._get_api_keys_serialize(
890
+ _param = self._get_exchange_keys_serialize(
891
891
  limit=limit,
892
892
  offset=offset,
893
893
  _request_auth=_request_auth,
@@ -910,7 +910,7 @@ class APIKeysApi:
910
910
  )
911
911
 
912
912
  @validate_call
913
- async def get_api_keys_without_preload_content(
913
+ async def get_exchange_keys_without_preload_content(
914
914
  self,
915
915
  limit: Optional[StrictInt] = None,
916
916
  offset: Optional[StrictInt] = None,
@@ -926,7 +926,7 @@ class APIKeysApi:
926
926
  _headers: Optional[Dict[StrictStr, Any]] = None,
927
927
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
928
928
  ) -> RESTResponseType:
929
- """Get Api Keys
929
+ """Get Exchange Keys
930
930
 
931
931
 
932
932
  :param limit:
@@ -955,7 +955,7 @@ class APIKeysApi:
955
955
  :return: Returns the result object.
956
956
  """ # noqa: E501
957
957
 
958
- _param = self._get_api_keys_serialize(
958
+ _param = self._get_exchange_keys_serialize(
959
959
  limit=limit,
960
960
  offset=offset,
961
961
  _request_auth=_request_auth,
@@ -973,7 +973,7 @@ class APIKeysApi:
973
973
  )
974
974
  return response_data.response
975
975
 
976
- def _get_api_keys_serialize(
976
+ def _get_exchange_keys_serialize(
977
977
  self,
978
978
  limit,
979
979
  offset,
@@ -1035,7 +1035,7 @@ class APIKeysApi:
1035
1035
  )
1036
1036
 
1037
1037
  @validate_call
1038
- async def update_api_key(
1038
+ async def update_exchange_key(
1039
1039
  self,
1040
1040
  id: StrictStr,
1041
1041
  api_key_model: APIKeyModel,
@@ -1051,7 +1051,7 @@ class APIKeysApi:
1051
1051
  _headers: Optional[Dict[StrictStr, Any]] = None,
1052
1052
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1053
1053
  ) -> object:
1054
- """Put Api Key
1054
+ """Put Exchange Key
1055
1055
 
1056
1056
 
1057
1057
  :param id: (required)
@@ -1080,7 +1080,7 @@ class APIKeysApi:
1080
1080
  :return: Returns the result object.
1081
1081
  """ # noqa: E501
1082
1082
 
1083
- _param = self._update_api_key_serialize(
1083
+ _param = self._update_exchange_key_serialize(
1084
1084
  id=id,
1085
1085
  api_key_model=api_key_model,
1086
1086
  _request_auth=_request_auth,
@@ -1103,7 +1103,7 @@ class APIKeysApi:
1103
1103
  ).data
1104
1104
 
1105
1105
  @validate_call
1106
- async def update_api_key_with_http_info(
1106
+ async def update_exchange_key_with_http_info(
1107
1107
  self,
1108
1108
  id: StrictStr,
1109
1109
  api_key_model: APIKeyModel,
@@ -1119,7 +1119,7 @@ class APIKeysApi:
1119
1119
  _headers: Optional[Dict[StrictStr, Any]] = None,
1120
1120
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1121
1121
  ) -> ApiResponse[object]:
1122
- """Put Api Key
1122
+ """Put Exchange Key
1123
1123
 
1124
1124
 
1125
1125
  :param id: (required)
@@ -1148,7 +1148,7 @@ class APIKeysApi:
1148
1148
  :return: Returns the result object.
1149
1149
  """ # noqa: E501
1150
1150
 
1151
- _param = self._update_api_key_serialize(
1151
+ _param = self._update_exchange_key_serialize(
1152
1152
  id=id,
1153
1153
  api_key_model=api_key_model,
1154
1154
  _request_auth=_request_auth,
@@ -1171,7 +1171,7 @@ class APIKeysApi:
1171
1171
  )
1172
1172
 
1173
1173
  @validate_call
1174
- async def update_api_key_without_preload_content(
1174
+ async def update_exchange_key_without_preload_content(
1175
1175
  self,
1176
1176
  id: StrictStr,
1177
1177
  api_key_model: APIKeyModel,
@@ -1187,7 +1187,7 @@ class APIKeysApi:
1187
1187
  _headers: Optional[Dict[StrictStr, Any]] = None,
1188
1188
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1189
1189
  ) -> RESTResponseType:
1190
- """Put Api Key
1190
+ """Put Exchange Key
1191
1191
 
1192
1192
 
1193
1193
  :param id: (required)
@@ -1216,7 +1216,7 @@ class APIKeysApi:
1216
1216
  :return: Returns the result object.
1217
1217
  """ # noqa: E501
1218
1218
 
1219
- _param = self._update_api_key_serialize(
1219
+ _param = self._update_exchange_key_serialize(
1220
1220
  id=id,
1221
1221
  api_key_model=api_key_model,
1222
1222
  _request_auth=_request_auth,
@@ -1234,7 +1234,7 @@ class APIKeysApi:
1234
1234
  )
1235
1235
  return response_data.response
1236
1236
 
1237
- def _update_api_key_serialize(
1237
+ def _update_exchange_key_serialize(
1238
1238
  self,
1239
1239
  id,
1240
1240
  api_key_model,
@@ -90,7 +90,7 @@ class BotsApi:
90
90
  )
91
91
 
92
92
  _response_types_map: Dict[str, Optional[str]] = {
93
- "200": "object",
93
+ "201": "object",
94
94
  "422": "HTTPValidationError",
95
95
  }
96
96
  response_data = await self.api_client.call_api(
@@ -155,7 +155,7 @@ class BotsApi:
155
155
  )
156
156
 
157
157
  _response_types_map: Dict[str, Optional[str]] = {
158
- "200": "object",
158
+ "201": "object",
159
159
  "422": "HTTPValidationError",
160
160
  }
161
161
  response_data = await self.api_client.call_api(
@@ -220,7 +220,7 @@ class BotsApi:
220
220
  )
221
221
 
222
222
  _response_types_map: Dict[str, Optional[str]] = {
223
- "200": "object",
223
+ "201": "object",
224
224
  "422": "HTTPValidationError",
225
225
  }
226
226
  response_data = await self.api_client.call_api(
@@ -1031,7 +1031,7 @@ class FuturesTradingPanelApi:
1031
1031
  async def place_futures_order(
1032
1032
  self,
1033
1033
  key: StrictStr,
1034
- body: Dict[str, Any],
1034
+ request_body: Dict[str, Any],
1035
1035
  _request_timeout: Union[
1036
1036
  None,
1037
1037
  Annotated[StrictFloat, Field(gt=0)],
@@ -1049,8 +1049,8 @@ class FuturesTradingPanelApi:
1049
1049
 
1050
1050
  :param key: (required)
1051
1051
  :type key: str
1052
- :param body: (required)
1053
- :type body: object
1052
+ :param request_body: (required)
1053
+ :type request_body: Dict[str, object]
1054
1054
  :param _request_timeout: timeout setting for this request. If one
1055
1055
  number provided, it will be total request
1056
1056
  timeout. It can also be a pair (tuple) of
@@ -1075,7 +1075,7 @@ class FuturesTradingPanelApi:
1075
1075
 
1076
1076
  _param = self._place_futures_order_serialize(
1077
1077
  key=key,
1078
- body=body,
1078
+ request_body=request_body,
1079
1079
  _request_auth=_request_auth,
1080
1080
  _content_type=_content_type,
1081
1081
  _headers=_headers,
@@ -1099,7 +1099,7 @@ class FuturesTradingPanelApi:
1099
1099
  async def place_futures_order_with_http_info(
1100
1100
  self,
1101
1101
  key: StrictStr,
1102
- body: Dict[str, Any],
1102
+ request_body: Dict[str, Any],
1103
1103
  _request_timeout: Union[
1104
1104
  None,
1105
1105
  Annotated[StrictFloat, Field(gt=0)],
@@ -1117,8 +1117,8 @@ class FuturesTradingPanelApi:
1117
1117
 
1118
1118
  :param key: (required)
1119
1119
  :type key: str
1120
- :param body: (required)
1121
- :type body: object
1120
+ :param request_body: (required)
1121
+ :type request_body: Dict[str, object]
1122
1122
  :param _request_timeout: timeout setting for this request. If one
1123
1123
  number provided, it will be total request
1124
1124
  timeout. It can also be a pair (tuple) of
@@ -1143,7 +1143,7 @@ class FuturesTradingPanelApi:
1143
1143
 
1144
1144
  _param = self._place_futures_order_serialize(
1145
1145
  key=key,
1146
- body=body,
1146
+ request_body=request_body,
1147
1147
  _request_auth=_request_auth,
1148
1148
  _content_type=_content_type,
1149
1149
  _headers=_headers,
@@ -1167,7 +1167,7 @@ class FuturesTradingPanelApi:
1167
1167
  async def place_futures_order_without_preload_content(
1168
1168
  self,
1169
1169
  key: StrictStr,
1170
- body: Dict[str, Any],
1170
+ request_body: Dict[str, Any],
1171
1171
  _request_timeout: Union[
1172
1172
  None,
1173
1173
  Annotated[StrictFloat, Field(gt=0)],
@@ -1185,8 +1185,8 @@ class FuturesTradingPanelApi:
1185
1185
 
1186
1186
  :param key: (required)
1187
1187
  :type key: str
1188
- :param body: (required)
1189
- :type body: object
1188
+ :param request_body: (required)
1189
+ :type request_body: Dict[str, object]
1190
1190
  :param _request_timeout: timeout setting for this request. If one
1191
1191
  number provided, it will be total request
1192
1192
  timeout. It can also be a pair (tuple) of
@@ -1211,7 +1211,7 @@ class FuturesTradingPanelApi:
1211
1211
 
1212
1212
  _param = self._place_futures_order_serialize(
1213
1213
  key=key,
1214
- body=body,
1214
+ request_body=request_body,
1215
1215
  _request_auth=_request_auth,
1216
1216
  _content_type=_content_type,
1217
1217
  _headers=_headers,
@@ -1230,7 +1230,7 @@ class FuturesTradingPanelApi:
1230
1230
  def _place_futures_order_serialize(
1231
1231
  self,
1232
1232
  key,
1233
- body,
1233
+ request_body,
1234
1234
  _request_auth,
1235
1235
  _content_type,
1236
1236
  _headers,
@@ -1259,8 +1259,8 @@ class FuturesTradingPanelApi:
1259
1259
  # process the header parameters
1260
1260
  # process the form parameters
1261
1261
  # process the body parameter
1262
- if body is not None:
1263
- _body_params = body
1262
+ if request_body is not None:
1263
+ _body_params = request_body
1264
1264
 
1265
1265
  # set the HTTP header `Accept`
1266
1266
  if "Accept" not in _header_params:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Summary: Maximise Your Crypto Trading Profits with AI Predictions
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
6
  Project-URL: Homepage, https://crypticorn.com
@@ -20,11 +20,11 @@ crypticorn/auth/client/models/add_wallet200_response.py,sha256=ibNUhAku-i2Bglo6i
20
20
  crypticorn/auth/client/models/add_wallet_request.py,sha256=w86tiy1vtlymB7ET0opmENQiEKAGAEjXTC-w4T3LHT4,3204
21
21
  crypticorn/auth/client/models/authorize_user200_response.py,sha256=tkhq7TaQK4li03HKXzrH0GzXa-GIkDVJTUKZ-Qp0USE,3381
22
22
  crypticorn/auth/client/models/authorize_user200_response_auth.py,sha256=h1PFbqzF96ssj7t7dMMKiNtRjRu44kPNUydevJm8vKo,3228
23
- crypticorn/auth/client/models/authorize_user_request.py,sha256=VZKmGc91nIhWwoKNTbYZ4oFPYuFNcLxEBvWl-HcM0r8,2981
23
+ crypticorn/auth/client/models/authorize_user_request.py,sha256=NZRa3ghNEsdt5IpqICCIXm7cn0-iptk_g4ljJ2FavmY,3225
24
24
  crypticorn/auth/client/models/create_api_key200_response.py,sha256=dj6G4vqSTDoUY3jT3_RbUxsLdg_2W-BvfYfwP9O9RJE,2479
25
- crypticorn/auth/client/models/create_api_key_request.py,sha256=UHRtVGudMK0h-ePJ_whlwqO0W6UVTQqNSeCBjo1A6wQ,4707
25
+ crypticorn/auth/client/models/create_api_key_request.py,sha256=5cv8KY_6mFBD6rURBr5V5UTxLzMP56MNCygoM-hdeb8,5091
26
26
  crypticorn/auth/client/models/create_user_request.py,sha256=kqVBJatlPtoYC1-nZnP2Mx2qZP2ATXffod7hTdWtoCY,3501
27
- crypticorn/auth/client/models/get_api_keys200_response_inner.py,sha256=YH7vEVQBgnrMV4EgD6WdkTJhC3h3l-Z-dNN2DJOSP5c,4845
27
+ crypticorn/auth/client/models/get_api_keys200_response_inner.py,sha256=IdTjwSgv5wpQWXb3POk3p4ogT5YP4O8-W6lSLZQYMDY,5479
28
28
  crypticorn/auth/client/models/list_wallets200_response.py,sha256=OB8nKlBflpj8dXhjTeTewxjSRok3LnllZZ5ZKISDRvE,4752
29
29
  crypticorn/auth/client/models/list_wallets200_response_balances_inner.py,sha256=sLebeWVenEeiHpiCgxQR8iCMlAgjtC6K8CKq6v9g-Ok,4043
30
30
  crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py,sha256=rqXN7WVEhmeJxDKCSK5sxwWXvmn-Gnf810MGWwIUXII,3623
@@ -37,7 +37,7 @@ crypticorn/auth/client/models/logout_default_response_issues_inner.py,sha256=_aO
37
37
  crypticorn/auth/client/models/oauth_callback200_response.py,sha256=E7NaQVrrlPtkkaFHG-QNJCQWQzFGXfpjotd2sVZ-gE4,3436
38
38
  crypticorn/auth/client/models/oauth_callback200_response_user.py,sha256=ABTvVFLHPR8jMOOHJDvy4_fIVLKuL753ImHLifNQzVg,3018
39
39
  crypticorn/auth/client/models/refresh_token_info200_response.py,sha256=YZITc7MeCrKIVewQxtwOv9xcr26fFhwhnl6o59Ry024,3082
40
- crypticorn/auth/client/models/refresh_token_info200_response_user_session.py,sha256=QUz7M-lgSDdvLg2RqFYJkTEJuZtvKlD1CB5BfXo4kFo,3101
40
+ crypticorn/auth/client/models/refresh_token_info200_response_user_session.py,sha256=t7DeYgD07I-wCtitoxeugKuRxlYCfUJQZTrLc0zqjbo,3470
41
41
  crypticorn/auth/client/models/resend_verification_email_request.py,sha256=Gx5OONaDxeXaXU7Q30NLMIAvX1XkzmdqbuC6EPlxumk,2546
42
42
  crypticorn/auth/client/models/revoke_user_tokens_request.py,sha256=Jrjg7q8HsGXzCWUNpw0N9ZelFBlX2g9VxyFywxl46EY,2479
43
43
  crypticorn/auth/client/models/rotate_tokens200_response.py,sha256=EL1ML7dqVcdGf1e7LVwM7eZRuJQHF_sP-OUqFO53K1g,3554
@@ -46,20 +46,20 @@ crypticorn/auth/client/models/unlink_wallet_request.py,sha256=n-SBkqofbSISLqutjg
46
46
  crypticorn/auth/client/models/update_user_request.py,sha256=A4BuxRHXPWV4lBNq6x9Qsd2ChCCzvhhkc3XnRr26a_I,2748
47
47
  crypticorn/auth/client/models/user_reset_password_request.py,sha256=LUMfM1qbGDeBSeS90AZ24IGYsWfsxQFhLYWnf2AKMEU,2658
48
48
  crypticorn/auth/client/models/user_set_password_request.py,sha256=AHV9dlveY9dRI4ymj8CixfMYiMRPCb1uUXCichTHbmQ,2660
49
- crypticorn/auth/client/models/verify200_response.py,sha256=Hfa1BkQoNfgYxy0r849IGOJiOv-Re95Blfjp99yKmP4,3245
49
+ crypticorn/auth/client/models/verify200_response.py,sha256=hy0CY5rNRzD53OQtnunxixZ3FCS9koMBdxhUMC6RaoU,3625
50
50
  crypticorn/auth/client/models/verify_email200_response.py,sha256=xyt3WdW0u3FosgtUc0MgifJy2t4pgak3-J1LwUjMGek,3365
51
51
  crypticorn/auth/client/models/verify_email200_response_auth.py,sha256=W-0qvqI7BMEbjQh92cj4ccD-_6oe0apD9-kG-TxUquM,3247
52
- crypticorn/auth/client/models/verify_email200_response_auth_auth.py,sha256=bc819T0UqSCxb7-Hgtkme8W4TgUzHuhGdc9lOFX0pP0,3297
52
+ crypticorn/auth/client/models/verify_email200_response_auth_auth.py,sha256=zc1tcYrg9wXaDR1f2Kq3ZDVw-0xzi57o8t_jlFpakm4,3677
53
53
  crypticorn/auth/client/models/verify_email_request.py,sha256=8MBfxPTLn5X6Z3vE2blxmOtqDhU9tu7O7AyaxkHBG6w,2464
54
54
  crypticorn/auth/client/models/verify_wallet_request.py,sha256=b0DAocvhKzPXPjM62DZqezlHxq3cNL7UVKl0d2judHQ,2691
55
55
  crypticorn/auth/client/models/wallet_verified200_response.py,sha256=QILnTLsCKdI-WdV_fsLBy1UH4ZZU-U-wWJ9ot8v08tI,2465
56
56
  crypticorn/auth/client/models/whoami200_response.py,sha256=uehdq5epgeOphhrIR3tbrseflxcLAzGyKF-VW-o5cY8,2974
57
57
  crypticorn/common/__init__.py,sha256=HToYJl9T76lzj_EkPUis5KUuwqWJOgsk18umHG7VYcY,193
58
58
  crypticorn/common/auth.py,sha256=5aVNsl39ngsoFaR5xGuWERRccq4HibYbSp61Z4QOVew,7483
59
- crypticorn/common/errors.py,sha256=Yd3zLtrqCe0NvjfqxIHohT48T4yfSi-V4s_WyYAi8t4,12614
60
- crypticorn/common/pydantic.py,sha256=CGJViUfHLIf5GIq1fL4MOVkAEfFpLx1SRw_m8fbQm1Y,975
61
- crypticorn/common/scopes.py,sha256=-dkEjY2AVAjdub4zLMy6IFltzii_Ll0NBaSWtI7w4BU,1419
62
- crypticorn/common/sorter.py,sha256=DPkQmxDeuti4onCiE8IJZUkTc5WZp1j4dIIc7wN9En0,1167
59
+ crypticorn/common/errors.py,sha256=HZvd4J2HAN7TvqlZxWtp29XV0wbkacWNZzgdVO-YWpw,14197
60
+ crypticorn/common/pydantic.py,sha256=pmnGYCIrLv59wZkDbvPyK9NJmgPJWW74LXTdIWSjOkY,1063
61
+ crypticorn/common/scopes.py,sha256=ghFa7aa7c91zo-BQWSc130EiBnAugO8ewBAJOKlbyCI,1489
62
+ crypticorn/common/sorter.py,sha256=Lx7hZMzsqrx2nqWOO0sFrSXSK1t2CqQJux70xU49Bz0,1282
63
63
  crypticorn/common/urls.py,sha256=X557WaODUqW2dECi-mOjTbmhkSpnp40fPXDdvlnBXfo,805
64
64
  crypticorn/hive/__init__.py,sha256=hRfTlEzEql4msytdUC_04vfaHzVKG5CGZle1M-9QFgY,81
65
65
  crypticorn/hive/main.py,sha256=U4wurkxnKai2i7iiq049ah9nVzBxmexRxBdFIWfd9qE,631
@@ -227,10 +227,10 @@ crypticorn/trade/client/exceptions.py,sha256=xSXlQpvCm5JkPI_N49jdTm72mSHMLOIDQ3g
227
227
  crypticorn/trade/client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
228
  crypticorn/trade/client/rest.py,sha256=o2sJyURJxO3XckjU_VuASM5AN0R5TsRcH1vtKCR97oI,6987
229
229
  crypticorn/trade/client/api/__init__.py,sha256=s6jcukWHyom8Bp9Vj0yrOL37-dNPNvdvMK_aXwpKZzc,668
230
- crypticorn/trade/client/api/api_keys_api.py,sha256=iATzCULeKgd1rE2Oe8w4vn2ZoSvGJx5KLpD2ZyTs0qY,50862
231
- crypticorn/trade/client/api/bots_api.py,sha256=WnrJK7zTGxJhaF6Blps3hXLUo03ud0aN-V3DjOsur20,41988
230
+ crypticorn/trade/client/api/api_keys_api.py,sha256=DYAPIg3Kpb3zyWV3gCPiqm4GC_2crHgsmh_3N9s2Fsc,51112
231
+ crypticorn/trade/client/api/bots_api.py,sha256=Ebd6741ucf4PGKZchmvxd0QFc_Nm4lj8wQeAbFuCvyg,41988
232
232
  crypticorn/trade/client/api/exchanges_api.py,sha256=PX8yeVZFDWxmsortW0HdphbNtYRYWaLv8nkE8VUmPgg,10166
233
- crypticorn/trade/client/api/futures_trading_panel_api.py,sha256=lD_sf4OFg4BGx5LE8sbwriHXRYKCe58b7ExJaoHKfRY,50404
233
+ crypticorn/trade/client/api/futures_trading_panel_api.py,sha256=xOxjCqg2o0exmQofO4l65LVFTOLHC8YBbVNzcyyBou0,50581
234
234
  crypticorn/trade/client/api/notifications_api.py,sha256=wTwrEj_GxjpxaZNCezKN6BRsI1cgWB3npcNstYZ912E,61442
235
235
  crypticorn/trade/client/api/orders_api.py,sha256=zibuEr3448IefONOEcgti06nxNtJCvi6WYRN7z8Z9mE,11217
236
236
  crypticorn/trade/client/api/status_api.py,sha256=deaW23XWpUMqhFzxO9GqT0MI8ZlAIC_f4ewdPLExBMw,9934
@@ -262,7 +262,7 @@ crypticorn/trade/client/models/tpsl.py,sha256=QGPhcgadjxAgyzpRSwlZJg_CDLnKxdZgse
262
262
  crypticorn/trade/client/models/trading_action_type.py,sha256=jW0OsNz_ZNXlITxAfh979BH5U12oTXSr6qUVcKcGHhw,847
263
263
  crypticorn/trade/client/models/validation_error.py,sha256=uTkvsKrOAt-21UC0YPqCdRl_OMsuu7uhPtWuwRSYvv0,3228
264
264
  crypticorn/trade/client/models/validation_error_loc_inner.py,sha256=22ql-H829xTBgfxNQZsqd8fS3zQt9tLW1pj0iobo0jY,5131
265
- crypticorn-2.2.2.dist-info/METADATA,sha256=C424uODL9Zkb9RApYhPqIRs-o3m7ToEhookZqgwwGyY,5393
266
- crypticorn-2.2.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
267
- crypticorn-2.2.2.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
268
- crypticorn-2.2.2.dist-info/RECORD,,
265
+ crypticorn-2.2.3.dist-info/METADATA,sha256=t6fcUvpBFdbA1CgCCOvNH6JAhyHBYuD8X_CQ2AS5_sg,5393
266
+ crypticorn-2.2.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
267
+ crypticorn-2.2.3.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
268
+ crypticorn-2.2.3.dist-info/RECORD,,