crypticorn 1.0.0__py3-none-any.whl → 1.0.2rc1__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/__init__.py +3 -3
- crypticorn/client.py +722 -0
- crypticorn/{api.py → hive/main.py} +6 -6
- crypticorn/hive/requirements.txt +4 -0
- crypticorn/{utils.py → hive/utils.py} +2 -2
- crypticorn/klines/client/__init__.py +62 -0
- crypticorn/klines/client/api/__init__.py +9 -0
- crypticorn/klines/client/api/funding_rates_api.py +362 -0
- crypticorn/klines/client/api/health_check_api.py +281 -0
- crypticorn/klines/client/api/ohlcv_data_api.py +409 -0
- crypticorn/klines/client/api/symbols_api.py +308 -0
- crypticorn/klines/client/api/udf_api.py +1929 -0
- crypticorn/klines/client/api_client.py +797 -0
- crypticorn/klines/client/api_response.py +21 -0
- crypticorn/klines/client/configuration.py +565 -0
- crypticorn/klines/client/exceptions.py +216 -0
- crypticorn/klines/client/models/__init__.py +41 -0
- crypticorn/klines/client/models/base_response_health_check_response.py +108 -0
- crypticorn/klines/client/models/base_response_list_funding_rate_response.py +112 -0
- crypticorn/klines/client/models/base_response_list_str.py +104 -0
- crypticorn/klines/client/models/base_response_ohlcv_response.py +108 -0
- crypticorn/klines/client/models/error_response.py +101 -0
- crypticorn/klines/client/models/exchange.py +91 -0
- crypticorn/klines/client/models/funding_rate_response.py +92 -0
- crypticorn/klines/client/models/health_check_response.py +89 -0
- crypticorn/klines/client/models/history_error_response.py +89 -0
- crypticorn/klines/client/models/history_no_data_response.py +99 -0
- crypticorn/klines/client/models/history_success_response.py +99 -0
- crypticorn/klines/client/models/http_validation_error.py +95 -0
- crypticorn/klines/client/models/market.py +37 -0
- crypticorn/klines/client/models/ohlcv_response.py +98 -0
- crypticorn/klines/client/models/resolution.py +40 -0
- crypticorn/klines/client/models/response_get_history_udf_history_get.py +149 -0
- crypticorn/klines/client/models/search_symbol_response.py +97 -0
- crypticorn/klines/client/models/sort_direction.py +37 -0
- crypticorn/klines/client/models/symbol_group_response.py +87 -0
- crypticorn/klines/client/models/symbol_info_response.py +115 -0
- crypticorn/klines/client/models/symbol_type.py +89 -0
- crypticorn/klines/client/models/timeframe.py +40 -0
- crypticorn/klines/client/models/udf_config_response.py +121 -0
- crypticorn/klines/client/models/validation_error.py +99 -0
- crypticorn/klines/client/models/validation_error_loc_inner.py +138 -0
- crypticorn/klines/client/py.typed +0 -0
- crypticorn/klines/client/rest.py +257 -0
- crypticorn/klines/main.py +42 -0
- crypticorn/klines/requirements.txt +4 -0
- crypticorn/klines/test/__init__.py +0 -0
- crypticorn/klines/test/test_base_response_health_check_response.py +56 -0
- crypticorn/klines/test/test_base_response_list_funding_rate_response.py +59 -0
- crypticorn/klines/test/test_base_response_list_str.py +56 -0
- crypticorn/klines/test/test_base_response_ohlcv_response.py +72 -0
- crypticorn/klines/test/test_error_response.py +57 -0
- crypticorn/klines/test/test_exchange.py +56 -0
- crypticorn/klines/test/test_funding_rate_response.py +56 -0
- crypticorn/klines/test/test_funding_rates_api.py +38 -0
- crypticorn/klines/test/test_health_check_api.py +38 -0
- crypticorn/klines/test/test_health_check_response.py +52 -0
- crypticorn/klines/test/test_history_error_response.py +53 -0
- crypticorn/klines/test/test_history_no_data_response.py +69 -0
- crypticorn/klines/test/test_history_success_response.py +87 -0
- crypticorn/klines/test/test_http_validation_error.py +58 -0
- crypticorn/klines/test/test_market.py +33 -0
- crypticorn/klines/test/test_ohlcv_data_api.py +38 -0
- crypticorn/klines/test/test_ohlcv_response.py +86 -0
- crypticorn/klines/test/test_resolution.py +33 -0
- crypticorn/klines/test/test_response_get_history_udf_history_get.py +89 -0
- crypticorn/klines/test/test_search_symbol_response.py +62 -0
- crypticorn/klines/test/test_sort_direction.py +33 -0
- crypticorn/klines/test/test_symbol_group_response.py +53 -0
- crypticorn/klines/test/test_symbol_info_response.py +84 -0
- crypticorn/klines/test/test_symbol_type.py +54 -0
- crypticorn/klines/test/test_symbols_api.py +38 -0
- crypticorn/klines/test/test_timeframe.py +33 -0
- crypticorn/klines/test/test_udf_api.py +80 -0
- crypticorn/klines/test/test_udf_config_response.py +95 -0
- crypticorn/klines/test/test_validation_error.py +60 -0
- crypticorn/klines/test/test_validation_error_loc_inner.py +50 -0
- crypticorn/trade/client/__init__.py +63 -0
- crypticorn/trade/client/api/__init__.py +13 -0
- crypticorn/trade/client/api/api_keys_api.py +1468 -0
- crypticorn/trade/client/api/bots_api.py +1211 -0
- crypticorn/trade/client/api/exchanges_api.py +297 -0
- crypticorn/trade/client/api/futures_trading_panel_api.py +1463 -0
- crypticorn/trade/client/api/notifications_api.py +1767 -0
- crypticorn/trade/client/api/orders_api.py +331 -0
- crypticorn/trade/client/api/status_api.py +278 -0
- crypticorn/trade/client/api/strategies_api.py +331 -0
- crypticorn/trade/client/api/trading_actions_api.py +898 -0
- crypticorn/trade/client/api_client.py +797 -0
- crypticorn/trade/client/api_response.py +21 -0
- crypticorn/trade/client/configuration.py +574 -0
- crypticorn/trade/client/exceptions.py +216 -0
- crypticorn/trade/client/models/__init__.py +38 -0
- crypticorn/trade/client/models/action_model.py +202 -0
- crypticorn/trade/client/models/api_error_identifier.py +83 -0
- crypticorn/trade/client/models/api_key_model.py +135 -0
- crypticorn/trade/client/models/bot_model.py +122 -0
- crypticorn/trade/client/models/exchange.py +37 -0
- crypticorn/trade/client/models/execution_ids.py +91 -0
- crypticorn/trade/client/models/futures_balance.py +109 -0
- crypticorn/trade/client/models/futures_trading_action.py +198 -0
- crypticorn/trade/client/models/http_validation_error.py +95 -0
- crypticorn/trade/client/models/margin_mode.py +37 -0
- crypticorn/trade/client/models/market_type.py +37 -0
- crypticorn/trade/client/models/notification_model.py +113 -0
- crypticorn/trade/client/models/notification_type.py +39 -0
- crypticorn/trade/client/models/order_model.py +263 -0
- crypticorn/trade/client/models/order_status.py +40 -0
- crypticorn/trade/client/models/post_futures_action.py +93 -0
- crypticorn/trade/client/models/strategy_exchange_info.py +90 -0
- crypticorn/trade/client/models/strategy_model.py +119 -0
- crypticorn/trade/client/models/tpsl.py +116 -0
- crypticorn/trade/client/models/trading_action_type.py +39 -0
- crypticorn/trade/client/models/update_notification.py +91 -0
- crypticorn/trade/client/models/validation_error.py +99 -0
- crypticorn/trade/client/models/validation_error_loc_inner.py +138 -0
- crypticorn/trade/client/py.typed +0 -0
- crypticorn/trade/client/rest.py +257 -0
- crypticorn/trade/main.py +38 -0
- crypticorn/trade/requirements.txt +4 -0
- crypticorn/trade/test/__init__.py +0 -0
- crypticorn/trade/test/test_action_model.py +87 -0
- crypticorn/trade/test/test_api_error_identifier.py +33 -0
- crypticorn/trade/test/test_api_key_model.py +61 -0
- crypticorn/trade/test/test_api_keys_api.py +66 -0
- crypticorn/trade/test/test_bot_model.py +64 -0
- crypticorn/trade/test/test_bots_api.py +59 -0
- crypticorn/trade/test/test_exchange.py +33 -0
- crypticorn/trade/test/test_exchanges_api.py +38 -0
- crypticorn/trade/test/test_execution_ids.py +68 -0
- crypticorn/trade/test/test_futures_balance.py +62 -0
- crypticorn/trade/test/test_futures_trading_action.py +86 -0
- crypticorn/trade/test/test_futures_trading_panel_api.py +66 -0
- crypticorn/trade/test/test_http_validation_error.py +58 -0
- crypticorn/trade/test/test_margin_mode.py +33 -0
- crypticorn/trade/test/test_market_type.py +33 -0
- crypticorn/trade/test/test_notification_model.py +59 -0
- crypticorn/trade/test/test_notification_type.py +33 -0
- crypticorn/trade/test/test_notifications_api.py +73 -0
- crypticorn/trade/test/test_order_model.py +75 -0
- crypticorn/trade/test/test_order_status.py +33 -0
- crypticorn/trade/test/test_orders_api.py +38 -0
- crypticorn/trade/test/test_post_futures_action.py +72 -0
- crypticorn/trade/test/test_status_api.py +38 -0
- crypticorn/trade/test/test_strategies_api.py +38 -0
- crypticorn/trade/test/test_strategy_exchange_info.py +54 -0
- crypticorn/trade/test/test_strategy_model.py +73 -0
- crypticorn/trade/test/test_tpsl.py +56 -0
- crypticorn/trade/test/test_trading_action_type.py +33 -0
- crypticorn/trade/test/test_trading_actions_api.py +52 -0
- crypticorn/trade/test/test_update_notification.py +54 -0
- crypticorn/trade/test/test_validation_error.py +60 -0
- crypticorn/trade/test/test_validation_error_loc_inner.py +50 -0
- crypticorn-1.0.2rc1.dist-info/METADATA +47 -0
- crypticorn-1.0.2rc1.dist-info/RECORD +158 -0
- {crypticorn-1.0.0.dist-info → crypticorn-1.0.2rc1.dist-info}/WHEEL +1 -1
- crypticorn-1.0.0.dist-info/METADATA +0 -34
- crypticorn-1.0.0.dist-info/RECORD +0 -8
- {crypticorn-1.0.0.dist-info → crypticorn-1.0.2rc1.dist-info}/LICENSE.md +0 -0
- {crypticorn-1.0.0.dist-info → crypticorn-1.0.2rc1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.order_model import OrderModel
|
18
|
+
|
19
|
+
class TestOrderModel(unittest.TestCase):
|
20
|
+
"""OrderModel unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def make_instance(self, include_optional) -> OrderModel:
|
29
|
+
"""Test OrderModel
|
30
|
+
include_optional is a boolean, when False only required
|
31
|
+
params are included, when True both required and
|
32
|
+
optional params are included """
|
33
|
+
# uncomment below to create an instance of `OrderModel`
|
34
|
+
"""
|
35
|
+
model = OrderModel()
|
36
|
+
if include_optional:
|
37
|
+
return OrderModel(
|
38
|
+
id = '',
|
39
|
+
trading_action_id = '',
|
40
|
+
execution_id = '',
|
41
|
+
exchange_order_id = '',
|
42
|
+
position_id = '',
|
43
|
+
api_key_id = '',
|
44
|
+
user_id = '',
|
45
|
+
bot_id = '',
|
46
|
+
client_order_id = '',
|
47
|
+
exchange = 'kucoin',
|
48
|
+
symbol = '',
|
49
|
+
common_symbol = '',
|
50
|
+
timestamp = 56,
|
51
|
+
price = 1.337,
|
52
|
+
action_type = 'open_long',
|
53
|
+
market_type = 'spot',
|
54
|
+
margin_mode = 'isolated',
|
55
|
+
status_code = 'success',
|
56
|
+
status = 'new',
|
57
|
+
filled_perc = 1.337,
|
58
|
+
filled_qty = 1.337,
|
59
|
+
fee = 1.337,
|
60
|
+
leverage = 1.337,
|
61
|
+
order_details = None,
|
62
|
+
pnl = 1.337
|
63
|
+
)
|
64
|
+
else:
|
65
|
+
return OrderModel(
|
66
|
+
)
|
67
|
+
"""
|
68
|
+
|
69
|
+
def testOrderModel(self):
|
70
|
+
"""Test OrderModel"""
|
71
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
72
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
73
|
+
|
74
|
+
if __name__ == '__main__':
|
75
|
+
unittest.main()
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.order_status import OrderStatus
|
18
|
+
|
19
|
+
class TestOrderStatus(unittest.TestCase):
|
20
|
+
"""OrderStatus unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def testOrderStatus(self):
|
29
|
+
"""Test OrderStatus"""
|
30
|
+
# inst = OrderStatus()
|
31
|
+
|
32
|
+
if __name__ == '__main__':
|
33
|
+
unittest.main()
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.api.orders_api import OrdersApi
|
18
|
+
|
19
|
+
|
20
|
+
class TestOrdersApi(unittest.TestCase):
|
21
|
+
"""OrdersApi unit test stubs"""
|
22
|
+
|
23
|
+
def setUp(self) -> None:
|
24
|
+
self.api = OrdersApi()
|
25
|
+
|
26
|
+
def tearDown(self) -> None:
|
27
|
+
pass
|
28
|
+
|
29
|
+
def test_get_orders(self) -> None:
|
30
|
+
"""Test case for get_orders
|
31
|
+
|
32
|
+
Get Orders
|
33
|
+
"""
|
34
|
+
pass
|
35
|
+
|
36
|
+
|
37
|
+
if __name__ == '__main__':
|
38
|
+
unittest.main()
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
|
18
|
+
|
19
|
+
class TestPostFuturesAction(unittest.TestCase):
|
20
|
+
"""PostFuturesAction unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def make_instance(self, include_optional) -> PostFuturesAction:
|
29
|
+
"""Test PostFuturesAction
|
30
|
+
include_optional is a boolean, when False only required
|
31
|
+
params are included, when True both required and
|
32
|
+
optional params are included """
|
33
|
+
# uncomment below to create an instance of `PostFuturesAction`
|
34
|
+
"""
|
35
|
+
model = PostFuturesAction()
|
36
|
+
if include_optional:
|
37
|
+
return PostFuturesAction(
|
38
|
+
id = '',
|
39
|
+
execution_ids = client.models.execution_ids.ExecutionIds(
|
40
|
+
main = [
|
41
|
+
''
|
42
|
+
],
|
43
|
+
sl = [
|
44
|
+
''
|
45
|
+
],
|
46
|
+
tp = [
|
47
|
+
''
|
48
|
+
], )
|
49
|
+
)
|
50
|
+
else:
|
51
|
+
return PostFuturesAction(
|
52
|
+
id = '',
|
53
|
+
execution_ids = client.models.execution_ids.ExecutionIds(
|
54
|
+
main = [
|
55
|
+
''
|
56
|
+
],
|
57
|
+
sl = [
|
58
|
+
''
|
59
|
+
],
|
60
|
+
tp = [
|
61
|
+
''
|
62
|
+
], ),
|
63
|
+
)
|
64
|
+
"""
|
65
|
+
|
66
|
+
def testPostFuturesAction(self):
|
67
|
+
"""Test PostFuturesAction"""
|
68
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
69
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
70
|
+
|
71
|
+
if __name__ == '__main__':
|
72
|
+
unittest.main()
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.api.status_api import StatusApi
|
18
|
+
|
19
|
+
|
20
|
+
class TestStatusApi(unittest.TestCase):
|
21
|
+
"""StatusApi unit test stubs"""
|
22
|
+
|
23
|
+
def setUp(self) -> None:
|
24
|
+
self.api = StatusApi()
|
25
|
+
|
26
|
+
def tearDown(self) -> None:
|
27
|
+
pass
|
28
|
+
|
29
|
+
def test_ping(self) -> None:
|
30
|
+
"""Test case for ping
|
31
|
+
|
32
|
+
Ping
|
33
|
+
"""
|
34
|
+
pass
|
35
|
+
|
36
|
+
|
37
|
+
if __name__ == '__main__':
|
38
|
+
unittest.main()
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.api.strategies_api import StrategiesApi
|
18
|
+
|
19
|
+
|
20
|
+
class TestStrategiesApi(unittest.TestCase):
|
21
|
+
"""StrategiesApi unit test stubs"""
|
22
|
+
|
23
|
+
def setUp(self) -> None:
|
24
|
+
self.api = StrategiesApi()
|
25
|
+
|
26
|
+
def tearDown(self) -> None:
|
27
|
+
pass
|
28
|
+
|
29
|
+
def test_get_strategies(self) -> None:
|
30
|
+
"""Test case for get_strategies
|
31
|
+
|
32
|
+
Get Strategies
|
33
|
+
"""
|
34
|
+
pass
|
35
|
+
|
36
|
+
|
37
|
+
if __name__ == '__main__':
|
38
|
+
unittest.main()
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.strategy_exchange_info import StrategyExchangeInfo
|
18
|
+
|
19
|
+
class TestStrategyExchangeInfo(unittest.TestCase):
|
20
|
+
"""StrategyExchangeInfo unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def make_instance(self, include_optional) -> StrategyExchangeInfo:
|
29
|
+
"""Test StrategyExchangeInfo
|
30
|
+
include_optional is a boolean, when False only required
|
31
|
+
params are included, when True both required and
|
32
|
+
optional params are included """
|
33
|
+
# uncomment below to create an instance of `StrategyExchangeInfo`
|
34
|
+
"""
|
35
|
+
model = StrategyExchangeInfo()
|
36
|
+
if include_optional:
|
37
|
+
return StrategyExchangeInfo(
|
38
|
+
exchange = 'kucoin',
|
39
|
+
min_amount = 1.337
|
40
|
+
)
|
41
|
+
else:
|
42
|
+
return StrategyExchangeInfo(
|
43
|
+
exchange = 'kucoin',
|
44
|
+
min_amount = 1.337,
|
45
|
+
)
|
46
|
+
"""
|
47
|
+
|
48
|
+
def testStrategyExchangeInfo(self):
|
49
|
+
"""Test StrategyExchangeInfo"""
|
50
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
51
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
52
|
+
|
53
|
+
if __name__ == '__main__':
|
54
|
+
unittest.main()
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.strategy_model import StrategyModel
|
18
|
+
|
19
|
+
class TestStrategyModel(unittest.TestCase):
|
20
|
+
"""StrategyModel unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def make_instance(self, include_optional) -> StrategyModel:
|
29
|
+
"""Test StrategyModel
|
30
|
+
include_optional is a boolean, when False only required
|
31
|
+
params are included, when True both required and
|
32
|
+
optional params are included """
|
33
|
+
# uncomment below to create an instance of `StrategyModel`
|
34
|
+
"""
|
35
|
+
model = StrategyModel()
|
36
|
+
if include_optional:
|
37
|
+
return StrategyModel(
|
38
|
+
id = '',
|
39
|
+
identifier = '',
|
40
|
+
name = '',
|
41
|
+
description = '',
|
42
|
+
exchanges = [
|
43
|
+
client.models.strategy_exchange_info.StrategyExchangeInfo(
|
44
|
+
exchange = 'kucoin',
|
45
|
+
min_amount = 1.337, )
|
46
|
+
],
|
47
|
+
enabled = True,
|
48
|
+
leverage = 56,
|
49
|
+
performance_fee = 1.337
|
50
|
+
)
|
51
|
+
else:
|
52
|
+
return StrategyModel(
|
53
|
+
identifier = '',
|
54
|
+
name = '',
|
55
|
+
description = '',
|
56
|
+
exchanges = [
|
57
|
+
client.models.strategy_exchange_info.StrategyExchangeInfo(
|
58
|
+
exchange = 'kucoin',
|
59
|
+
min_amount = 1.337, )
|
60
|
+
],
|
61
|
+
enabled = True,
|
62
|
+
leverage = 56,
|
63
|
+
performance_fee = 1.337,
|
64
|
+
)
|
65
|
+
"""
|
66
|
+
|
67
|
+
def testStrategyModel(self):
|
68
|
+
"""Test StrategyModel"""
|
69
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
70
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
71
|
+
|
72
|
+
if __name__ == '__main__':
|
73
|
+
unittest.main()
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.tpsl import TPSL
|
18
|
+
|
19
|
+
class TestTPSL(unittest.TestCase):
|
20
|
+
"""TPSL unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def make_instance(self, include_optional) -> TPSL:
|
29
|
+
"""Test TPSL
|
30
|
+
include_optional is a boolean, when False only required
|
31
|
+
params are included, when True both required and
|
32
|
+
optional params are included """
|
33
|
+
# uncomment below to create an instance of `TPSL`
|
34
|
+
"""
|
35
|
+
model = TPSL()
|
36
|
+
if include_optional:
|
37
|
+
return TPSL(
|
38
|
+
price_delta = 0.0,
|
39
|
+
price = 1.337,
|
40
|
+
allocation = 0.0,
|
41
|
+
execution_id = '',
|
42
|
+
client_order_id = ''
|
43
|
+
)
|
44
|
+
else:
|
45
|
+
return TPSL(
|
46
|
+
allocation = 0.0,
|
47
|
+
)
|
48
|
+
"""
|
49
|
+
|
50
|
+
def testTPSL(self):
|
51
|
+
"""Test TPSL"""
|
52
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
53
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
54
|
+
|
55
|
+
if __name__ == '__main__':
|
56
|
+
unittest.main()
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
18
|
+
|
19
|
+
class TestTradingActionType(unittest.TestCase):
|
20
|
+
"""TradingActionType unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def testTradingActionType(self):
|
29
|
+
"""Test TradingActionType"""
|
30
|
+
# inst = TradingActionType()
|
31
|
+
|
32
|
+
if __name__ == '__main__':
|
33
|
+
unittest.main()
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.api.trading_actions_api import TradingActionsApi
|
18
|
+
|
19
|
+
|
20
|
+
class TestTradingActionsApi(unittest.TestCase):
|
21
|
+
"""TradingActionsApi unit test stubs"""
|
22
|
+
|
23
|
+
def setUp(self) -> None:
|
24
|
+
self.api = TradingActionsApi()
|
25
|
+
|
26
|
+
def tearDown(self) -> None:
|
27
|
+
pass
|
28
|
+
|
29
|
+
def test_get_actions(self) -> None:
|
30
|
+
"""Test case for get_actions
|
31
|
+
|
32
|
+
Get Actions
|
33
|
+
"""
|
34
|
+
pass
|
35
|
+
|
36
|
+
def test_post_futures_action(self) -> None:
|
37
|
+
"""Test case for post_futures_action
|
38
|
+
|
39
|
+
Post Futures Action
|
40
|
+
"""
|
41
|
+
pass
|
42
|
+
|
43
|
+
def test_post_spot_action(self) -> None:
|
44
|
+
"""Test case for post_spot_action
|
45
|
+
|
46
|
+
Post Spot Action
|
47
|
+
"""
|
48
|
+
pass
|
49
|
+
|
50
|
+
|
51
|
+
if __name__ == '__main__':
|
52
|
+
unittest.main()
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.update_notification import UpdateNotification
|
18
|
+
|
19
|
+
class TestUpdateNotification(unittest.TestCase):
|
20
|
+
"""UpdateNotification unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def make_instance(self, include_optional) -> UpdateNotification:
|
29
|
+
"""Test UpdateNotification
|
30
|
+
include_optional is a boolean, when False only required
|
31
|
+
params are included, when True both required and
|
32
|
+
optional params are included """
|
33
|
+
# uncomment below to create an instance of `UpdateNotification`
|
34
|
+
"""
|
35
|
+
model = UpdateNotification()
|
36
|
+
if include_optional:
|
37
|
+
return UpdateNotification(
|
38
|
+
id = '',
|
39
|
+
viewed = True,
|
40
|
+
sent = True
|
41
|
+
)
|
42
|
+
else:
|
43
|
+
return UpdateNotification(
|
44
|
+
id = '',
|
45
|
+
)
|
46
|
+
"""
|
47
|
+
|
48
|
+
def testUpdateNotification(self):
|
49
|
+
"""Test UpdateNotification"""
|
50
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
51
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
52
|
+
|
53
|
+
if __name__ == '__main__':
|
54
|
+
unittest.main()
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.trade.client.models.validation_error import ValidationError
|
18
|
+
|
19
|
+
class TestValidationError(unittest.TestCase):
|
20
|
+
"""ValidationError unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def make_instance(self, include_optional) -> ValidationError:
|
29
|
+
"""Test ValidationError
|
30
|
+
include_optional is a boolean, when False only required
|
31
|
+
params are included, when True both required and
|
32
|
+
optional params are included """
|
33
|
+
# uncomment below to create an instance of `ValidationError`
|
34
|
+
"""
|
35
|
+
model = ValidationError()
|
36
|
+
if include_optional:
|
37
|
+
return ValidationError(
|
38
|
+
loc = [
|
39
|
+
null
|
40
|
+
],
|
41
|
+
msg = '',
|
42
|
+
type = ''
|
43
|
+
)
|
44
|
+
else:
|
45
|
+
return ValidationError(
|
46
|
+
loc = [
|
47
|
+
null
|
48
|
+
],
|
49
|
+
msg = '',
|
50
|
+
type = '',
|
51
|
+
)
|
52
|
+
"""
|
53
|
+
|
54
|
+
def testValidationError(self):
|
55
|
+
"""Test ValidationError"""
|
56
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
57
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
58
|
+
|
59
|
+
if __name__ == '__main__':
|
60
|
+
unittest.main()
|