crypticorn 2.12.0__py3-none-any.whl → 2.12.1__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.
@@ -33,6 +33,7 @@ class ApiErrorIdentifier(StrEnum):
33
33
  BOT_DISABLED = "bot_disabled"
34
34
  BOT_STOPPING_COMPLETED = "bot_stopping_completed"
35
35
  BOT_STOPPING_STARTED = "bot_stopping_started"
36
+ CANCELLED_OPEN_ORDER = "cancelled_open_order"
36
37
  CLIENT_ORDER_ID_REPEATED = "client_order_id_already_exists"
37
38
  CONTENT_TYPE_ERROR = "invalid_content_type"
38
39
  DELETE_BOT_ERROR = "delete_bot_error"
@@ -51,6 +52,7 @@ class ApiErrorIdentifier(StrEnum):
51
52
  EXCHANGE_USER_FROZEN = "exchange_user_account_is_frozen"
52
53
  EXPIRED_API_KEY = "api_key_expired"
53
54
  EXPIRED_BEARER = "bearer_token_expired"
55
+ FAILED_OPEN_ORDER = "open_order_expired"
54
56
  FORBIDDEN = "forbidden"
55
57
  HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
56
58
  HTTP_ERROR = "http_request_error"
@@ -84,6 +86,8 @@ class ApiErrorIdentifier(StrEnum):
84
86
  ORDER_PRICE_INVALID = "order_price_is_invalid"
85
87
  ORDER_SIZE_TOO_LARGE = "order_size_too_large"
86
88
  ORDER_SIZE_TOO_SMALL = "order_size_too_small"
89
+ ORPHAN_OPEN_ORDER = "orphan_open_order"
90
+ ORPHAN_CLOSE_ORDER = "orphan_close_order"
87
91
  POSITION_LIMIT_EXCEEDED = "position_limit_exceeded"
88
92
  POSITION_NOT_FOUND = "position_does_not_exist"
89
93
  POSITION_SUSPENDED = "position_opening_temporarily_suspended"
@@ -99,7 +103,7 @@ class ApiErrorIdentifier(StrEnum):
99
103
  SUCCESS = "success"
100
104
  SYMBOL_NOT_FOUND = "symbol_does_not_exist"
101
105
  TRADING_ACTION_EXPIRED = "trading_action_expired"
102
- TRADING_ACTION_SKIPPED = "trading_action_skipped"
106
+ TRADING_ACTION_SKIPPED_BOT_STOPPING = "TRADING_ACTION_SKIPPED_BOT_STOPPING"
103
107
  TRADING_LOCKED = "trading_has_been_locked"
104
108
  TRADING_SUSPENDED = "trading_is_suspended"
105
109
  UNKNOWN_ERROR = "unknown_error_occurred"
@@ -158,6 +162,11 @@ class ApiError(Enum, metaclass=ApiErrorFallback):
158
162
  ApiErrorType.NO_ERROR,
159
163
  ApiErrorLevel.INFO,
160
164
  )
165
+ CANCELLED_OPEN_ORDER = (
166
+ ApiErrorIdentifier.CANCELLED_OPEN_ORDER,
167
+ ApiErrorType.NO_ERROR,
168
+ ApiErrorLevel.INFO,
169
+ )
161
170
  CLIENT_ORDER_ID_REPEATED = (
162
171
  ApiErrorIdentifier.CLIENT_ORDER_ID_REPEATED,
163
172
  ApiErrorType.SERVER_ERROR,
@@ -248,6 +257,11 @@ class ApiError(Enum, metaclass=ApiErrorFallback):
248
257
  ApiErrorType.USER_ERROR,
249
258
  ApiErrorLevel.ERROR,
250
259
  )
260
+ FAILED_OPEN_ORDER = (
261
+ ApiErrorIdentifier.FAILED_OPEN_ORDER,
262
+ ApiErrorType.NO_ERROR,
263
+ ApiErrorLevel.INFO,
264
+ )
251
265
  FORBIDDEN = (
252
266
  ApiErrorIdentifier.FORBIDDEN,
253
267
  ApiErrorType.USER_ERROR,
@@ -413,6 +427,16 @@ class ApiError(Enum, metaclass=ApiErrorFallback):
413
427
  ApiErrorType.USER_ERROR,
414
428
  ApiErrorLevel.WARNING,
415
429
  )
430
+ ORPHAN_OPEN_ORDER = (
431
+ ApiErrorIdentifier.ORPHAN_OPEN_ORDER,
432
+ ApiErrorType.SERVER_ERROR,
433
+ ApiErrorLevel.INFO,
434
+ )
435
+ ORPHAN_CLOSE_ORDER = (
436
+ ApiErrorIdentifier.ORPHAN_CLOSE_ORDER,
437
+ ApiErrorType.NO_ERROR,
438
+ ApiErrorLevel.INFO,
439
+ )
416
440
  POSITION_LIMIT_EXCEEDED = (
417
441
  ApiErrorIdentifier.POSITION_LIMIT_EXCEEDED,
418
442
  ApiErrorType.USER_ERROR,
@@ -484,8 +508,8 @@ class ApiError(Enum, metaclass=ApiErrorFallback):
484
508
  ApiErrorType.NO_ERROR,
485
509
  ApiErrorLevel.INFO,
486
510
  )
487
- TRADING_ACTION_SKIPPED = (
488
- ApiErrorIdentifier.TRADING_ACTION_SKIPPED,
511
+ TRADING_ACTION_SKIPPED_BOT_STOPPING = (
512
+ ApiErrorIdentifier.TRADING_ACTION_SKIPPED_BOT_STOPPING,
489
513
  ApiErrorType.NO_ERROR,
490
514
  ApiErrorLevel.INFO,
491
515
  )
@@ -797,6 +821,14 @@ class StatusCodeMapper:
797
821
  status.HTTP_400_BAD_REQUEST,
798
822
  status.WS_1008_POLICY_VIOLATION,
799
823
  ),
