crypticorn 2.1.2__py3-none-any.whl → 2.1.4__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 (32) hide show
  1. crypticorn/common/auth.py +0 -28
  2. crypticorn/common/auth_client.py +14 -18
  3. crypticorn/common/errors.py +216 -253
  4. crypticorn/common/sorter.py +36 -0
  5. crypticorn/pay/client/__init__.py +1 -0
  6. crypticorn/pay/client/api/now_payments_api.py +3 -16
  7. crypticorn/pay/client/api/payments_api.py +0 -42
  8. crypticorn/pay/client/api/products_api.py +18 -57
  9. crypticorn/pay/client/configuration.py +2 -1
  10. crypticorn/pay/client/models/__init__.py +1 -0
  11. crypticorn/pay/client/models/body_create_now_invoice.py +98 -0
  12. crypticorn/pay/client/models/body_create_product.py +98 -0
  13. crypticorn/pay/client/models/body_get_products.py +87 -0
  14. crypticorn/pay/client/models/body_handle_now_webhook.py +98 -0
  15. crypticorn/pay/client/models/body_update_product.py +98 -0
  16. crypticorn/pay/client/models/now_webhook_payload.py +1 -1
  17. crypticorn/pay/client/models/product_model.py +9 -0
  18. crypticorn/pay/client/models/scope.py +56 -0
  19. crypticorn/trade/client/api/api_keys_api.py +5 -70
  20. crypticorn/trade/client/api/bots_api.py +4 -56
  21. crypticorn/trade/client/api/exchanges_api.py +2 -19
  22. crypticorn/trade/client/api/futures_trading_panel_api.py +6 -74
  23. crypticorn/trade/client/api/notifications_api.py +6 -87
  24. crypticorn/trade/client/api/orders_api.py +2 -15
  25. crypticorn/trade/client/api/strategies_api.py +4 -56
  26. crypticorn/trade/client/api/trading_actions_api.py +1 -14
  27. crypticorn/trade/client/configuration.py +2 -1
  28. crypticorn/trade/client/models/api_error_identifier.py +4 -0
  29. {crypticorn-2.1.2.dist-info → crypticorn-2.1.4.dist-info}/METADATA +1 -1
  30. {crypticorn-2.1.2.dist-info → crypticorn-2.1.4.dist-info}/RECORD +32 -25
  31. {crypticorn-2.1.2.dist-info → crypticorn-2.1.4.dist-info}/WHEEL +0 -0
  32. {crypticorn-2.1.2.dist-info → crypticorn-2.1.4.dist-info}/top_level.txt +0 -0
