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