824
+ ApiError.ORPHAN_OPEN_ORDER: (
825
+ status.HTTP_400_BAD_REQUEST,
826
+ status.WS_1008_POLICY_VIOLATION,
827
+ ),
828
+ ApiError.ORPHAN_CLOSE_ORDER: (
829
+ status.HTTP_400_BAD_REQUEST,
830
+ status.WS_1008_POLICY_VIOLATION,
831
+ ),
800
832
  ApiError.POSITION_LIMIT_EXCEEDED: (
801
833
  status.HTTP_400_BAD_REQUEST,
802
834
  status.WS_1008_POLICY_VIOLATION,
@@ -825,7 +857,7 @@ class StatusCodeMapper:
825
857
  status.HTTP_400_BAD_REQUEST,
826
858
  status.WS_1008_POLICY_VIOLATION,
827
859
  ),
828
- ApiError.TRADING_ACTION_SKIPPED: (
860
+ ApiError.TRADING_ACTION_SKIPPED_BOT_STOPPING: (
829
861
  status.HTTP_400_BAD_REQUEST,
830
862
  status.WS_1008_POLICY_VIOLATION,
831
863
  ),
@@ -848,6 +880,14 @@ class StatusCodeMapper:
848
880
  status.HTTP_204_NO_CONTENT,
849
881
  status.WS_1000_NORMAL_CLOSURE,
850
882
  ),
883
+ ApiError.CANCELLED_OPEN_ORDER: (
884
+ status.HTTP_200_OK,
885
+ status.WS_1008_POLICY_VIOLATION,
886
+ ),
887
+ ApiError.FAILED_OPEN_ORDER: (
888
+ status.HTTP_200_OK,
889
+ status.WS_1008_POLICY_VIOLATION,
890
+ ),
851
891
  # Miscellaneous
852
892
  ApiError.OBJECT_LOCKED: (
853
893
  status.HTTP_423_LOCKED,
@@ -155,6 +155,7 @@ exception_response = {
155
155
  "default": {"model": ExceptionDetail, "description": "Error response"}
156
156
  }
157
157
 
158
+
158
159
  class CrypticornException(Exception):
159
160
  """A custom exception class for Crypticorn."""
160
161
 
@@ -163,4 +164,4 @@ class CrypticornException(Exception):
163
164
  self.error = error
164
165
 
165
166
  def __str__(self):
166
- return f"{self.error.identifier}: {self.message}"
167
+ return f"{self.error.identifier}: {self.message}"
@@ -16,8 +16,9 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
- from pydantic import StrictInt, StrictStr
19
+ from pydantic import Field, StrictBool, StrictInt, StrictStr
20
20
  from typing import List, Optional
21
+ from typing_extensions import Annotated
21
22
  from crypticorn.trade.client.models.exchange_key import ExchangeKey
22
23
  from crypticorn.trade.client.models.exchange_key_create import ExchangeKeyCreate
23
24
  from crypticorn.trade.client.models.exchange_key_update import ExchangeKeyUpdate
@@ -57,6 +58,7 @@ class APIKeysApi:
57
58
  ) -> ExchangeKey:
58
59
  """Post Exchange Key
59
60
 
61
+ Create a new exchange key.
60
62
 
61
63
  :param exchange_key_create: (required)
62
64
  :type exchange_key_create: ExchangeKeyCreate
@@ -120,6 +122,7 @@ class APIKeysApi:
120
122
  ) -> ApiResponse[ExchangeKey]:
121
123
  """Post Exchange Key
122
124
 
125
+ Create a new exchange key.
123
126
 
124
127
  :param exchange_key_create: (required)
125
128
  :type exchange_key_create: ExchangeKeyCreate
@@ -183,6 +186,7 @@ class APIKeysApi:
183
186
  ) -> RESTResponseType:
184
187
  """Post Exchange Key
185
188
 
189
+ Create a new exchange key.
186
190
 
187
191
  :param exchange_key_create: (required)
188
192
  :type exchange_key_create: ExchangeKeyCreate
@@ -291,7 +295,7 @@ class APIKeysApi:
291
295
  @validate_call
292
296
  async def delete_exchange_key(
293
297
  self,
294
- id: StrictStr,
298
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
295
299
  _request_timeout: Union[
296
300
  None,
297
301
  Annotated[StrictFloat, Field(gt=0)],
@@ -306,8 +310,9 @@ class APIKeysApi:
306
310
  ) -> None:
307
311
  """Delete Exchange Key
308
312
 
313
+ Delete an API key. This will set the deleted field to true.
309
314
 
310
- :param id: (required)
315
+ :param id: The ID of the API key to delete. (required)
311
316
  :type id: str
312
317
  :param _request_timeout: timeout setting for this request. If one
313
318
  number provided, it will be total request
@@ -354,7 +359,7 @@ class APIKeysApi:
354
359
  @validate_call
