crypticorn 2.5.0rc5__py3-none-any.whl → 2.5.2__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 (144) hide show
  1. crypticorn/auth/main.py +2 -0
  2. crypticorn/client.py +60 -69
  3. crypticorn/common/__init__.py +3 -1
  4. crypticorn/common/auth.py +38 -20
  5. crypticorn/common/enums.py +4 -31
  6. crypticorn/common/errors.py +72 -17
  7. crypticorn/common/exceptions.py +29 -15
  8. crypticorn/common/mixins.py +37 -0
  9. crypticorn/common/status_router.py +42 -0
  10. crypticorn/common/urls.py +2 -1
  11. crypticorn/common/utils.py +9 -14
  12. crypticorn/hive/main.py +2 -0
  13. crypticorn/klines/client/__init__.py +10 -43
  14. crypticorn/klines/client/api/__init__.py +1 -1
  15. crypticorn/klines/client/api/change_in_timeframe_api.py +16 -31
  16. crypticorn/klines/client/api/funding_rates_api.py +8 -22
  17. crypticorn/klines/client/api/ohlcv_data_api.py +17 -38
  18. crypticorn/klines/client/api/{health_check_api.py → status_api.py} +18 -23
  19. crypticorn/klines/client/api/symbols_api.py +18 -34
  20. crypticorn/klines/client/api/udf_api.py +48 -59
  21. crypticorn/klines/client/api_client.py +1 -1
  22. crypticorn/klines/client/configuration.py +1 -1
  23. crypticorn/klines/client/exceptions.py +1 -1
  24. crypticorn/klines/client/models/__init__.py +9 -42
  25. crypticorn/klines/client/models/{change_in_timeframe_response.py → change_in_timeframe.py} +5 -5
  26. crypticorn/klines/client/models/{error_response.py → exception_detail.py} +25 -20
  27. crypticorn/klines/client/models/{funding_rate_response.py → funding_rate.py} +5 -5
  28. crypticorn/klines/client/models/{ohlcv_response.py → ohlcv_history.py} +14 -14
  29. crypticorn/klines/client/models/resolution.py +1 -1
  30. crypticorn/klines/client/models/{exchange.py → search_symbol.py} +17 -13
  31. crypticorn/klines/client/models/sort_direction.py +1 -1
  32. crypticorn/klines/client/models/{symbol_group_response.py → symbol_group.py} +5 -5
  33. crypticorn/klines/client/models/{symbol_info_response.py → symbol_info.py} +5 -5
  34. crypticorn/klines/client/models/symbol_type.py +1 -1
  35. crypticorn/klines/client/models/timeframe.py +1 -1
  36. crypticorn/klines/client/models/{udf_config_response.py → udf_config.py} +7 -19
  37. crypticorn/klines/client/rest.py +1 -1
  38. crypticorn/klines/main.py +40 -23
  39. crypticorn/metrics/client/__init__.py +3 -22
  40. crypticorn/metrics/client/api/__init__.py +1 -1
  41. crypticorn/metrics/client/api/exchanges_api.py +53 -97
  42. crypticorn/metrics/client/api/indicators_api.py +26 -52
  43. crypticorn/metrics/client/api/logs_api.py +8 -23
  44. crypticorn/metrics/client/api/marketcap_api.py +36 -88
  45. crypticorn/metrics/client/api/markets_api.py +26 -55
  46. crypticorn/metrics/client/api/{health_check_api.py → status_api.py} +18 -23
  47. crypticorn/metrics/client/api/tokens_api.py +7 -21
  48. crypticorn/metrics/client/api_client.py +1 -1
  49. crypticorn/metrics/client/configuration.py +1 -1
  50. crypticorn/metrics/client/exceptions.py +1 -1
  51. crypticorn/metrics/client/models/__init__.py +2 -21
  52. crypticorn/metrics/client/models/{error_response.py → exception_detail.py} +25 -20
  53. crypticorn/metrics/client/models/severity.py +1 -1
  54. crypticorn/metrics/client/models/time_interval.py +1 -1
  55. crypticorn/metrics/client/models/trading_status.py +1 -1
  56. crypticorn/metrics/client/rest.py +1 -1
  57. crypticorn/metrics/main.py +51 -43
  58. crypticorn/pay/main.py +2 -0
  59. crypticorn/trade/client/__init__.py +1 -5
  60. crypticorn/trade/client/api/exchanges_api.py +6 -6
  61. crypticorn/trade/client/api/trading_actions_api.py +16 -15
  62. crypticorn/trade/client/models/__init__.py +1 -5
  63. crypticorn/trade/client/models/action_model.py +1 -2
  64. crypticorn/trade/client/models/bot_model.py +3 -7
  65. crypticorn/trade/client/models/exchange_key_model.py +2 -11
  66. crypticorn/trade/client/models/execution_ids.py +1 -1
  67. crypticorn/trade/client/models/futures_trading_action.py +1 -2
  68. crypticorn/trade/client/models/notification_model.py +3 -12
  69. crypticorn/trade/client/models/order_model.py +7 -21
  70. crypticorn/trade/client/models/spot_trading_action.py +230 -0
  71. crypticorn/trade/client/models/strategy_exchange_info.py +2 -3
  72. crypticorn/trade/client/models/strategy_model_input.py +1 -2
  73. crypticorn/trade/client/models/strategy_model_output.py +1 -2
  74. crypticorn/trade/client/models/tpsl.py +3 -1
  75. crypticorn/trade/main.py +2 -0
  76. {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/METADATA +7 -5
  77. {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/RECORD +81 -141
  78. {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/WHEEL +1 -1
  79. crypticorn/common/sorter.py +0 -40
  80. crypticorn/klines/client/models/base_response_health_check_response.py +0 -114
  81. crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +0 -123
  82. crypticorn/klines/client/models/base_response_list_funding_rate_response.py +0 -118
  83. crypticorn/klines/client/models/base_response_list_str.py +0 -106
  84. crypticorn/klines/client/models/base_response_ohlcv_response.py +0 -114
  85. crypticorn/klines/client/models/health_check_response.py +0 -91
  86. crypticorn/klines/client/models/history_error_response.py +0 -89
  87. crypticorn/klines/client/models/history_no_data_response.py +0 -99
  88. crypticorn/klines/client/models/history_success_response.py +0 -99
  89. crypticorn/klines/client/models/http_validation_error.py +0 -99
  90. crypticorn/klines/client/models/market.py +0 -35
  91. crypticorn/klines/client/models/market_type.py +0 -35
  92. crypticorn/klines/client/models/response_get_history_udf_history_get.py +0 -198
  93. crypticorn/klines/client/models/response_get_udf_history.py +0 -198
  94. crypticorn/klines/client/models/search_symbol_response.py +0 -104
  95. crypticorn/klines/client/models/validation_error.py +0 -105
  96. crypticorn/klines/client/models/validation_error_loc_inner.py +0 -159
  97. crypticorn/metrics/client/models/base_response_dict.py +0 -106
  98. crypticorn/metrics/client/models/base_response_health_check_response.py +0 -114
  99. crypticorn/metrics/client/models/base_response_list_dict.py +0 -106
  100. crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +0 -118
  101. crypticorn/metrics/client/models/base_response_list_str.py +0 -106
  102. crypticorn/metrics/client/models/exchange_mapping.py +0 -134
  103. crypticorn/metrics/client/models/health_check_response.py +0 -91
  104. crypticorn/metrics/client/models/http_validation_error.py +0 -99
  105. crypticorn/metrics/client/models/market.py +0 -35
  106. crypticorn/metrics/client/models/market_type.py +0 -35
  107. crypticorn/metrics/client/models/validation_error.py +0 -105
  108. crypticorn/metrics/client/models/validation_error_loc_inner.py +0 -159
  109. crypticorn/pay/client/models/api_status_res.py +0 -83
  110. crypticorn/pay/client/models/body_create_now_invoice.py +0 -98
  111. crypticorn/pay/client/models/body_create_product.py +0 -98
  112. crypticorn/pay/client/models/body_get_products.py +0 -87
  113. crypticorn/pay/client/models/body_handle_now_webhook.py +0 -98
  114. crypticorn/pay/client/models/body_update_product.py +0 -98
  115. crypticorn/pay/client/models/combined_payment_history.py +0 -101
  116. crypticorn/pay/client/models/create_invoice_req.py +0 -188
  117. crypticorn/pay/client/models/create_invoice_res.py +0 -188
  118. crypticorn/pay/client/models/currency.py +0 -165
  119. crypticorn/pay/client/models/estimate_price_req.py +0 -91
  120. crypticorn/pay/client/models/estimate_price_res.py +0 -102
  121. crypticorn/pay/client/models/get_currencies_res.py +0 -99
  122. crypticorn/pay/client/models/get_payment_status_res.py +0 -222
  123. crypticorn/pay/client/models/get_payments_list_res.py +0 -109
  124. crypticorn/pay/client/models/min_amount_req.py +0 -124
  125. crypticorn/pay/client/models/min_amount_res.py +0 -105
  126. crypticorn/pay/client/models/now_fee_structure.py +0 -104
  127. crypticorn/pay/client/models/now_payment_model.py +0 -124
  128. crypticorn/pay/client/models/now_payment_status.py +0 -42
  129. crypticorn/pay/client/models/now_webhook_payload.py +0 -181
  130. crypticorn/pay/client/models/partial_product_update_model.py +0 -150
  131. crypticorn/pay/client/models/product.py +0 -87
  132. crypticorn/pay/client/models/product_model.py +0 -128
  133. crypticorn/pay/client/models/product_subs_model.py +0 -108
  134. crypticorn/pay/client/models/product_update_model.py +0 -150
  135. crypticorn/pay/client/models/unified_payment_model.py +0 -112
  136. crypticorn/trade/client/models/api_error_identifier.py +0 -104
  137. crypticorn/trade/client/models/api_error_level.py +0 -37
  138. crypticorn/trade/client/models/api_error_type.py +0 -37
  139. crypticorn/trade/client/models/api_key_model.py +0 -156
  140. crypticorn/trade/client/models/exchange.py +0 -35
  141. crypticorn/trade/client/models/market_type.py +0 -35
  142. /crypticorn/common/{pydantic.py → decorators.py} +0 -0
  143. {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/entry_points.txt +0 -0
  144. {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Klines Service API
5
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\" } ```
6
+ API for retrieving OHLCV data, funding rates, and symbol information from Binance.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -19,10 +19,7 @@ from typing_extensions import Annotated
19
19
  from pydantic import Field, StrictInt, StrictStr
20
20
  from typing import Optional
21
21
  from typing_extensions import Annotated
22
- from crypticorn.klines.client.models.base_response_ohlcv_response import (
23
- BaseResponseOHLCVResponse,
24
- )
25
- from crypticorn.klines.client.models.market_type import MarketType
22
+ from crypticorn.klines.client.models.ohlcv_history import OHLCVHistory
26
23
  from crypticorn.klines.client.models.sort_direction import SortDirection
27
24
  from crypticorn.klines.client.models.timeframe import Timeframe
28
25
 
@@ -46,9 +43,7 @@ class OHLCVDataApi:
46
43
  @validate_call
47
44
  async def get_ohlcv(
48
45
  self,
49
- market: Annotated[
50
- MarketType, Field(description="Market type (spot or futures)")
51
- ],
46
+ market: Annotated[StrictStr, Field(description="Market type")],
52
47
  timeframe: Annotated[Timeframe, Field(description="Timeframe for the candles")],
53
48
  symbol: Annotated[
54
49
  StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
@@ -78,13 +73,13 @@ class OHLCVDataApi:
78
73
  _content_type: Optional[StrictStr] = None,
79
74
  _headers: Optional[Dict[StrictStr, Any]] = None,
80
75
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
81
- ) -> BaseResponseOHLCVResponse:
76
+ ) -> OHLCVHistory:
82
77
  """Get Ohlcv
83
78
 
84
79
  Retrieve OHLCV (Open, High, Low, Close, Volume) data for a specific market, timeframe, and symbol.
85
80
 
86
- :param market: Market type (spot or futures) (required)
87
- :type market: MarketType
81
+ :param market: Market type (required)
82
+ :type market: str
88
83
  :param timeframe: Timeframe for the candles (required)
89
84
  :type timeframe: Timeframe
90
85
  :param symbol: Trading pair symbol (e.g., BTCUSDT) (required)
@@ -134,11 +129,7 @@ class OHLCVDataApi:
134
129
  )
135
130
 
136
131
  _response_types_map: Dict[str, Optional[str]] = {
137
- "200": "BaseResponseOHLCVResponse",
138
- "400": "ErrorResponse",
139
- "404": "ErrorResponse",
140
- "500": "ErrorResponse",
141
- "422": "HTTPValidationError",
132
+ "200": "OHLCVHistory",
142
133
  }
143
134
  response_data = await self.api_client.call_api(
144
135
  *_param, _request_timeout=_request_timeout
@@ -152,9 +143,7 @@ class OHLCVDataApi:
152
143
  @validate_call
153
144
  async def get_ohlcv_with_http_info(
154
145
  self,
155
- market: Annotated[
156
- MarketType, Field(description="Market type (spot or futures)")
157
- ],
146
+ market: Annotated[StrictStr, Field(description="Market type")],
158
147
  timeframe: Annotated[Timeframe, Field(description="Timeframe for the candles")],
159
148
  symbol: Annotated[
160
149
  StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
@@ -184,13 +173,13 @@ class OHLCVDataApi:
184
173
  _content_type: Optional[StrictStr] = None,
185
174
  _headers: Optional[Dict[StrictStr, Any]] = None,
186
175
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
187
- ) -> ApiResponse[BaseResponseOHLCVResponse]:
176
+ ) -> ApiResponse[OHLCVHistory]:
188
177
  """Get Ohlcv
189
178
 
190
179
  Retrieve OHLCV (Open, High, Low, Close, Volume) data for a specific market, timeframe, and symbol.
191
180
 
192
- :param market: Market type (spot or futures) (required)
193
- :type market: MarketType
181
+ :param market: Market type (required)
182
+ :type market: str
194
183
  :param timeframe: Timeframe for the candles (required)
195
184
  :type timeframe: Timeframe
196
185
  :param symbol: Trading pair symbol (e.g., BTCUSDT) (required)
@@ -240,11 +229,7 @@ class OHLCVDataApi:
240
229
  )
241
230
 
242
231
  _response_types_map: Dict[str, Optional[str]] = {
243
- "200": "BaseResponseOHLCVResponse",
244
- "400": "ErrorResponse",
245
- "404": "ErrorResponse",
246
- "500": "ErrorResponse",
247
- "422": "HTTPValidationError",
232
+ "200": "OHLCVHistory",
248
233
  }
249
234
  response_data = await self.api_client.call_api(
250
235
  *_param, _request_timeout=_request_timeout
@@ -258,9 +243,7 @@ class OHLCVDataApi:
258
243
  @validate_call
259
244
  async def get_ohlcv_without_preload_content(
260
245
  self,
261
- market: Annotated[
262
- MarketType, Field(description="Market type (spot or futures)")
263
- ],
246
+ market: Annotated[StrictStr, Field(description="Market type")],
264
247
  timeframe: Annotated[Timeframe, Field(description="Timeframe for the candles")],
265
248
  symbol: Annotated[
266
249
  StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
@@ -295,8 +278,8 @@ class OHLCVDataApi:
295
278
 
296
279
  Retrieve OHLCV (Open, High, Low, Close, Volume) data for a specific market, timeframe, and symbol.
297
280
 
298
- :param market: Market type (spot or futures) (required)
299
- :type market: MarketType
281
+ :param market: Market type (required)
282
+ :type market: str
300
283
  :param timeframe: Timeframe for the candles (required)
301
284
  :type timeframe: Timeframe
302
285
  :param symbol: Trading pair symbol (e.g., BTCUSDT) (required)
@@ -346,11 +329,7 @@ class OHLCVDataApi:
346
329
  )
347
330
 
348
331
  _response_types_map: Dict[str, Optional[str]] = {
349
- "200": "BaseResponseOHLCVResponse",
350
- "400": "ErrorResponse",
351
- "404": "ErrorResponse",
352
- "500": "ErrorResponse",
353
- "422": "HTTPValidationError",
332
+ "200": "OHLCVHistory",
354
333
  }
355
334
  response_data = await self.api_client.call_api(
356
335
  *_param, _request_timeout=_request_timeout
@@ -387,7 +366,7 @@ class OHLCVDataApi:
387
366
 
388
367
  # process the path parameters
389
368
  if market is not None:
390
- _path_params["market"] = market.value
369
+ _path_params["market"] = market
391
370
  if timeframe is not None:
392
371
  _path_params["timeframe"] = timeframe.value
393
372
  if symbol is not None:
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Klines Service API
5
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\" } ```
6
+ API for retrieving OHLCV data, funding rates, and symbol information from Binance.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -16,16 +16,14 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
- from crypticorn.klines.client.models.base_response_health_check_response import (
20
- BaseResponseHealthCheckResponse,
21
- )
19
+ from typing import Any
22
20
 
23
21
  from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
24
22
  from crypticorn.klines.client.api_response import ApiResponse
25
23
  from crypticorn.klines.client.rest import RESTResponseType
26
24
 
27
25
 
28
- class HealthCheckApi:
26
+ class StatusApi:
29
27
  """NOTE: This class is auto generated by OpenAPI Generator
30
28
  Ref: https://openapi-generator.tech
31
29
 
@@ -38,7 +36,7 @@ class HealthCheckApi:
38
36
  self.api_client = api_client
39
37
 
40
38
  @validate_call
41
- async def index_get(
39
+ async def ping(
42
40
  self,
43
41
  _request_timeout: Union[
44
42
  None,
@@ -51,10 +49,9 @@ class HealthCheckApi:
51
49
  _content_type: Optional[StrictStr] = None,
52
50
  _headers: Optional[Dict[StrictStr, Any]] = None,
53
51
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
54
- ) -> BaseResponseHealthCheckResponse:
55
- """Index
52
+ ) -> object:
53
+ """Ping
56
54
 
57
- Health check endpoint to verify if the API is running.
58
55
 
59
56
  :param _request_timeout: timeout setting for this request. If one
60
57
  number provided, it will be total request
@@ -78,7 +75,7 @@ class HealthCheckApi:
78
75
  :return: Returns the result object.
79
76
  """ # noqa: E501
80
77
 
81
- _param = self._index_get_serialize(
78
+ _param = self._ping_serialize(
82
79
  _request_auth=_request_auth,
83
80
  _content_type=_content_type,
84
81
  _headers=_headers,
@@ -86,7 +83,7 @@ class HealthCheckApi:
86
83
  )
87
84
 
88
85
  _response_types_map: Dict[str, Optional[str]] = {
89
- "200": "BaseResponseHealthCheckResponse",
86
+ "200": "object",
90
87
  }
91
88
  response_data = await self.api_client.call_api(
92
89
  *_param, _request_timeout=_request_timeout
@@ -98,7 +95,7 @@ class HealthCheckApi:
98
95
  ).data
99
96
 
100
97
  @validate_call
101
- async def index_get_with_http_info(
98
+ async def ping_with_http_info(
102
99
  self,
103
100
  _request_timeout: Union[
104
101
  None,
@@ -111,10 +108,9 @@ class HealthCheckApi:
111
108
  _content_type: Optional[StrictStr] = None,
112
109
  _headers: Optional[Dict[StrictStr, Any]] = None,
113
110
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
114
- ) -> ApiResponse[BaseResponseHealthCheckResponse]:
115
- """Index
111
+ ) -> ApiResponse[object]:
112
+ """Ping
116
113
 
117
- Health check endpoint to verify if the API is running.
118
114
 
119
115
  :param _request_timeout: timeout setting for this request. If one
120
116
  number provided, it will be total request
@@ -138,7 +134,7 @@ class HealthCheckApi:
138
134
  :return: Returns the result object.
139
135
  """ # noqa: E501
140
136
 
141
- _param = self._index_get_serialize(
137
+ _param = self._ping_serialize(
142
138
  _request_auth=_request_auth,
143
139
  _content_type=_content_type,
144
140
  _headers=_headers,
@@ -146,7 +142,7 @@ class HealthCheckApi:
146
142
  )
147
143
 
148
144
  _response_types_map: Dict[str, Optional[str]] = {
149
- "200": "BaseResponseHealthCheckResponse",
145
+ "200": "object",
150
146
  }
151
147
  response_data = await self.api_client.call_api(
152
148
  *_param, _request_timeout=_request_timeout
@@ -158,7 +154,7 @@ class HealthCheckApi:
158
154
  )
159
155
 
160
156
  @validate_call
161
- async def index_get_without_preload_content(
157
+ async def ping_without_preload_content(
162
158
  self,
163
159
  _request_timeout: Union[
164
160
  None,
@@ -172,9 +168,8 @@ class HealthCheckApi:
172
168
  _headers: Optional[Dict[StrictStr, Any]] = None,
173
169
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
174
170
  ) -> RESTResponseType:
175
- """Index
171
+ """Ping
176
172
 
177
- Health check endpoint to verify if the API is running.
178
173
 
179
174
  :param _request_timeout: timeout setting for this request. If one
180
175
  number provided, it will be total request
@@ -198,7 +193,7 @@ class HealthCheckApi:
198
193
  :return: Returns the result object.
199
194
  """ # noqa: E501
200
195
 
201
- _param = self._index_get_serialize(
196
+ _param = self._ping_serialize(
202
197
  _request_auth=_request_auth,
203
198
  _content_type=_content_type,
204
199
  _headers=_headers,
@@ -206,14 +201,14 @@ class HealthCheckApi:
206
201
  )
207
202
 
208
203
  _response_types_map: Dict[str, Optional[str]] = {
209
- "200": "BaseResponseHealthCheckResponse",
204
+ "200": "object",
210
205
  }
211
206
  response_data = await self.api_client.call_api(
212
207
  *_param, _request_timeout=_request_timeout
213
208
  )
214
209
  return response_data.response
215
210
 
216
- def _index_get_serialize(
211
+ def _ping_serialize(
217
212
  self,
218
213
  _request_auth,
219
214
  _content_type,
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Klines Service API
5
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\" } ```
6
+ API for retrieving OHLCV data, funding rates, and symbol information from Binance.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -16,10 +16,9 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
- from pydantic import Field
19
+ from pydantic import Field, StrictStr
20
+ from typing import List
20
21
  from typing_extensions import Annotated
21
- from crypticorn.klines.client.models.base_response_list_str import BaseResponseListStr
22
- from crypticorn.klines.client.models.market_type import MarketType
23
22
 
24
23
  from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
25
24
  from crypticorn.klines.client.api_response import ApiResponse
@@ -41,9 +40,7 @@ class SymbolsApi:
41
40
  @validate_call
42
41
  async def get_klines_symbols(
43
42
  self,
44
- market: Annotated[
45
- MarketType, Field(description="Market type (spot or futures)")
46
- ],
43
+ market: Annotated[StrictStr, Field(description="Market type")],
47
44
  _request_timeout: Union[
48
45
  None,
49
46
  Annotated[StrictFloat, Field(gt=0)],
@@ -55,13 +52,13 @@ class SymbolsApi:
55
52
  _content_type: Optional[StrictStr] = None,
56
53
  _headers: Optional[Dict[StrictStr, Any]] = None,
57
54
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
- ) -> BaseResponseListStr:
55
+ ) -> List[str]:
59
56
  """Symbols
60
57
 
61
58
  Retrieve a list of whitelisted symbols for a specific market.
62
59
 
63
- :param market: Market type (spot or futures) (required)
64
- :type market: MarketType
60
+ :param market: Market type (required)
61
+ :type market: str
65
62
  :param _request_timeout: timeout setting for this request. If one
66
63
  number provided, it will be total request
67
64
  timeout. It can also be a pair (tuple) of
@@ -93,10 +90,7 @@ class SymbolsApi:
93
90
  )
94
91
 
95
92
  _response_types_map: Dict[str, Optional[str]] = {
96
- "200": "BaseResponseListStr",
97
- "404": "ErrorResponse",
98
- "500": "ErrorResponse",
99
- "422": "HTTPValidationError",
93
+ "200": "List[str]",
100
94
  }
101
95
  response_data = await self.api_client.call_api(
102
96
  *_param, _request_timeout=_request_timeout
@@ -110,9 +104,7 @@ class SymbolsApi:
110
104
  @validate_call
111
105
  async def get_klines_symbols_with_http_info(
112
106
  self,
113
- market: Annotated[
114
- MarketType, Field(description="Market type (spot or futures)")
115
- ],
107
+ market: Annotated[StrictStr, Field(description="Market type")],
116
108
  _request_timeout: Union[
117
109
  None,
118
110
  Annotated[StrictFloat, Field(gt=0)],
@@ -124,13 +116,13 @@ class SymbolsApi:
124
116
  _content_type: Optional[StrictStr] = None,
125
117
  _headers: Optional[Dict[StrictStr, Any]] = None,
126
118
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
127
- ) -> ApiResponse[BaseResponseListStr]:
119
+ ) -> ApiResponse[List[str]]:
128
120
  """Symbols
129
121
 
130
122
  Retrieve a list of whitelisted symbols for a specific market.
131
123
 
132
- :param market: Market type (spot or futures) (required)
133
- :type market: MarketType
124
+ :param market: Market type (required)
125
+ :type market: str
134
126
  :param _request_timeout: timeout setting for this request. If one
135
127
  number provided, it will be total request
136
128
  timeout. It can also be a pair (tuple) of
@@ -162,10 +154,7 @@ class SymbolsApi:
162
154
  )
163
155
 
164
156
  _response_types_map: Dict[str, Optional[str]] = {
165
- "200": "BaseResponseListStr",
166
- "404": "ErrorResponse",
167
- "500": "ErrorResponse",
168
- "422": "HTTPValidationError",
157
+ "200": "List[str]",
169
158
  }
170
159
  response_data = await self.api_client.call_api(
171
160
  *_param, _request_timeout=_request_timeout
@@ -179,9 +168,7 @@ class SymbolsApi:
179
168
  @validate_call
180
169
  async def get_klines_symbols_without_preload_content(
181
170
  self,
182
- market: Annotated[
183
- MarketType, Field(description="Market type (spot or futures)")
184
- ],
171
+ market: Annotated[StrictStr, Field(description="Market type")],
185
172
  _request_timeout: Union[
186
173
  None,
187
174
  Annotated[StrictFloat, Field(gt=0)],
@@ -198,8 +185,8 @@ class SymbolsApi:
198
185
 
199
186
  Retrieve a list of whitelisted symbols for a specific market.
200
187
 
201
- :param market: Market type (spot or futures) (required)
202
- :type market: MarketType
188
+ :param market: Market type (required)
189
+ :type market: str
203
190
  :param _request_timeout: timeout setting for this request. If one
204
191
  number provided, it will be total request
205
192
  timeout. It can also be a pair (tuple) of
@@ -231,10 +218,7 @@ class SymbolsApi:
231
218
  )
232
219
 
233
220
  _response_types_map: Dict[str, Optional[str]] = {
234
- "200": "BaseResponseListStr",
235
- "404": "ErrorResponse",
236
- "500": "ErrorResponse",
237
- "422": "HTTPValidationError",
221
+ "200": "List[str]",
238
222
  }
239
223
  response_data = await self.api_client.call_api(
240
224
  *_param, _request_timeout=_request_timeout
@@ -265,7 +249,7 @@ class SymbolsApi:
265
249
 
266
250
  # process the path parameters
267
251
  if market is not None:
268
- _path_params["market"] = market.value
252
+ _path_params["market"] = market
269
253
  # process the query parameters
270
254
  # process the header parameters
271
255
  # process the form parameters