crypticorn 2.17.0rc1__py3-none-any.whl → 2.17.0rc2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- crypticorn/__init__.py +2 -2
- crypticorn/auth/client/api/admin_api.py +415 -13
- crypticorn/auth/client/api/auth_api.py +2622 -113
- crypticorn/auth/client/api/service_api.py +258 -7
- crypticorn/auth/client/api/user_api.py +2485 -270
- crypticorn/auth/client/api/wallet_api.py +1518 -77
- crypticorn/auth/client/models/create_api_key_request.py +2 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
- crypticorn/auth/client/rest.py +23 -4
- crypticorn/auth/main.py +8 -5
- crypticorn/client.py +227 -59
- crypticorn/common/__init__.py +0 -1
- crypticorn/common/metrics.py +4 -6
- crypticorn/common/middleware.py +10 -5
- crypticorn/common/pagination.py +137 -18
- crypticorn/common/router/admin_router.py +1 -1
- crypticorn/common/utils.py +2 -1
- crypticorn/common/warnings.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1234 -51
- crypticorn/hive/client/api/data_api.py +517 -13
- crypticorn/hive/client/api/models_api.py +1657 -83
- crypticorn/hive/client/api/status_api.py +415 -13
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/klines/client/api/admin_api.py +1234 -51
- crypticorn/klines/client/api/change_in_timeframe_api.py +278 -7
- crypticorn/klines/client/api/funding_rates_api.py +324 -7
- crypticorn/klines/client/api/ohlcv_data_api.py +399 -7
- crypticorn/klines/client/api/status_api.py +415 -13
- crypticorn/klines/client/api/symbols_api.py +225 -7
- crypticorn/klines/client/api/udf_api.py +1393 -120
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1234 -51
- crypticorn/metrics/client/api/exchanges_api.py +1405 -140
- crypticorn/metrics/client/api/indicators_api.py +640 -13
- crypticorn/metrics/client/api/logs_api.py +305 -7
- crypticorn/metrics/client/api/marketcap_api.py +1240 -60
- crypticorn/metrics/client/api/markets_api.py +352 -7
- crypticorn/metrics/client/api/quote_currencies_api.py +237 -7
- crypticorn/metrics/client/api/status_api.py +415 -13
- crypticorn/metrics/client/api/tokens_api.py +400 -13
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1720 -126
- crypticorn/pay/client/api/now_payments_api.py +1013 -42
- crypticorn/pay/client/api/payments_api.py +580 -13
- crypticorn/pay/client/api/products_api.py +915 -25
- crypticorn/pay/client/api/status_api.py +415 -13
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- crypticorn/pay/client/models/scope.py +1 -0
- crypticorn/pay/client/rest.py +23 -4
- crypticorn/pay/main.py +10 -6
- crypticorn/trade/client/__init__.py +2 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1718 -123
- crypticorn/trade/client/api/api_keys_api.py +1596 -103
- crypticorn/trade/client/api/bots_api.py +1106 -47
- crypticorn/trade/client/api/exchanges_api.py +592 -19
- crypticorn/trade/client/api/notifications_api.py +1340 -112
- crypticorn/trade/client/api/orders_api.py +240 -7
- crypticorn/trade/client/api/status_api.py +415 -13
- crypticorn/trade/client/api/strategies_api.py +1170 -69
- crypticorn/trade/client/api/trading_actions_api.py +650 -19
- crypticorn/trade/client/models/__init__.py +2 -0
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/spot_balance.py +110 -0
- crypticorn/trade/client/models/strategy.py +5 -3
- crypticorn/trade/client/models/strategy_create.py +6 -4
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +2 -2
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/METADATA +64 -20
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/RECORD +85 -84
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/top_level.txt +0 -0
@@ -1,1285 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Trading API
|
5
|
-
|
6
|
-
API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
|
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 StrictStr
|
20
|
-
from typing import Any, Dict, List
|
21
|
-
from crypticorn.trade.client.models.futures_balance import FuturesBalance
|
22
|
-
|
23
|
-
from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
24
|
-
from crypticorn.trade.client.api_response import ApiResponse
|
25
|
-
from crypticorn.trade.client.rest import RESTResponseType
|
26
|
-
|
27
|
-
|
28
|
-
class FuturesTradingPanelApi:
|
29
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
30
|
-
Ref: https://openapi-generator.tech
|
31
|
-
|
32
|
-
Do not edit the class manually.
|
33
|
-
"""
|
34
|
-
|
35
|
-
def __init__(self, api_client=None) -> None:
|
36
|
-
if api_client is None:
|
37
|
-
api_client = ApiClient.get_default()
|
38
|
-
self.api_client = api_client
|
39
|
-
|
40
|
-
@validate_call
|
41
|
-
async def cancel_futures_order(
|
42
|
-
self,
|
43
|
-
order_id: StrictStr,
|
44
|
-
symbol: StrictStr,
|
45
|
-
key: StrictStr,
|
46
|
-
_request_timeout: Union[
|
47
|
-
None,
|
48
|
-
Annotated[StrictFloat, Field(gt=0)],
|
49
|
-
Tuple[
|
50
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
51
|
-
],
|
52
|
-
] = None,
|
53
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
54
|
-
_content_type: Optional[StrictStr] = None,
|
55
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
56
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
57
|
-
) -> None:
|
58
|
-
"""Cancel Order
|
59
|
-
|
60
|
-
|
61
|
-
:param order_id: (required)
|
62
|
-
:type order_id: str
|
63
|
-
:param symbol: (required)
|
64
|
-
:type symbol: str
|
65
|
-
:param key: (required)
|
66
|
-
:type key: str
|
67
|
-
:param _request_timeout: timeout setting for this request. If one
|
68
|
-
number provided, it will be total request
|
69
|
-
timeout. It can also be a pair (tuple) of
|
70
|
-
(connection, read) timeouts.
|
71
|
-
:type _request_timeout: int, tuple(int, int), optional
|
72
|
-
:param _request_auth: set to override the auth_settings for an a single
|
73
|
-
request; this effectively ignores the
|
74
|
-
authentication in the spec for a single request.
|
75
|
-
:type _request_auth: dict, optional
|
76
|
-
:param _content_type: force content-type for the request.
|
77
|
-
:type _content_type: str, Optional
|
78
|
-
:param _headers: set to override the headers for a single
|
79
|
-
request; this effectively ignores the headers
|
80
|
-
in the spec for a single request.
|
81
|
-
:type _headers: dict, optional
|
82
|
-
:param _host_index: set to override the host_index for a single
|
83
|
-
request; this effectively ignores the host_index
|
84
|
-
in the spec for a single request.
|
85
|
-
:type _host_index: int, optional
|
86
|
-
:return: Returns the result object.
|
87
|
-
""" # noqa: E501
|
88
|
-
|
89
|
-
_param = self._cancel_futures_order_serialize(
|
90
|
-
order_id=order_id,
|
91
|
-
symbol=symbol,
|
92
|
-
key=key,
|
93
|
-
_request_auth=_request_auth,
|
94
|
-
_content_type=_content_type,
|
95
|
-
_headers=_headers,
|
96
|
-
_host_index=_host_index,
|
97
|
-
)
|
98
|
-
|
99
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
100
|
-
"204": None,
|
101
|
-
}
|
102
|
-
response_data = await self.api_client.call_api(
|
103
|
-
*_param, _request_timeout=_request_timeout
|
104
|
-
)
|
105
|
-
await response_data.read()
|
106
|
-
return self.api_client.response_deserialize(
|
107
|
-
response_data=response_data,
|
108
|
-
response_types_map=_response_types_map,
|
109
|
-
).data
|
110
|
-
|
111
|
-
@validate_call
|
112
|
-
async def cancel_futures_order_with_http_info(
|
113
|
-
self,
|
114
|
-
order_id: StrictStr,
|
115
|
-
symbol: StrictStr,
|
116
|
-
key: StrictStr,
|
117
|
-
_request_timeout: Union[
|
118
|
-
None,
|
119
|
-
Annotated[StrictFloat, Field(gt=0)],
|
120
|
-
Tuple[
|
121
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
122
|
-
],
|
123
|
-
] = None,
|
124
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
125
|
-
_content_type: Optional[StrictStr] = None,
|
126
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
127
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
128
|
-
) -> ApiResponse[None]:
|
129
|
-
"""Cancel Order
|
130
|
-
|
131
|
-
|
132
|
-
:param order_id: (required)
|
133
|
-
:type order_id: str
|
134
|
-
:param symbol: (required)
|
135
|
-
:type symbol: str
|
136
|
-
:param key: (required)
|
137
|
-
:type key: str
|
138
|
-
:param _request_timeout: timeout setting for this request. If one
|
139
|
-
number provided, it will be total request
|
140
|
-
timeout. It can also be a pair (tuple) of
|
141
|
-
(connection, read) timeouts.
|
142
|
-
:type _request_timeout: int, tuple(int, int), optional
|
143
|
-
:param _request_auth: set to override the auth_settings for an a single
|
144
|
-
request; this effectively ignores the
|
145
|
-
authentication in the spec for a single request.
|
146
|
-
:type _request_auth: dict, optional
|
147
|
-
:param _content_type: force content-type for the request.
|
148
|
-
:type _content_type: str, Optional
|
149
|
-
:param _headers: set to override the headers for a single
|
150
|
-
request; this effectively ignores the headers
|
151
|
-
in the spec for a single request.
|
152
|
-
:type _headers: dict, optional
|
153
|
-
:param _host_index: set to override the host_index for a single
|
154
|
-
request; this effectively ignores the host_index
|
155
|
-
in the spec for a single request.
|
156
|
-
:type _host_index: int, optional
|
157
|
-
:return: Returns the result object.
|
158
|
-
""" # noqa: E501
|
159
|
-
|
160
|
-
_param = self._cancel_futures_order_serialize(
|
161
|
-
order_id=order_id,
|
162
|
-
symbol=symbol,
|
163
|
-
key=key,
|
164
|
-
_request_auth=_request_auth,
|
165
|
-
_content_type=_content_type,
|
166
|
-
_headers=_headers,
|
167
|
-
_host_index=_host_index,
|
168
|
-
)
|
169
|
-
|
170
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
171
|
-
"204": None,
|
172
|
-
}
|
173
|
-
response_data = await self.api_client.call_api(
|
174
|
-
*_param, _request_timeout=_request_timeout
|
175
|
-
)
|
176
|
-
await response_data.read()
|
177
|
-
return self.api_client.response_deserialize(
|
178
|
-
response_data=response_data,
|
179
|
-
response_types_map=_response_types_map,
|
180
|
-
)
|
181
|
-
|
182
|
-
@validate_call
|
183
|
-
async def cancel_futures_order_without_preload_content(
|
184
|
-
self,
|
185
|
-
order_id: StrictStr,
|
186
|
-
symbol: StrictStr,
|
187
|
-
key: StrictStr,
|
188
|
-
_request_timeout: Union[
|
189
|
-
None,
|
190
|
-
Annotated[StrictFloat, Field(gt=0)],
|
191
|
-
Tuple[
|
192
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
193
|
-
],
|
194
|
-
] = None,
|
195
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
196
|
-
_content_type: Optional[StrictStr] = None,
|
197
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
198
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
199
|
-
) -> RESTResponseType:
|
200
|
-
"""Cancel Order
|
201
|
-
|
202
|
-
|
203
|
-
:param order_id: (required)
|
204
|
-
:type order_id: str
|
205
|
-
:param symbol: (required)
|
206
|
-
:type symbol: str
|
207
|
-
:param key: (required)
|
208
|
-
:type key: str
|
209
|
-
:param _request_timeout: timeout setting for this request. If one
|
210
|
-
number provided, it will be total request
|
211
|
-
timeout. It can also be a pair (tuple) of
|
212
|
-
(connection, read) timeouts.
|
213
|
-
:type _request_timeout: int, tuple(int, int), optional
|
214
|
-
:param _request_auth: set to override the auth_settings for an a single
|
215
|
-
request; this effectively ignores the
|
216
|
-
authentication in the spec for a single request.
|
217
|
-
:type _request_auth: dict, optional
|
218
|
-
:param _content_type: force content-type for the request.
|
219
|
-
:type _content_type: str, Optional
|
220
|
-
:param _headers: set to override the headers for a single
|
221
|
-
request; this effectively ignores the headers
|
222
|
-
in the spec for a single request.
|
223
|
-
:type _headers: dict, optional
|
224
|
-
:param _host_index: set to override the host_index for a single
|
225
|
-
request; this effectively ignores the host_index
|
226
|
-
in the spec for a single request.
|
227
|
-
:type _host_index: int, optional
|
228
|
-
:return: Returns the result object.
|
229
|
-
""" # noqa: E501
|
230
|
-
|
231
|
-
_param = self._cancel_futures_order_serialize(
|
232
|
-
order_id=order_id,
|
233
|
-
symbol=symbol,
|
234
|
-
key=key,
|
235
|
-
_request_auth=_request_auth,
|
236
|
-
_content_type=_content_type,
|
237
|
-
_headers=_headers,
|
238
|
-
_host_index=_host_index,
|
239
|
-
)
|
240
|
-
|
241
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
242
|
-
"204": None,
|
243
|
-
}
|
244
|
-
response_data = await self.api_client.call_api(
|
245
|
-
*_param, _request_timeout=_request_timeout
|
246
|
-
)
|
247
|
-
return response_data.response
|
248
|
-
|
249
|
-
def _cancel_futures_order_serialize(
|
250
|
-
self,
|
251
|
-
order_id,
|
252
|
-
symbol,
|
253
|
-
key,
|
254
|
-
_request_auth,
|
255
|
-
_content_type,
|
256
|
-
_headers,
|
257
|
-
_host_index,
|
258
|
-
) -> RequestSerialized:
|
259
|
-
|
260
|
-
_host = None
|
261
|
-
|
262
|
-
_collection_formats: Dict[str, str] = {}
|
263
|
-
|
264
|
-
_path_params: Dict[str, str] = {}
|
265
|
-
_query_params: List[Tuple[str, str]] = []
|
266
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
267
|
-
_form_params: List[Tuple[str, str]] = []
|
268
|
-
_files: Dict[
|
269
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
270
|
-
] = {}
|
271
|
-
_body_params: Optional[bytes] = None
|
272
|
-
|
273
|
-
# process the path parameters
|
274
|
-
# process the query parameters
|
275
|
-
if order_id is not None:
|
276
|
-
|
277
|
-
_query_params.append(("orderId", order_id))
|
278
|
-
|
279
|
-
if symbol is not None:
|
280
|
-
|
281
|
-
_query_params.append(("symbol", symbol))
|
282
|
-
|
283
|
-
if key is not None:
|
284
|
-
|
285
|
-
_query_params.append(("key", key))
|
286
|
-
|
287
|
-
# process the header parameters
|
288
|
-
# process the form parameters
|
289
|
-
# process the body parameter
|
290
|
-
|
291
|
-
# set the HTTP header `Accept`
|
292
|
-
if "Accept" not in _header_params:
|
293
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
294
|
-
["application/json"]
|
295
|
-
)
|
296
|
-
|
297
|
-
# authentication setting
|
298
|
-
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
299
|
-
|
300
|
-
return self.api_client.param_serialize(
|
301
|
-
method="DELETE",
|
302
|
-
resource_path="/futures/orders",
|
303
|
-
path_params=_path_params,
|
304
|
-
query_params=_query_params,
|
305
|
-
header_params=_header_params,
|
306
|
-
body=_body_params,
|
307
|
-
post_params=_form_params,
|
308
|
-
files=_files,
|
309
|
-
auth_settings=_auth_settings,
|
310
|
-
collection_formats=_collection_formats,
|
311
|
-
_host=_host,
|
312
|
-
_request_auth=_request_auth,
|
313
|
-
)
|
314
|
-
|
315
|
-
@validate_call
|
316
|
-
async def get_futures_balance(
|
317
|
-
self,
|
318
|
-
_request_timeout: Union[
|
319
|
-
None,
|
320
|
-
Annotated[StrictFloat, Field(gt=0)],
|
321
|
-
Tuple[
|
322
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
323
|
-
],
|
324
|
-
] = None,
|
325
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
326
|
-
_content_type: Optional[StrictStr] = None,
|
327
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
328
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
329
|
-
) -> List[FuturesBalance]:
|
330
|
-
"""Get Futures Balance
|
331
|
-
|
332
|
-
|
333
|
-
:param _request_timeout: timeout setting for this request. If one
|
334
|
-
number provided, it will be total request
|
335
|
-
timeout. It can also be a pair (tuple) of
|
336
|
-
(connection, read) timeouts.
|
337
|
-
:type _request_timeout: int, tuple(int, int), optional
|
338
|
-
:param _request_auth: set to override the auth_settings for an a single
|
339
|
-
request; this effectively ignores the
|
340
|
-
authentication in the spec for a single request.
|
341
|
-
:type _request_auth: dict, optional
|
342
|
-
:param _content_type: force content-type for the request.
|
343
|
-
:type _content_type: str, Optional
|
344
|
-
:param _headers: set to override the headers for a single
|
345
|
-
request; this effectively ignores the headers
|
346
|
-
in the spec for a single request.
|
347
|
-
:type _headers: dict, optional
|
348
|
-
:param _host_index: set to override the host_index for a single
|
349
|
-
request; this effectively ignores the host_index
|
350
|
-
in the spec for a single request.
|
351
|
-
:type _host_index: int, optional
|
352
|
-
:return: Returns the result object.
|
353
|
-
""" # noqa: E501
|
354
|
-
|
355
|
-
_param = self._get_futures_balance_serialize(
|
356
|
-
_request_auth=_request_auth,
|
357
|
-
_content_type=_content_type,
|
358
|
-
_headers=_headers,
|
359
|
-
_host_index=_host_index,
|
360
|
-
)
|
361
|
-
|
362
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
363
|
-
"200": "List[FuturesBalance]",
|
364
|
-
}
|
365
|
-
response_data = await self.api_client.call_api(
|
366
|
-
*_param, _request_timeout=_request_timeout
|
367
|
-
)
|
368
|
-
await response_data.read()
|
369
|
-
return self.api_client.response_deserialize(
|
370
|
-
response_data=response_data,
|
371
|
-
response_types_map=_response_types_map,
|
372
|
-
).data
|
373
|
-
|
374
|
-
@validate_call
|
375
|
-
async def get_futures_balance_with_http_info(
|
376
|
-
self,
|
377
|
-
_request_timeout: Union[
|
378
|
-
None,
|
379
|
-
Annotated[StrictFloat, Field(gt=0)],
|
380
|
-
Tuple[
|
381
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
382
|
-
],
|
383
|
-
] = None,
|
384
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
385
|
-
_content_type: Optional[StrictStr] = None,
|
386
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
387
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
388
|
-
) -> ApiResponse[List[FuturesBalance]]:
|
389
|
-
"""Get Futures Balance
|
390
|
-
|
391
|
-
|
392
|
-
:param _request_timeout: timeout setting for this request. If one
|
393
|
-
number provided, it will be total request
|
394
|
-
timeout. It can also be a pair (tuple) of
|
395
|
-
(connection, read) timeouts.
|
396
|
-
:type _request_timeout: int, tuple(int, int), optional
|
397
|
-
:param _request_auth: set to override the auth_settings for an a single
|
398
|
-
request; this effectively ignores the
|
399
|
-
authentication in the spec for a single request.
|
400
|
-
:type _request_auth: dict, optional
|
401
|
-
:param _content_type: force content-type for the request.
|
402
|
-
:type _content_type: str, Optional
|
403
|
-
:param _headers: set to override the headers for a single
|
404
|
-
request; this effectively ignores the headers
|
405
|
-
in the spec for a single request.
|
406
|
-
:type _headers: dict, optional
|
407
|
-
:param _host_index: set to override the host_index for a single
|
408
|
-
request; this effectively ignores the host_index
|
409
|
-
in the spec for a single request.
|
410
|
-
:type _host_index: int, optional
|
411
|
-
:return: Returns the result object.
|
412
|
-
""" # noqa: E501
|
413
|
-
|
414
|
-
_param = self._get_futures_balance_serialize(
|
415
|
-
_request_auth=_request_auth,
|
416
|
-
_content_type=_content_type,
|
417
|
-
_headers=_headers,
|
418
|
-
_host_index=_host_index,
|
419
|
-
)
|
420
|
-
|
421
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
422
|
-
"200": "List[FuturesBalance]",
|
423
|
-
}
|
424
|
-
response_data = await self.api_client.call_api(
|
425
|
-
*_param, _request_timeout=_request_timeout
|
426
|
-
)
|
427
|
-
await response_data.read()
|
428
|
-
return self.api_client.response_deserialize(
|
429
|
-
response_data=response_data,
|
430
|
-
response_types_map=_response_types_map,
|
431
|
-
)
|
432
|
-
|
433
|
-
@validate_call
|
434
|
-
async def get_futures_balance_without_preload_content(
|
435
|
-
self,
|
436
|
-
_request_timeout: Union[
|
437
|
-
None,
|
438
|
-
Annotated[StrictFloat, Field(gt=0)],
|
439
|
-
Tuple[
|
440
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
441
|
-
],
|
442
|
-
] = None,
|
443
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
444
|
-
_content_type: Optional[StrictStr] = None,
|
445
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
446
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
447
|
-
) -> RESTResponseType:
|
448
|
-
"""Get Futures Balance
|
449
|
-
|
450
|
-
|
451
|
-
:param _request_timeout: timeout setting for this request. If one
|
452
|
-
number provided, it will be total request
|
453
|
-
timeout. It can also be a pair (tuple) of
|
454
|
-
(connection, read) timeouts.
|
455
|
-
:type _request_timeout: int, tuple(int, int), optional
|
456
|
-
:param _request_auth: set to override the auth_settings for an a single
|
457
|
-
request; this effectively ignores the
|
458
|
-
authentication in the spec for a single request.
|
459
|
-
:type _request_auth: dict, optional
|
460
|
-
:param _content_type: force content-type for the request.
|
461
|
-
:type _content_type: str, Optional
|
462
|
-
:param _headers: set to override the headers for a single
|
463
|
-
request; this effectively ignores the headers
|
464
|
-
in the spec for a single request.
|
465
|
-
:type _headers: dict, optional
|
466
|
-
:param _host_index: set to override the host_index for a single
|
467
|
-
request; this effectively ignores the host_index
|
468
|
-
in the spec for a single request.
|
469
|
-
:type _host_index: int, optional
|
470
|
-
:return: Returns the result object.
|
471
|
-
""" # noqa: E501
|
472
|
-
|
473
|
-
_param = self._get_futures_balance_serialize(
|
474
|
-
_request_auth=_request_auth,
|
475
|
-
_content_type=_content_type,
|
476
|
-
_headers=_headers,
|
477
|
-
_host_index=_host_index,
|
478
|
-
)
|
479
|
-
|
480
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
481
|
-
"200": "List[FuturesBalance]",
|
482
|
-
}
|
483
|
-
response_data = await self.api_client.call_api(
|
484
|
-
*_param, _request_timeout=_request_timeout
|
485
|
-
)
|
486
|
-
return response_data.response
|
487
|
-
|
488
|
-
def _get_futures_balance_serialize(
|
489
|
-
self,
|
490
|
-
_request_auth,
|
491
|
-
_content_type,
|
492
|
-
_headers,
|
493
|
-
_host_index,
|
494
|
-
) -> RequestSerialized:
|
495
|
-
|
496
|
-
_host = None
|
497
|
-
|
498
|
-
_collection_formats: Dict[str, str] = {}
|
499
|
-
|
500
|
-
_path_params: Dict[str, str] = {}
|
501
|
-
_query_params: List[Tuple[str, str]] = []
|
502
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
503
|
-
_form_params: List[Tuple[str, str]] = []
|
504
|
-
_files: Dict[
|
505
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
506
|
-
] = {}
|
507
|
-
_body_params: Optional[bytes] = None
|
508
|
-
|
509
|
-
# process the path parameters
|
510
|
-
# process the query parameters
|
511
|
-
# process the header parameters
|
512
|
-
# process the form parameters
|
513
|
-
# process the body parameter
|
514
|
-
|
515
|
-
# set the HTTP header `Accept`
|
516
|
-
if "Accept" not in _header_params:
|
517
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
518
|
-
["application/json"]
|
519
|
-
)
|
520
|
-
|
521
|
-
# authentication setting
|
522
|
-
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
523
|
-
|
524
|
-
return self.api_client.param_serialize(
|
525
|
-
method="GET",
|
526
|
-
resource_path="/futures/balance",
|
527
|
-
path_params=_path_params,
|
528
|
-
query_params=_query_params,
|
529
|
-
header_params=_header_params,
|
530
|
-
body=_body_params,
|
531
|
-
post_params=_form_params,
|
532
|
-
files=_files,
|
533
|
-
auth_settings=_auth_settings,
|
534
|
-
collection_formats=_collection_formats,
|
535
|
-
_host=_host,
|
536
|
-
_request_auth=_request_auth,
|
537
|
-
)
|
538
|
-
|
539
|
-
@validate_call
|
540
|
-
async def get_futures_ledger(
|
541
|
-
self,
|
542
|
-
key: StrictStr,
|
543
|
-
_request_timeout: Union[
|
544
|
-
None,
|
545
|
-
Annotated[StrictFloat, Field(gt=0)],
|
546
|
-
Tuple[
|
547
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
548
|
-
],
|
549
|
-
] = None,
|
550
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
551
|
-
_content_type: Optional[StrictStr] = None,
|
552
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
553
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
554
|
-
) -> object:
|
555
|
-
"""Get Futures Ledger
|
556
|
-
|
557
|
-
|
558
|
-
:param key: (required)
|
559
|
-
:type key: str
|
560
|
-
:param _request_timeout: timeout setting for this request. If one
|
561
|
-
number provided, it will be total request
|
562
|
-
timeout. It can also be a pair (tuple) of
|
563
|
-
(connection, read) timeouts.
|
564
|
-
:type _request_timeout: int, tuple(int, int), optional
|
565
|
-
:param _request_auth: set to override the auth_settings for an a single
|
566
|
-
request; this effectively ignores the
|
567
|
-
authentication in the spec for a single request.
|
568
|
-
:type _request_auth: dict, optional
|
569
|
-
:param _content_type: force content-type for the request.
|
570
|
-
:type _content_type: str, Optional
|
571
|
-
:param _headers: set to override the headers for a single
|
572
|
-
request; this effectively ignores the headers
|
573
|
-
in the spec for a single request.
|
574
|
-
:type _headers: dict, optional
|
575
|
-
:param _host_index: set to override the host_index for a single
|
576
|
-
request; this effectively ignores the host_index
|
577
|
-
in the spec for a single request.
|
578
|
-
:type _host_index: int, optional
|
579
|
-
:return: Returns the result object.
|
580
|
-
""" # noqa: E501
|
581
|
-
|
582
|
-
_param = self._get_futures_ledger_serialize(
|
583
|
-
key=key,
|
584
|
-
_request_auth=_request_auth,
|
585
|
-
_content_type=_content_type,
|
586
|
-
_headers=_headers,
|
587
|
-
_host_index=_host_index,
|
588
|
-
)
|
589
|
-
|
590
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
591
|
-
"200": "object",
|
592
|
-
}
|
593
|
-
response_data = await self.api_client.call_api(
|
594
|
-
*_param, _request_timeout=_request_timeout
|
595
|
-
)
|
596
|
-
await response_data.read()
|
597
|
-
return self.api_client.response_deserialize(
|
598
|
-
response_data=response_data,
|
599
|
-
response_types_map=_response_types_map,
|
600
|
-
).data
|
601
|
-
|
602
|
-
@validate_call
|
603
|
-
async def get_futures_ledger_with_http_info(
|
604
|
-
self,
|
605
|
-
key: StrictStr,
|
606
|
-
_request_timeout: Union[
|
607
|
-
None,
|
608
|
-
Annotated[StrictFloat, Field(gt=0)],
|
609
|
-
Tuple[
|
610
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
611
|
-
],
|
612
|
-
] = None,
|
613
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
614
|
-
_content_type: Optional[StrictStr] = None,
|
615
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
616
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
617
|
-
) -> ApiResponse[object]:
|
618
|
-
"""Get Futures Ledger
|
619
|
-
|
620
|
-
|
621
|
-
:param key: (required)
|
622
|
-
:type key: str
|
623
|
-
:param _request_timeout: timeout setting for this request. If one
|
624
|
-
number provided, it will be total request
|
625
|
-
timeout. It can also be a pair (tuple) of
|
626
|
-
(connection, read) timeouts.
|
627
|
-
:type _request_timeout: int, tuple(int, int), optional
|
628
|
-
:param _request_auth: set to override the auth_settings for an a single
|
629
|
-
request; this effectively ignores the
|
630
|
-
authentication in the spec for a single request.
|
631
|
-
:type _request_auth: dict, optional
|
632
|
-
:param _content_type: force content-type for the request.
|
633
|
-
:type _content_type: str, Optional
|
634
|
-
:param _headers: set to override the headers for a single
|
635
|
-
request; this effectively ignores the headers
|
636
|
-
in the spec for a single request.
|
637
|
-
:type _headers: dict, optional
|
638
|
-
:param _host_index: set to override the host_index for a single
|
639
|
-
request; this effectively ignores the host_index
|
640
|
-
in the spec for a single request.
|
641
|
-
:type _host_index: int, optional
|
642
|
-
:return: Returns the result object.
|
643
|
-
""" # noqa: E501
|
644
|
-
|
645
|
-
_param = self._get_futures_ledger_serialize(
|
646
|
-
key=key,
|
647
|
-
_request_auth=_request_auth,
|
648
|
-
_content_type=_content_type,
|
649
|
-
_headers=_headers,
|
650
|
-
_host_index=_host_index,
|
651
|
-
)
|
652
|
-
|
653
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
654
|
-
"200": "object",
|
655
|
-
}
|
656
|
-
response_data = await self.api_client.call_api(
|
657
|
-
*_param, _request_timeout=_request_timeout
|
658
|
-
)
|
659
|
-
await response_data.read()
|
660
|
-
return self.api_client.response_deserialize(
|
661
|
-
response_data=response_data,
|
662
|
-
response_types_map=_response_types_map,
|
663
|
-
)
|
664
|
-
|
665
|
-
@validate_call
|
666
|
-
async def get_futures_ledger_without_preload_content(
|
667
|
-
self,
|
668
|
-
key: StrictStr,
|
669
|
-
_request_timeout: Union[
|
670
|
-
None,
|
671
|
-
Annotated[StrictFloat, Field(gt=0)],
|
672
|
-
Tuple[
|
673
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
674
|
-
],
|
675
|
-
] = None,
|
676
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
677
|
-
_content_type: Optional[StrictStr] = None,
|
678
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
679
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
680
|
-
) -> RESTResponseType:
|
681
|
-
"""Get Futures Ledger
|
682
|
-
|
683
|
-
|
684
|
-
:param key: (required)
|
685
|
-
:type key: str
|
686
|
-
:param _request_timeout: timeout setting for this request. If one
|
687
|
-
number provided, it will be total request
|
688
|
-
timeout. It can also be a pair (tuple) of
|
689
|
-
(connection, read) timeouts.
|
690
|
-
:type _request_timeout: int, tuple(int, int), optional
|
691
|
-
:param _request_auth: set to override the auth_settings for an a single
|
692
|
-
request; this effectively ignores the
|
693
|
-
authentication in the spec for a single request.
|
694
|
-
:type _request_auth: dict, optional
|
695
|
-
:param _content_type: force content-type for the request.
|
696
|
-
:type _content_type: str, Optional
|
697
|
-
:param _headers: set to override the headers for a single
|
698
|
-
request; this effectively ignores the headers
|
699
|
-
in the spec for a single request.
|
700
|
-
:type _headers: dict, optional
|
701
|
-
:param _host_index: set to override the host_index for a single
|
702
|
-
request; this effectively ignores the host_index
|
703
|
-
in the spec for a single request.
|
704
|
-
:type _host_index: int, optional
|
705
|
-
:return: Returns the result object.
|
706
|
-
""" # noqa: E501
|
707
|
-
|
708
|
-
_param = self._get_futures_ledger_serialize(
|
709
|
-
key=key,
|
710
|
-
_request_auth=_request_auth,
|
711
|
-
_content_type=_content_type,
|
712
|
-
_headers=_headers,
|
713
|
-
_host_index=_host_index,
|
714
|
-
)
|
715
|
-
|
716
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
717
|
-
"200": "object",
|
718
|
-
}
|
719
|
-
response_data = await self.api_client.call_api(
|
720
|
-
*_param, _request_timeout=_request_timeout
|
721
|
-
)
|
722
|
-
return response_data.response
|
723
|
-
|
724
|
-
def _get_futures_ledger_serialize(
|
725
|
-
self,
|
726
|
-
key,
|
727
|
-
_request_auth,
|
728
|
-
_content_type,
|
729
|
-
_headers,
|
730
|
-
_host_index,
|
731
|
-
) -> RequestSerialized:
|
732
|
-
|
733
|
-
_host = None
|
734
|
-
|
735
|
-
_collection_formats: Dict[str, str] = {}
|
736
|
-
|
737
|
-
_path_params: Dict[str, str] = {}
|
738
|
-
_query_params: List[Tuple[str, str]] = []
|
739
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
740
|
-
_form_params: List[Tuple[str, str]] = []
|
741
|
-
_files: Dict[
|
742
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
743
|
-
] = {}
|
744
|
-
_body_params: Optional[bytes] = None
|
745
|
-
|
746
|
-
# process the path parameters
|
747
|
-
# process the query parameters
|
748
|
-
if key is not None:
|
749
|
-
|
750
|
-
_query_params.append(("key", key))
|
751
|
-
|
752
|
-
# process the header parameters
|
753
|
-
# process the form parameters
|
754
|
-
# process the body parameter
|
755
|
-
|
756
|
-
# set the HTTP header `Accept`
|
757
|
-
if "Accept" not in _header_params:
|
758
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
759
|
-
["application/json"]
|
760
|
-
)
|
761
|
-
|
762
|
-
# authentication setting
|
763
|
-
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
764
|
-
|
765
|
-
return self.api_client.param_serialize(
|
766
|
-
method="GET",
|
767
|
-
resource_path="/futures/ledger",
|
768
|
-
path_params=_path_params,
|
769
|
-
query_params=_query_params,
|
770
|
-
header_params=_header_params,
|
771
|
-
body=_body_params,
|
772
|
-
post_params=_form_params,
|
773
|
-
files=_files,
|
774
|
-
auth_settings=_auth_settings,
|
775
|
-
collection_formats=_collection_formats,
|
776
|
-
_host=_host,
|
777
|
-
_request_auth=_request_auth,
|
778
|
-
)
|
779
|
-
|
780
|
-
@validate_call
|
781
|
-
async def get_historical_futures_orders(
|
782
|
-
self,
|
783
|
-
key: StrictStr,
|
784
|
-
_request_timeout: Union[
|
785
|
-
None,
|
786
|
-
Annotated[StrictFloat, Field(gt=0)],
|
787
|
-
Tuple[
|
788
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
789
|
-
],
|
790
|
-
] = None,
|
791
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
792
|
-
_content_type: Optional[StrictStr] = None,
|
793
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
794
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
795
|
-
) -> object:
|
796
|
-
"""Get Historical Futures Orders
|
797
|
-
|
798
|
-
|
799
|
-
:param key: (required)
|
800
|
-
:type key: str
|
801
|
-
:param _request_timeout: timeout setting for this request. If one
|
802
|
-
number provided, it will be total request
|
803
|
-
timeout. It can also be a pair (tuple) of
|
804
|
-
(connection, read) timeouts.
|
805
|
-
:type _request_timeout: int, tuple(int, int), optional
|
806
|
-
:param _request_auth: set to override the auth_settings for an a single
|
807
|
-
request; this effectively ignores the
|
808
|
-
authentication in the spec for a single request.
|
809
|
-
:type _request_auth: dict, optional
|
810
|
-
:param _content_type: force content-type for the request.
|
811
|
-
:type _content_type: str, Optional
|
812
|
-
:param _headers: set to override the headers for a single
|
813
|
-
request; this effectively ignores the headers
|
814
|
-
in the spec for a single request.
|
815
|
-
:type _headers: dict, optional
|
816
|
-
:param _host_index: set to override the host_index for a single
|
817
|
-
request; this effectively ignores the host_index
|
818
|
-
in the spec for a single request.
|
819
|
-
:type _host_index: int, optional
|
820
|
-
:return: Returns the result object.
|
821
|
-
""" # noqa: E501
|
822
|
-
|
823
|
-
_param = self._get_historical_futures_orders_serialize(
|
824
|
-
key=key,
|
825
|
-
_request_auth=_request_auth,
|
826
|
-
_content_type=_content_type,
|
827
|
-
_headers=_headers,
|
828
|
-
_host_index=_host_index,
|
829
|
-
)
|
830
|
-
|
831
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
832
|
-
"200": "object",
|
833
|
-
}
|
834
|
-
response_data = await self.api_client.call_api(
|
835
|
-
*_param, _request_timeout=_request_timeout
|
836
|
-
)
|
837
|
-
await response_data.read()
|
838
|
-
return self.api_client.response_deserialize(
|
839
|
-
response_data=response_data,
|
840
|
-
response_types_map=_response_types_map,
|
841
|
-
).data
|
842
|
-
|
843
|
-
@validate_call
|
844
|
-
async def get_historical_futures_orders_with_http_info(
|
845
|
-
self,
|
846
|
-
key: StrictStr,
|
847
|
-
_request_timeout: Union[
|
848
|
-
None,
|
849
|
-
Annotated[StrictFloat, Field(gt=0)],
|
850
|
-
Tuple[
|
851
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
852
|
-
],
|
853
|
-
] = None,
|
854
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
855
|
-
_content_type: Optional[StrictStr] = None,
|
856
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
857
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
858
|
-
) -> ApiResponse[object]:
|
859
|
-
"""Get Historical Futures Orders
|
860
|
-
|
861
|
-
|
862
|
-
:param key: (required)
|
863
|
-
:type key: str
|
864
|
-
:param _request_timeout: timeout setting for this request. If one
|
865
|
-
number provided, it will be total request
|
866
|
-
timeout. It can also be a pair (tuple) of
|
867
|
-
(connection, read) timeouts.
|
868
|
-
:type _request_timeout: int, tuple(int, int), optional
|
869
|
-
:param _request_auth: set to override the auth_settings for an a single
|
870
|
-
request; this effectively ignores the
|
871
|
-
authentication in the spec for a single request.
|
872
|
-
:type _request_auth: dict, optional
|
873
|
-
:param _content_type: force content-type for the request.
|
874
|
-
:type _content_type: str, Optional
|
875
|
-
:param _headers: set to override the headers for a single
|
876
|
-
request; this effectively ignores the headers
|
877
|
-
in the spec for a single request.
|
878
|
-
:type _headers: dict, optional
|
879
|
-
:param _host_index: set to override the host_index for a single
|
880
|
-
request; this effectively ignores the host_index
|
881
|
-
in the spec for a single request.
|
882
|
-
:type _host_index: int, optional
|
883
|
-
:return: Returns the result object.
|
884
|
-
""" # noqa: E501
|
885
|
-
|
886
|
-
_param = self._get_historical_futures_orders_serialize(
|
887
|
-
key=key,
|
888
|
-
_request_auth=_request_auth,
|
889
|
-
_content_type=_content_type,
|
890
|
-
_headers=_headers,
|
891
|
-
_host_index=_host_index,
|
892
|
-
)
|
893
|
-
|
894
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
895
|
-
"200": "object",
|
896
|
-
}
|
897
|
-
response_data = await self.api_client.call_api(
|
898
|
-
*_param, _request_timeout=_request_timeout
|
899
|
-
)
|
900
|
-
await response_data.read()
|
901
|
-
return self.api_client.response_deserialize(
|
902
|
-
response_data=response_data,
|
903
|
-
response_types_map=_response_types_map,
|
904
|
-
)
|
905
|
-
|
906
|
-
@validate_call
|
907
|
-
async def get_historical_futures_orders_without_preload_content(
|
908
|
-
self,
|
909
|
-
key: StrictStr,
|
910
|
-
_request_timeout: Union[
|
911
|
-
None,
|
912
|
-
Annotated[StrictFloat, Field(gt=0)],
|
913
|
-
Tuple[
|
914
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
915
|
-
],
|
916
|
-
] = None,
|
917
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
918
|
-
_content_type: Optional[StrictStr] = None,
|
919
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
920
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
921
|
-
) -> RESTResponseType:
|
922
|
-
"""Get Historical Futures Orders
|
923
|
-
|
924
|
-
|
925
|
-
:param key: (required)
|
926
|
-
:type key: str
|
927
|
-
:param _request_timeout: timeout setting for this request. If one
|
928
|
-
number provided, it will be total request
|
929
|
-
timeout. It can also be a pair (tuple) of
|
930
|
-
(connection, read) timeouts.
|
931
|
-
:type _request_timeout: int, tuple(int, int), optional
|
932
|
-
:param _request_auth: set to override the auth_settings for an a single
|
933
|
-
request; this effectively ignores the
|
934
|
-
authentication in the spec for a single request.
|
935
|
-
:type _request_auth: dict, optional
|
936
|
-
:param _content_type: force content-type for the request.
|
937
|
-
:type _content_type: str, Optional
|
938
|
-
:param _headers: set to override the headers for a single
|
939
|
-
request; this effectively ignores the headers
|
940
|
-
in the spec for a single request.
|
941
|
-
:type _headers: dict, optional
|
942
|
-
:param _host_index: set to override the host_index for a single
|
943
|
-
request; this effectively ignores the host_index
|
944
|
-
in the spec for a single request.
|
945
|
-
:type _host_index: int, optional
|
946
|
-
:return: Returns the result object.
|
947
|
-
""" # noqa: E501
|
948
|
-
|
949
|
-
_param = self._get_historical_futures_orders_serialize(
|
950
|
-
key=key,
|
951
|
-
_request_auth=_request_auth,
|
952
|
-
_content_type=_content_type,
|
953
|
-
_headers=_headers,
|
954
|
-
_host_index=_host_index,
|
955
|
-
)
|
956
|
-
|
957
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
958
|
-
"200": "object",
|
959
|
-
}
|
960
|
-
response_data = await self.api_client.call_api(
|
961
|
-
*_param, _request_timeout=_request_timeout
|
962
|
-
)
|
963
|
-
return response_data.response
|
964
|
-
|
965
|
-
def _get_historical_futures_orders_serialize(
|
966
|
-
self,
|
967
|
-
key,
|
968
|
-
_request_auth,
|
969
|
-
_content_type,
|
970
|
-
_headers,
|
971
|
-
_host_index,
|
972
|
-
) -> RequestSerialized:
|
973
|
-
|
974
|
-
_host = None
|
975
|
-
|
976
|
-
_collection_formats: Dict[str, str] = {}
|
977
|
-
|
978
|
-
_path_params: Dict[str, str] = {}
|
979
|
-
_query_params: List[Tuple[str, str]] = []
|
980
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
981
|
-
_form_params: List[Tuple[str, str]] = []
|
982
|
-
_files: Dict[
|
983
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
984
|
-
] = {}
|
985
|
-
_body_params: Optional[bytes] = None
|
986
|
-
|
987
|
-
# process the path parameters
|
988
|
-
# process the query parameters
|
989
|
-
if key is not None:
|
990
|
-
|
991
|
-
_query_params.append(("key", key))
|
992
|
-
|
993
|
-
# process the header parameters
|
994
|
-
# process the form parameters
|
995
|
-
# process the body parameter
|
996
|
-
|
997
|
-
# set the HTTP header `Accept`
|
998
|
-
if "Accept" not in _header_params:
|
999
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
1000
|
-
["application/json"]
|
1001
|
-
)
|
1002
|
-
|
1003
|
-
# authentication setting
|
1004
|
-
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1005
|
-
|
1006
|
-
return self.api_client.param_serialize(
|
1007
|
-
method="GET",
|
1008
|
-
resource_path="/futures/orders",
|
1009
|
-
path_params=_path_params,
|
1010
|
-
query_params=_query_params,
|
1011
|
-
header_params=_header_params,
|
1012
|
-
body=_body_params,
|
1013
|
-
post_params=_form_params,
|
1014
|
-
files=_files,
|
1015
|
-
auth_settings=_auth_settings,
|
1016
|
-
collection_formats=_collection_formats,
|
1017
|
-
_host=_host,
|
1018
|
-
_request_auth=_request_auth,
|
1019
|
-
)
|
1020
|
-
|
1021
|
-
@validate_call
|
1022
|
-
async def place_futures_order(
|
1023
|
-
self,
|
1024
|
-
key: StrictStr,
|
1025
|
-
request_body: Dict[str, Any],
|
1026
|
-
_request_timeout: Union[
|
1027
|
-
None,
|
1028
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1029
|
-
Tuple[
|
1030
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1031
|
-
],
|
1032
|
-
] = None,
|
1033
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1034
|
-
_content_type: Optional[StrictStr] = None,
|
1035
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1036
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1037
|
-
) -> object:
|
1038
|
-
"""Place Order
|
1039
|
-
|
1040
|
-
|
1041
|
-
:param key: (required)
|
1042
|
-
:type key: str
|
1043
|
-
:param request_body: (required)
|
1044
|
-
:type request_body: Dict[str, object]
|
1045
|
-
:param _request_timeout: timeout setting for this request. If one
|
1046
|
-
number provided, it will be total request
|
1047
|
-
timeout. It can also be a pair (tuple) of
|
1048
|
-
(connection, read) timeouts.
|
1049
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1050
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1051
|
-
request; this effectively ignores the
|
1052
|
-
authentication in the spec for a single request.
|
1053
|
-
:type _request_auth: dict, optional
|
1054
|
-
:param _content_type: force content-type for the request.
|
1055
|
-
:type _content_type: str, Optional
|
1056
|
-
:param _headers: set to override the headers for a single
|
1057
|
-
request; this effectively ignores the headers
|
1058
|
-
in the spec for a single request.
|
1059
|
-
:type _headers: dict, optional
|
1060
|
-
:param _host_index: set to override the host_index for a single
|
1061
|
-
request; this effectively ignores the host_index
|
1062
|
-
in the spec for a single request.
|
1063
|
-
:type _host_index: int, optional
|
1064
|
-
:return: Returns the result object.
|
1065
|
-
""" # noqa: E501
|
1066
|
-
|
1067
|
-
_param = self._place_futures_order_serialize(
|
1068
|
-
key=key,
|
1069
|
-
request_body=request_body,
|
1070
|
-
_request_auth=_request_auth,
|
1071
|
-
_content_type=_content_type,
|
1072
|
-
_headers=_headers,
|
1073
|
-
_host_index=_host_index,
|
1074
|
-
)
|
1075
|
-
|
1076
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1077
|
-
"201": "object",
|
1078
|
-
}
|
1079
|
-
response_data = await self.api_client.call_api(
|
1080
|
-
*_param, _request_timeout=_request_timeout
|
1081
|
-
)
|
1082
|
-
await response_data.read()
|
1083
|
-
return self.api_client.response_deserialize(
|
1084
|
-
response_data=response_data,
|
1085
|
-
response_types_map=_response_types_map,
|
1086
|
-
).data
|
1087
|
-
|
1088
|
-
@validate_call
|
1089
|
-
async def place_futures_order_with_http_info(
|
1090
|
-
self,
|
1091
|
-
key: StrictStr,
|
1092
|
-
request_body: Dict[str, Any],
|
1093
|
-
_request_timeout: Union[
|
1094
|
-
None,
|
1095
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1096
|
-
Tuple[
|
1097
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1098
|
-
],
|
1099
|
-
] = None,
|
1100
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1101
|
-
_content_type: Optional[StrictStr] = None,
|
1102
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1103
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1104
|
-
) -> ApiResponse[object]:
|
1105
|
-
"""Place Order
|
1106
|
-
|
1107
|
-
|
1108
|
-
:param key: (required)
|
1109
|
-
:type key: str
|
1110
|
-
:param request_body: (required)
|
1111
|
-
:type request_body: Dict[str, object]
|
1112
|
-
:param _request_timeout: timeout setting for this request. If one
|
1113
|
-
number provided, it will be total request
|
1114
|
-
timeout. It can also be a pair (tuple) of
|
1115
|
-
(connection, read) timeouts.
|
1116
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1117
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1118
|
-
request; this effectively ignores the
|
1119
|
-
authentication in the spec for a single request.
|
1120
|
-
:type _request_auth: dict, optional
|
1121
|
-
:param _content_type: force content-type for the request.
|
1122
|
-
:type _content_type: str, Optional
|
1123
|
-
:param _headers: set to override the headers for a single
|
1124
|
-
request; this effectively ignores the headers
|
1125
|
-
in the spec for a single request.
|
1126
|
-
:type _headers: dict, optional
|
1127
|
-
:param _host_index: set to override the host_index for a single
|
1128
|
-
request; this effectively ignores the host_index
|
1129
|
-
in the spec for a single request.
|
1130
|
-
:type _host_index: int, optional
|
1131
|
-
:return: Returns the result object.
|
1132
|
-
""" # noqa: E501
|
1133
|
-
|
1134
|
-
_param = self._place_futures_order_serialize(
|
1135
|
-
key=key,
|
1136
|
-
request_body=request_body,
|
1137
|
-
_request_auth=_request_auth,
|
1138
|
-
_content_type=_content_type,
|
1139
|
-
_headers=_headers,
|
1140
|
-
_host_index=_host_index,
|
1141
|
-
)
|
1142
|
-
|
1143
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1144
|
-
"201": "object",
|
1145
|
-
}
|
1146
|
-
response_data = await self.api_client.call_api(
|
1147
|
-
*_param, _request_timeout=_request_timeout
|
1148
|
-
)
|
1149
|
-
await response_data.read()
|
1150
|
-
return self.api_client.response_deserialize(
|
1151
|
-
response_data=response_data,
|
1152
|
-
response_types_map=_response_types_map,
|
1153
|
-
)
|
1154
|
-
|
1155
|
-
@validate_call
|
1156
|
-
async def place_futures_order_without_preload_content(
|
1157
|
-
self,
|
1158
|
-
key: StrictStr,
|
1159
|
-
request_body: Dict[str, Any],
|
1160
|
-
_request_timeout: Union[
|
1161
|
-
None,
|
1162
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1163
|
-
Tuple[
|
1164
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1165
|
-
],
|
1166
|
-
] = None,
|
1167
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1168
|
-
_content_type: Optional[StrictStr] = None,
|
1169
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1170
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1171
|
-
) -> RESTResponseType:
|
1172
|
-
"""Place Order
|
1173
|
-
|
1174
|
-
|
1175
|
-
:param key: (required)
|
1176
|
-
:type key: str
|
1177
|
-
:param request_body: (required)
|
1178
|
-
:type request_body: Dict[str, object]
|
1179
|
-
:param _request_timeout: timeout setting for this request. If one
|
1180
|
-
number provided, it will be total request
|
1181
|
-
timeout. It can also be a pair (tuple) of
|
1182
|
-
(connection, read) timeouts.
|
1183
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1184
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1185
|
-
request; this effectively ignores the
|
1186
|
-
authentication in the spec for a single request.
|
1187
|
-
:type _request_auth: dict, optional
|
1188
|
-
:param _content_type: force content-type for the request.
|
1189
|
-
:type _content_type: str, Optional
|
1190
|
-
:param _headers: set to override the headers for a single
|
1191
|
-
request; this effectively ignores the headers
|
1192
|
-
in the spec for a single request.
|
1193
|
-
:type _headers: dict, optional
|
1194
|
-
:param _host_index: set to override the host_index for a single
|
1195
|
-
request; this effectively ignores the host_index
|
1196
|
-
in the spec for a single request.
|
1197
|
-
:type _host_index: int, optional
|
1198
|
-
:return: Returns the result object.
|
1199
|
-
""" # noqa: E501
|
1200
|
-
|
1201
|
-
_param = self._place_futures_order_serialize(
|
1202
|
-
key=key,
|
1203
|
-
request_body=request_body,
|
1204
|
-
_request_auth=_request_auth,
|
1205
|
-
_content_type=_content_type,
|
1206
|
-
_headers=_headers,
|
1207
|
-
_host_index=_host_index,
|
1208
|
-
)
|
1209
|
-
|
1210
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1211
|
-
"201": "object",
|
1212
|
-
}
|
1213
|
-
response_data = await self.api_client.call_api(
|
1214
|
-
*_param, _request_timeout=_request_timeout
|
1215
|
-
)
|
1216
|
-
return response_data.response
|
1217
|
-
|
1218
|
-
def _place_futures_order_serialize(
|
1219
|
-
self,
|
1220
|
-
key,
|
1221
|
-
request_body,
|
1222
|
-
_request_auth,
|
1223
|
-
_content_type,
|
1224
|
-
_headers,
|
1225
|
-
_host_index,
|
1226
|
-
) -> RequestSerialized:
|
1227
|
-
|
1228
|
-
_host = None
|
1229
|
-
|
1230
|
-
_collection_formats: Dict[str, str] = {}
|
1231
|
-
|
1232
|
-
_path_params: Dict[str, str] = {}
|
1233
|
-
_query_params: List[Tuple[str, str]] = []
|
1234
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1235
|
-
_form_params: List[Tuple[str, str]] = []
|
1236
|
-
_files: Dict[
|
1237
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1238
|
-
] = {}
|
1239
|
-
_body_params: Optional[bytes] = None
|
1240
|
-
|
1241
|
-
# process the path parameters
|
1242
|
-
# process the query parameters
|
1243
|
-
if key is not None:
|
1244
|
-
|
1245
|
-
_query_params.append(("key", key))
|
1246
|
-
|
1247
|
-
# process the header parameters
|
1248
|
-
# process the form parameters
|
1249
|
-
# process the body parameter
|
1250
|
-
if request_body is not None:
|
1251
|
-
_body_params = request_body
|
1252
|
-
|
1253
|
-
# set the HTTP header `Accept`
|
1254
|
-
if "Accept" not in _header_params:
|
1255
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
1256
|
-
["application/json"]
|
1257
|
-
)
|
1258
|
-
|
1259
|
-
# set the HTTP header `Content-Type`
|
1260
|
-
if _content_type:
|
1261
|
-
_header_params["Content-Type"] = _content_type
|
1262
|
-
else:
|
1263
|
-
_default_content_type = self.api_client.select_header_content_type(
|
1264
|
-
["application/json"]
|
1265
|
-
)
|
1266
|
-
if _default_content_type is not None:
|
1267
|
-
_header_params["Content-Type"] = _default_content_type
|
1268
|
-
|
1269
|
-
# authentication setting
|
1270
|
-
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1271
|
-
|
1272
|
-
return self.api_client.param_serialize(
|
1273
|
-
method="POST",
|
1274
|
-
resource_path="/futures/orders",
|
1275
|
-
path_params=_path_params,
|
1276
|
-
query_params=_query_params,
|
1277
|
-
header_params=_header_params,
|
1278
|
-
body=_body_params,
|
1279
|
-
post_params=_form_params,
|
1280
|
-
files=_files,
|
1281
|
-
auth_settings=_auth_settings,
|
1282
|
-
collection_formats=_collection_formats,
|
1283
|
-
_host=_host,
|
1284
|
-
_request_auth=_request_auth,
|
1285
|
-
)
|