crypticorn 2.11.6__py3-none-any.whl → 2.11.8__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.
- crypticorn/common/errors.py +14 -3
- crypticorn/trade/client/__init__.py +27 -9
- crypticorn/trade/client/api/__init__.py +1 -0
- crypticorn/trade/client/api/admin_api.py +1455 -0
- crypticorn/trade/client/api/api_keys_api.py +60 -58
- crypticorn/trade/client/api/bots_api.py +289 -48
- crypticorn/trade/client/api/exchanges_api.py +474 -17
- crypticorn/trade/client/api/futures_trading_panel_api.py +1 -1
- crypticorn/trade/client/api/notifications_api.py +80 -96
- crypticorn/trade/client/api/orders_api.py +7 -7
- crypticorn/trade/client/api/status_api.py +5 -232
- crypticorn/trade/client/api/strategies_api.py +55 -54
- crypticorn/trade/client/api/trading_actions_api.py +42 -38
- crypticorn/trade/client/api_client.py +1 -1
- crypticorn/trade/client/configuration.py +1 -1
- crypticorn/trade/client/exceptions.py +1 -1
- crypticorn/trade/client/models/__init__.py +26 -9
- crypticorn/trade/client/models/api_error_identifier.py +116 -0
- crypticorn/trade/client/models/api_error_level.py +37 -0
- crypticorn/trade/client/models/api_error_type.py +37 -0
- crypticorn/trade/client/models/{bot_model.py → bot.py} +59 -60
- crypticorn/trade/client/models/bot_create.py +104 -0
- crypticorn/trade/client/models/bot_status.py +1 -1
- crypticorn/trade/client/models/bot_update.py +107 -0
- crypticorn/trade/client/models/exception_detail.py +8 -5
- crypticorn/trade/client/models/exchange.py +36 -0
- crypticorn/trade/client/models/exchange_key.py +111 -0
- crypticorn/trade/client/models/exchange_key_create.py +107 -0
- crypticorn/trade/client/models/{exchange_key_model.py → exchange_key_update.py} +12 -47
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_balance.py +1 -1
- crypticorn/trade/client/models/futures_trading_action.py +24 -16
- crypticorn/trade/client/models/{spot_trading_action.py → futures_trading_action_create.py} +24 -28
- crypticorn/trade/client/models/log_level.py +38 -0
- crypticorn/trade/client/models/margin_mode.py +1 -1
- crypticorn/trade/client/models/market_type.py +35 -0
- crypticorn/trade/client/models/{notification_model.py → notification.py} +35 -40
- crypticorn/trade/client/models/notification_create.py +114 -0
- crypticorn/trade/client/models/notification_update.py +96 -0
- crypticorn/trade/client/models/{order_model.py → order.py} +66 -59
- crypticorn/trade/client/models/order_status.py +1 -1
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/{action_model.py → spot_trading_action_create.py} +7 -65
- crypticorn/trade/client/models/{strategy_model_input.py → strategy.py} +32 -31
- crypticorn/trade/client/models/{strategy_model_output.py → strategy_create.py} +22 -36
- crypticorn/trade/client/models/strategy_exchange_info.py +4 -3
- crypticorn/trade/client/models/strategy_update.py +147 -0
- crypticorn/trade/client/models/tpsl.py +1 -1
- crypticorn/trade/client/models/trading_action_type.py +1 -1
- crypticorn/trade/client/rest.py +1 -1
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/METADATA +1 -1
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/RECORD +56 -42
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/WHEEL +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/top_level.txt +0 -0
crypticorn/common/errors.py
CHANGED
@@ -74,6 +74,7 @@ class ApiErrorIdentifier(StrEnum):
|
|
74
74
|
OBJECT_ALREADY_EXISTS = "object_already_exists"
|
75
75
|
OBJECT_CREATED = "object_created"
|
76
76
|
OBJECT_DELETED = "object_deleted"
|
77
|
+
OBJECT_LOCKED = "object_locked"
|
77
78
|
OBJECT_NOT_FOUND = "object_not_found"
|
78
79
|
OBJECT_UPDATED = "object_updated"
|
79
80
|
ORDER_ALREADY_FILLED = "order_is_already_filled"
|
@@ -139,8 +140,8 @@ class ApiError(Enum, metaclass=ApiErrorFallback):
|
|
139
140
|
)
|
140
141
|
BOT_ALREADY_DELETED = (
|
141
142
|
ApiErrorIdentifier.BOT_ALREADY_DELETED,
|
142
|
-
ApiErrorType.
|
143
|
-
ApiErrorLevel.
|
143
|
+
ApiErrorType.USER_ERROR,
|
144
|
+
ApiErrorLevel.INFO,
|
144
145
|
)
|
145
146
|
BOT_DISABLED = (
|
146
147
|
ApiErrorIdentifier.BOT_DISABLED,
|
@@ -299,7 +300,7 @@ class ApiError(Enum, metaclass=ApiErrorFallback):
|
|
299
300
|
)
|
300
301
|
INVALID_EXCHANGE_KEY = (
|
301
302
|
ApiErrorIdentifier.INVALID_EXCHANGE_KEY,
|
302
|
-
ApiErrorType.
|
303
|
+
ApiErrorType.USER_ERROR,
|
303
304
|
ApiErrorLevel.ERROR,
|
304
305
|
)
|
305
306
|
INVALID_MARGIN_MODE = (
|
@@ -362,6 +363,11 @@ class ApiError(Enum, metaclass=ApiErrorFallback):
|
|
362
363
|
ApiErrorType.SERVER_ERROR,
|
363
364
|
ApiErrorLevel.INFO,
|
364
365
|
)
|
366
|
+
OBJECT_LOCKED = (
|
367
|
+
ApiErrorIdentifier.OBJECT_LOCKED,
|
368
|
+
ApiErrorType.NO_ERROR,
|
369
|
+
ApiErrorLevel.INFO,
|
370
|
+
)
|
365
371
|
OBJECT_NOT_FOUND = (
|
366
372
|
ApiErrorIdentifier.OBJECT_NOT_FOUND,
|
367
373
|
ApiErrorType.SERVER_ERROR,
|
@@ -842,6 +848,11 @@ class StatusCodeMapper:
|
|
842
848
|
status.HTTP_204_NO_CONTENT,
|
843
849
|
status.WS_1000_NORMAL_CLOSURE,
|
844
850
|
),
|
851
|
+
# Miscellaneous
|
852
|
+
ApiError.OBJECT_LOCKED: (
|
853
|
+
status.HTTP_423_LOCKED,
|
854
|
+
status.WS_1013_TRY_AGAIN_LATER,
|
855
|
+
),
|
845
856
|
}
|
846
857
|
|
847
858
|
@classmethod
|
@@ -5,7 +5,7 @@
|
|
5
5
|
"""
|
6
6
|
Trading API
|
7
7
|
|
8
|
-
API for automated trading and exchange interface
|
8
|
+
API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
|
9
9
|
|
10
10
|
The version of the OpenAPI document: 1.0.0
|
11
11
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -18,6 +18,7 @@ __version__ = "1.0.0"
|
|
18
18
|
|
19
19
|
# import apis into sdk package
|
20
20
|
from crypticorn.trade.client.api.api_keys_api import APIKeysApi
|
21
|
+
from crypticorn.trade.client.api.admin_api import AdminApi
|
21
22
|
from crypticorn.trade.client.api.bots_api import BotsApi
|
22
23
|
from crypticorn.trade.client.api.exchanges_api import ExchangesApi
|
23
24
|
from crypticorn.trade.client.api.futures_trading_panel_api import FuturesTradingPanelApi
|
@@ -39,22 +40,39 @@ from crypticorn.trade.client.exceptions import ApiAttributeError
|
|
39
40
|
from crypticorn.trade.client.exceptions import ApiException
|
40
41
|
|
41
42
|
# import models into sdk package
|
42
|
-
from crypticorn.trade.client.models.
|
43
|
-
from crypticorn.trade.client.models.
|
43
|
+
from crypticorn.trade.client.models.api_error_identifier import ApiErrorIdentifier
|
44
|
+
from crypticorn.trade.client.models.api_error_level import ApiErrorLevel
|
45
|
+
from crypticorn.trade.client.models.api_error_type import ApiErrorType
|
46
|
+
from crypticorn.trade.client.models.bot import Bot
|
47
|
+
from crypticorn.trade.client.models.bot_create import BotCreate
|
44
48
|
from crypticorn.trade.client.models.bot_status import BotStatus
|
49
|
+
from crypticorn.trade.client.models.bot_update import BotUpdate
|
45
50
|
from crypticorn.trade.client.models.exception_detail import ExceptionDetail
|
46
|
-
from crypticorn.trade.client.models.
|
51
|
+
from crypticorn.trade.client.models.exchange import Exchange
|
52
|
+
from crypticorn.trade.client.models.exchange_key import ExchangeKey
|
53
|
+
from crypticorn.trade.client.models.exchange_key_create import ExchangeKeyCreate
|
54
|
+
from crypticorn.trade.client.models.exchange_key_update import ExchangeKeyUpdate
|
47
55
|
from crypticorn.trade.client.models.execution_ids import ExecutionIds
|
48
56
|
from crypticorn.trade.client.models.futures_balance import FuturesBalance
|
49
57
|
from crypticorn.trade.client.models.futures_trading_action import FuturesTradingAction
|
58
|
+
from crypticorn.trade.client.models.futures_trading_action_create import (
|
59
|
+
FuturesTradingActionCreate,
|
60
|
+
)
|
61
|
+
from crypticorn.trade.client.models.log_level import LogLevel
|
50
62
|
from crypticorn.trade.client.models.margin_mode import MarginMode
|
51
|
-
from crypticorn.trade.client.models.
|
52
|
-
from crypticorn.trade.client.models.
|
63
|
+
from crypticorn.trade.client.models.market_type import MarketType
|
64
|
+
from crypticorn.trade.client.models.notification import Notification
|
65
|
+
from crypticorn.trade.client.models.notification_create import NotificationCreate
|
66
|
+
from crypticorn.trade.client.models.notification_update import NotificationUpdate
|
67
|
+
from crypticorn.trade.client.models.order import Order
|
53
68
|
from crypticorn.trade.client.models.order_status import OrderStatus
|
54
69
|
from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
|
55
|
-
from crypticorn.trade.client.models.
|
70
|
+
from crypticorn.trade.client.models.spot_trading_action_create import (
|
71
|
+
SpotTradingActionCreate,
|
72
|
+
)
|
73
|
+
from crypticorn.trade.client.models.strategy import Strategy
|
74
|
+
from crypticorn.trade.client.models.strategy_create import StrategyCreate
|
56
75
|
from crypticorn.trade.client.models.strategy_exchange_info import StrategyExchangeInfo
|
57
|
-
from crypticorn.trade.client.models.
|
58
|
-
from crypticorn.trade.client.models.strategy_model_output import StrategyModelOutput
|
76
|
+
from crypticorn.trade.client.models.strategy_update import StrategyUpdate
|
59
77
|
from crypticorn.trade.client.models.tpsl import TPSL
|
60
78
|
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
# import apis into api package
|
4
4
|
from crypticorn.trade.client.api.api_keys_api import APIKeysApi
|
5
|
+
from crypticorn.trade.client.api.admin_api import AdminApi
|
5
6
|
from crypticorn.trade.client.api.bots_api import BotsApi
|
6
7
|
from crypticorn.trade.client.api.exchanges_api import ExchangesApi
|
7
8
|
from crypticorn.trade.client.api.futures_trading_panel_api import FuturesTradingPanelApi
|