crypticorn 2.11.6__py3-none-any.whl → 2.11.7__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 (56) hide show
  1. crypticorn/common/errors.py +3 -3
  2. crypticorn/trade/client/__init__.py +27 -9
  3. crypticorn/trade/client/api/__init__.py +1 -0
  4. crypticorn/trade/client/api/admin_api.py +1455 -0
  5. crypticorn/trade/client/api/api_keys_api.py +60 -58
  6. crypticorn/trade/client/api/bots_api.py +289 -48
  7. crypticorn/trade/client/api/exchanges_api.py +474 -17
  8. crypticorn/trade/client/api/futures_trading_panel_api.py +1 -1
  9. crypticorn/trade/client/api/notifications_api.py +80 -96
  10. crypticorn/trade/client/api/orders_api.py +7 -7
  11. crypticorn/trade/client/api/status_api.py +5 -232
  12. crypticorn/trade/client/api/strategies_api.py +49 -48
  13. crypticorn/trade/client/api/trading_actions_api.py +42 -38
  14. crypticorn/trade/client/api_client.py +1 -1
  15. crypticorn/trade/client/configuration.py +1 -1
  16. crypticorn/trade/client/exceptions.py +1 -1
  17. crypticorn/trade/client/models/__init__.py +26 -9
  18. crypticorn/trade/client/models/api_error_identifier.py +116 -0
  19. crypticorn/trade/client/models/api_error_level.py +37 -0
  20. crypticorn/trade/client/models/api_error_type.py +37 -0
  21. crypticorn/trade/client/models/{bot_model.py → bot.py} +59 -60
  22. crypticorn/trade/client/models/bot_create.py +104 -0
  23. crypticorn/trade/client/models/bot_status.py +1 -1
  24. crypticorn/trade/client/models/bot_update.py +107 -0
  25. crypticorn/trade/client/models/exception_detail.py +8 -5
  26. crypticorn/trade/client/models/exchange.py +36 -0
  27. crypticorn/trade/client/models/exchange_key.py +111 -0
  28. crypticorn/trade/client/models/exchange_key_create.py +107 -0
  29. crypticorn/trade/client/models/{exchange_key_model.py → exchange_key_update.py} +12 -47
  30. crypticorn/trade/client/models/execution_ids.py +1 -1
  31. crypticorn/trade/client/models/futures_balance.py +1 -1
  32. crypticorn/trade/client/models/futures_trading_action.py +24 -16
  33. crypticorn/trade/client/models/{spot_trading_action.py → futures_trading_action_create.py} +24 -28
  34. crypticorn/trade/client/models/log_level.py +38 -0
  35. crypticorn/trade/client/models/margin_mode.py +1 -1
  36. crypticorn/trade/client/models/market_type.py +35 -0
  37. crypticorn/trade/client/models/{notification_model.py → notification.py} +35 -40
  38. crypticorn/trade/client/models/notification_create.py +114 -0
  39. crypticorn/trade/client/models/notification_update.py +96 -0
  40. crypticorn/trade/client/models/{order_model.py → order.py} +36 -31
  41. crypticorn/trade/client/models/order_status.py +1 -1
  42. crypticorn/trade/client/models/post_futures_action.py +1 -1
  43. crypticorn/trade/client/models/{action_model.py → spot_trading_action_create.py} +7 -65
  44. crypticorn/trade/client/models/{strategy_model_input.py → strategy.py} +25 -33
  45. crypticorn/trade/client/models/{strategy_model_output.py → strategy_create.py} +16 -39
  46. crypticorn/trade/client/models/strategy_exchange_info.py +4 -3
  47. crypticorn/trade/client/models/strategy_update.py +147 -0
  48. crypticorn/trade/client/models/tpsl.py +1 -1
  49. crypticorn/trade/client/models/trading_action_type.py +1 -1
  50. crypticorn/trade/client/rest.py +1 -1
  51. {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/METADATA +1 -1
  52. {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/RECORD +56 -42
  53. {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/WHEEL +0 -0
  54. {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/entry_points.txt +0 -0
  55. {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/licenses/LICENSE +0 -0
  56. {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Trading API
5
5
 
6
- API for automated trading and exchange interface
6
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -18,10 +18,14 @@ from typing_extensions import Annotated
18
18
 
19
19
  from pydantic import StrictInt
20
20
  from typing import Any, List, Optional
21
- from crypticorn.trade.client.models.action_model import ActionModel
22
21
  from crypticorn.trade.client.models.futures_trading_action import FuturesTradingAction
22
+ from crypticorn.trade.client.models.futures_trading_action_create import (
23
+ FuturesTradingActionCreate,
24
+ )
23
25
  from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
24
- from crypticorn.trade.client.models.spot_trading_action import SpotTradingAction
26
+ from crypticorn.trade.client.models.spot_trading_action_create import (
27
+ SpotTradingActionCreate,
28
+ )
25
29
 
26
30
  from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
27
31
  from crypticorn.trade.client.api_response import ApiResponse
@@ -56,7 +60,7 @@ class TradingActionsApi:
56
60
  _content_type: Optional[StrictStr] = None,
57
61
  _headers: Optional[Dict[StrictStr, Any]] = None,
58
62
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
- ) -> List[ActionModel]:
63
+ ) -> List[FuturesTradingAction]:
60
64
  """Get Actions
61
65
 
62
66
 
@@ -96,7 +100,7 @@ class TradingActionsApi:
96
100
  )
97
101
 
98
102
  _response_types_map: Dict[str, Optional[str]] = {
99
- "200": "List[ActionModel]",
103
+ "200": "List[FuturesTradingAction]",
100
104
  }
101
105
  response_data = await self.api_client.call_api(
102
106
  *_param, _request_timeout=_request_timeout
@@ -123,7 +127,7 @@ class TradingActionsApi:
123
127
  _content_type: Optional[StrictStr] = None,
124
128
  _headers: Optional[Dict[StrictStr, Any]] = None,
125
129
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
- ) -> ApiResponse[List[ActionModel]]:
130
+ ) -> ApiResponse[List[FuturesTradingAction]]:
127
131
  """Get Actions
128
132
 
129
133
 
@@ -163,7 +167,7 @@ class TradingActionsApi:
163
167
  )
164
168
 
165
169
  _response_types_map: Dict[str, Optional[str]] = {
166
- "200": "List[ActionModel]",
170
+ "200": "List[FuturesTradingAction]",
167
171
  }
168
172
  response_data = await self.api_client.call_api(
169
173
  *_param, _request_timeout=_request_timeout
@@ -230,7 +234,7 @@ class TradingActionsApi:
230
234
  )
231
235
 
232
236
  _response_types_map: Dict[str, Optional[str]] = {
233
- "200": "List[ActionModel]",
237
+ "200": "List[FuturesTradingAction]",
234
238
  }
235
239
  response_data = await self.api_client.call_api(
236
240
  *_param, _request_timeout=_request_timeout
@@ -301,7 +305,7 @@ class TradingActionsApi:
301
305
  @validate_call
302
306
  async def post_futures_action(
303
307
  self,
304
- futures_trading_action: FuturesTradingAction,
308
+ futures_trading_action_create: FuturesTradingActionCreate,
305
309
  _request_timeout: Union[
306
310
  None,
307
311
  Annotated[StrictFloat, Field(gt=0)],
@@ -318,8 +322,8 @@ class TradingActionsApi:
318
322
 
319
323
  Endpoint to receive futures trading actions from the trading strategy
320
324
 
321
- :param futures_trading_action: (required)
322
- :type futures_trading_action: FuturesTradingAction
325
+ :param futures_trading_action_create: (required)
326
+ :type futures_trading_action_create: FuturesTradingActionCreate
323
327
  :param _request_timeout: timeout setting for this request. If one
324
328
  number provided, it will be total request
325
329
  timeout. It can also be a pair (tuple) of
@@ -343,7 +347,7 @@ class TradingActionsApi:
343
347
  """ # noqa: E501
344
348
 
345
349
  _param = self._post_futures_action_serialize(
346
- futures_trading_action=futures_trading_action,
350
+ futures_trading_action_create=futures_trading_action_create,
347
351
  _request_auth=_request_auth,
348
352
  _content_type=_content_type,
349
353
  _headers=_headers,
@@ -365,7 +369,7 @@ class TradingActionsApi:
365
369
  @validate_call
366
370
  async def post_futures_action_with_http_info(
367
371
  self,
368
- futures_trading_action: FuturesTradingAction,
372
+ futures_trading_action_create: FuturesTradingActionCreate,
369
373
  _request_timeout: Union[
370
374
  None,
371
375
  Annotated[StrictFloat, Field(gt=0)],
@@ -382,8 +386,8 @@ class TradingActionsApi:
382
386
 
383
387
  Endpoint to receive futures trading actions from the trading strategy
384
388
 
385
- :param futures_trading_action: (required)
386
- :type futures_trading_action: FuturesTradingAction
389
+ :param futures_trading_action_create: (required)
390
+ :type futures_trading_action_create: FuturesTradingActionCreate
387
391
  :param _request_timeout: timeout setting for this request. If one
388
392
  number provided, it will be total request
389
393
  timeout. It can also be a pair (tuple) of
@@ -407,7 +411,7 @@ class TradingActionsApi:
407
411
  """ # noqa: E501
408
412
 
409
413
  _param = self._post_futures_action_serialize(
410
- futures_trading_action=futures_trading_action,
414
+ futures_trading_action_create=futures_trading_action_create,
411
415
  _request_auth=_request_auth,
412
416
  _content_type=_content_type,
413
417
  _headers=_headers,
@@ -429,7 +433,7 @@ class TradingActionsApi:
429
433
  @validate_call
430
434
  async def post_futures_action_without_preload_content(
431
435
  self,
432
- futures_trading_action: FuturesTradingAction,
436
+ futures_trading_action_create: FuturesTradingActionCreate,
433
437
  _request_timeout: Union[
434
438
  None,
435
439
  Annotated[StrictFloat, Field(gt=0)],
@@ -446,8 +450,8 @@ class TradingActionsApi:
446
450
 
447
451
  Endpoint to receive futures trading actions from the trading strategy
448
452
 
449
- :param futures_trading_action: (required)
450
- :type futures_trading_action: FuturesTradingAction
453
+ :param futures_trading_action_create: (required)
454
+ :type futures_trading_action_create: FuturesTradingActionCreate
451
455
  :param _request_timeout: timeout setting for this request. If one
452
456
  number provided, it will be total request
453
457
  timeout. It can also be a pair (tuple) of
@@ -471,7 +475,7 @@ class TradingActionsApi:
471
475
  """ # noqa: E501
472
476
 
473
477
  _param = self._post_futures_action_serialize(
474
- futures_trading_action=futures_trading_action,
478
+ futures_trading_action_create=futures_trading_action_create,
475
479
  _request_auth=_request_auth,
476
480
  _content_type=_content_type,
477
481
  _headers=_headers,
@@ -488,7 +492,7 @@ class TradingActionsApi:
488
492
 
489
493
  def _post_futures_action_serialize(
490
494
  self,
491
- futures_trading_action,
495
+ futures_trading_action_create,
492
496
  _request_auth,
493
497
  _content_type,
494
498
  _headers,
@@ -513,8 +517,8 @@ class TradingActionsApi:
513
517
  # process the header parameters
514
518
  # process the form parameters
515
519
  # process the body parameter
516
- if futures_trading_action is not None:
517
- _body_params = futures_trading_action
520
+ if futures_trading_action_create is not None:
521
+ _body_params = futures_trading_action_create
518
522
 
519
523
  # set the HTTP header `Accept`
520
524
  if "Accept" not in _header_params:
@@ -553,7 +557,7 @@ class TradingActionsApi:
553
557
  @validate_call
554
558
  async def post_spot_action(
555
559
  self,
556
- spot_trading_action: SpotTradingAction,
560
+ spot_trading_action_create: SpotTradingActionCreate,
557
561
  _request_timeout: Union[
558
562
  None,
559
563
  Annotated[StrictFloat, Field(gt=0)],
@@ -569,8 +573,8 @@ class TradingActionsApi:
569
573
  """Post Spot Action
570
574
 
571
575
 
572
- :param spot_trading_action: (required)
573
- :type spot_trading_action: SpotTradingAction
576
+ :param spot_trading_action_create: (required)
577
+ :type spot_trading_action_create: SpotTradingActionCreate
574
578
  :param _request_timeout: timeout setting for this request. If one
575
579
  number provided, it will be total request
576
580
  timeout. It can also be a pair (tuple) of
@@ -594,7 +598,7 @@ class TradingActionsApi:
594
598
  """ # noqa: E501
595
599
 
596
600
  _param = self._post_spot_action_serialize(
597
- spot_trading_action=spot_trading_action,
601
+ spot_trading_action_create=spot_trading_action_create,
598
602
  _request_auth=_request_auth,
599
603
  _content_type=_content_type,
600
604
  _headers=_headers,
@@ -616,7 +620,7 @@ class TradingActionsApi:
616
620
  @validate_call
617
621
  async def post_spot_action_with_http_info(
618
622
  self,
619
- spot_trading_action: SpotTradingAction,
623
+ spot_trading_action_create: SpotTradingActionCreate,
620
624
  _request_timeout: Union[
621
625
  None,
622
626
  Annotated[StrictFloat, Field(gt=0)],
@@ -632,8 +636,8 @@ class TradingActionsApi:
632
636
  """Post Spot Action
633
637
 
634
638
 
635
- :param spot_trading_action: (required)
636
- :type spot_trading_action: SpotTradingAction
639
+ :param spot_trading_action_create: (required)
640
+ :type spot_trading_action_create: SpotTradingActionCreate
637
641
  :param _request_timeout: timeout setting for this request. If one
638
642
  number provided, it will be total request
639
643
  timeout. It can also be a pair (tuple) of
@@ -657,7 +661,7 @@ class TradingActionsApi:
657
661
  """ # noqa: E501
658
662
 
659
663
  _param = self._post_spot_action_serialize(
660
- spot_trading_action=spot_trading_action,
664
+ spot_trading_action_create=spot_trading_action_create,
661
665
  _request_auth=_request_auth,
662
666
  _content_type=_content_type,
663
667
  _headers=_headers,
@@ -679,7 +683,7 @@ class TradingActionsApi:
679
683
  @validate_call
680
684
  async def post_spot_action_without_preload_content(
681
685
  self,
682
- spot_trading_action: SpotTradingAction,
686
+ spot_trading_action_create: SpotTradingActionCreate,
683
687
  _request_timeout: Union[
684
688
  None,
685
689
  Annotated[StrictFloat, Field(gt=0)],
@@ -695,8 +699,8 @@ class TradingActionsApi:
695
699
  """Post Spot Action
696
700
 
697
701
 
698
- :param spot_trading_action: (required)
699
- :type spot_trading_action: SpotTradingAction
702
+ :param spot_trading_action_create: (required)
703
+ :type spot_trading_action_create: SpotTradingActionCreate
700
704
  :param _request_timeout: timeout setting for this request. If one
701
705
  number provided, it will be total request
702
706
  timeout. It can also be a pair (tuple) of
@@ -720,7 +724,7 @@ class TradingActionsApi:
720
724
  """ # noqa: E501
721
725
 
722
726
  _param = self._post_spot_action_serialize(
723
- spot_trading_action=spot_trading_action,
727
+ spot_trading_action_create=spot_trading_action_create,
724
728
  _request_auth=_request_auth,
725
729
  _content_type=_content_type,
726
730
  _headers=_headers,
@@ -737,7 +741,7 @@ class TradingActionsApi:
737
741
 
738
742
  def _post_spot_action_serialize(
739
743
  self,
740
- spot_trading_action,
744
+ spot_trading_action_create,
741
745
  _request_auth,
742
746
  _content_type,
743
747
  _headers,
@@ -762,8 +766,8 @@ class TradingActionsApi:
762
766
  # process the header parameters
763
767
  # process the form parameters
764
768
  # process the body parameter
765
- if spot_trading_action is not None:
766
- _body_params = spot_trading_action
769
+ if spot_trading_action_create is not None:
770
+ _body_params = spot_trading_action_create
767
771
 
768
772
  # set the HTTP header `Accept`
769
773
  if "Accept" not in _header_params:
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Trading API
5
5
 
6
- API for automated trading and exchange interface
6
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Trading API
5
5
 
6
- API for automated trading and exchange interface
6
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Trading API
5
5
 
6
- API for automated trading and exchange interface
6
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -4,7 +4,7 @@
4
4
  """
5
5
  Trading API
6
6
 
7
- API for automated trading and exchange interface
7
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
8
8
 
9
9
  The version of the OpenAPI document: 1.0.0
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -14,22 +14,39 @@ Do not edit the class manually.
14
14
 
15
15
 
16
16
  # import models into model package
17
- from crypticorn.trade.client.models.action_model import ActionModel
18
- from crypticorn.trade.client.models.bot_model import BotModel
17
+ from crypticorn.trade.client.models.api_error_identifier import ApiErrorIdentifier
18
+ from crypticorn.trade.client.models.api_error_level import ApiErrorLevel
19
+ from crypticorn.trade.client.models.api_error_type import ApiErrorType
20
+ from crypticorn.trade.client.models.bot import Bot
21
+ from crypticorn.trade.client.models.bot_create import BotCreate
19
22
  from crypticorn.trade.client.models.bot_status import BotStatus
23
+ from crypticorn.trade.client.models.bot_update import BotUpdate
20
24
  from crypticorn.trade.client.models.exception_detail import ExceptionDetail
21
- from crypticorn.trade.client.models.exchange_key_model import ExchangeKeyModel
25
+ from crypticorn.trade.client.models.exchange import Exchange
26
+ from crypticorn.trade.client.models.exchange_key import ExchangeKey
27
+ from crypticorn.trade.client.models.exchange_key_create import ExchangeKeyCreate
28
+ from crypticorn.trade.client.models.exchange_key_update import ExchangeKeyUpdate
22
29
  from crypticorn.trade.client.models.execution_ids import ExecutionIds
23
30
  from crypticorn.trade.client.models.futures_balance import FuturesBalance
24
31
  from crypticorn.trade.client.models.futures_trading_action import FuturesTradingAction
32
+ from crypticorn.trade.client.models.futures_trading_action_create import (
33
+ FuturesTradingActionCreate,
34
+ )
35
+ from crypticorn.trade.client.models.log_level import LogLevel
25
36
  from crypticorn.trade.client.models.margin_mode import MarginMode
26
- from crypticorn.trade.client.models.notification_model import NotificationModel
27
- from crypticorn.trade.client.models.order_model import OrderModel
37
+ from crypticorn.trade.client.models.market_type import MarketType
38
+ from crypticorn.trade.client.models.notification import Notification
39
+ from crypticorn.trade.client.models.notification_create import NotificationCreate
40
+ from crypticorn.trade.client.models.notification_update import NotificationUpdate
41
+ from crypticorn.trade.client.models.order import Order
28
42
  from crypticorn.trade.client.models.order_status import OrderStatus
29
43
  from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
30
- from crypticorn.trade.client.models.spot_trading_action import SpotTradingAction
44
+ from crypticorn.trade.client.models.spot_trading_action_create import (
45
+ SpotTradingActionCreate,
46
+ )
47
+ from crypticorn.trade.client.models.strategy import Strategy
48
+ from crypticorn.trade.client.models.strategy_create import StrategyCreate
31
49
  from crypticorn.trade.client.models.strategy_exchange_info import StrategyExchangeInfo
32
- from crypticorn.trade.client.models.strategy_model_input import StrategyModelInput
33
- from crypticorn.trade.client.models.strategy_model_output import StrategyModelOutput
50
+ from crypticorn.trade.client.models.strategy_update import StrategyUpdate
34
51
  from crypticorn.trade.client.models.tpsl import TPSL
35
52
  from crypticorn.trade.client.models.trading_action_type import TradingActionType
@@ -0,0 +1,116 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Trading API
5
+
6
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class ApiErrorIdentifier(str, Enum):
22
+ """
23
+ Unique identifier of the API error.
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ ALLOCATION_BELOW_CURRENT_EXPOSURE = "allocation_below_current_exposure"
30
+ ALLOCATION_BELOW_MIN_AMOUNT = "allocation_below_min_amount"
31
+ BLACK_SWAN = "black_swan"
32
+ BOT_ALREADY_DELETED = "bot_already_deleted"
33
+ BOT_DISABLED = "bot_disabled"
34
+ BOT_STOPPING_COMPLETED = "bot_stopping_completed"
35
+ BOT_STOPPING_STARTED = "bot_stopping_started"
36
+ CLIENT_ORDER_ID_ALREADY_EXISTS = "client_order_id_already_exists"
37
+ INVALID_CONTENT_TYPE = "invalid_content_type"
38
+ DELETE_BOT_ERROR = "delete_bot_error"
39
+ EXCHANGE_INVALID_SIGNATURE = "exchange_invalid_signature"
40
+ EXCHANGE_INVALID_TIMESTAMP = "exchange_invalid_timestamp"
41
+ EXCHANGE_IP_ADDRESS_IS_NOT_AUTHORIZED = "exchange_ip_address_is_not_authorized"
42
+ EXCHANGE_KEY_ALREADY_EXISTS = "exchange_key_already_exists"
43
+ EXCHANGE_KEY_IN_USE = "exchange_key_in_use"
44
+ EXCHANGE_SYSTEM_UNDER_MAINTENANCE = "exchange_system_under_maintenance"
45
+ EXCHANGE_RATE_LIMIT_EXCEEDED = "exchange_rate_limit_exceeded"
46
+ INSUFFICIENT_PERMISSIONS_SPOT_AND_FUTURES_REQUIRED = (
47
+ "insufficient_permissions_spot_and_futures_required"
48
+ )
49
+ EXCHANGE_SERVICE_TEMPORARILY_UNAVAILABLE = (
50
+ "exchange_service_temporarily_unavailable"
51
+ )
52
+ EXCHANGE_SYSTEM_IS_BUSY = "exchange_system_is_busy"
53
+ EXCHANGE_SYSTEM_CONFIGURATION_ERROR = "exchange_system_configuration_error"
54
+ EXCHANGE_INTERNAL_SYSTEM_ERROR = "exchange_internal_system_error"
55
+ EXCHANGE_USER_ACCOUNT_IS_FROZEN = "exchange_user_account_is_frozen"
56
+ API_KEY_EXPIRED = "api_key_expired"
57
+ BEARER_TOKEN_EXPIRED = "bearer_token_expired"
58
+ FORBIDDEN = "forbidden"
59
+ HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
60
+ HTTP_REQUEST_ERROR = "http_request_error"
61
+ INSUFFICIENT_BALANCE = "insufficient_balance"
62
+ INSUFFICIENT_MARGIN = "insufficient_margin"
63
+ INSUFFICIENT_SCOPES = "insufficient_scopes"
64
+ INVALID_API_KEY = "invalid_api_key"
65
+ INVALID_BEARER = "invalid_bearer"
66
+ INVALID_DATA = "invalid_data"
67
+ INVALID_DATA_RESPONSE = "invalid_data_response"
68
+ INVALID_EXCHANGE_KEY = "invalid_exchange_key"
69
+ INVALID_MARGIN_MODE = "invalid_margin_mode"
70
+ INVALID_MODEL_NAME = "invalid_model_name"
71
+ INVALID_PARAMETER_PROVIDED = "invalid_parameter_provided"
72
+ LEVERAGE_LIMIT_EXCEEDED = "leverage_limit_exceeded"
73
+ ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = (
74
+ "order_violates_liquidation_price_constraints"
75
+ )
76
+ MARGIN_MODE_CLASH = "margin_mode_clash"
77
+ MODEL_NAME_NOT_UNIQUE = "model_name_not_unique"
78
+ NO_CREDENTIALS = "no_credentials"
79
+ NOW_API_DOWN = "now_api_down"
80
+ OBJECT_ALREADY_EXISTS = "object_already_exists"
81
+ OBJECT_CREATED = "object_created"
82
+ OBJECT_DELETED = "object_deleted"
83
+ OBJECT_NOT_FOUND = "object_not_found"
84
+ OBJECT_UPDATED = "object_updated"
85
+ ORDER_IS_ALREADY_FILLED = "order_is_already_filled"
86
+ ORDER_IS_BEING_PROCESSED = "order_is_being_processed"
87
+ ORDER_QUANTITY_LIMIT_EXCEEDED = "order_quantity_limit_exceeded"
88
+ ORDER_DOES_NOT_EXIST = "order_does_not_exist"
89
+ ORDER_PRICE_IS_INVALID = "order_price_is_invalid"
90
+ ORDER_SIZE_TOO_LARGE = "order_size_too_large"
91
+ ORDER_SIZE_TOO_SMALL = "order_size_too_small"
92
+ POSITION_LIMIT_EXCEEDED = "position_limit_exceeded"
93
+ POSITION_DOES_NOT_EXIST = "position_does_not_exist"
94
+ POSITION_OPENING_TEMPORARILY_SUSPENDED = "position_opening_temporarily_suspended"
95
+ POST_ONLY_ORDER_WOULD_IMMEDIATELY_MATCH = "post_only_order_would_immediately_match"
96
+ REQUEST_SCOPE_LIMIT_EXCEEDED = "request_scope_limit_exceeded"
97
+ RISK_LIMIT_EXCEEDED = "risk_limit_exceeded"
98
+ RPC_TIMEOUT = "rpc_timeout"
99
+ SYSTEM_SETTLEMENT_IN_PROCESS = "system_settlement_in_process"
100
+ STRATEGY_ALREADY_EXISTS = "strategy_already_exists"
101
+ STRATEGY_DISABLED = "strategy_disabled"
102
+ STRATEGY_LEVERAGE_MISMATCH = "strategy_leverage_mismatch"
103
+ STRATEGY_NOT_SUPPORTING_EXCHANGE = "strategy_not_supporting_exchange"
104
+ SUCCESS = "success"
105
+ SYMBOL_DOES_NOT_EXIST = "symbol_does_not_exist"
106
+ TRADING_ACTION_EXPIRED = "trading_action_expired"
107
+ TRADING_ACTION_SKIPPED = "trading_action_skipped"
108
+ TRADING_HAS_BEEN_LOCKED = "trading_has_been_locked"
109
+ TRADING_IS_SUSPENDED = "trading_is_suspended"
110
+ UNKNOWN_ERROR_OCCURRED = "unknown_error_occurred"
111
+ REQUESTED_RESOURCE_NOT_FOUND = "requested_resource_not_found"
112
+
113
+ @classmethod
114
+ def from_json(cls, json_str: str) -> Self:
115
+ """Create an instance of ApiErrorIdentifier from a JSON string"""
116
+ return cls(json.loads(json_str))
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Trading API
5
+
6
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class ApiErrorLevel(str, Enum):
22
+ """
23
+ Level of the API error.
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ ERROR = "error"
30
+ INFO = "info"
31
+ SUCCESS = "success"
32
+ WARNING = "warning"
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of ApiErrorLevel from a JSON string"""
37
+ return cls(json.loads(json_str))
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Trading API
5
+
6
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class ApiErrorType(str, Enum):
22
+ """
23
+ Type of the API error.
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ USER_ERROR = "user error"
30
+ EXCHANGE_ERROR = "exchange error"
31
+ SERVER_ERROR = "server error"
32
+ NO_ERROR = "no error"
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of ApiErrorType from a JSON string"""
37
+ return cls(json.loads(json_str))