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.
Files changed (132) hide show
  1. crypticorn/__init__.py +3 -3
  2. crypticorn/client.py +722 -0
  3. crypticorn/hive/__init__.py +1 -0
  4. crypticorn/{api.py → hive/main.py} +6 -6
  5. crypticorn/hive/requirements.txt +4 -0
  6. crypticorn/{utils.py → hive/utils.py} +2 -2
  7. crypticorn/klines/__init__.py +2 -0
  8. crypticorn/klines/client/__init__.py +62 -0
  9. crypticorn/klines/client/api/__init__.py +9 -0
  10. crypticorn/klines/client/api/funding_rates_api.py +362 -0
  11. crypticorn/klines/client/api/health_check_api.py +281 -0
  12. crypticorn/klines/client/api/ohlcv_data_api.py +409 -0
  13. crypticorn/klines/client/api/symbols_api.py +308 -0
  14. crypticorn/klines/client/api/udf_api.py +1929 -0
  15. crypticorn/klines/client/api_client.py +797 -0
  16. crypticorn/klines/client/api_response.py +21 -0
  17. crypticorn/klines/client/configuration.py +565 -0
  18. crypticorn/klines/client/exceptions.py +216 -0
  19. crypticorn/klines/client/models/__init__.py +41 -0
  20. crypticorn/klines/client/models/base_response_health_check_response.py +108 -0
  21. crypticorn/klines/client/models/base_response_list_funding_rate_response.py +112 -0
  22. crypticorn/klines/client/models/base_response_list_str.py +104 -0
  23. crypticorn/klines/client/models/base_response_ohlcv_response.py +108 -0
  24. crypticorn/klines/client/models/error_response.py +101 -0
  25. crypticorn/{models/deleted.py → klines/client/models/exchange.py} +15 -11
  26. crypticorn/klines/client/models/funding_rate_response.py +92 -0
  27. crypticorn/klines/client/models/health_check_response.py +89 -0
  28. crypticorn/{models/create_api_key_response.py → klines/client/models/history_error_response.py} +12 -22
  29. crypticorn/klines/client/models/history_no_data_response.py +99 -0
  30. crypticorn/klines/client/models/history_success_response.py +99 -0
  31. crypticorn/klines/client/models/http_validation_error.py +95 -0
  32. crypticorn/klines/client/models/market.py +37 -0
  33. crypticorn/klines/client/models/ohlcv_response.py +98 -0
  34. crypticorn/klines/client/models/resolution.py +40 -0
  35. crypticorn/klines/client/models/response_get_history_udf_history_get.py +149 -0
  36. crypticorn/klines/client/models/search_symbol_response.py +97 -0
  37. crypticorn/klines/client/models/sort_direction.py +37 -0
  38. crypticorn/{models/futures_balance_error.py → klines/client/models/symbol_group_response.py} +12 -14
  39. crypticorn/klines/client/models/symbol_info_response.py +115 -0
  40. crypticorn/{models/id.py → klines/client/models/symbol_type.py} +13 -11
  41. crypticorn/klines/client/models/timeframe.py +40 -0
  42. crypticorn/klines/client/models/udf_config_response.py +121 -0
  43. crypticorn/klines/client/models/validation_error.py +99 -0
  44. crypticorn/{models/get_futures_balance200_response_inner.py → klines/client/models/validation_error_loc_inner.py} +39 -35
  45. crypticorn/klines/client/py.typed +0 -0
  46. crypticorn/klines/client/rest.py +257 -0
  47. crypticorn/klines/main.py +42 -0
  48. crypticorn/klines/requirements.txt +4 -0
  49. crypticorn/klines/test/__init__.py +0 -0
  50. crypticorn/klines/test/test_base_response_health_check_response.py +56 -0
  51. crypticorn/klines/test/test_base_response_list_funding_rate_response.py +59 -0
  52. crypticorn/klines/test/test_base_response_list_str.py +56 -0
  53. crypticorn/klines/test/test_base_response_ohlcv_response.py +72 -0
  54. crypticorn/klines/test/test_error_response.py +57 -0
  55. crypticorn/klines/test/test_exchange.py +56 -0
  56. crypticorn/klines/test/test_funding_rate_response.py +56 -0
  57. crypticorn/klines/test/test_funding_rates_api.py +38 -0
  58. crypticorn/klines/test/test_health_check_api.py +38 -0
  59. crypticorn/klines/test/test_health_check_response.py +52 -0
  60. crypticorn/klines/test/test_history_error_response.py +53 -0
  61. crypticorn/klines/test/test_history_no_data_response.py +69 -0
  62. crypticorn/klines/test/test_history_success_response.py +87 -0
  63. crypticorn/klines/test/test_http_validation_error.py +58 -0
  64. crypticorn/klines/test/test_market.py +33 -0
  65. crypticorn/klines/test/test_ohlcv_data_api.py +38 -0
  66. crypticorn/klines/test/test_ohlcv_response.py +86 -0
  67. crypticorn/klines/test/test_resolution.py +33 -0
  68. crypticorn/klines/test/test_response_get_history_udf_history_get.py +89 -0
  69. crypticorn/klines/test/test_search_symbol_response.py +62 -0
  70. crypticorn/klines/test/test_sort_direction.py +33 -0
  71. crypticorn/klines/test/test_symbol_group_response.py +53 -0
  72. crypticorn/klines/test/test_symbol_info_response.py +84 -0
  73. crypticorn/klines/test/test_symbol_type.py +54 -0
  74. crypticorn/klines/test/test_symbols_api.py +38 -0
  75. crypticorn/klines/test/test_timeframe.py +33 -0
  76. crypticorn/klines/test/test_udf_api.py +80 -0
  77. crypticorn/klines/test/test_udf_config_response.py +95 -0
  78. crypticorn/klines/test/test_validation_error.py +60 -0
  79. crypticorn/klines/test/test_validation_error_loc_inner.py +50 -0
  80. crypticorn/trade/__init__.py +2 -0
  81. crypticorn/trade/client/__init__.py +63 -0
  82. crypticorn/trade/client/api/__init__.py +13 -0
  83. crypticorn/trade/client/api/api_keys_api.py +1468 -0
  84. crypticorn/trade/client/api/bots_api.py +1211 -0
  85. crypticorn/trade/client/api/exchanges_api.py +297 -0
  86. crypticorn/trade/client/api/futures_trading_panel_api.py +1463 -0
  87. crypticorn/trade/client/api/notifications_api.py +1767 -0
  88. crypticorn/trade/client/api/orders_api.py +331 -0
  89. crypticorn/trade/client/api/status_api.py +278 -0
  90. crypticorn/trade/client/api/strategies_api.py +331 -0
  91. crypticorn/trade/client/api/trading_actions_api.py +898 -0
  92. crypticorn/trade/client/api_client.py +797 -0
  93. crypticorn/trade/client/api_response.py +21 -0
  94. crypticorn/trade/client/configuration.py +574 -0
  95. crypticorn/trade/client/exceptions.py +216 -0
  96. crypticorn/trade/client/models/__init__.py +38 -0
  97. crypticorn/{models → trade/client/models}/action_model.py +17 -20
  98. crypticorn/{models → trade/client/models}/api_error_identifier.py +3 -1
  99. crypticorn/{models → trade/client/models}/api_key_model.py +5 -8
  100. crypticorn/{models → trade/client/models}/bot_model.py +15 -11
  101. crypticorn/{models → trade/client/models}/futures_trading_action.py +12 -12
  102. crypticorn/{models → trade/client/models}/http_validation_error.py +1 -1
  103. crypticorn/{models → trade/client/models}/notification_model.py +8 -6
  104. crypticorn/{models → trade/client/models}/order_model.py +12 -15
  105. crypticorn/{models → trade/client/models}/post_futures_action.py +1 -1
  106. crypticorn/{models → trade/client/models}/strategy_exchange_info.py +1 -1
  107. crypticorn/{models → trade/client/models}/strategy_model.py +6 -2
  108. crypticorn/{models → trade/client/models}/validation_error.py +1 -1
  109. crypticorn/trade/client/py.typed +0 -0
  110. crypticorn/trade/client/rest.py +257 -0
  111. crypticorn/trade/main.py +39 -0
  112. crypticorn/trade/requirements.txt +4 -0
  113. crypticorn-1.0.2rc2.dist-info/METADATA +47 -0
  114. crypticorn-1.0.2rc2.dist-info/RECORD +128 -0
  115. {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/WHEEL +1 -1
  116. crypticorn/models/__init__.py +0 -31
  117. crypticorn/models/modified.py +0 -87
  118. crypticorn-1.0.1.dist-info/METADATA +0 -40
  119. crypticorn-1.0.1.dist-info/RECORD +0 -38
  120. /crypticorn/{models → trade/client/models}/exchange.py +0 -0
  121. /crypticorn/{models → trade/client/models}/execution_ids.py +0 -0
  122. /crypticorn/{models → trade/client/models}/futures_balance.py +0 -0
  123. /crypticorn/{models → trade/client/models}/margin_mode.py +0 -0
  124. /crypticorn/{models → trade/client/models}/market_type.py +0 -0
  125. /crypticorn/{models → trade/client/models}/notification_type.py +0 -0
  126. /crypticorn/{models → trade/client/models}/order_status.py +0 -0
  127. /crypticorn/{models → trade/client/models}/tpsl.py +0 -0
  128. /crypticorn/{models → trade/client/models}/trading_action_type.py +0 -0
  129. /crypticorn/{models → trade/client/models}/update_notification.py +0 -0
  130. /crypticorn/{models → trade/client/models}/validation_error_loc_inner.py +0 -0
  131. {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/LICENSE.md +0 -0
  132. {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,308 @@
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
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field
20
+ from typing import Any
21
+ from typing_extensions import Annotated
22
+ from crypticorn.klines.client.models.base_response_list_str import BaseResponseListStr
23
+
24
+ from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
25
+ from crypticorn.klines.client.api_response import ApiResponse
26
+ from crypticorn.klines.client.rest import RESTResponseType
27
+
28
+
29
+ class SymbolsApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def symbols_symbols_market_get(
44
+ self,
45
+ market: Annotated[Any, Field(description="Market type (spot or futures)")],
46
+ _request_timeout: Union[
47
+ None,
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Tuple[
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Annotated[StrictFloat, Field(gt=0)]
52
+ ]
53
+ ] = None,
54
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
55
+ _content_type: Optional[StrictStr] = None,
56
+ _headers: Optional[Dict[StrictStr, Any]] = None,
57
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
+ ) -> BaseResponseListStr:
59
+ """Symbols
60
+
61
+ Retrieve a list of whitelisted symbols for a specific market.
62
+
63
+ :param market: Market type (spot or futures) (required)
64
+ :type market: Market
65
+ :param _request_timeout: timeout setting for this request. If one
66
+ number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :type _request_timeout: int, tuple(int, int), optional
70
+ :param _request_auth: set to override the auth_settings for an a single
71
+ request; this effectively ignores the
72
+ authentication in the spec for a single request.
73
+ :type _request_auth: dict, optional
74
+ :param _content_type: force content-type for the request.
75
+ :type _content_type: str, Optional
76
+ :param _headers: set to override the headers for a single
77
+ request; this effectively ignores the headers
78
+ in the spec for a single request.
79
+ :type _headers: dict, optional
80
+ :param _host_index: set to override the host_index for a single
81
+ request; this effectively ignores the host_index
82
+ in the spec for a single request.
83
+ :type _host_index: int, optional
84
+ :return: Returns the result object.
85
+ """ # noqa: E501
86
+
87
+ _param = self._symbols_symbols_market_get_serialize(
88
+ market=market,
89
+ _request_auth=_request_auth,
90
+ _content_type=_content_type,
91
+ _headers=_headers,
92
+ _host_index=_host_index
93
+ )
94
+
95
+ _response_types_map: Dict[str, Optional[str]] = {
96
+ '200': "BaseResponseListStr",
97
+ '404': "ErrorResponse",
98
+ '500': "ErrorResponse",
99
+ '422': "HTTPValidationError",
100
+ }
101
+ response_data = self.api_client.call_api(
102
+ *_param,
103
+ _request_timeout=_request_timeout
104
+ )
105
+ response_data.read()
106
+ return self.api_client.response_deserialize(
107
+ response_data=response_data,
108
+ response_types_map=_response_types_map,
109
+ ).data
110
+
111
+
112
+ @validate_call
113
+ def symbols_symbols_market_get_with_http_info(
114
+ self,
115
+ market: Annotated[Any, Field(description="Market type (spot or futures)")],
116
+ _request_timeout: Union[
117
+ None,
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Tuple[
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Annotated[StrictFloat, Field(gt=0)]
122
+ ]
123
+ ] = None,
124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
125
+ _content_type: Optional[StrictStr] = None,
126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
+ ) -> ApiResponse[BaseResponseListStr]:
129
+ """Symbols
130
+
131
+ Retrieve a list of whitelisted symbols for a specific market.
132
+
133
+ :param market: Market type (spot or futures) (required)
134
+ :type market: Market
135
+ :param _request_timeout: timeout setting for this request. If one
136
+ number provided, it will be total request
137
+ timeout. It can also be a pair (tuple) of
138
+ (connection, read) timeouts.
139
+ :type _request_timeout: int, tuple(int, int), optional
140
+ :param _request_auth: set to override the auth_settings for an a single
141
+ request; this effectively ignores the
142
+ authentication in the spec for a single request.
143
+ :type _request_auth: dict, optional
144
+ :param _content_type: force content-type for the request.
145
+ :type _content_type: str, Optional
146
+ :param _headers: set to override the headers for a single
147
+ request; this effectively ignores the headers
148
+ in the spec for a single request.
149
+ :type _headers: dict, optional
150
+ :param _host_index: set to override the host_index for a single
151
+ request; this effectively ignores the host_index
152
+ in the spec for a single request.
153
+ :type _host_index: int, optional
154
+ :return: Returns the result object.
155
+ """ # noqa: E501
156
+
157
+ _param = self._symbols_symbols_market_get_serialize(
158
+ market=market,
159
+ _request_auth=_request_auth,
160
+ _content_type=_content_type,
161
+ _headers=_headers,
162
+ _host_index=_host_index
163
+ )
164
+
165
+ _response_types_map: Dict[str, Optional[str]] = {
166
+ '200': "BaseResponseListStr",
167
+ '404': "ErrorResponse",
168
+ '500': "ErrorResponse",
169
+ '422': "HTTPValidationError",
170
+ }
171
+ response_data = self.api_client.call_api(
172
+ *_param,
173
+ _request_timeout=_request_timeout
174
+ )
175
+ response_data.read()
176
+ return self.api_client.response_deserialize(
177
+ response_data=response_data,
178
+ response_types_map=_response_types_map,
179
+ )
180
+
181
+
182
+ @validate_call
183
+ def symbols_symbols_market_get_without_preload_content(
184
+ self,
185
+ market: Annotated[Any, Field(description="Market type (spot or futures)")],
186
+ _request_timeout: Union[
187
+ None,
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Tuple[
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Annotated[StrictFloat, Field(gt=0)]
192
+ ]
193
+ ] = None,
194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
195
+ _content_type: Optional[StrictStr] = None,
196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
198
+ ) -> RESTResponseType:
199
+ """Symbols
200
+
201
+ Retrieve a list of whitelisted symbols for a specific market.
202
+
203
+ :param market: Market type (spot or futures) (required)
204
+ :type market: Market
205
+ :param _request_timeout: timeout setting for this request. If one
206
+ number provided, it will be total request
207
+ timeout. It can also be a pair (tuple) of
208
+ (connection, read) timeouts.
209
+ :type _request_timeout: int, tuple(int, int), optional
210
+ :param _request_auth: set to override the auth_settings for an a single
211
+ request; this effectively ignores the
212
+ authentication in the spec for a single request.
213
+ :type _request_auth: dict, optional
214
+ :param _content_type: force content-type for the request.
215
+ :type _content_type: str, Optional
216
+ :param _headers: set to override the headers for a single
217
+ request; this effectively ignores the headers
218
+ in the spec for a single request.
219
+ :type _headers: dict, optional
220
+ :param _host_index: set to override the host_index for a single
221
+ request; this effectively ignores the host_index
222
+ in the spec for a single request.
223
+ :type _host_index: int, optional
224
+ :return: Returns the result object.
225
+ """ # noqa: E501
226
+
227
+ _param = self._symbols_symbols_market_get_serialize(
228
+ market=market,
229
+ _request_auth=_request_auth,
230
+ _content_type=_content_type,
231
+ _headers=_headers,
232
+ _host_index=_host_index
233
+ )
234
+
235
+ _response_types_map: Dict[str, Optional[str]] = {
236
+ '200': "BaseResponseListStr",
237
+ '404': "ErrorResponse",
238
+ '500': "ErrorResponse",
239
+ '422': "HTTPValidationError",
240
+ }
241
+ response_data = self.api_client.call_api(
242
+ *_param,
243
+ _request_timeout=_request_timeout
244
+ )
245
+ return response_data.response
246
+
247
+
248
+ def _symbols_symbols_market_get_serialize(
249
+ self,
250
+ market,
251
+ _request_auth,
252
+ _content_type,
253
+ _headers,
254
+ _host_index,
255
+ ) -> RequestSerialized:
256
+
257
+ _host = None
258
+
259
+ _collection_formats: Dict[str, str] = {
260
+ }
261
+
262
+ _path_params: Dict[str, str] = {}
263
+ _query_params: List[Tuple[str, str]] = []
264
+ _header_params: Dict[str, Optional[str]] = _headers or {}
265
+ _form_params: List[Tuple[str, str]] = []
266
+ _files: Dict[
267
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
268
+ ] = {}
269
+ _body_params: Optional[bytes] = None
270
+
271
+ # process the path parameters
272
+ if market is not None:
273
+ _path_params['market'] = market.value
274
+ # process the query parameters
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+
279
+
280
+ # set the HTTP header `Accept`
281
+ if 'Accept' not in _header_params:
282
+ _header_params['Accept'] = self.api_client.select_header_accept(
283
+ [
284
+ 'application/json'
285
+ ]
286
+ )
287
+
288
+
289
+ # authentication setting
290
+ _auth_settings: List[str] = [
291
+ ]
292
+
293
+ return self.api_client.param_serialize(
294
+ method='GET',
295
+ resource_path='/symbols/{market}',
296
+ path_params=_path_params,
297
+ query_params=_query_params,
298
+ header_params=_header_params,
299
+ body=_body_params,
300
+ post_params=_form_params,
301
+ files=_files,
302
+ auth_settings=_auth_settings,
303
+ collection_formats=_collection_formats,
304
+ _host=_host,
305
+ _request_auth=_request_auth
306
+ )
307
+
308
+