355
360
  async def delete_exchange_key_with_http_info(
356
361
  self,
357
- id: StrictStr,
362
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
358
363
  _request_timeout: Union[
359
364
  None,
360
365
  Annotated[StrictFloat, Field(gt=0)],
@@ -369,8 +374,9 @@ class APIKeysApi:
369
374
  ) -> ApiResponse[None]:
370
375
  """Delete Exchange Key
371
376
 
377
+ Delete an API key. This will set the deleted field to true.
372
378
 
373
- :param id: (required)
379
+ :param id: The ID of the API key to delete. (required)
374
380
  :type id: str
375
381
  :param _request_timeout: timeout setting for this request. If one
376
382
  number provided, it will be total request
@@ -417,7 +423,7 @@ class APIKeysApi:
417
423
  @validate_call
418
424
  async def delete_exchange_key_without_preload_content(
419
425
  self,
420
- id: StrictStr,
426
+ id: Annotated[StrictStr, Field(description="The ID of the API key to delete.")],
421
427
  _request_timeout: Union[
422
428
  None,
423
429
  Annotated[StrictFloat, Field(gt=0)],
@@ -432,8 +438,9 @@ class APIKeysApi:
432
438
  ) -> RESTResponseType:
433
439
  """Delete Exchange Key
434
440
 
441
+ Delete an API key. This will set the deleted field to true.
435
442
 
436
- :param id: (required)
443
+ :param id: The ID of the API key to delete. (required)
437
444
  :type id: str
438
445
  :param _request_timeout: timeout setting for this request. If one
439
446
  number provided, it will be total request
@@ -530,7 +537,7 @@ class APIKeysApi:
530
537
  @validate_call
531
538
  async def get_exchange_key_by_id(
532
539
  self,
533
- id: StrictStr,
540
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
534
541
  _request_timeout: Union[
535
542
  None,
536
543
  Annotated[StrictFloat, Field(gt=0)],
@@ -545,8 +552,9 @@ class APIKeysApi:
545
552
  ) -> ExchangeKey:
546
553
  """Get Exchange Key By Id
547
554
 
555
+ Get an exchange key by ID.
548
556
 
549
- :param id: (required)
557
+ :param id: The ID of the API key to get. (required)
550
558
  :type id: str
551
559
  :param _request_timeout: timeout setting for this request. If one
552
560
  number provided, it will be total request
@@ -593,7 +601,7 @@ class APIKeysApi:
593
601
  @validate_call
594
602
  async def get_exchange_key_by_id_with_http_info(
595
603
  self,
596
- id: StrictStr,
604
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
597
605
  _request_timeout: Union[
598
606
  None,
599
607
  Annotated[StrictFloat, Field(gt=0)],
@@ -608,8 +616,9 @@ class APIKeysApi:
608
616
  ) -> ApiResponse[ExchangeKey]:
609
617
  """Get Exchange Key By Id
610
618
 
619
+ Get an exchange key by ID.
611
620
 
612
- :param id: (required)
621
+ :param id: The ID of the API key to get. (required)
613
622
  :type id: str
614
623
  :param _request_timeout: timeout setting for this request. If one
615
624
  number provided, it will be total request
@@ -656,7 +665,7 @@ class APIKeysApi:
656
665
  @validate_call
657
666
  async def get_exchange_key_by_id_without_preload_content(
658
667
  self,
659
- id: StrictStr,
668
+ id: Annotated[StrictStr, Field(description="The ID of the API key to get.")],
660
669
  _request_timeout: Union[
661
670
  None,
662
671
  Annotated[StrictFloat, Field(gt=0)],
@@ -671,8 +680,9 @@ class APIKeysApi:
671
680
  ) -> RESTResponseType:
672
681
  """Get Exchange Key By Id
673
682
 
683
+ Get an exchange key by ID.
674
684
 
675
- :param id: (required)
685
+ :param id: The ID of the API key to get. (required)
676
686
  :type id: str
677
687
  :param _request_timeout: timeout setting for this request. If one
678
688
  number provided, it will be total request
@@ -771,6 +781,10 @@ class APIKeysApi:
771
781
  self,
772
782
  limit: Optional[StrictInt] = None,
773
783
  offset: Optional[StrictInt] = None,
784
+ include_deleted: Annotated[
785
+ Optional[StrictBool],
786
+ Field(description="Whether to include deleted API keys."),
787
+ ] = None,
774
788
  _request_timeout: Union[
775
789
  None,
776
790
  Annotated[StrictFloat, Field(gt=0)],
@@ -785,11 +799,14 @@ class APIKeysApi:
785
799
  ) -> List[ExchangeKey]:
786
800
  """Get Exchange Keys
787
801
 
802
+ Get all exchange keys. If include_deleted is true, all API keys will be returned, including deleted ones.
788
803
 
789
804
  :param limit:
790
805
  :type limit: int
791
806
  :param offset:
792
807
  :type offset: int
808
+ :param include_deleted: Whether to include deleted API keys.
809
+ :type include_deleted: bool
793
810
  :param _request_timeout: timeout setting for this request. If one
794
811
  number provided, it will be total request
795
812
  timeout. It can also be a pair (tuple) of
@@ -815,6 +832,7 @@ class APIKeysApi:
815
832
  _param = self._get_exchange_keys_serialize(
816
833
  limit=limit,
817
834
  offset=offset,
835
+ include_deleted=include_deleted,
818
836
  _request_auth=_request_auth,
819
837
  _content_type=_content_type,
820
838
  _headers=_headers,
@@ -838,6 +856,10 @@ class APIKeysApi:
838
856
  self,
839
857
  limit: Optional[StrictInt] = None,
840
858
  offset: Optional[StrictInt] = None,
859
+ include_deleted: Annotated[
860
+ Optional[StrictBool],
861
+ Field(description="Whether to include deleted API keys."),
862
+ ] = None,
841
863
  _request_timeout: Union[
842
864
  None,
843
865
  Annotated[StrictFloat, Field(gt=0)],
@@ -852,11 +874,14 @@ class APIKeysApi:
852
874
  ) -> ApiResponse[List[ExchangeKey]]:
853
875
  """Get Exchange Keys
854
876
 
877
+ Get all exchange keys. If include_deleted is true, all API keys will be returned, including deleted ones.
855
878
 
856
879
  :param limit:
857
880
  :type limit: int
858
881
  :param offset:
859
882
  :type offset: int
883
+ :param include_deleted: Whether to include deleted API keys.
884
+ :type include_deleted: bool
860
885
  :param _request_timeout: timeout setting for this request. If one
861
886
  number provided, it will be total request
862
887
  timeout. It can also be a pair (tuple) of
@@ -882,6 +907,7 @@ class APIKeysApi:
882
907
  _param = self._get_exchange_keys_serialize(
883
908
  limit=limit,
884
909
  offset=offset,
910
+ include_deleted=include_deleted,
885
911
  _request_auth=_request_auth,
886
912
  _content_type=_content_type,
887
913
  _headers=_headers,
@@ -905,6 +931,10 @@ class APIKeysApi:
905
931
  self,
906
932
  limit: Optional[StrictInt] = None,
907
933
  offset: Optional[StrictInt] = None,
934
+ include_deleted: Annotated[
935
+ Optional[StrictBool],
936
+ Field(description="Whether to include deleted API keys."),
937
+ ] = None,
908
938
  _request_timeout: Union[
909
939
  None,
910
940
  Annotated[StrictFloat, Field(gt=0)],
@@ -919,11 +949,14 @@ class APIKeysApi:
919
949
  ) -> RESTResponseType:
920
950
  """Get Exchange Keys
921
951
 
952
+ Get all exchange keys. If include_deleted is true, all API keys will be returned, including deleted ones.
922
953
 
923
954
  :param limit:
924
955
  :type limit: int
925
956
  :param offset:
926
957
  :type offset: int
958
+ :param include_deleted: Whether to include deleted API keys.
959
+ :type include_deleted: bool
927
960
  :param _request_timeout: timeout setting for this request. If one
928
961
  number provided, it will be total request
929
962
  timeout. It can also be a pair (tuple) of
@@ -949,6 +982,7 @@ class APIKeysApi:
949
982
  _param = self._get_exchange_keys_serialize(
950
983
  limit=limit,
951
984
  offset=offset,
985
+ include_deleted=include_deleted,
952
986
  _request_auth=_request_auth,
953
987
  _content_type=_content_type,
954
988
  _headers=_headers,
@@ -967,6 +1001,7 @@ class APIKeysApi:
967
1001
  self,
968
1002
  limit,
969
1003
  offset,
1004
+ include_deleted,
970
1005
  _request_auth,
971
1006
  _content_type,
972
1007
  _headers,
@@ -996,6 +1031,10 @@ class APIKeysApi:
996
1031
 
997
1032
  _query_params.append(("offset", offset))
998
1033
 
1034
+ if include_deleted is not None:
1035
+
1036
+ _query_params.append(("include_deleted", include_deleted))
1037
+
999
1038
  # process the header parameters
1000
1039
  # process the form parameters
1001
1040
  # process the body parameter
@@ -1027,7 +1066,7 @@ class APIKeysApi:
1027
1066
  @validate_call
1028
1067
  async def update_exchange_key(
1029
1068
  self,
1030
- id: StrictStr,
1069
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
1031
1070
  exchange_key_update: ExchangeKeyUpdate,
1032
1071
  _request_timeout: Union[
1033
1072
  None,
@@ -1043,8 +1082,9 @@ class APIKeysApi:
1043
1082
  ) -> ExchangeKey:
1044
1083
  """Put Exchange Key
1045
1084
 
1085
+ Update an exchange key.
1046
1086
 
1047
- :param id: (required)
1087
+ :param id: The ID of the API key to update. (required)
1048
1088
  :type id: str
1049
1089
  :param exchange_key_update: (required)
1050
1090
  :type exchange_key_update: ExchangeKeyUpdate
@@ -1094,7 +1134,7 @@ class APIKeysApi:
1094
1134
  @validate_call
1095
1135
  async def update_exchange_key_with_http_info(
1096
1136
  self,
1097
- id: StrictStr,
1137
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
1098
1138
  exchange_key_update: ExchangeKeyUpdate,
1099
1139
  _request_timeout: Union[
1100
1140
  None,
@@ -1110,8 +1150,9 @@ class APIKeysApi:
1110
1150
  ) -> ApiResponse[ExchangeKey]:
1111
1151
  """Put Exchange Key
1112
1152
 
1153
+ Update an exchange key.
1113
1154
 
1114
- :param id: (required)
1155
+ :param id: The ID of the API key to update. (required)
1115
1156
  :type id: str
1116
1157
  :param exchange_key_update: (required)
1117
1158
  :type exchange_key_update: ExchangeKeyUpdate
@@ -1161,7 +1202,7 @@ class APIKeysApi:
1161
1202
  @validate_call
1162
1203
  async def update_exchange_key_without_preload_content(
1163
1204
  self,
1164
- id: StrictStr,
1205
+ id: Annotated[StrictStr, Field(description="The ID of the API key to update.")],
1165
1206
  exchange_key_update: ExchangeKeyUpdate,
1166
1207
  _request_timeout: Union[
1167
1208
  None,
@@ -1177,8 +1218,9 @@ class APIKeysApi:
1177
1218
  ) -> RESTResponseType:
1178
1219
  """Put Exchange Key
1179
1220
 
1221
+ Update an exchange key.
1180
1222
 
1181
- :param id: (required)
1223
+ :param id: The ID of the API key to update. (required)
1182
1224
  :type id: str
1183
1225
  :param exchange_key_update: (required)
1184
1226
  :type exchange_key_update: ExchangeKeyUpdate
@@ -56,6 +56,7 @@ class OrdersApi:
56
56
  ) -> List[Order]:
57
57
  """Get Orders
58
58
 
59
+ Get all orders for a user
59
60
 
60
61
  :param limit:
61
62
  :type limit: int
@@ -123,6 +124,7 @@ class OrdersApi:
123
124
  ) -> ApiResponse[List[Order]]:
124
125
  """Get Orders
125
126
 
127
+ Get all orders for a user
126
128
 
127
129
  :param limit:
128
130
  :type limit: int
@@ -190,6 +192,7 @@ class OrdersApi:
190
192
  ) -> RESTResponseType:
191
193
  """Get Orders
192
194
 
195
+ Get all orders for a user
193
196
 
194
197
  :param limit:
195
198
  :type limit: int
@@ -74,7 +74,7 @@ class ApiErrorIdentifier(str, Enum):
74
74
  "order_violates_liquidation_price_constraints"
75
75
  )
76
76
  MARGIN_MODE_CLASH = "margin_mode_clash"
77
- MODEL_NAME_NOT_UNIQUE = "model_name_not_unique"
77
+ NAME_NOT_UNIQUE = "name_not_unique"
78
78
  NO_CREDENTIALS = "no_credentials"
79
79
  NOW_API_DOWN = "now_api_down"
80
80
  OBJECT_ALREADY_EXISTS = "object_already_exists"
@@ -32,15 +32,15 @@ class Bot(BaseModel):
32
32
  """ # noqa: E501
33
33
 
34
34
  user_id: StrictStr = Field(description="UID for the user")
35
- id: Optional[StrictStr] = Field(
36
- default=None, description="Unique identifier for the resource"
37
- )
38
35
  created_at: Optional[StrictInt] = Field(
39
36
  default=None, description="Timestamp of creation"
40
37
  )
41
38
  updated_at: Optional[StrictInt] = Field(
42
39
  default=None, description="Timestamp of last update"
43
40
  )
41
+ id: Optional[StrictStr] = Field(
42
+ default=None, description="Unique identifier for the resource"
43
+ )
44
44
  name: StrictStr = Field(description="Name of the bot")
45
45
  allocation: StrictInt = Field(description="Initial allocation for the bot")
46
46
  status: BotStatus = Field(description="Status of the bot")
@@ -69,9 +69,9 @@ class Bot(BaseModel):
69
69
  )
70
70
  __properties: ClassVar[List[str]] = [
71
71
  "user_id",
72
- "id",
73
72
  "created_at",
74
73
  "updated_at",
74
+ "id",
75
75
  "name",
76
76
  "allocation",
77
77
  "status",
@@ -138,9 +138,9 @@ class Bot(BaseModel):
138
138
  _obj = cls.model_validate(
139
139
  {
140
140
  "user_id": obj.get("user_id"),
141
- "id": obj.get("id"),
142
141
  "created_at": obj.get("created_at"),
143
142
  "updated_at": obj.get("updated_at"),
143
+ "id": obj.get("id"),
144
144
  "name": obj.get("name"),
145
145
  "allocation": obj.get("allocation"),
146
146
  "status": obj.get("status"),
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from crypticorn.trade.client.models.exchange import Exchange
23
23
  from typing import Optional, Set
@@ -30,23 +30,27 @@ class ExchangeKey(BaseModel):
30
30
  """ # noqa: E501
31
31
 
32
32
  user_id: StrictStr = Field(description="UID for the user")
33
- id: Optional[StrictStr] = Field(
34
- default=None, description="Unique identifier for the resource"
35
- )
36
33
  created_at: Optional[StrictInt] = Field(
37
34
  default=None, description="Timestamp of creation"
38
35
  )
39
36
  updated_at: Optional[StrictInt] = Field(
40
37
  default=None, description="Timestamp of last update"
41
38
  )
39
+ id: Optional[StrictStr] = Field(
40
+ default=None, description="Unique identifier for the resource"
41
+ )
42
42
  label: StrictStr = Field(description="Label for the API key")
43
+ deleted: Optional[StrictBool] = Field(
44
+ default=False, description="Whether the API key has been deleted."
45
+ )
43
46
  exchange: Exchange = Field(description="The exchange the API key is for.")
44
47
  __properties: ClassVar[List[str]] = [
45
48
  "user_id",
46
- "id",
47
49
  "created_at",
48
50
  "updated_at",
51
+ "id",
49
52
  "label",
53
+ "deleted",
50
54
  "exchange",
51
55
  ]
52
56
 
@@ -101,10 +105,13 @@ class ExchangeKey(BaseModel):
101
105
  _obj = cls.model_validate(
102
106
  {
103
107
  "user_id": obj.get("user_id"),
104
- "id": obj.get("id"),
105
108
  "created_at": obj.get("created_at"),
106
109
  "updated_at": obj.get("updated_at"),
110
+ "id": obj.get("id"),
107
111
  "label": obj.get("label"),
112
+ "deleted": (
113
+ obj.get("deleted") if obj.get("deleted") is not None else False
114
+ ),
108
115
  "exchange": obj.get("exchange"),
109
116
  }
110
117
  )
@@ -41,15 +41,15 @@ class FuturesTradingAction(BaseModel):
41
41
  Model for futures trading actions
42
42
  """ # noqa: E501
43
43
 
44
- id: Optional[StrictStr] = Field(
45
- default=None, description="Unique identifier for the resource"
46
- )
47
44
  created_at: Optional[StrictInt] = Field(
48
45
  default=None, description="Timestamp of creation"
49
46
  )
50
47
  updated_at: Optional[StrictInt] = Field(
51
48
  default=None, description="Timestamp of last update"
52
49
  )
50
+ id: Optional[StrictStr] = Field(
51
+ default=None, description="Unique identifier for the resource"
52
+ )
53
53
  execution_id: Optional[StrictStr] = None
54
54
  open_order_execution_id: Optional[StrictStr] = None
55
55
  action_type: TradingActionType = Field(description="The type of action.")
@@ -77,9 +77,9 @@ class FuturesTradingAction(BaseModel):
77
77
  leverage: Optional[Annotated[int, Field(strict=True, ge=1)]]
78
78
  margin_mode: Optional[MarginMode] = None
79
79
  __properties: ClassVar[List[str]] = [
80
- "id",
81
80
  "created_at",
82
81
  "updated_at",
82
+ "id",
83
83
  "execution_id",
84
84
  "open_order_execution_id",
85
85
  "action_type",
@@ -223,9 +223,9 @@ class FuturesTradingAction(BaseModel):
223
223
 
224
224
  _obj = cls.model_validate(
225
225
  {
226
- "id": obj.get("id"),
227
226
  "created_at": obj.get("created_at"),
228
227
  "updated_at": obj.get("updated_at"),
228
+ "id": obj.get("id"),
229
229
  "execution_id": obj.get("execution_id"),
230
230
  "open_order_execution_id": obj.get("open_order_execution_id"),
231
231
  "action_type": obj.get("action_type"),
@@ -32,15 +32,15 @@ class Notification(BaseModel):
32
32
  """ # noqa: E501
33
33
 
34
34
  user_id: StrictStr = Field(description="UID for the user")
35
- id: Optional[StrictStr] = Field(
36
- default=None, description="Unique identifier for the resource"
37
- )
38
35
  created_at: Optional[StrictInt] = Field(
39
36
  default=None, description="Timestamp of creation"
40
37
  )
41
38
  updated_at: Optional[StrictInt] = Field(
42
39
  default=None, description="Timestamp of last update"
43
40
  )
41
+ id: Optional[StrictStr] = Field(
42
+ default=None, description="Unique identifier for the resource"
43
+ )
44
44
  viewed: Optional[StrictBool] = Field(
45
45
  default=False, description="Whether the notification has been marked as seen"
46
46
  )
@@ -58,9 +58,9 @@ class Notification(BaseModel):
58
58
  )
59
59
  __properties: ClassVar[List[str]] = [
60
60
  "user_id",
61
- "id",
62
61
  "created_at",
63
62
  "updated_at",
63
+ "id",
64
64
  "viewed",
65
65
  "sent",
66
66
  "identifier",
@@ -119,9 +119,9 @@ class Notification(BaseModel):
119
119
  _obj = cls.model_validate(
120
120
  {
121
121
  "user_id": obj.get("user_id"),
122
- "id": obj.get("id"),
123
122
  "created_at": obj.get("created_at"),
124
123
  "updated_at": obj.get("updated_at"),
124
+ "id": obj.get("id"),
125
125
  "viewed": obj.get("viewed") if obj.get("viewed") is not None else False,
126
126
  "sent": obj.get("sent") if obj.get("sent") is not None else False,
127
127
  "identifier": obj.get("identifier"),
@@ -35,15 +35,15 @@ class Order(BaseModel):
35
35
  Response model for orders. All optional as the model is built step by step.
36
36
  """ # noqa: E501
37
37
 
38
- id: Optional[StrictStr] = Field(
39
- default=None, description="Unique identifier for the resource"
40
- )
41
38
  created_at: Optional[StrictInt] = Field(
42
39
  default=None, description="Timestamp of creation"
43
40
  )
44
41
  updated_at: Optional[StrictInt] = Field(
45
42
  default=None, description="Timestamp of last update"
46
43
  )
44
+ id: Optional[StrictStr] = Field(
45
+ default=None, description="Unique identifier for the resource"
46
+ )
47
47
  trading_action_id: Optional[StrictStr] = None
48
48
  execution_id: Optional[StrictStr] = None
49
49
  exchange_order_id: Optional[StrictStr] = None
@@ -88,9 +88,9 @@ class Order(BaseModel):
88
88
  )
89
89
  order_time: Optional[StrictInt] = None
90
90
  __properties: ClassVar[List[str]] = [
91
- "id",
92
91
  "created_at",
93
92
  "updated_at",
93
+ "id",
94
94
  "trading_action_id",
95
95
  "execution_id",
96
96
  "exchange_order_id",
@@ -276,9 +276,9 @@ class Order(BaseModel):
276
276
 
277
277
  _obj = cls.model_validate(
278
278
  {
279
- "id": obj.get("id"),
280
279
  "created_at": obj.get("created_at"),
281
280
  "updated_at": obj.get("updated_at"),
281
+ "id": obj.get("id"),
282
282
  "trading_action_id": obj.get("trading_action_id"),
283
283
  "execution_id": obj.get("execution_id"),
284
284
  "exchange_order_id": obj.get("exchange_order_id"),
@@ -32,15 +32,15 @@ class Strategy(BaseModel):
32
32
  Strategy model for read operations.
33
33
  """ # noqa: E501
34
34
 
35
- id: Optional[StrictStr] = Field(
36
- default=None, description="Unique identifier for the resource"
37
- )
38
35
  created_at: Optional[StrictInt] = Field(
39
36
  default=None, description="Timestamp of creation"
40
37
  )
41
38
  updated_at: Optional[StrictInt] = Field(
42
39
  default=None, description="Timestamp of last update"
43
40
  )
41
+ id: Optional[StrictStr] = Field(
42
+ default=None, description="Unique identifier for the resource"
43
+ )
44
44
  name: StrictStr = Field(description="Name of the strategy")
45
45
  description: StrictStr = Field(description="Description of the strategy")
46
46
  exchanges: List[StrategyExchangeInfo] = Field(
@@ -60,9 +60,9 @@ class Strategy(BaseModel):
60
60
  leverage: StrictInt = Field(description="Leverage for the strategy")
61
61
  market_type: MarketType = Field(description="Market of operation of the strategy")
62
62
  __properties: ClassVar[List[str]] = [
63
- "id",
64
63
  "created_at",
65
64
  "updated_at",
65
+ "id",
66
66
  "name",
67
67
  "description",
68
68
  "exchanges",
@@ -136,9 +136,9 @@ class Strategy(BaseModel):
136
136
 
137
137
  _obj = cls.model_validate(
138
138
  {
139
- "id": obj.get("id"),
140
139
  "created_at": obj.get("created_at"),
141
140
  "updated_at": obj.get("updated_at"),
141
+ "id": obj.get("id"),
142
142
  "name": obj.get("name"),
143
143
  "description": obj.get("description"),
144
144
  "exchanges": (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.12.0
3
+ Version: 2.12.1
4
4
  Summary: Maximise Your Crypto Trading Profits with Machine Learning
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
6
  License-Expression: MIT
@@ -70,8 +70,8 @@ crypticorn/common/ansi_colors.py,sha256=-tMlUTE8NI7TPv7uj0kGRe-SI2hGaUNPKBFI_dfi
70
70
  crypticorn/common/auth.py,sha256=HxiAEej315qQGbX0p8WmQI50blUTOWsMWpCtguMx-A4,8786
71
71
  crypticorn/common/decorators.py,sha256=t5Y3vSJ-gt0n2vOYYjYN0dtzNXvZxrJs2SEItpzG8oo,1127
72
72
  crypticorn/common/enums.py,sha256=YE7ObydyWAKO8MOSQBwk9M1PzzaPvlnxc6Dbpu78QMk,787
73
- crypticorn/common/errors.py,sha256=qI6MqplcMbQg4A2-fa8h-qoSLrj1lJJl9DfRlAF34pE,28691
74
- crypticorn/common/exceptions.py,sha256=ytMxm7I5QWM9RkirQmzXon1NdhecrXEXafGyXDjVkS0,6390
73
+ crypticorn/common/errors.py,sha256=x0iv6uZ1VhLBWJQEHhucgNo8_bSCM9tEotVt29ESn2Q,30029
74
+ crypticorn/common/exceptions.py,sha256=4oT58wcL9zQuqYU8op_36uZ1Kzt7JRCccu-o_usgqtU,6392
75
75
  crypticorn/common/logging.py,sha256=3ZTFB9j8Mqy_AlNYABUFQ_134OH0YtophJkP4_GDJ9w,4408
76
76
  crypticorn/common/middleware.py,sha256=O7XiXPimNYUhF9QTv6yFUTVlb91-SK-3CfTrWMNP6Ck,1011
77
77
  crypticorn/common/mixins.py,sha256=l7XQrBISaee6fDZXy96k0HnQ18XYocjTUXlNpVxhaOY,2206
@@ -236,51 +236,51 @@ crypticorn/trade/client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
236
236
  crypticorn/trade/client/rest.py,sha256=7vR8Z4wHrU1uGZyW1B6j96Qo5PECAfMl0-d-wxl6S0A,7067
237
237
  crypticorn/trade/client/api/__init__.py,sha256=PzT1LP1-ner5PA-f_n5v97ifkP05Yh-k-ReOI9T1j-o,727
238
238
  crypticorn/trade/client/api/admin_api.py,sha256=x3rSuXi68grjnBZ8ro5-7wjnkLR20qtqf9zmN3KuJcg,59879
239
- crypticorn/trade/client/api/api_keys_api.py,sha256=qfauZXQySnqnah6mvZmTk5xLGk9Axsjeq_15eR4n9Dc,50970
239
+ crypticorn/trade/client/api/api_keys_api.py,sha256=HltCdJ-UbI9gQ5fvIvpEaAQe3ZCoq7RTiZ_2uHI7u3s,53819
240
240
  crypticorn/trade/client/api/bots_api.py,sha256=Ub6SVM6PgA0exB4eGVtipvm19epKNtIpxiepdCjztLU,50859
241
241
  crypticorn/trade/client/api/exchanges_api.py,sha256=PVTRapNFD-tOVJmSaC_X_8NbWMxM97YDB77IljKdCkw,29007
242
242
  crypticorn/trade/client/api/futures_trading_panel_api.py,sha256=L4wVotLLu4p-44nEInIgM79I40xeObmn3hN1zYPiNWM,50071
243
243
  crypticorn/trade/client/api/notifications_api.py,sha256=-_b61sYBL7jBkSnBqhN8feDzUA3K8KLZOiLPV6Wae24,61426
244
- crypticorn/trade/client/api/orders_api.py,sha256=AtDyddOSCp7Y974F45niIaql9w70KVi-7kTV7ZZEOM8,11065
244
+ crypticorn/trade/client/api/orders_api.py,sha256=Sz-jOWtvVUz_Ok_WHmalN9aRdjxRyvrl3MEngrrRC5k,11167
245
245
  crypticorn/trade/client/api/status_api.py,sha256=YtSZh7xuOl_vq9xfPqdnfuOEA9EpftOqCR7H7yWVAcI,19671
246
246
  crypticorn/trade/client/api/strategies_api.py,sha256=bUzv2DNBlYJsjABI-Jsrg_Sgx7-Vwzv4GLFsKXfEd-M,41707
247
247
  crypticorn/trade/client/api/trading_actions_api.py,sha256=PBl1hSkkP9yRSRbr7jpUzgH4VEFOW7fHaNYYvD37fp8,32634
248
248
  crypticorn/trade/client/models/__init__.py,sha256=T3rP5b5DS5tiW-cgTQuHMQ8L_-OrrTR8vnB8cwON4io,2723
249
- crypticorn/trade/client/models/api_error_identifier.py,sha256=2bN3TUHA4aAyFOvewUM3-EKzBAXqWe9UEQc5YbIuK_M,5086
249
+ crypticorn/trade/client/models/api_error_identifier.py,sha256=Qcwl5BqRI6mx2dKDtkXwHFeEYUcc3sR6_234GXpTnYI,5074
250
250
  crypticorn/trade/client/models/api_error_level.py,sha256=8Sau6q3K29fg-EIGnex0yrw7gXJZLmyGTicYIXcehmY,816
251
251
  crypticorn/trade/client/models/api_error_type.py,sha256=34NBgCP296pQx8doVpeqlhopPfBfRH1I-135YVtN19Y,855
252
- crypticorn/trade/client/models/bot.py,sha256=UhpD-sRc4AZvnqqlVBfY9_P4zCCN2qL2jPocH1jYpYU,5513
252
+ crypticorn/trade/client/models/bot.py,sha256=8A6rbg_HW4NWhXknOyHmHEHxzfhRC1TqODOLh6BHrm0,5513
253
253
  crypticorn/trade/client/models/bot_create.py,sha256=tMko-M8c1iTlbxP8LcCALr1Ep2TMwgS0e9aZlrtQdX4,3271
254
254
  crypticorn/trade/client/models/bot_status.py,sha256=Yga6SVNHBOcJhBENCWi7I12aSBhMDPI5uQrTPBReOQw,806
255
255
  crypticorn/trade/client/models/bot_update.py,sha256=ptZquK4D7eUkfBLqZK5F2uJt-5am54E8KVJ7xu9JAfE,3458
256
256
  crypticorn/trade/client/models/exception_detail.py,sha256=mW4Zxb1KtRMboZDupnhGpkiYHi1e2JE_j3qewgTwfbc,3891
257
257
  crypticorn/trade/client/models/exchange.py,sha256=dGaPReYJA4trppExGlKrYxmBBqJKuxYSSK37p0e5LXI,802
258
- crypticorn/trade/client/models/exchange_key.py,sha256=cDPYE8N736Eges65jAqDEPjUNX3l2Nmfhy-Dq-1uSME,3527
258
+ crypticorn/trade/client/models/exchange_key.py,sha256=aGyEDANSuxUdKFWTnNDi2HvAh7a-tHrx3Xi2uaT8Jig,3814
259
259
  crypticorn/trade/client/models/exchange_key_create.py,sha256=n6yiomatf9FGB5GQpB2gVhWVmTzd7Md3rEFM2gPB2Mc,3418
260
260
  crypticorn/trade/client/models/exchange_key_update.py,sha256=6rBpzKIAzRq7Wg_P-nNSOJKoljTm3Lq3B8cVkZtM50E,3725
261
261
  crypticorn/trade/client/models/execution_ids.py,sha256=0MHzL43PX-aMjKxCkcLTPbszG5q0KruZPwlColEZW58,2963
262
262
  crypticorn/trade/client/models/futures_balance.py,sha256=BePXd2bngkHjcKtZButMFcsU4RS7MU1QkvzF46q8X6U,4191
263
- crypticorn/trade/client/models/futures_trading_action.py,sha256=VsSGZ1EyAm4h0OMttPFCQWObLk65n77-xlbGohHm5rE,9767
263
+ crypticorn/trade/client/models/futures_trading_action.py,sha256=l24IwhY8VcUsrGzSFlhtt3C3oNBfZtSIed4bPDRcg-4,9767
264
264
  crypticorn/trade/client/models/futures_trading_action_create.py,sha256=gAnmn8VIFV2QUJJnpcUuZS5kzHZH7y0Ll4NYCsgK82Q,8527
265
265
  crypticorn/trade/client/models/log_level.py,sha256=Fv2WlajyWZTiXBRNyFQ1x0xqh5nrzKL_0k7fyt92bHA,813
266
266
  crypticorn/trade/client/models/margin_mode.py,sha256=kG1ElFka5OYQI6YQOH1JhGY3qo-ZQhdMTqIYDpqPlgs,777
267
267
  crypticorn/trade/client/models/market_type.py,sha256=OkEE5lAPw2FAudw_98BLcyglEXQhb2uhFeP82W7WFPM,755
268
- crypticorn/trade/client/models/notification.py,sha256=Xl3hsWJP24-hJv-3QAZFyN_BBI9PNyp73Y_wqcmUyYs,4416
268
+ crypticorn/trade/client/models/notification.py,sha256=QbvFkWGjolyba7trkG8SdJE1gfzdUftfywCMUe1IDwQ,4416
269
269
  crypticorn/trade/client/models/notification_create.py,sha256=iXkqvDhFYGoKW4yCWkJP7_5q-DPpJpE0FqWKqK21CE8,3749
270
270
  crypticorn/trade/client/models/notification_update.py,sha256=a1tpTjKWA2kOqBJxxeyheMdIOZ_2NtAYu9X7R5h1M3c,3034
271
- crypticorn/trade/client/models/order.py,sha256=f82QyKRMteuO7bTcTJj9BT1fh9j9diO7e3UARU6eKXM,12252
271
+ crypticorn/trade/client/models/order.py,sha256=IQVzH4rnVuHSAb7uwbjC90OLB_GP7iwTNf6UJUb2ZmA,12252
272
272
  crypticorn/trade/client/models/order_status.py,sha256=dQkbXtPSW4bVGQOVL0M9-Q_fMpAUa4v3uwuuUwXNcnY,852
273
273
  crypticorn/trade/client/models/post_futures_action.py,sha256=KBI3lPayQQNfQP8Attow9tkuo9zimJk19cKQQb9JK-w,3123
274
274
  crypticorn/trade/client/models/spot_trading_action_create.py,sha256=NGtT-hpfhYYizIjGZQ0X67IxP9l99aiCjvxu1oDNnxA,7668
275
- crypticorn/trade/client/models/strategy.py,sha256=cN2X-biPaBuEzG0qOZ4eu5mPIF7xzqYGwlNdvYl9Z8s,5797
275
+ crypticorn/trade/client/models/strategy.py,sha256=Jlgt4oxseebVkbhthQDH3ayOLO2muYnyP6Kg23W02ic,5797
276
276
  crypticorn/trade/client/models/strategy_create.py,sha256=jtr1lUcafFzqYQKiuSXWEqfhLiT4WPj9yw63jtVW6kI,5285
277
277
  crypticorn/trade/client/models/strategy_exchange_info.py,sha256=MhPqBXHNM-jM0JPYHuhzfTKTzEaaNBGMwK9FW2Kq_OI,2841
278
278
  crypticorn/trade/client/models/strategy_update.py,sha256=f7UsKSlNardj5h6uqHYbacjWWQscXkFDqcLOoefa28M,5048
279
279
  crypticorn/trade/client/models/tpsl.py,sha256=vUWMI9T69kCgiN0aQobiIkGFb3MYdMfkhPUjQuCLeYE,4405
280
280
  crypticorn/trade/client/models/trading_action_type.py,sha256=BysUEOl85zs79EA2zOcDN1EExcpQdABaJ4Jz08_z8VU,857
281
- crypticorn-2.12.0.dist-info/licenses/LICENSE,sha256=HonAVvzFXkP2C1d7D3ByIKPwjGH8NcHTAQvKH7uvOHQ,1856
282
- crypticorn-2.12.0.dist-info/METADATA,sha256=DNXZ9XgcxhdhiljcW7ixFoUDkiz-VqfphIKqntf3llM,8640
283
- crypticorn-2.12.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
284
- crypticorn-2.12.0.dist-info/entry_points.txt,sha256=d_xHsGvUTebPveVUK0SrpDFQ5ZRSjlI7lNCc11sn2PM,59
285
- crypticorn-2.12.0.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
286
- crypticorn-2.12.0.dist-info/RECORD,,
281
+ crypticorn-2.12.1.dist-info/licenses/LICENSE,sha256=HonAVvzFXkP2C1d7D3ByIKPwjGH8NcHTAQvKH7uvOHQ,1856
282
+ crypticorn-2.12.1.dist-info/METADATA,sha256=wnt9k2NXeF-22FslfQU18TVQxSvZ4jqyqpfAYiU9XPg,8640
283
+ crypticorn-2.12.1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
284
+ crypticorn-2.12.1.dist-info/entry_points.txt,sha256=d_xHsGvUTebPveVUK0SrpDFQ5ZRSjlI7lNCc11sn2PM,59
285
+ crypticorn-2.12.1.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
286
+ crypticorn-2.12.1.dist-info/RECORD,,