@@ -41,7 +41,6 @@ class BotsApi:
41
41
  async def create_bot(
42
42
  self,
43
43
  bot_model: BotModel,
44
- access_token: Optional[StrictStr] = None,
45
44
  _request_timeout: Union[
46
45
  None,
47
46
  Annotated[StrictFloat, Field(gt=0)],
@@ -60,8 +59,6 @@ class BotsApi:
60
59
 
61
60
  :param bot_model: (required)
62
61
  :type bot_model: BotModel
63
- :param access_token:
64
- :type access_token: str
65
62
  :param _request_timeout: timeout setting for this request. If one
66
63
  number provided, it will be total request
67
64
  timeout. It can also be a pair (tuple) of
@@ -86,7 +83,6 @@ class BotsApi:
86
83
 
87
84
  _param = self._create_bot_serialize(
88
85
  bot_model=bot_model,
89
- access_token=access_token,
90
86
  _request_auth=_request_auth,
91
87
  _content_type=_content_type,
92
88
  _headers=_headers,
@@ -110,7 +106,6 @@ class BotsApi:
110
106
  async def create_bot_with_http_info(
111
107
  self,
112
108
  bot_model: BotModel,
113
- access_token: Optional[StrictStr] = None,
114
109
  _request_timeout: Union[
115
110
  None,
116
111
  Annotated[StrictFloat, Field(gt=0)],
@@ -129,8 +124,6 @@ class BotsApi:
129
124
 
130
125
  :param bot_model: (required)
131
126
  :type bot_model: BotModel
132
- :param access_token:
133
- :type access_token: str
134
127
  :param _request_timeout: timeout setting for this request. If one
135
128
  number provided, it will be total request
136
129
  timeout. It can also be a pair (tuple) of
@@ -155,7 +148,6 @@ class BotsApi:
155
148
 
156
149
  _param = self._create_bot_serialize(
157
150
  bot_model=bot_model,
158
- access_token=access_token,
159
151
  _request_auth=_request_auth,
160
152
  _content_type=_content_type,
161
153
  _headers=_headers,
@@ -179,7 +171,6 @@ class BotsApi:
179
171
  async def create_bot_without_preload_content(
180
172
  self,
181
173
  bot_model: BotModel,
182
- access_token: Optional[StrictStr] = None,
183
174
  _request_timeout: Union[
184
175
  None,
185
176
  Annotated[StrictFloat, Field(gt=0)],
@@ -198,8 +189,6 @@ class BotsApi:
198
189
 
199
190
  :param bot_model: (required)
200
191
  :type bot_model: BotModel
201
- :param access_token:
202
- :type access_token: str
203
192
  :param _request_timeout: timeout setting for this request. If one
204
193
  number provided, it will be total request
205
194
  timeout. It can also be a pair (tuple) of
@@ -224,7 +213,6 @@ class BotsApi:
224
213
 
225
214
  _param = self._create_bot_serialize(
226
215
  bot_model=bot_model,
227
- access_token=access_token,
228
216
  _request_auth=_request_auth,
229
217
  _content_type=_content_type,
230
218
  _headers=_headers,
@@ -243,7 +231,6 @@ class BotsApi:
243
231
  def _create_bot_serialize(
244
232
  self,
245
233
  bot_model,
246
- access_token,
247
234
  _request_auth,
248
235
  _content_type,
249
236
  _headers,
@@ -288,7 +275,7 @@ class BotsApi:
288
275
  _header_params["Content-Type"] = _default_content_type
289
276
 
290
277
  # authentication setting
291
- _auth_settings: List[str] = ["HTTPBearer"]
278
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
292
279
 
293
280
  return self.api_client.param_serialize(
294
281
  method="POST",
@@ -309,7 +296,6 @@ class BotsApi:
309
296
  async def delete_bot(
310
297
  self,
311
298
  id: StrictStr,
312
- access_token: Optional[StrictStr] = None,
313
299
  _request_timeout: Union[
314
300
  None,
315
301
  Annotated[StrictFloat, Field(gt=0)],
@@ -328,8 +314,6 @@ class BotsApi:
328
314
 
329
315
  :param id: (required)
330
316
  :type id: str
331
- :param access_token:
332
- :type access_token: str
333
317
  :param _request_timeout: timeout setting for this request. If one
334
318
  number provided, it will be total request
335
319
  timeout. It can also be a pair (tuple) of
@@ -354,7 +338,6 @@ class BotsApi:
354
338
 
355
339
  _param = self._delete_bot_serialize(
356
340
  id=id,
357
- access_token=access_token,
358
341
  _request_auth=_request_auth,
359
342
  _content_type=_content_type,
360
343
  _headers=_headers,
@@ -378,7 +361,6 @@ class BotsApi:
378
361
  async def delete_bot_with_http_info(
379
362
  self,
380
363
  id: StrictStr,
381
- access_token: Optional[StrictStr] = None,
382
364
  _request_timeout: Union[
383
365
  None,
384
366
  Annotated[StrictFloat, Field(gt=0)],
@@ -397,8 +379,6 @@ class BotsApi:
397
379
 
398
380
  :param id: (required)
399
381
  :type id: str
400
- :param access_token:
401
- :type access_token: str
402
382
  :param _request_timeout: timeout setting for this request. If one
403
383
  number provided, it will be total request
404
384
  timeout. It can also be a pair (tuple) of
@@ -423,7 +403,6 @@ class BotsApi:
423
403
 
424
404
  _param = self._delete_bot_serialize(
425
405
  id=id,
426
- access_token=access_token,
427
406
  _request_auth=_request_auth,
428
407
  _content_type=_content_type,
429
408
  _headers=_headers,
@@ -447,7 +426,6 @@ class BotsApi:
447
426
  async def delete_bot_without_preload_content(
448
427
  self,
449
428
  id: StrictStr,
450
- access_token: Optional[StrictStr] = None,
451
429
  _request_timeout: Union[
452
430
  None,
453
431
  Annotated[StrictFloat, Field(gt=0)],
@@ -466,8 +444,6 @@ class BotsApi:
466
444
 
467
445
  :param id: (required)
468
446
  :type id: str
469
- :param access_token:
470
- :type access_token: str
471
447
  :param _request_timeout: timeout setting for this request. If one
472
448
  number provided, it will be total request
473
449
  timeout. It can also be a pair (tuple) of
@@ -492,7 +468,6 @@ class BotsApi:
492
468
 
493
469
  _param = self._delete_bot_serialize(
494
470
  id=id,
495
- access_token=access_token,
496
471
  _request_auth=_request_auth,
497
472
  _content_type=_content_type,
498
473
  _headers=_headers,
@@ -511,7 +486,6 @@ class BotsApi:
511
486
  def _delete_bot_serialize(
512
487
  self,
513
488
  id,
514
- access_token,
515
489
  _request_auth,
516
490
  _content_type,
517
491
  _headers,
@@ -546,7 +520,7 @@ class BotsApi:
546
520
  )
547
521
 
548
522
  # authentication setting
549
- _auth_settings: List[str] = ["HTTPBearer"]
523
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
550
524
 
551
525
  return self.api_client.param_serialize(
552
526
  method="DELETE",
@@ -569,7 +543,6 @@ class BotsApi:
569
543
  include_deleted: Optional[StrictBool] = None,
570
544
  limit: Optional[StrictInt] = None,
571
545
  offset: Optional[StrictInt] = None,
572
- access_token: Optional[StrictStr] = None,
573
546
  _request_timeout: Union[
574
547
  None,
575
548
  Annotated[StrictFloat, Field(gt=0)],
@@ -591,8 +564,6 @@ class BotsApi:
591
564
  :type limit: int
592
565
  :param offset:
593
566
  :type offset: int
594
- :param access_token:
595
- :type access_token: str
596
567
  :param _request_timeout: timeout setting for this request. If one
597
568
  number provided, it will be total request
598
569
  timeout. It can also be a pair (tuple) of
@@ -619,7 +590,6 @@ class BotsApi:
619
590
  include_deleted=include_deleted,
620
591
  limit=limit,
621
592
  offset=offset,
622
- access_token=access_token,
623
593
  _request_auth=_request_auth,
624
594
  _content_type=_content_type,
625
595
  _headers=_headers,
@@ -645,7 +615,6 @@ class BotsApi:
645
615
  include_deleted: Optional[StrictBool] = None,
646
616
  limit: Optional[StrictInt] = None,
647
617
  offset: Optional[StrictInt] = None,
648
- access_token: Optional[StrictStr] = None,
649
618
  _request_timeout: Union[
650
619
  None,
651
620
  Annotated[StrictFloat, Field(gt=0)],
@@ -667,8 +636,6 @@ class BotsApi:
667
636
  :type limit: int
668
637
  :param offset:
669
638
  :type offset: int
670
- :param access_token:
671
- :type access_token: str
672
639
  :param _request_timeout: timeout setting for this request. If one
673
640
  number provided, it will be total request
674
641
  timeout. It can also be a pair (tuple) of
@@ -695,7 +662,6 @@ class BotsApi:
695
662
  include_deleted=include_deleted,
696
663
  limit=limit,
697
664
  offset=offset,
698
- access_token=access_token,
699
665
  _request_auth=_request_auth,
700
666
  _content_type=_content_type,
701
667
  _headers=_headers,
@@ -721,7 +687,6 @@ class BotsApi:
721
687
  include_deleted: Optional[StrictBool] = None,
722
688
  limit: Optional[StrictInt] = None,
723
689
  offset: Optional[StrictInt] = None,
724
- access_token: Optional[StrictStr] = None,
725
690
  _request_timeout: Union[
726
691
  None,
727
692
  Annotated[StrictFloat, Field(gt=0)],
@@ -743,8 +708,6 @@ class BotsApi:
743
708
  :type limit: int
744
709
  :param offset:
745
710
  :type offset: int
746
- :param access_token:
747
- :type access_token: str
748
711
  :param _request_timeout: timeout setting for this request. If one
749
712
  number provided, it will be total request
750
713
  timeout. It can also be a pair (tuple) of
@@ -771,7 +734,6 @@ class BotsApi:
771
734
  include_deleted=include_deleted,
772
735
  limit=limit,
773
736
  offset=offset,
774
- access_token=access_token,
775
737
  _request_auth=_request_auth,
776
738
  _content_type=_content_type,
777
739
  _headers=_headers,
@@ -792,7 +754,6 @@ class BotsApi:
792
754
  include_deleted,
793
755
  limit,
794
756
  offset,
795
- access_token,
796
757
  _request_auth,
797
758
  _content_type,
798
759
  _headers,
@@ -837,7 +798,7 @@ class BotsApi:
837
798
  )
838
799
 
839
800
  # authentication setting
840
- _auth_settings: List[str] = ["HTTPBearer"]
801
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
841
802
 
842
803
  return self.api_client.param_serialize(
843
804
  method="GET",
@@ -859,7 +820,6 @@ class BotsApi:
859
820
  self,
860
821
  id: StrictStr,
861
822
  bot_model: BotModel,
862
- access_token: Optional[StrictStr] = None,
863
823
  _request_timeout: Union[
864
824
  None,
865
825
  Annotated[StrictFloat, Field(gt=0)],
@@ -880,8 +840,6 @@ class BotsApi:
880
840
  :type id: str
881
841
  :param bot_model: (required)
882
842
  :type bot_model: BotModel
883
- :param access_token:
884
- :type access_token: str
885
843
  :param _request_timeout: timeout setting for this request. If one
886
844
  number provided, it will be total request
887
845
  timeout. It can also be a pair (tuple) of
@@ -907,7 +865,6 @@ class BotsApi:
907
865
  _param = self._update_bot_serialize(
908
866
  id=id,
909
867
  bot_model=bot_model,
910
- access_token=access_token,
911
868
  _request_auth=_request_auth,
912
869
  _content_type=_content_type,
913
870
  _headers=_headers,
@@ -932,7 +889,6 @@ class BotsApi:
932
889
  self,
933
890
  id: StrictStr,
934
891
  bot_model: BotModel,
935
- access_token: Optional[StrictStr] = None,
936
892
  _request_timeout: Union[
937
893
  None,
938
894
  Annotated[StrictFloat, Field(gt=0)],
@@ -953,8 +909,6 @@ class BotsApi:
953
909
  :type id: str
954
910
  :param bot_model: (required)
955
911
  :type bot_model: BotModel
956
- :param access_token:
957
- :type access_token: str
958
912
  :param _request_timeout: timeout setting for this request. If one
959
913
  number provided, it will be total request
960
914
  timeout. It can also be a pair (tuple) of
@@ -980,7 +934,6 @@ class BotsApi:
980
934
  _param = self._update_bot_serialize(
981
935
  id=id,
982
936
  bot_model=bot_model,
983
- access_token=access_token,
984
937
  _request_auth=_request_auth,
985
938
  _content_type=_content_type,
986
939
  _headers=_headers,
@@ -1005,7 +958,6 @@ class BotsApi:
1005
958
  self,
1006
959
  id: StrictStr,
1007
960
  bot_model: BotModel,
1008
- access_token: Optional[StrictStr] = None,
1009
961
  _request_timeout: Union[
1010
962
  None,
1011
963
  Annotated[StrictFloat, Field(gt=0)],
@@ -1026,8 +978,6 @@ class BotsApi:
1026
978
  :type id: str
1027
979
  :param bot_model: (required)
1028
980
  :type bot_model: BotModel
1029
- :param access_token:
1030
- :type access_token: str
1031
981
  :param _request_timeout: timeout setting for this request. If one
1032
982
  number provided, it will be total request
1033
983
  timeout. It can also be a pair (tuple) of
@@ -1053,7 +1003,6 @@ class BotsApi:
1053
1003
  _param = self._update_bot_serialize(
1054
1004
  id=id,
1055
1005
  bot_model=bot_model,
1056
- access_token=access_token,
1057
1006
  _request_auth=_request_auth,
1058
1007
  _content_type=_content_type,
1059
1008
  _headers=_headers,
@@ -1073,7 +1022,6 @@ class BotsApi:
1073
1022
  self,
1074
1023
  id,
1075
1024
  bot_model,
1076
- access_token,
1077
1025
  _request_auth,
1078
1026
  _content_type,
1079
1027
  _headers,
@@ -1120,7 +1068,7 @@ class BotsApi:
1120
1068
  _header_params["Content-Type"] = _default_content_type
1121
1069
 
1122
1070
  # authentication setting
1123
- _auth_settings: List[str] = ["HTTPBearer"]
1071
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1124
1072
 
1125
1073
  return self.api_client.param_serialize(
1126
1074
  method="PUT",
@@ -16,8 +16,7 @@ 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 StrictStr
20
- from typing import List, Optional
19
+ from typing import List
21
20
  from crypticorn.trade.client.models.exchange import Exchange
22
21
 
23
22
  from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
@@ -40,7 +39,6 @@ class ExchangesApi:
40
39
  @validate_call
41
40
  async def get_exchanges(
42
41
  self,
43
- access_token: Optional[StrictStr] = None,
44
42
  _request_timeout: Union[
45
43
  None,
46
44
  Annotated[StrictFloat, Field(gt=0)],
@@ -56,8 +54,6 @@ class ExchangesApi:
56
54
  """Get Exchanges
57
55
 
58
56
 
59
- :param access_token:
60
- :type access_token: str
61
57
  :param _request_timeout: timeout setting for this request. If one
62
58
  number provided, it will be total request
63
59
  timeout. It can also be a pair (tuple) of
@@ -81,7 +77,6 @@ class ExchangesApi:
81
77
  """ # noqa: E501
82
78
 
83
79
  _param = self._get_exchanges_serialize(
84
- access_token=access_token,
85
80
  _request_auth=_request_auth,
86
81
  _content_type=_content_type,
87
82
  _headers=_headers,
@@ -90,7 +85,6 @@ class ExchangesApi:
90
85
 
91
86
  _response_types_map: Dict[str, Optional[str]] = {
92
87
  "200": "List[Exchange]",
93
- "422": "HTTPValidationError",
94
88
  }
95
89
  response_data = await self.api_client.call_api(
96
90
  *_param, _request_timeout=_request_timeout
@@ -104,7 +98,6 @@ class ExchangesApi:
104
98
  @validate_call
105
99
  async def get_exchanges_with_http_info(
106
100
  self,
107
- access_token: Optional[StrictStr] = None,
108
101
  _request_timeout: Union[
109
102
  None,
110
103
  Annotated[StrictFloat, Field(gt=0)],
@@ -120,8 +113,6 @@ class ExchangesApi:
120
113
  """Get Exchanges
121
114
 
122
115
 
123
- :param access_token:
124
- :type access_token: str
125
116
  :param _request_timeout: timeout setting for this request. If one
126
117
  number provided, it will be total request
127
118
  timeout. It can also be a pair (tuple) of
@@ -145,7 +136,6 @@ class ExchangesApi:
145
136
  """ # noqa: E501
146
137
 
147
138
  _param = self._get_exchanges_serialize(
148
- access_token=access_token,
149
139
  _request_auth=_request_auth,
150
140
  _content_type=_content_type,
151
141
  _headers=_headers,
@@ -154,7 +144,6 @@ class ExchangesApi:
154
144
 
155
145
  _response_types_map: Dict[str, Optional[str]] = {
156
146
  "200": "List[Exchange]",
157
- "422": "HTTPValidationError",
158
147
  }
159
148
  response_data = await self.api_client.call_api(
160
149
  *_param, _request_timeout=_request_timeout
@@ -168,7 +157,6 @@ class ExchangesApi:
168
157
  @validate_call
169
158
  async def get_exchanges_without_preload_content(
170
159
  self,
171
- access_token: Optional[StrictStr] = None,
172
160
  _request_timeout: Union[
173
161
  None,
174
162
  Annotated[StrictFloat, Field(gt=0)],
@@ -184,8 +172,6 @@ class ExchangesApi:
184
172
  """Get Exchanges
185
173
 
186
174
 
187
- :param access_token:
188
- :type access_token: str
189
175
  :param _request_timeout: timeout setting for this request. If one
190
176
  number provided, it will be total request
191
177
  timeout. It can also be a pair (tuple) of
@@ -209,7 +195,6 @@ class ExchangesApi:
209
195
  """ # noqa: E501
210
196
 
211
197
  _param = self._get_exchanges_serialize(
212
- access_token=access_token,
213
198
  _request_auth=_request_auth,
214
199
  _content_type=_content_type,
215
200
  _headers=_headers,
@@ -218,7 +203,6 @@ class ExchangesApi:
218
203
 
219
204
  _response_types_map: Dict[str, Optional[str]] = {
220
205
  "200": "List[Exchange]",
221
- "422": "HTTPValidationError",
222
206
  }
223
207
  response_data = await self.api_client.call_api(
224
208
  *_param, _request_timeout=_request_timeout
@@ -227,7 +211,6 @@ class ExchangesApi:
227
211
 
228
212
  def _get_exchanges_serialize(
229
213
  self,
230
- access_token,
231
214
  _request_auth,
232
215
  _content_type,
233
216
  _headers,
@@ -260,7 +243,7 @@ class ExchangesApi:
260
243
  )
261
244
 
262
245
  # authentication setting
263
- _auth_settings: List[str] = ["HTTPBearer"]
246
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
264
247
 
265
248
  return self.api_client.param_serialize(
266
249
  method="GET",