crypticorn 1.0.1__py3-none-any.whl → 1.0.2rc2__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/hive/__init__.py +1 -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/__init__.py +2 -0
- 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/{models/deleted.py → klines/client/models/exchange.py} +15 -11
- crypticorn/klines/client/models/funding_rate_response.py +92 -0
- crypticorn/klines/client/models/health_check_response.py +89 -0
- crypticorn/{models/create_api_key_response.py → klines/client/models/history_error_response.py} +12 -22
- 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/{models/futures_balance_error.py → klines/client/models/symbol_group_response.py} +12 -14
- crypticorn/klines/client/models/symbol_info_response.py +115 -0
- crypticorn/{models/id.py → klines/client/models/symbol_type.py} +13 -11
- 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/{models/get_futures_balance200_response_inner.py → klines/client/models/validation_error_loc_inner.py} +39 -35
- 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/__init__.py +2 -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/{models → trade/client/models}/action_model.py +17 -20
- crypticorn/{models → trade/client/models}/api_error_identifier.py +3 -1
- crypticorn/{models → trade/client/models}/api_key_model.py +5 -8
- crypticorn/{models → trade/client/models}/bot_model.py +15 -11
- crypticorn/{models → trade/client/models}/futures_trading_action.py +12 -12
- crypticorn/{models → trade/client/models}/http_validation_error.py +1 -1
- crypticorn/{models → trade/client/models}/notification_model.py +8 -6
- crypticorn/{models → trade/client/models}/order_model.py +12 -15
- crypticorn/{models → trade/client/models}/post_futures_action.py +1 -1
- crypticorn/{models → trade/client/models}/strategy_exchange_info.py +1 -1
- crypticorn/{models → trade/client/models}/strategy_model.py +6 -2
- crypticorn/{models → trade/client/models}/validation_error.py +1 -1
- crypticorn/trade/client/py.typed +0 -0
- crypticorn/trade/client/rest.py +257 -0
- crypticorn/trade/main.py +39 -0
- crypticorn/trade/requirements.txt +4 -0
- crypticorn-1.0.2rc2.dist-info/METADATA +47 -0
- crypticorn-1.0.2rc2.dist-info/RECORD +128 -0
- {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/WHEEL +1 -1
- crypticorn/models/__init__.py +0 -31
- crypticorn/models/modified.py +0 -87
- crypticorn-1.0.1.dist-info/METADATA +0 -40
- crypticorn-1.0.1.dist-info/RECORD +0 -38
- /crypticorn/{models → trade/client/models}/exchange.py +0 -0
- /crypticorn/{models → trade/client/models}/execution_ids.py +0 -0
- /crypticorn/{models → trade/client/models}/futures_balance.py +0 -0
- /crypticorn/{models → trade/client/models}/margin_mode.py +0 -0
- /crypticorn/{models → trade/client/models}/market_type.py +0 -0
- /crypticorn/{models → trade/client/models}/notification_type.py +0 -0
- /crypticorn/{models → trade/client/models}/order_status.py +0 -0
- /crypticorn/{models → trade/client/models}/tpsl.py +0 -0
- /crypticorn/{models → trade/client/models}/trading_action_type.py +0 -0
- /crypticorn/{models → trade/client/models}/update_notification.py +0 -0
- /crypticorn/{models → trade/client/models}/validation_error_loc_inner.py +0 -0
- {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/LICENSE.md +0 -0
- {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.funding_rate_response import FundingRateResponse
|
18
|
+
|
19
|
+
class TestFundingRateResponse(unittest.TestCase):
|
20
|
+
"""FundingRateResponse 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) -> FundingRateResponse:
|
29
|
+
"""Test FundingRateResponse
|
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 `FundingRateResponse`
|
34
|
+
"""
|
35
|
+
model = FundingRateResponse()
|
36
|
+
if include_optional:
|
37
|
+
return FundingRateResponse(
|
38
|
+
symbol = '',
|
39
|
+
timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
|
40
|
+
funding_rate = 1.337
|
41
|
+
)
|
42
|
+
else:
|
43
|
+
return FundingRateResponse(
|
44
|
+
symbol = '',
|
45
|
+
timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
|
46
|
+
funding_rate = 1.337,
|
47
|
+
)
|
48
|
+
"""
|
49
|
+
|
50
|
+
def testFundingRateResponse(self):
|
51
|
+
"""Test FundingRateResponse"""
|
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,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.api.funding_rates_api import FundingRatesApi
|
18
|
+
|
19
|
+
|
20
|
+
class TestFundingRatesApi(unittest.TestCase):
|
21
|
+
"""FundingRatesApi unit test stubs"""
|
22
|
+
|
23
|
+
def setUp(self) -> None:
|
24
|
+
self.api = FundingRatesApi()
|
25
|
+
|
26
|
+
def tearDown(self) -> None:
|
27
|
+
pass
|
28
|
+
|
29
|
+
def test_funding_rate_funding_rates_symbol_get(self) -> None:
|
30
|
+
"""Test case for funding_rate_funding_rates_symbol_get
|
31
|
+
|
32
|
+
Funding Rate
|
33
|
+
"""
|
34
|
+
pass
|
35
|
+
|
36
|
+
|
37
|
+
if __name__ == '__main__':
|
38
|
+
unittest.main()
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.api.health_check_api import HealthCheckApi
|
18
|
+
|
19
|
+
|
20
|
+
class TestHealthCheckApi(unittest.TestCase):
|
21
|
+
"""HealthCheckApi unit test stubs"""
|
22
|
+
|
23
|
+
def setUp(self) -> None:
|
24
|
+
self.api = HealthCheckApi()
|
25
|
+
|
26
|
+
def tearDown(self) -> None:
|
27
|
+
pass
|
28
|
+
|
29
|
+
def test_index_get(self) -> None:
|
30
|
+
"""Test case for index_get
|
31
|
+
|
32
|
+
Index
|
33
|
+
"""
|
34
|
+
pass
|
35
|
+
|
36
|
+
|
37
|
+
if __name__ == '__main__':
|
38
|
+
unittest.main()
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.health_check_response import HealthCheckResponse
|
18
|
+
|
19
|
+
class TestHealthCheckResponse(unittest.TestCase):
|
20
|
+
"""HealthCheckResponse 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) -> HealthCheckResponse:
|
29
|
+
"""Test HealthCheckResponse
|
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 `HealthCheckResponse`
|
34
|
+
"""
|
35
|
+
model = HealthCheckResponse()
|
36
|
+
if include_optional:
|
37
|
+
return HealthCheckResponse(
|
38
|
+
status = 'ok',
|
39
|
+
version = '1.0.0'
|
40
|
+
)
|
41
|
+
else:
|
42
|
+
return HealthCheckResponse(
|
43
|
+
)
|
44
|
+
"""
|
45
|
+
|
46
|
+
def testHealthCheckResponse(self):
|
47
|
+
"""Test HealthCheckResponse"""
|
48
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
49
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
50
|
+
|
51
|
+
if __name__ == '__main__':
|
52
|
+
unittest.main()
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.history_error_response import HistoryErrorResponse
|
18
|
+
|
19
|
+
class TestHistoryErrorResponse(unittest.TestCase):
|
20
|
+
"""HistoryErrorResponse 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) -> HistoryErrorResponse:
|
29
|
+
"""Test HistoryErrorResponse
|
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 `HistoryErrorResponse`
|
34
|
+
"""
|
35
|
+
model = HistoryErrorResponse()
|
36
|
+
if include_optional:
|
37
|
+
return HistoryErrorResponse(
|
38
|
+
s = 'error',
|
39
|
+
errmsg = ''
|
40
|
+
)
|
41
|
+
else:
|
42
|
+
return HistoryErrorResponse(
|
43
|
+
errmsg = '',
|
44
|
+
)
|
45
|
+
"""
|
46
|
+
|
47
|
+
def testHistoryErrorResponse(self):
|
48
|
+
"""Test HistoryErrorResponse"""
|
49
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
50
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
51
|
+
|
52
|
+
if __name__ == '__main__':
|
53
|
+
unittest.main()
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.history_no_data_response import HistoryNoDataResponse
|
18
|
+
|
19
|
+
class TestHistoryNoDataResponse(unittest.TestCase):
|
20
|
+
"""HistoryNoDataResponse 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) -> HistoryNoDataResponse:
|
29
|
+
"""Test HistoryNoDataResponse
|
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 `HistoryNoDataResponse`
|
34
|
+
"""
|
35
|
+
model = HistoryNoDataResponse()
|
36
|
+
if include_optional:
|
37
|
+
return HistoryNoDataResponse(
|
38
|
+
s = 'no_data',
|
39
|
+
t = [
|
40
|
+
56
|
41
|
+
],
|
42
|
+
o = [
|
43
|
+
1.337
|
44
|
+
],
|
45
|
+
h = [
|
46
|
+
1.337
|
47
|
+
],
|
48
|
+
l = [
|
49
|
+
1.337
|
50
|
+
],
|
51
|
+
c = [
|
52
|
+
1.337
|
53
|
+
],
|
54
|
+
v = [
|
55
|
+
1.337
|
56
|
+
]
|
57
|
+
)
|
58
|
+
else:
|
59
|
+
return HistoryNoDataResponse(
|
60
|
+
)
|
61
|
+
"""
|
62
|
+
|
63
|
+
def testHistoryNoDataResponse(self):
|
64
|
+
"""Test HistoryNoDataResponse"""
|
65
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
66
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
67
|
+
|
68
|
+
if __name__ == '__main__':
|
69
|
+
unittest.main()
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.history_success_response import HistorySuccessResponse
|
18
|
+
|
19
|
+
class TestHistorySuccessResponse(unittest.TestCase):
|
20
|
+
"""HistorySuccessResponse 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) -> HistorySuccessResponse:
|
29
|
+
"""Test HistorySuccessResponse
|
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 `HistorySuccessResponse`
|
34
|
+
"""
|
35
|
+
model = HistorySuccessResponse()
|
36
|
+
if include_optional:
|
37
|
+
return HistorySuccessResponse(
|
38
|
+
s = 'ok',
|
39
|
+
t = [
|
40
|
+
56
|
41
|
+
],
|
42
|
+
o = [
|
43
|
+
1.337
|
44
|
+
],
|
45
|
+
h = [
|
46
|
+
1.337
|
47
|
+
],
|
48
|
+
l = [
|
49
|
+
1.337
|
50
|
+
],
|
51
|
+
c = [
|
52
|
+
1.337
|
53
|
+
],
|
54
|
+
v = [
|
55
|
+
1.337
|
56
|
+
]
|
57
|
+
)
|
58
|
+
else:
|
59
|
+
return HistorySuccessResponse(
|
60
|
+
t = [
|
61
|
+
56
|
62
|
+
],
|
63
|
+
o = [
|
64
|
+
1.337
|
65
|
+
],
|
66
|
+
h = [
|
67
|
+
1.337
|
68
|
+
],
|
69
|
+
l = [
|
70
|
+
1.337
|
71
|
+
],
|
72
|
+
c = [
|
73
|
+
1.337
|
74
|
+
],
|
75
|
+
v = [
|
76
|
+
1.337
|
77
|
+
],
|
78
|
+
)
|
79
|
+
"""
|
80
|
+
|
81
|
+
def testHistorySuccessResponse(self):
|
82
|
+
"""Test HistorySuccessResponse"""
|
83
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
84
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
85
|
+
|
86
|
+
if __name__ == '__main__':
|
87
|
+
unittest.main()
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.http_validation_error import HTTPValidationError
|
18
|
+
|
19
|
+
class TestHTTPValidationError(unittest.TestCase):
|
20
|
+
"""HTTPValidationError 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) -> HTTPValidationError:
|
29
|
+
"""Test HTTPValidationError
|
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 `HTTPValidationError`
|
34
|
+
"""
|
35
|
+
model = HTTPValidationError()
|
36
|
+
if include_optional:
|
37
|
+
return HTTPValidationError(
|
38
|
+
detail = [
|
39
|
+
client.models.validation_error.ValidationError(
|
40
|
+
loc = [
|
41
|
+
null
|
42
|
+
],
|
43
|
+
msg = '',
|
44
|
+
type = '', )
|
45
|
+
]
|
46
|
+
)
|
47
|
+
else:
|
48
|
+
return HTTPValidationError(
|
49
|
+
)
|
50
|
+
"""
|
51
|
+
|
52
|
+
def testHTTPValidationError(self):
|
53
|
+
"""Test HTTPValidationError"""
|
54
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
55
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
56
|
+
|
57
|
+
if __name__ == '__main__':
|
58
|
+
unittest.main()
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.market import Market
|
18
|
+
|
19
|
+
class TestMarket(unittest.TestCase):
|
20
|
+
"""Market unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def testMarket(self):
|
29
|
+
"""Test Market"""
|
30
|
+
# inst = Market()
|
31
|
+
|
32
|
+
if __name__ == '__main__':
|
33
|
+
unittest.main()
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.api.ohlcv_data_api import OHLCVDataApi
|
18
|
+
|
19
|
+
|
20
|
+
class TestOHLCVDataApi(unittest.TestCase):
|
21
|
+
"""OHLCVDataApi unit test stubs"""
|
22
|
+
|
23
|
+
def setUp(self) -> None:
|
24
|
+
self.api = OHLCVDataApi()
|
25
|
+
|
26
|
+
def tearDown(self) -> None:
|
27
|
+
pass
|
28
|
+
|
29
|
+
def test_get_ohlcv_market_timeframe_symbol_get(self) -> None:
|
30
|
+
"""Test case for get_ohlcv_market_timeframe_symbol_get
|
31
|
+
|
32
|
+
Get Ohlcv
|
33
|
+
"""
|
34
|
+
pass
|
35
|
+
|
36
|
+
|
37
|
+
if __name__ == '__main__':
|
38
|
+
unittest.main()
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.ohlcv_response import OHLCVResponse
|
18
|
+
|
19
|
+
class TestOHLCVResponse(unittest.TestCase):
|
20
|
+
"""OHLCVResponse 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) -> OHLCVResponse:
|
29
|
+
"""Test OHLCVResponse
|
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 `OHLCVResponse`
|
34
|
+
"""
|
35
|
+
model = OHLCVResponse()
|
36
|
+
if include_optional:
|
37
|
+
return OHLCVResponse(
|
38
|
+
timestamp = [
|
39
|
+
datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
|
40
|
+
],
|
41
|
+
open = [
|
42
|
+
1.337
|
43
|
+
],
|
44
|
+
high = [
|
45
|
+
1.337
|
46
|
+
],
|
47
|
+
low = [
|
48
|
+
1.337
|
49
|
+
],
|
50
|
+
close = [
|
51
|
+
1.337
|
52
|
+
],
|
53
|
+
volume = [
|
54
|
+
1.337
|
55
|
+
]
|
56
|
+
)
|
57
|
+
else:
|
58
|
+
return OHLCVResponse(
|
59
|
+
timestamp = [
|
60
|
+
datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
|
61
|
+
],
|
62
|
+
open = [
|
63
|
+
1.337
|
64
|
+
],
|
65
|
+
high = [
|
66
|
+
1.337
|
67
|
+
],
|
68
|
+
low = [
|
69
|
+
1.337
|
70
|
+
],
|
71
|
+
close = [
|
72
|
+
1.337
|
73
|
+
],
|
74
|
+
volume = [
|
75
|
+
1.337
|
76
|
+
],
|
77
|
+
)
|
78
|
+
"""
|
79
|
+
|
80
|
+
def testOHLCVResponse(self):
|
81
|
+
"""Test OHLCVResponse"""
|
82
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
83
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
84
|
+
|
85
|
+
if __name__ == '__main__':
|
86
|
+
unittest.main()
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
+
import unittest
|
16
|
+
|
17
|
+
from crypticorn.klines.client.models.resolution import Resolution
|
18
|
+
|
19
|
+
class TestResolution(unittest.TestCase):
|
20
|
+
"""Resolution unit test stubs"""
|
21
|
+
|
22
|
+
def setUp(self):
|
23
|
+
pass
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
pass
|
27
|
+
|
28
|
+
def testResolution(self):
|
29
|
+
"""Test Resolution"""
|
30
|
+
# inst = Resolution()
|
31
|
+
|
32
|
+
if __name__ == '__main__':
|
33
|
+
unittest.main()
|