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,1929 @@
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 StrictInt, StrictStr
20
+ from typing import Any, List, Optional
21
+ from crypticorn.klines.client.models.resolution import Resolution
22
+ from crypticorn.klines.client.models.response_get_history_udf_history_get import ResponseGetHistoryUdfHistoryGet
23
+ from crypticorn.klines.client.models.search_symbol_response import SearchSymbolResponse
24
+ from crypticorn.klines.client.models.symbol_group_response import SymbolGroupResponse
25
+ from crypticorn.klines.client.models.symbol_info_response import SymbolInfoResponse
26
+ from crypticorn.klines.client.models.udf_config_response import UDFConfigResponse
27
+
28
+ from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
29
+ from crypticorn.klines.client.api_response import ApiResponse
30
+ from crypticorn.klines.client.rest import RESTResponseType
31
+
32
+
33
+ class UDFApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def get_config_udf_config_get(
48
+ self,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> UDFConfigResponse:
62
+ """Get Config
63
+
64
+
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._get_config_udf_config_get_serialize(
88
+ _request_auth=_request_auth,
89
+ _content_type=_content_type,
90
+ _headers=_headers,
91
+ _host_index=_host_index
92
+ )
93
+
94
+ _response_types_map: Dict[str, Optional[str]] = {
95
+ '200': "UDFConfigResponse",
96
+ }
97
+ response_data = self.api_client.call_api(
98
+ *_param,
99
+ _request_timeout=_request_timeout
100
+ )
101
+ response_data.read()
102
+ return self.api_client.response_deserialize(
103
+ response_data=response_data,
104
+ response_types_map=_response_types_map,
105
+ ).data
106
+
107
+
108
+ @validate_call
109
+ def get_config_udf_config_get_with_http_info(
110
+ self,
111
+ _request_timeout: Union[
112
+ None,
113
+ Annotated[StrictFloat, Field(gt=0)],
114
+ Tuple[
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Annotated[StrictFloat, Field(gt=0)]
117
+ ]
118
+ ] = None,
119
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
120
+ _content_type: Optional[StrictStr] = None,
121
+ _headers: Optional[Dict[StrictStr, Any]] = None,
122
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
123
+ ) -> ApiResponse[UDFConfigResponse]:
124
+ """Get Config
125
+
126
+
127
+ :param _request_timeout: timeout setting for this request. If one
128
+ number provided, it will be total request
129
+ timeout. It can also be a pair (tuple) of
130
+ (connection, read) timeouts.
131
+ :type _request_timeout: int, tuple(int, int), optional
132
+ :param _request_auth: set to override the auth_settings for an a single
133
+ request; this effectively ignores the
134
+ authentication in the spec for a single request.
135
+ :type _request_auth: dict, optional
136
+ :param _content_type: force content-type for the request.
137
+ :type _content_type: str, Optional
138
+ :param _headers: set to override the headers for a single
139
+ request; this effectively ignores the headers
140
+ in the spec for a single request.
141
+ :type _headers: dict, optional
142
+ :param _host_index: set to override the host_index for a single
143
+ request; this effectively ignores the host_index
144
+ in the spec for a single request.
145
+ :type _host_index: int, optional
146
+ :return: Returns the result object.
147
+ """ # noqa: E501
148
+
149
+ _param = self._get_config_udf_config_get_serialize(
150
+ _request_auth=_request_auth,
151
+ _content_type=_content_type,
152
+ _headers=_headers,
153
+ _host_index=_host_index
154
+ )
155
+
156
+ _response_types_map: Dict[str, Optional[str]] = {
157
+ '200': "UDFConfigResponse",
158
+ }
159
+ response_data = self.api_client.call_api(
160
+ *_param,
161
+ _request_timeout=_request_timeout
162
+ )
163
+ response_data.read()
164
+ return self.api_client.response_deserialize(
165
+ response_data=response_data,
166
+ response_types_map=_response_types_map,
167
+ )
168
+
169
+
170
+ @validate_call
171
+ def get_config_udf_config_get_without_preload_content(
172
+ self,
173
+ _request_timeout: Union[
174
+ None,
175
+ Annotated[StrictFloat, Field(gt=0)],
176
+ Tuple[
177
+ Annotated[StrictFloat, Field(gt=0)],
178
+ Annotated[StrictFloat, Field(gt=0)]
179
+ ]
180
+ ] = None,
181
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
182
+ _content_type: Optional[StrictStr] = None,
183
+ _headers: Optional[Dict[StrictStr, Any]] = None,
184
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
185
+ ) -> RESTResponseType:
186
+ """Get Config
187
+
188
+
189
+ :param _request_timeout: timeout setting for this request. If one
190
+ number provided, it will be total request
191
+ timeout. It can also be a pair (tuple) of
192
+ (connection, read) timeouts.
193
+ :type _request_timeout: int, tuple(int, int), optional
194
+ :param _request_auth: set to override the auth_settings for an a single
195
+ request; this effectively ignores the
196
+ authentication in the spec for a single request.
197
+ :type _request_auth: dict, optional
198
+ :param _content_type: force content-type for the request.
199
+ :type _content_type: str, Optional
200
+ :param _headers: set to override the headers for a single
201
+ request; this effectively ignores the headers
202
+ in the spec for a single request.
203
+ :type _headers: dict, optional
204
+ :param _host_index: set to override the host_index for a single
205
+ request; this effectively ignores the host_index
206
+ in the spec for a single request.
207
+ :type _host_index: int, optional
208
+ :return: Returns the result object.
209
+ """ # noqa: E501
210
+
211
+ _param = self._get_config_udf_config_get_serialize(
212
+ _request_auth=_request_auth,
213
+ _content_type=_content_type,
214
+ _headers=_headers,
215
+ _host_index=_host_index
216
+ )
217
+
218
+ _response_types_map: Dict[str, Optional[str]] = {
219
+ '200': "UDFConfigResponse",
220
+ }
221
+ response_data = self.api_client.call_api(
222
+ *_param,
223
+ _request_timeout=_request_timeout
224
+ )
225
+ return response_data.response
226
+
227
+
228
+ def _get_config_udf_config_get_serialize(
229
+ self,
230
+ _request_auth,
231
+ _content_type,
232
+ _headers,
233
+ _host_index,
234
+ ) -> RequestSerialized:
235
+
236
+ _host = None
237
+
238
+ _collection_formats: Dict[str, str] = {
239
+ }
240
+
241
+ _path_params: Dict[str, str] = {}
242
+ _query_params: List[Tuple[str, str]] = []
243
+ _header_params: Dict[str, Optional[str]] = _headers or {}
244
+ _form_params: List[Tuple[str, str]] = []
245
+ _files: Dict[
246
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
247
+ ] = {}
248
+ _body_params: Optional[bytes] = None
249
+
250
+ # process the path parameters
251
+ # process the query parameters
252
+ # process the header parameters
253
+ # process the form parameters
254
+ # process the body parameter
255
+
256
+
257
+ # set the HTTP header `Accept`
258
+ if 'Accept' not in _header_params:
259
+ _header_params['Accept'] = self.api_client.select_header_accept(
260
+ [
261
+ 'application/json'
262
+ ]
263
+ )
264
+
265
+
266
+ # authentication setting
267
+ _auth_settings: List[str] = [
268
+ ]
269
+
270
+ return self.api_client.param_serialize(
271
+ method='GET',
272
+ resource_path='/udf/config',
273
+ path_params=_path_params,
274
+ query_params=_query_params,
275
+ header_params=_header_params,
276
+ body=_body_params,
277
+ post_params=_form_params,
278
+ files=_files,
279
+ auth_settings=_auth_settings,
280
+ collection_formats=_collection_formats,
281
+ _host=_host,
282
+ _request_auth=_request_auth
283
+ )
284
+
285
+
286
+
287
+
288
+ @validate_call
289
+ def get_history_udf_history_get(
290
+ self,
291
+ symbol: StrictStr,
292
+ resolution: Resolution,
293
+ var_from: StrictInt,
294
+ to: StrictInt,
295
+ countback: Optional[StrictInt] = None,
296
+ _request_timeout: Union[
297
+ None,
298
+ Annotated[StrictFloat, Field(gt=0)],
299
+ Tuple[
300
+ Annotated[StrictFloat, Field(gt=0)],
301
+ Annotated[StrictFloat, Field(gt=0)]
302
+ ]
303
+ ] = None,
304
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
305
+ _content_type: Optional[StrictStr] = None,
306
+ _headers: Optional[Dict[StrictStr, Any]] = None,
307
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
308
+ ) -> ResponseGetHistoryUdfHistoryGet:
309
+ """Get History
310
+
311
+
312
+ :param symbol: (required)
313
+ :type symbol: str
314
+ :param resolution: (required)
315
+ :type resolution: Resolution
316
+ :param var_from: (required)
317
+ :type var_from: int
318
+ :param to: (required)
319
+ :type to: int
320
+ :param countback:
321
+ :type countback: int
322
+ :param _request_timeout: timeout setting for this request. If one
323
+ number provided, it will be total request
324
+ timeout. It can also be a pair (tuple) of
325
+ (connection, read) timeouts.
326
+ :type _request_timeout: int, tuple(int, int), optional
327
+ :param _request_auth: set to override the auth_settings for an a single
328
+ request; this effectively ignores the
329
+ authentication in the spec for a single request.
330
+ :type _request_auth: dict, optional
331
+ :param _content_type: force content-type for the request.
332
+ :type _content_type: str, Optional
333
+ :param _headers: set to override the headers for a single
334
+ request; this effectively ignores the headers
335
+ in the spec for a single request.
336
+ :type _headers: dict, optional
337
+ :param _host_index: set to override the host_index for a single
338
+ request; this effectively ignores the host_index
339
+ in the spec for a single request.
340
+ :type _host_index: int, optional
341
+ :return: Returns the result object.
342
+ """ # noqa: E501
343
+
344
+ _param = self._get_history_udf_history_get_serialize(
345
+ symbol=symbol,
346
+ resolution=resolution,
347
+ var_from=var_from,
348
+ to=to,
349
+ countback=countback,
350
+ _request_auth=_request_auth,
351
+ _content_type=_content_type,
352
+ _headers=_headers,
353
+ _host_index=_host_index
354
+ )
355
+
356
+ _response_types_map: Dict[str, Optional[str]] = {
357
+ '200': "ResponseGetHistoryUdfHistoryGet",
358
+ '422': "HTTPValidationError",
359
+ }
360
+ response_data = self.api_client.call_api(
361
+ *_param,
362
+ _request_timeout=_request_timeout
363
+ )
364
+ response_data.read()
365
+ return self.api_client.response_deserialize(
366
+ response_data=response_data,
367
+ response_types_map=_response_types_map,
368
+ ).data
369
+
370
+
371
+ @validate_call
372
+ def get_history_udf_history_get_with_http_info(
373
+ self,
374
+ symbol: StrictStr,
375
+ resolution: Resolution,
376
+ var_from: StrictInt,
377
+ to: StrictInt,
378
+ countback: Optional[StrictInt] = None,
379
+ _request_timeout: Union[
380
+ None,
381
+ Annotated[StrictFloat, Field(gt=0)],
382
+ Tuple[
383
+ Annotated[StrictFloat, Field(gt=0)],
384
+ Annotated[StrictFloat, Field(gt=0)]
385
+ ]
386
+ ] = None,
387
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
388
+ _content_type: Optional[StrictStr] = None,
389
+ _headers: Optional[Dict[StrictStr, Any]] = None,
390
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
391
+ ) -> ApiResponse[ResponseGetHistoryUdfHistoryGet]:
392
+ """Get History
393
+
394
+
395
+ :param symbol: (required)
396
+ :type symbol: str
397
+ :param resolution: (required)
398
+ :type resolution: Resolution
399
+ :param var_from: (required)
400
+ :type var_from: int
401
+ :param to: (required)
402
+ :type to: int
403
+ :param countback:
404
+ :type countback: int
405
+ :param _request_timeout: timeout setting for this request. If one
406
+ number provided, it will be total request
407
+ timeout. It can also be a pair (tuple) of
408
+ (connection, read) timeouts.
409
+ :type _request_timeout: int, tuple(int, int), optional
410
+ :param _request_auth: set to override the auth_settings for an a single
411
+ request; this effectively ignores the
412
+ authentication in the spec for a single request.
413
+ :type _request_auth: dict, optional
414
+ :param _content_type: force content-type for the request.
415
+ :type _content_type: str, Optional
416
+ :param _headers: set to override the headers for a single
417
+ request; this effectively ignores the headers
418
+ in the spec for a single request.
419
+ :type _headers: dict, optional
420
+ :param _host_index: set to override the host_index for a single
421
+ request; this effectively ignores the host_index
422
+ in the spec for a single request.
423
+ :type _host_index: int, optional
424
+ :return: Returns the result object.
425
+ """ # noqa: E501
426
+
427
+ _param = self._get_history_udf_history_get_serialize(
428
+ symbol=symbol,
429
+ resolution=resolution,
430
+ var_from=var_from,
431
+ to=to,
432
+ countback=countback,
433
+ _request_auth=_request_auth,
434
+ _content_type=_content_type,
435
+ _headers=_headers,
436
+ _host_index=_host_index
437
+ )
438
+
439
+ _response_types_map: Dict[str, Optional[str]] = {
440
+ '200': "ResponseGetHistoryUdfHistoryGet",
441
+ '422': "HTTPValidationError",
442
+ }
443
+ response_data = self.api_client.call_api(
444
+ *_param,
445
+ _request_timeout=_request_timeout
446
+ )
447
+ response_data.read()
448
+ return self.api_client.response_deserialize(
449
+ response_data=response_data,
450
+ response_types_map=_response_types_map,
451
+ )
452
+
453
+
454
+ @validate_call
455
+ def get_history_udf_history_get_without_preload_content(
456
+ self,
457
+ symbol: StrictStr,
458
+ resolution: Resolution,
459
+ var_from: StrictInt,
460
+ to: StrictInt,
461
+ countback: Optional[StrictInt] = None,
462
+ _request_timeout: Union[
463
+ None,
464
+ Annotated[StrictFloat, Field(gt=0)],
465
+ Tuple[
466
+ Annotated[StrictFloat, Field(gt=0)],
467
+ Annotated[StrictFloat, Field(gt=0)]
468
+ ]
469
+ ] = None,
470
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
471
+ _content_type: Optional[StrictStr] = None,
472
+ _headers: Optional[Dict[StrictStr, Any]] = None,
473
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
474
+ ) -> RESTResponseType:
475
+ """Get History
476
+
477
+
478
+ :param symbol: (required)
479
+ :type symbol: str
480
+ :param resolution: (required)
481
+ :type resolution: Resolution
482
+ :param var_from: (required)
483
+ :type var_from: int
484
+ :param to: (required)
485
+ :type to: int
486
+ :param countback:
487
+ :type countback: int
488
+ :param _request_timeout: timeout setting for this request. If one
489
+ number provided, it will be total request
490
+ timeout. It can also be a pair (tuple) of
491
+ (connection, read) timeouts.
492
+ :type _request_timeout: int, tuple(int, int), optional
493
+ :param _request_auth: set to override the auth_settings for an a single
494
+ request; this effectively ignores the
495
+ authentication in the spec for a single request.
496
+ :type _request_auth: dict, optional
497
+ :param _content_type: force content-type for the request.
498
+ :type _content_type: str, Optional
499
+ :param _headers: set to override the headers for a single
500
+ request; this effectively ignores the headers
501
+ in the spec for a single request.
502
+ :type _headers: dict, optional
503
+ :param _host_index: set to override the host_index for a single
504
+ request; this effectively ignores the host_index
505
+ in the spec for a single request.
506
+ :type _host_index: int, optional
507
+ :return: Returns the result object.
508
+ """ # noqa: E501
509
+
510
+ _param = self._get_history_udf_history_get_serialize(
511
+ symbol=symbol,
512
+ resolution=resolution,
513
+ var_from=var_from,
514
+ to=to,
515
+ countback=countback,
516
+ _request_auth=_request_auth,
517
+ _content_type=_content_type,
518
+ _headers=_headers,
519
+ _host_index=_host_index
520
+ )
521
+
522
+ _response_types_map: Dict[str, Optional[str]] = {
523
+ '200': "ResponseGetHistoryUdfHistoryGet",
524
+ '422': "HTTPValidationError",
525
+ }
526
+ response_data = self.api_client.call_api(
527
+ *_param,
528
+ _request_timeout=_request_timeout
529
+ )
530
+ return response_data.response
531
+
532
+
533
+ def _get_history_udf_history_get_serialize(
534
+ self,
535
+ symbol,
536
+ resolution,
537
+ var_from,
538
+ to,
539
+ countback,
540
+ _request_auth,
541
+ _content_type,
542
+ _headers,
543
+ _host_index,
544
+ ) -> RequestSerialized:
545
+
546
+ _host = None
547
+
548
+ _collection_formats: Dict[str, str] = {
549
+ }
550
+
551
+ _path_params: Dict[str, str] = {}
552
+ _query_params: List[Tuple[str, str]] = []
553
+ _header_params: Dict[str, Optional[str]] = _headers or {}
554
+ _form_params: List[Tuple[str, str]] = []
555
+ _files: Dict[
556
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
557
+ ] = {}
558
+ _body_params: Optional[bytes] = None
559
+
560
+ # process the path parameters
561
+ # process the query parameters
562
+ if symbol is not None:
563
+
564
+ _query_params.append(('symbol', symbol))
565
+
566
+ if resolution is not None:
567
+
568
+ _query_params.append(('resolution', resolution.value))
569
+
570
+ if var_from is not None:
571
+
572
+ _query_params.append(('from', var_from))
573
+
574
+ if to is not None:
575
+
576
+ _query_params.append(('to', to))
577
+
578
+ if countback is not None:
579
+
580
+ _query_params.append(('countback', countback))
581
+
582
+ # process the header parameters
583
+ # process the form parameters
584
+ # process the body parameter
585
+
586
+
587
+ # set the HTTP header `Accept`
588
+ if 'Accept' not in _header_params:
589
+ _header_params['Accept'] = self.api_client.select_header_accept(
590
+ [
591
+ 'application/json'
592
+ ]
593
+ )
594
+
595
+
596
+ # authentication setting
597
+ _auth_settings: List[str] = [
598
+ ]
599
+
600
+ return self.api_client.param_serialize(
601
+ method='GET',
602
+ resource_path='/udf/history',
603
+ path_params=_path_params,
604
+ query_params=_query_params,
605
+ header_params=_header_params,
606
+ body=_body_params,
607
+ post_params=_form_params,
608
+ files=_files,
609
+ auth_settings=_auth_settings,
610
+ collection_formats=_collection_formats,
611
+ _host=_host,
612
+ _request_auth=_request_auth
613
+ )
614
+
615
+
616
+
617
+
618
+ @validate_call
619
+ def get_server_time_udf_time_get(
620
+ self,
621
+ _request_timeout: Union[
622
+ None,
623
+ Annotated[StrictFloat, Field(gt=0)],
624
+ Tuple[
625
+ Annotated[StrictFloat, Field(gt=0)],
626
+ Annotated[StrictFloat, Field(gt=0)]
627
+ ]
628
+ ] = None,
629
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
630
+ _content_type: Optional[StrictStr] = None,
631
+ _headers: Optional[Dict[StrictStr, Any]] = None,
632
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
633
+ ) -> object:
634
+ """Get Server Time
635
+
636
+
637
+ :param _request_timeout: timeout setting for this request. If one
638
+ number provided, it will be total request
639
+ timeout. It can also be a pair (tuple) of
640
+ (connection, read) timeouts.
641
+ :type _request_timeout: int, tuple(int, int), optional
642
+ :param _request_auth: set to override the auth_settings for an a single
643
+ request; this effectively ignores the
644
+ authentication in the spec for a single request.
645
+ :type _request_auth: dict, optional
646
+ :param _content_type: force content-type for the request.
647
+ :type _content_type: str, Optional
648
+ :param _headers: set to override the headers for a single
649
+ request; this effectively ignores the headers
650
+ in the spec for a single request.
651
+ :type _headers: dict, optional
652
+ :param _host_index: set to override the host_index for a single
653
+ request; this effectively ignores the host_index
654
+ in the spec for a single request.
655
+ :type _host_index: int, optional
656
+ :return: Returns the result object.
657
+ """ # noqa: E501
658
+
659
+ _param = self._get_server_time_udf_time_get_serialize(
660
+ _request_auth=_request_auth,
661
+ _content_type=_content_type,
662
+ _headers=_headers,
663
+ _host_index=_host_index
664
+ )
665
+
666
+ _response_types_map: Dict[str, Optional[str]] = {
667
+ '200': "object",
668
+ }
669
+ response_data = self.api_client.call_api(
670
+ *_param,
671
+ _request_timeout=_request_timeout
672
+ )
673
+ response_data.read()
674
+ return self.api_client.response_deserialize(
675
+ response_data=response_data,
676
+ response_types_map=_response_types_map,
677
+ ).data
678
+
679
+
680
+ @validate_call
681
+ def get_server_time_udf_time_get_with_http_info(
682
+ self,
683
+ _request_timeout: Union[
684
+ None,
685
+ Annotated[StrictFloat, Field(gt=0)],
686
+ Tuple[
687
+ Annotated[StrictFloat, Field(gt=0)],
688
+ Annotated[StrictFloat, Field(gt=0)]
689
+ ]
690
+ ] = None,
691
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
692
+ _content_type: Optional[StrictStr] = None,
693
+ _headers: Optional[Dict[StrictStr, Any]] = None,
694
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
695
+ ) -> ApiResponse[object]:
696
+ """Get Server Time
697
+
698
+
699
+ :param _request_timeout: timeout setting for this request. If one
700
+ number provided, it will be total request
701
+ timeout. It can also be a pair (tuple) of
702
+ (connection, read) timeouts.
703
+ :type _request_timeout: int, tuple(int, int), optional
704
+ :param _request_auth: set to override the auth_settings for an a single
705
+ request; this effectively ignores the
706
+ authentication in the spec for a single request.
707
+ :type _request_auth: dict, optional
708
+ :param _content_type: force content-type for the request.
709
+ :type _content_type: str, Optional
710
+ :param _headers: set to override the headers for a single
711
+ request; this effectively ignores the headers
712
+ in the spec for a single request.
713
+ :type _headers: dict, optional
714
+ :param _host_index: set to override the host_index for a single
715
+ request; this effectively ignores the host_index
716
+ in the spec for a single request.
717
+ :type _host_index: int, optional
718
+ :return: Returns the result object.
719
+ """ # noqa: E501
720
+
721
+ _param = self._get_server_time_udf_time_get_serialize(
722
+ _request_auth=_request_auth,
723
+ _content_type=_content_type,
724
+ _headers=_headers,
725
+ _host_index=_host_index
726
+ )
727
+
728
+ _response_types_map: Dict[str, Optional[str]] = {
729
+ '200': "object",
730
+ }
731
+ response_data = self.api_client.call_api(
732
+ *_param,
733
+ _request_timeout=_request_timeout
734
+ )
735
+ response_data.read()
736
+ return self.api_client.response_deserialize(
737
+ response_data=response_data,
738
+ response_types_map=_response_types_map,
739
+ )
740
+
741
+
742
+ @validate_call
743
+ def get_server_time_udf_time_get_without_preload_content(
744
+ self,
745
+ _request_timeout: Union[
746
+ None,
747
+ Annotated[StrictFloat, Field(gt=0)],
748
+ Tuple[
749
+ Annotated[StrictFloat, Field(gt=0)],
750
+ Annotated[StrictFloat, Field(gt=0)]
751
+ ]
752
+ ] = None,
753
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
754
+ _content_type: Optional[StrictStr] = None,
755
+ _headers: Optional[Dict[StrictStr, Any]] = None,
756
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
757
+ ) -> RESTResponseType:
758
+ """Get Server Time
759
+
760
+
761
+ :param _request_timeout: timeout setting for this request. If one
762
+ number provided, it will be total request
763
+ timeout. It can also be a pair (tuple) of
764
+ (connection, read) timeouts.
765
+ :type _request_timeout: int, tuple(int, int), optional
766
+ :param _request_auth: set to override the auth_settings for an a single
767
+ request; this effectively ignores the
768
+ authentication in the spec for a single request.
769
+ :type _request_auth: dict, optional
770
+ :param _content_type: force content-type for the request.
771
+ :type _content_type: str, Optional
772
+ :param _headers: set to override the headers for a single
773
+ request; this effectively ignores the headers
774
+ in the spec for a single request.
775
+ :type _headers: dict, optional
776
+ :param _host_index: set to override the host_index for a single
777
+ request; this effectively ignores the host_index
778
+ in the spec for a single request.
779
+ :type _host_index: int, optional
780
+ :return: Returns the result object.
781
+ """ # noqa: E501
782
+
783
+ _param = self._get_server_time_udf_time_get_serialize(
784
+ _request_auth=_request_auth,
785
+ _content_type=_content_type,
786
+ _headers=_headers,
787
+ _host_index=_host_index
788
+ )
789
+
790
+ _response_types_map: Dict[str, Optional[str]] = {
791
+ '200': "object",
792
+ }
793
+ response_data = self.api_client.call_api(
794
+ *_param,
795
+ _request_timeout=_request_timeout
796
+ )
797
+ return response_data.response
798
+
799
+
800
+ def _get_server_time_udf_time_get_serialize(
801
+ self,
802
+ _request_auth,
803
+ _content_type,
804
+ _headers,
805
+ _host_index,
806
+ ) -> RequestSerialized:
807
+
808
+ _host = None
809
+
810
+ _collection_formats: Dict[str, str] = {
811
+ }
812
+
813
+ _path_params: Dict[str, str] = {}
814
+ _query_params: List[Tuple[str, str]] = []
815
+ _header_params: Dict[str, Optional[str]] = _headers or {}
816
+ _form_params: List[Tuple[str, str]] = []
817
+ _files: Dict[
818
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
819
+ ] = {}
820
+ _body_params: Optional[bytes] = None
821
+
822
+ # process the path parameters
823
+ # process the query parameters
824
+ # process the header parameters
825
+ # process the form parameters
826
+ # process the body parameter
827
+
828
+
829
+ # set the HTTP header `Accept`
830
+ if 'Accept' not in _header_params:
831
+ _header_params['Accept'] = self.api_client.select_header_accept(
832
+ [
833
+ 'application/json'
834
+ ]
835
+ )
836
+
837
+
838
+ # authentication setting
839
+ _auth_settings: List[str] = [
840
+ ]
841
+
842
+ return self.api_client.param_serialize(
843
+ method='GET',
844
+ resource_path='/udf/time',
845
+ path_params=_path_params,
846
+ query_params=_query_params,
847
+ header_params=_header_params,
848
+ body=_body_params,
849
+ post_params=_form_params,
850
+ files=_files,
851
+ auth_settings=_auth_settings,
852
+ collection_formats=_collection_formats,
853
+ _host=_host,
854
+ _request_auth=_request_auth
855
+ )
856
+
857
+
858
+
859
+
860
+ @validate_call
861
+ def get_symbol_info_udf_symbol_info_get(
862
+ self,
863
+ group: StrictStr,
864
+ _request_timeout: Union[
865
+ None,
866
+ Annotated[StrictFloat, Field(gt=0)],
867
+ Tuple[
868
+ Annotated[StrictFloat, Field(gt=0)],
869
+ Annotated[StrictFloat, Field(gt=0)]
870
+ ]
871
+ ] = None,
872
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
873
+ _content_type: Optional[StrictStr] = None,
874
+ _headers: Optional[Dict[StrictStr, Any]] = None,
875
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
876
+ ) -> SymbolGroupResponse:
877
+ """Get Symbol Info
878
+
879
+ Handle symbol info requests for different groups
880
+
881
+ :param group: (required)
882
+ :type group: str
883
+ :param _request_timeout: timeout setting for this request. If one
884
+ number provided, it will be total request
885
+ timeout. It can also be a pair (tuple) of
886
+ (connection, read) timeouts.
887
+ :type _request_timeout: int, tuple(int, int), optional
888
+ :param _request_auth: set to override the auth_settings for an a single
889
+ request; this effectively ignores the
890
+ authentication in the spec for a single request.
891
+ :type _request_auth: dict, optional
892
+ :param _content_type: force content-type for the request.
893
+ :type _content_type: str, Optional
894
+ :param _headers: set to override the headers for a single
895
+ request; this effectively ignores the headers
896
+ in the spec for a single request.
897
+ :type _headers: dict, optional
898
+ :param _host_index: set to override the host_index for a single
899
+ request; this effectively ignores the host_index
900
+ in the spec for a single request.
901
+ :type _host_index: int, optional
902
+ :return: Returns the result object.
903
+ """ # noqa: E501
904
+
905
+ _param = self._get_symbol_info_udf_symbol_info_get_serialize(
906
+ group=group,
907
+ _request_auth=_request_auth,
908
+ _content_type=_content_type,
909
+ _headers=_headers,
910
+ _host_index=_host_index
911
+ )
912
+
913
+ _response_types_map: Dict[str, Optional[str]] = {
914
+ '200': "SymbolGroupResponse",
915
+ '422': "HTTPValidationError",
916
+ }
917
+ response_data = self.api_client.call_api(
918
+ *_param,
919
+ _request_timeout=_request_timeout
920
+ )
921
+ response_data.read()
922
+ return self.api_client.response_deserialize(
923
+ response_data=response_data,
924
+ response_types_map=_response_types_map,
925
+ ).data
926
+
927
+
928
+ @validate_call
929
+ def get_symbol_info_udf_symbol_info_get_with_http_info(
930
+ self,
931
+ group: StrictStr,
932
+ _request_timeout: Union[
933
+ None,
934
+ Annotated[StrictFloat, Field(gt=0)],
935
+ Tuple[
936
+ Annotated[StrictFloat, Field(gt=0)],
937
+ Annotated[StrictFloat, Field(gt=0)]
938
+ ]
939
+ ] = None,
940
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
941
+ _content_type: Optional[StrictStr] = None,
942
+ _headers: Optional[Dict[StrictStr, Any]] = None,
943
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
944
+ ) -> ApiResponse[SymbolGroupResponse]:
945
+ """Get Symbol Info
946
+
947
+ Handle symbol info requests for different groups
948
+
949
+ :param group: (required)
950
+ :type group: str
951
+ :param _request_timeout: timeout setting for this request. If one
952
+ number provided, it will be total request
953
+ timeout. It can also be a pair (tuple) of
954
+ (connection, read) timeouts.
955
+ :type _request_timeout: int, tuple(int, int), optional
956
+ :param _request_auth: set to override the auth_settings for an a single
957
+ request; this effectively ignores the
958
+ authentication in the spec for a single request.
959
+ :type _request_auth: dict, optional
960
+ :param _content_type: force content-type for the request.
961
+ :type _content_type: str, Optional
962
+ :param _headers: set to override the headers for a single
963
+ request; this effectively ignores the headers
964
+ in the spec for a single request.
965
+ :type _headers: dict, optional
966
+ :param _host_index: set to override the host_index for a single
967
+ request; this effectively ignores the host_index
968
+ in the spec for a single request.
969
+ :type _host_index: int, optional
970
+ :return: Returns the result object.
971
+ """ # noqa: E501
972
+
973
+ _param = self._get_symbol_info_udf_symbol_info_get_serialize(
974
+ group=group,
975
+ _request_auth=_request_auth,
976
+ _content_type=_content_type,
977
+ _headers=_headers,
978
+ _host_index=_host_index
979
+ )
980
+
981
+ _response_types_map: Dict[str, Optional[str]] = {
982
+ '200': "SymbolGroupResponse",
983
+ '422': "HTTPValidationError",
984
+ }
985
+ response_data = self.api_client.call_api(
986
+ *_param,
987
+ _request_timeout=_request_timeout
988
+ )
989
+ response_data.read()
990
+ return self.api_client.response_deserialize(
991
+ response_data=response_data,
992
+ response_types_map=_response_types_map,
993
+ )
994
+
995
+
996
+ @validate_call
997
+ def get_symbol_info_udf_symbol_info_get_without_preload_content(
998
+ self,
999
+ group: StrictStr,
1000
+ _request_timeout: Union[
1001
+ None,
1002
+ Annotated[StrictFloat, Field(gt=0)],
1003
+ Tuple[
1004
+ Annotated[StrictFloat, Field(gt=0)],
1005
+ Annotated[StrictFloat, Field(gt=0)]
1006
+ ]
1007
+ ] = None,
1008
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1009
+ _content_type: Optional[StrictStr] = None,
1010
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1011
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1012
+ ) -> RESTResponseType:
1013
+ """Get Symbol Info
1014
+
1015
+ Handle symbol info requests for different groups
1016
+
1017
+ :param group: (required)
1018
+ :type group: str
1019
+ :param _request_timeout: timeout setting for this request. If one
1020
+ number provided, it will be total request
1021
+ timeout. It can also be a pair (tuple) of
1022
+ (connection, read) timeouts.
1023
+ :type _request_timeout: int, tuple(int, int), optional
1024
+ :param _request_auth: set to override the auth_settings for an a single
1025
+ request; this effectively ignores the
1026
+ authentication in the spec for a single request.
1027
+ :type _request_auth: dict, optional
1028
+ :param _content_type: force content-type for the request.
1029
+ :type _content_type: str, Optional
1030
+ :param _headers: set to override the headers for a single
1031
+ request; this effectively ignores the headers
1032
+ in the spec for a single request.
1033
+ :type _headers: dict, optional
1034
+ :param _host_index: set to override the host_index for a single
1035
+ request; this effectively ignores the host_index
1036
+ in the spec for a single request.
1037
+ :type _host_index: int, optional
1038
+ :return: Returns the result object.
1039
+ """ # noqa: E501
1040
+
1041
+ _param = self._get_symbol_info_udf_symbol_info_get_serialize(
1042
+ group=group,
1043
+ _request_auth=_request_auth,
1044
+ _content_type=_content_type,
1045
+ _headers=_headers,
1046
+ _host_index=_host_index
1047
+ )
1048
+
1049
+ _response_types_map: Dict[str, Optional[str]] = {
1050
+ '200': "SymbolGroupResponse",
1051
+ '422': "HTTPValidationError",
1052
+ }
1053
+ response_data = self.api_client.call_api(
1054
+ *_param,
1055
+ _request_timeout=_request_timeout
1056
+ )
1057
+ return response_data.response
1058
+
1059
+
1060
+ def _get_symbol_info_udf_symbol_info_get_serialize(
1061
+ self,
1062
+ group,
1063
+ _request_auth,
1064
+ _content_type,
1065
+ _headers,
1066
+ _host_index,
1067
+ ) -> RequestSerialized:
1068
+
1069
+ _host = None
1070
+
1071
+ _collection_formats: Dict[str, str] = {
1072
+ }
1073
+
1074
+ _path_params: Dict[str, str] = {}
1075
+ _query_params: List[Tuple[str, str]] = []
1076
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1077
+ _form_params: List[Tuple[str, str]] = []
1078
+ _files: Dict[
1079
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1080
+ ] = {}
1081
+ _body_params: Optional[bytes] = None
1082
+
1083
+ # process the path parameters
1084
+ # process the query parameters
1085
+ if group is not None:
1086
+
1087
+ _query_params.append(('group', group))
1088
+
1089
+ # process the header parameters
1090
+ # process the form parameters
1091
+ # process the body parameter
1092
+
1093
+
1094
+ # set the HTTP header `Accept`
1095
+ if 'Accept' not in _header_params:
1096
+ _header_params['Accept'] = self.api_client.select_header_accept(
1097
+ [
1098
+ 'application/json'
1099
+ ]
1100
+ )
1101
+
1102
+
1103
+ # authentication setting
1104
+ _auth_settings: List[str] = [
1105
+ ]
1106
+
1107
+ return self.api_client.param_serialize(
1108
+ method='GET',
1109
+ resource_path='/udf/symbol_info',
1110
+ path_params=_path_params,
1111
+ query_params=_query_params,
1112
+ header_params=_header_params,
1113
+ body=_body_params,
1114
+ post_params=_form_params,
1115
+ files=_files,
1116
+ auth_settings=_auth_settings,
1117
+ collection_formats=_collection_formats,
1118
+ _host=_host,
1119
+ _request_auth=_request_auth
1120
+ )
1121
+
1122
+
1123
+
1124
+
1125
+ @validate_call
1126
+ def get_symbol_udf_symbols_get(
1127
+ self,
1128
+ symbol: StrictStr,
1129
+ _request_timeout: Union[
1130
+ None,
1131
+ Annotated[StrictFloat, Field(gt=0)],
1132
+ Tuple[
1133
+ Annotated[StrictFloat, Field(gt=0)],
1134
+ Annotated[StrictFloat, Field(gt=0)]
1135
+ ]
1136
+ ] = None,
1137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1138
+ _content_type: Optional[StrictStr] = None,
1139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1141
+ ) -> SymbolInfoResponse:
1142
+ """Get Symbol
1143
+
1144
+
1145
+ :param symbol: (required)
1146
+ :type symbol: str
1147
+ :param _request_timeout: timeout setting for this request. If one
1148
+ number provided, it will be total request
1149
+ timeout. It can also be a pair (tuple) of
1150
+ (connection, read) timeouts.
1151
+ :type _request_timeout: int, tuple(int, int), optional
1152
+ :param _request_auth: set to override the auth_settings for an a single
1153
+ request; this effectively ignores the
1154
+ authentication in the spec for a single request.
1155
+ :type _request_auth: dict, optional
1156
+ :param _content_type: force content-type for the request.
1157
+ :type _content_type: str, Optional
1158
+ :param _headers: set to override the headers for a single
1159
+ request; this effectively ignores the headers
1160
+ in the spec for a single request.
1161
+ :type _headers: dict, optional
1162
+ :param _host_index: set to override the host_index for a single
1163
+ request; this effectively ignores the host_index
1164
+ in the spec for a single request.
1165
+ :type _host_index: int, optional
1166
+ :return: Returns the result object.
1167
+ """ # noqa: E501
1168
+
1169
+ _param = self._get_symbol_udf_symbols_get_serialize(
1170
+ symbol=symbol,
1171
+ _request_auth=_request_auth,
1172
+ _content_type=_content_type,
1173
+ _headers=_headers,
1174
+ _host_index=_host_index
1175
+ )
1176
+
1177
+ _response_types_map: Dict[str, Optional[str]] = {
1178
+ '200': "SymbolInfoResponse",
1179
+ '422': "HTTPValidationError",
1180
+ }
1181
+ response_data = self.api_client.call_api(
1182
+ *_param,
1183
+ _request_timeout=_request_timeout
1184
+ )
1185
+ response_data.read()
1186
+ return self.api_client.response_deserialize(
1187
+ response_data=response_data,
1188
+ response_types_map=_response_types_map,
1189
+ ).data
1190
+
1191
+
1192
+ @validate_call
1193
+ def get_symbol_udf_symbols_get_with_http_info(
1194
+ self,
1195
+ symbol: StrictStr,
1196
+ _request_timeout: Union[
1197
+ None,
1198
+ Annotated[StrictFloat, Field(gt=0)],
1199
+ Tuple[
1200
+ Annotated[StrictFloat, Field(gt=0)],
1201
+ Annotated[StrictFloat, Field(gt=0)]
1202
+ ]
1203
+ ] = None,
1204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1205
+ _content_type: Optional[StrictStr] = None,
1206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1208
+ ) -> ApiResponse[SymbolInfoResponse]:
1209
+ """Get Symbol
1210
+
1211
+
1212
+ :param symbol: (required)
1213
+ :type symbol: str
1214
+ :param _request_timeout: timeout setting for this request. If one
1215
+ number provided, it will be total request
1216
+ timeout. It can also be a pair (tuple) of
1217
+ (connection, read) timeouts.
1218
+ :type _request_timeout: int, tuple(int, int), optional
1219
+ :param _request_auth: set to override the auth_settings for an a single
1220
+ request; this effectively ignores the
1221
+ authentication in the spec for a single request.
1222
+ :type _request_auth: dict, optional
1223
+ :param _content_type: force content-type for the request.
1224
+ :type _content_type: str, Optional
1225
+ :param _headers: set to override the headers for a single
1226
+ request; this effectively ignores the headers
1227
+ in the spec for a single request.
1228
+ :type _headers: dict, optional
1229
+ :param _host_index: set to override the host_index for a single
1230
+ request; this effectively ignores the host_index
1231
+ in the spec for a single request.
1232
+ :type _host_index: int, optional
1233
+ :return: Returns the result object.
1234
+ """ # noqa: E501
1235
+
1236
+ _param = self._get_symbol_udf_symbols_get_serialize(
1237
+ symbol=symbol,
1238
+ _request_auth=_request_auth,
1239
+ _content_type=_content_type,
1240
+ _headers=_headers,
1241
+ _host_index=_host_index
1242
+ )
1243
+
1244
+ _response_types_map: Dict[str, Optional[str]] = {
1245
+ '200': "SymbolInfoResponse",
1246
+ '422': "HTTPValidationError",
1247
+ }
1248
+ response_data = self.api_client.call_api(
1249
+ *_param,
1250
+ _request_timeout=_request_timeout
1251
+ )
1252
+ response_data.read()
1253
+ return self.api_client.response_deserialize(
1254
+ response_data=response_data,
1255
+ response_types_map=_response_types_map,
1256
+ )
1257
+
1258
+
1259
+ @validate_call
1260
+ def get_symbol_udf_symbols_get_without_preload_content(
1261
+ self,
1262
+ symbol: StrictStr,
1263
+ _request_timeout: Union[
1264
+ None,
1265
+ Annotated[StrictFloat, Field(gt=0)],
1266
+ Tuple[
1267
+ Annotated[StrictFloat, Field(gt=0)],
1268
+ Annotated[StrictFloat, Field(gt=0)]
1269
+ ]
1270
+ ] = None,
1271
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1272
+ _content_type: Optional[StrictStr] = None,
1273
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1274
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1275
+ ) -> RESTResponseType:
1276
+ """Get Symbol
1277
+
1278
+
1279
+ :param symbol: (required)
1280
+ :type symbol: str
1281
+ :param _request_timeout: timeout setting for this request. If one
1282
+ number provided, it will be total request
1283
+ timeout. It can also be a pair (tuple) of
1284
+ (connection, read) timeouts.
1285
+ :type _request_timeout: int, tuple(int, int), optional
1286
+ :param _request_auth: set to override the auth_settings for an a single
1287
+ request; this effectively ignores the
1288
+ authentication in the spec for a single request.
1289
+ :type _request_auth: dict, optional
1290
+ :param _content_type: force content-type for the request.
1291
+ :type _content_type: str, Optional
1292
+ :param _headers: set to override the headers for a single
1293
+ request; this effectively ignores the headers
1294
+ in the spec for a single request.
1295
+ :type _headers: dict, optional
1296
+ :param _host_index: set to override the host_index for a single
1297
+ request; this effectively ignores the host_index
1298
+ in the spec for a single request.
1299
+ :type _host_index: int, optional
1300
+ :return: Returns the result object.
1301
+ """ # noqa: E501
1302
+
1303
+ _param = self._get_symbol_udf_symbols_get_serialize(
1304
+ symbol=symbol,
1305
+ _request_auth=_request_auth,
1306
+ _content_type=_content_type,
1307
+ _headers=_headers,
1308
+ _host_index=_host_index
1309
+ )
1310
+
1311
+ _response_types_map: Dict[str, Optional[str]] = {
1312
+ '200': "SymbolInfoResponse",
1313
+ '422': "HTTPValidationError",
1314
+ }
1315
+ response_data = self.api_client.call_api(
1316
+ *_param,
1317
+ _request_timeout=_request_timeout
1318
+ )
1319
+ return response_data.response
1320
+
1321
+
1322
+ def _get_symbol_udf_symbols_get_serialize(
1323
+ self,
1324
+ symbol,
1325
+ _request_auth,
1326
+ _content_type,
1327
+ _headers,
1328
+ _host_index,
1329
+ ) -> RequestSerialized:
1330
+
1331
+ _host = None
1332
+
1333
+ _collection_formats: Dict[str, str] = {
1334
+ }
1335
+
1336
+ _path_params: Dict[str, str] = {}
1337
+ _query_params: List[Tuple[str, str]] = []
1338
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1339
+ _form_params: List[Tuple[str, str]] = []
1340
+ _files: Dict[
1341
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1342
+ ] = {}
1343
+ _body_params: Optional[bytes] = None
1344
+
1345
+ # process the path parameters
1346
+ # process the query parameters
1347
+ if symbol is not None:
1348
+
1349
+ _query_params.append(('symbol', symbol))
1350
+
1351
+ # process the header parameters
1352
+ # process the form parameters
1353
+ # process the body parameter
1354
+
1355
+
1356
+ # set the HTTP header `Accept`
1357
+ if 'Accept' not in _header_params:
1358
+ _header_params['Accept'] = self.api_client.select_header_accept(
1359
+ [
1360
+ 'application/json'
1361
+ ]
1362
+ )
1363
+
1364
+
1365
+ # authentication setting
1366
+ _auth_settings: List[str] = [
1367
+ ]
1368
+
1369
+ return self.api_client.param_serialize(
1370
+ method='GET',
1371
+ resource_path='/udf/symbols',
1372
+ path_params=_path_params,
1373
+ query_params=_query_params,
1374
+ header_params=_header_params,
1375
+ body=_body_params,
1376
+ post_params=_form_params,
1377
+ files=_files,
1378
+ auth_settings=_auth_settings,
1379
+ collection_formats=_collection_formats,
1380
+ _host=_host,
1381
+ _request_auth=_request_auth
1382
+ )
1383
+
1384
+
1385
+
1386
+
1387
+ @validate_call
1388
+ def options_handler_udf_path_options(
1389
+ self,
1390
+ path: StrictStr,
1391
+ _request_timeout: Union[
1392
+ None,
1393
+ Annotated[StrictFloat, Field(gt=0)],
1394
+ Tuple[
1395
+ Annotated[StrictFloat, Field(gt=0)],
1396
+ Annotated[StrictFloat, Field(gt=0)]
1397
+ ]
1398
+ ] = None,
1399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1400
+ _content_type: Optional[StrictStr] = None,
1401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1403
+ ) -> object:
1404
+ """Options Handler
1405
+
1406
+ Handle OPTIONS requests for all UDF endpoints
1407
+
1408
+ :param path: (required)
1409
+ :type path: str
1410
+ :param _request_timeout: timeout setting for this request. If one
1411
+ number provided, it will be total request
1412
+ timeout. It can also be a pair (tuple) of
1413
+ (connection, read) timeouts.
1414
+ :type _request_timeout: int, tuple(int, int), optional
1415
+ :param _request_auth: set to override the auth_settings for an a single
1416
+ request; this effectively ignores the
1417
+ authentication in the spec for a single request.
1418
+ :type _request_auth: dict, optional
1419
+ :param _content_type: force content-type for the request.
1420
+ :type _content_type: str, Optional
1421
+ :param _headers: set to override the headers for a single
1422
+ request; this effectively ignores the headers
1423
+ in the spec for a single request.
1424
+ :type _headers: dict, optional
1425
+ :param _host_index: set to override the host_index for a single
1426
+ request; this effectively ignores the host_index
1427
+ in the spec for a single request.
1428
+ :type _host_index: int, optional
1429
+ :return: Returns the result object.
1430
+ """ # noqa: E501
1431
+
1432
+ _param = self._options_handler_udf_path_options_serialize(
1433
+ path=path,
1434
+ _request_auth=_request_auth,
1435
+ _content_type=_content_type,
1436
+ _headers=_headers,
1437
+ _host_index=_host_index
1438
+ )
1439
+
1440
+ _response_types_map: Dict[str, Optional[str]] = {
1441
+ '200': "object",
1442
+ '422': "HTTPValidationError",
1443
+ }
1444
+ response_data = self.api_client.call_api(
1445
+ *_param,
1446
+ _request_timeout=_request_timeout
1447
+ )
1448
+ response_data.read()
1449
+ return self.api_client.response_deserialize(
1450
+ response_data=response_data,
1451
+ response_types_map=_response_types_map,
1452
+ ).data
1453
+
1454
+
1455
+ @validate_call
1456
+ def options_handler_udf_path_options_with_http_info(
1457
+ self,
1458
+ path: StrictStr,
1459
+ _request_timeout: Union[
1460
+ None,
1461
+ Annotated[StrictFloat, Field(gt=0)],
1462
+ Tuple[
1463
+ Annotated[StrictFloat, Field(gt=0)],
1464
+ Annotated[StrictFloat, Field(gt=0)]
1465
+ ]
1466
+ ] = None,
1467
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1468
+ _content_type: Optional[StrictStr] = None,
1469
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1470
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1471
+ ) -> ApiResponse[object]:
1472
+ """Options Handler
1473
+
1474
+ Handle OPTIONS requests for all UDF endpoints
1475
+
1476
+ :param path: (required)
1477
+ :type path: str
1478
+ :param _request_timeout: timeout setting for this request. If one
1479
+ number provided, it will be total request
1480
+ timeout. It can also be a pair (tuple) of
1481
+ (connection, read) timeouts.
1482
+ :type _request_timeout: int, tuple(int, int), optional
1483
+ :param _request_auth: set to override the auth_settings for an a single
1484
+ request; this effectively ignores the
1485
+ authentication in the spec for a single request.
1486
+ :type _request_auth: dict, optional
1487
+ :param _content_type: force content-type for the request.
1488
+ :type _content_type: str, Optional
1489
+ :param _headers: set to override the headers for a single
1490
+ request; this effectively ignores the headers
1491
+ in the spec for a single request.
1492
+ :type _headers: dict, optional
1493
+ :param _host_index: set to override the host_index for a single
1494
+ request; this effectively ignores the host_index
1495
+ in the spec for a single request.
1496
+ :type _host_index: int, optional
1497
+ :return: Returns the result object.
1498
+ """ # noqa: E501
1499
+
1500
+ _param = self._options_handler_udf_path_options_serialize(
1501
+ path=path,
1502
+ _request_auth=_request_auth,
1503
+ _content_type=_content_type,
1504
+ _headers=_headers,
1505
+ _host_index=_host_index
1506
+ )
1507
+
1508
+ _response_types_map: Dict[str, Optional[str]] = {
1509
+ '200': "object",
1510
+ '422': "HTTPValidationError",
1511
+ }
1512
+ response_data = self.api_client.call_api(
1513
+ *_param,
1514
+ _request_timeout=_request_timeout
1515
+ )
1516
+ response_data.read()
1517
+ return self.api_client.response_deserialize(
1518
+ response_data=response_data,
1519
+ response_types_map=_response_types_map,
1520
+ )
1521
+
1522
+
1523
+ @validate_call
1524
+ def options_handler_udf_path_options_without_preload_content(
1525
+ self,
1526
+ path: StrictStr,
1527
+ _request_timeout: Union[
1528
+ None,
1529
+ Annotated[StrictFloat, Field(gt=0)],
1530
+ Tuple[
1531
+ Annotated[StrictFloat, Field(gt=0)],
1532
+ Annotated[StrictFloat, Field(gt=0)]
1533
+ ]
1534
+ ] = None,
1535
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1536
+ _content_type: Optional[StrictStr] = None,
1537
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1538
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1539
+ ) -> RESTResponseType:
1540
+ """Options Handler
1541
+
1542
+ Handle OPTIONS requests for all UDF endpoints
1543
+
1544
+ :param path: (required)
1545
+ :type path: str
1546
+ :param _request_timeout: timeout setting for this request. If one
1547
+ number provided, it will be total request
1548
+ timeout. It can also be a pair (tuple) of
1549
+ (connection, read) timeouts.
1550
+ :type _request_timeout: int, tuple(int, int), optional
1551
+ :param _request_auth: set to override the auth_settings for an a single
1552
+ request; this effectively ignores the
1553
+ authentication in the spec for a single request.
1554
+ :type _request_auth: dict, optional
1555
+ :param _content_type: force content-type for the request.
1556
+ :type _content_type: str, Optional
1557
+ :param _headers: set to override the headers for a single
1558
+ request; this effectively ignores the headers
1559
+ in the spec for a single request.
1560
+ :type _headers: dict, optional
1561
+ :param _host_index: set to override the host_index for a single
1562
+ request; this effectively ignores the host_index
1563
+ in the spec for a single request.
1564
+ :type _host_index: int, optional
1565
+ :return: Returns the result object.
1566
+ """ # noqa: E501
1567
+
1568
+ _param = self._options_handler_udf_path_options_serialize(
1569
+ path=path,
1570
+ _request_auth=_request_auth,
1571
+ _content_type=_content_type,
1572
+ _headers=_headers,
1573
+ _host_index=_host_index
1574
+ )
1575
+
1576
+ _response_types_map: Dict[str, Optional[str]] = {
1577
+ '200': "object",
1578
+ '422': "HTTPValidationError",
1579
+ }
1580
+ response_data = self.api_client.call_api(
1581
+ *_param,
1582
+ _request_timeout=_request_timeout
1583
+ )
1584
+ return response_data.response
1585
+
1586
+
1587
+ def _options_handler_udf_path_options_serialize(
1588
+ self,
1589
+ path,
1590
+ _request_auth,
1591
+ _content_type,
1592
+ _headers,
1593
+ _host_index,
1594
+ ) -> RequestSerialized:
1595
+
1596
+ _host = None
1597
+
1598
+ _collection_formats: Dict[str, str] = {
1599
+ }
1600
+
1601
+ _path_params: Dict[str, str] = {}
1602
+ _query_params: List[Tuple[str, str]] = []
1603
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1604
+ _form_params: List[Tuple[str, str]] = []
1605
+ _files: Dict[
1606
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1607
+ ] = {}
1608
+ _body_params: Optional[bytes] = None
1609
+
1610
+ # process the path parameters
1611
+ if path is not None:
1612
+ _path_params['path'] = path
1613
+ # process the query parameters
1614
+ # process the header parameters
1615
+ # process the form parameters
1616
+ # process the body parameter
1617
+
1618
+
1619
+ # set the HTTP header `Accept`
1620
+ if 'Accept' not in _header_params:
1621
+ _header_params['Accept'] = self.api_client.select_header_accept(
1622
+ [
1623
+ 'application/json'
1624
+ ]
1625
+ )
1626
+
1627
+
1628
+ # authentication setting
1629
+ _auth_settings: List[str] = [
1630
+ ]
1631
+
1632
+ return self.api_client.param_serialize(
1633
+ method='OPTIONS',
1634
+ resource_path='/udf/{path}',
1635
+ path_params=_path_params,
1636
+ query_params=_query_params,
1637
+ header_params=_header_params,
1638
+ body=_body_params,
1639
+ post_params=_form_params,
1640
+ files=_files,
1641
+ auth_settings=_auth_settings,
1642
+ collection_formats=_collection_formats,
1643
+ _host=_host,
1644
+ _request_auth=_request_auth
1645
+ )
1646
+
1647
+
1648
+
1649
+
1650
+ @validate_call
1651
+ def search_symbols_udf_search_get(
1652
+ self,
1653
+ query: StrictStr,
1654
+ limit: Optional[StrictInt] = None,
1655
+ _request_timeout: Union[
1656
+ None,
1657
+ Annotated[StrictFloat, Field(gt=0)],
1658
+ Tuple[
1659
+ Annotated[StrictFloat, Field(gt=0)],
1660
+ Annotated[StrictFloat, Field(gt=0)]
1661
+ ]
1662
+ ] = None,
1663
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1664
+ _content_type: Optional[StrictStr] = None,
1665
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1666
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1667
+ ) -> List[SearchSymbolResponse]:
1668
+ """Search Symbols
1669
+
1670
+ Called when a user searches for symbols in TradingView
1671
+
1672
+ :param query: (required)
1673
+ :type query: str
1674
+ :param limit:
1675
+ :type limit: int
1676
+ :param _request_timeout: timeout setting for this request. If one
1677
+ number provided, it will be total request
1678
+ timeout. It can also be a pair (tuple) of
1679
+ (connection, read) timeouts.
1680
+ :type _request_timeout: int, tuple(int, int), optional
1681
+ :param _request_auth: set to override the auth_settings for an a single
1682
+ request; this effectively ignores the
1683
+ authentication in the spec for a single request.
1684
+ :type _request_auth: dict, optional
1685
+ :param _content_type: force content-type for the request.
1686
+ :type _content_type: str, Optional
1687
+ :param _headers: set to override the headers for a single
1688
+ request; this effectively ignores the headers
1689
+ in the spec for a single request.
1690
+ :type _headers: dict, optional
1691
+ :param _host_index: set to override the host_index for a single
1692
+ request; this effectively ignores the host_index
1693
+ in the spec for a single request.
1694
+ :type _host_index: int, optional
1695
+ :return: Returns the result object.
1696
+ """ # noqa: E501
1697
+
1698
+ _param = self._search_symbols_udf_search_get_serialize(
1699
+ query=query,
1700
+ limit=limit,
1701
+ _request_auth=_request_auth,
1702
+ _content_type=_content_type,
1703
+ _headers=_headers,
1704
+ _host_index=_host_index
1705
+ )
1706
+
1707
+ _response_types_map: Dict[str, Optional[str]] = {
1708
+ '200': "List[SearchSymbolResponse]",
1709
+ '422': "HTTPValidationError",
1710
+ }
1711
+ response_data = self.api_client.call_api(
1712
+ *_param,
1713
+ _request_timeout=_request_timeout
1714
+ )
1715
+ response_data.read()
1716
+ return self.api_client.response_deserialize(
1717
+ response_data=response_data,
1718
+ response_types_map=_response_types_map,
1719
+ ).data
1720
+
1721
+
1722
+ @validate_call
1723
+ def search_symbols_udf_search_get_with_http_info(
1724
+ self,
1725
+ query: StrictStr,
1726
+ limit: Optional[StrictInt] = None,
1727
+ _request_timeout: Union[
1728
+ None,
1729
+ Annotated[StrictFloat, Field(gt=0)],
1730
+ Tuple[
1731
+ Annotated[StrictFloat, Field(gt=0)],
1732
+ Annotated[StrictFloat, Field(gt=0)]
1733
+ ]
1734
+ ] = None,
1735
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1736
+ _content_type: Optional[StrictStr] = None,
1737
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1738
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1739
+ ) -> ApiResponse[List[SearchSymbolResponse]]:
1740
+ """Search Symbols
1741
+
1742
+ Called when a user searches for symbols in TradingView
1743
+
1744
+ :param query: (required)
1745
+ :type query: str
1746
+ :param limit:
1747
+ :type limit: int
1748
+ :param _request_timeout: timeout setting for this request. If one
1749
+ number provided, it will be total request
1750
+ timeout. It can also be a pair (tuple) of
1751
+ (connection, read) timeouts.
1752
+ :type _request_timeout: int, tuple(int, int), optional
1753
+ :param _request_auth: set to override the auth_settings for an a single
1754
+ request; this effectively ignores the
1755
+ authentication in the spec for a single request.
1756
+ :type _request_auth: dict, optional
1757
+ :param _content_type: force content-type for the request.
1758
+ :type _content_type: str, Optional
1759
+ :param _headers: set to override the headers for a single
1760
+ request; this effectively ignores the headers
1761
+ in the spec for a single request.
1762
+ :type _headers: dict, optional
1763
+ :param _host_index: set to override the host_index for a single
1764
+ request; this effectively ignores the host_index
1765
+ in the spec for a single request.
1766
+ :type _host_index: int, optional
1767
+ :return: Returns the result object.
1768
+ """ # noqa: E501
1769
+
1770
+ _param = self._search_symbols_udf_search_get_serialize(
1771
+ query=query,
1772
+ limit=limit,
1773
+ _request_auth=_request_auth,
1774
+ _content_type=_content_type,
1775
+ _headers=_headers,
1776
+ _host_index=_host_index
1777
+ )
1778
+
1779
+ _response_types_map: Dict[str, Optional[str]] = {
1780
+ '200': "List[SearchSymbolResponse]",
1781
+ '422': "HTTPValidationError",
1782
+ }
1783
+ response_data = self.api_client.call_api(
1784
+ *_param,
1785
+ _request_timeout=_request_timeout
1786
+ )
1787
+ response_data.read()
1788
+ return self.api_client.response_deserialize(
1789
+ response_data=response_data,
1790
+ response_types_map=_response_types_map,
1791
+ )
1792
+
1793
+
1794
+ @validate_call
1795
+ def search_symbols_udf_search_get_without_preload_content(
1796
+ self,
1797
+ query: StrictStr,
1798
+ limit: Optional[StrictInt] = None,
1799
+ _request_timeout: Union[
1800
+ None,
1801
+ Annotated[StrictFloat, Field(gt=0)],
1802
+ Tuple[
1803
+ Annotated[StrictFloat, Field(gt=0)],
1804
+ Annotated[StrictFloat, Field(gt=0)]
1805
+ ]
1806
+ ] = None,
1807
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1808
+ _content_type: Optional[StrictStr] = None,
1809
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1810
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1811
+ ) -> RESTResponseType:
1812
+ """Search Symbols
1813
+
1814
+ Called when a user searches for symbols in TradingView
1815
+
1816
+ :param query: (required)
1817
+ :type query: str
1818
+ :param limit:
1819
+ :type limit: int
1820
+ :param _request_timeout: timeout setting for this request. If one
1821
+ number provided, it will be total request
1822
+ timeout. It can also be a pair (tuple) of
1823
+ (connection, read) timeouts.
1824
+ :type _request_timeout: int, tuple(int, int), optional
1825
+ :param _request_auth: set to override the auth_settings for an a single
1826
+ request; this effectively ignores the
1827
+ authentication in the spec for a single request.
1828
+ :type _request_auth: dict, optional
1829
+ :param _content_type: force content-type for the request.
1830
+ :type _content_type: str, Optional
1831
+ :param _headers: set to override the headers for a single
1832
+ request; this effectively ignores the headers
1833
+ in the spec for a single request.
1834
+ :type _headers: dict, optional
1835
+ :param _host_index: set to override the host_index for a single
1836
+ request; this effectively ignores the host_index
1837
+ in the spec for a single request.
1838
+ :type _host_index: int, optional
1839
+ :return: Returns the result object.
1840
+ """ # noqa: E501
1841
+
1842
+ _param = self._search_symbols_udf_search_get_serialize(
1843
+ query=query,
1844
+ limit=limit,
1845
+ _request_auth=_request_auth,
1846
+ _content_type=_content_type,
1847
+ _headers=_headers,
1848
+ _host_index=_host_index
1849
+ )
1850
+
1851
+ _response_types_map: Dict[str, Optional[str]] = {
1852
+ '200': "List[SearchSymbolResponse]",
1853
+ '422': "HTTPValidationError",
1854
+ }
1855
+ response_data = self.api_client.call_api(
1856
+ *_param,
1857
+ _request_timeout=_request_timeout
1858
+ )
1859
+ return response_data.response
1860
+
1861
+
1862
+ def _search_symbols_udf_search_get_serialize(
1863
+ self,
1864
+ query,
1865
+ limit,
1866
+ _request_auth,
1867
+ _content_type,
1868
+ _headers,
1869
+ _host_index,
1870
+ ) -> RequestSerialized:
1871
+
1872
+ _host = None
1873
+
1874
+ _collection_formats: Dict[str, str] = {
1875
+ }
1876
+
1877
+ _path_params: Dict[str, str] = {}
1878
+ _query_params: List[Tuple[str, str]] = []
1879
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1880
+ _form_params: List[Tuple[str, str]] = []
1881
+ _files: Dict[
1882
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1883
+ ] = {}
1884
+ _body_params: Optional[bytes] = None
1885
+
1886
+ # process the path parameters
1887
+ # process the query parameters
1888
+ if query is not None:
1889
+
1890
+ _query_params.append(('query', query))
1891
+
1892
+ if limit is not None:
1893
+
1894
+ _query_params.append(('limit', limit))
1895
+
1896
+ # process the header parameters
1897
+ # process the form parameters
1898
+ # process the body parameter
1899
+
1900
+
1901
+ # set the HTTP header `Accept`
1902
+ if 'Accept' not in _header_params:
1903
+ _header_params['Accept'] = self.api_client.select_header_accept(
1904
+ [
1905
+ 'application/json'
1906
+ ]
1907
+ )
1908
+
1909
+
1910
+ # authentication setting
1911
+ _auth_settings: List[str] = [
1912
+ ]
1913
+
1914
+ return self.api_client.param_serialize(
1915
+ method='GET',
1916
+ resource_path='/udf/search',
1917
+ path_params=_path_params,
1918
+ query_params=_query_params,
1919
+ header_params=_header_params,
1920
+ body=_body_params,
1921
+ post_params=_form_params,
1922
+ files=_files,
1923
+ auth_settings=_auth_settings,
1924
+ collection_formats=_collection_formats,
1925
+ _host=_host,
1926
+ _request_auth=_request_auth
1927
+ )
1928
+
1929
+