kalshi-python-async 3.0.0__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.
- kalshi_python_async/__init__.py +272 -0
- kalshi_python_async/api/__init__.py +19 -0
- kalshi_python_async/api/api_keys_api.py +1098 -0
- kalshi_python_async/api/communications_api.py +3216 -0
- kalshi_python_async/api/events_api.py +1941 -0
- kalshi_python_async/api/exchange_api.py +1263 -0
- kalshi_python_async/api/fcm_api.py +792 -0
- kalshi_python_async/api/incentive_programs_api.py +346 -0
- kalshi_python_async/api/live_data_api.py +564 -0
- kalshi_python_async/api/market_api.py +2568 -0
- kalshi_python_async/api/milestone_api.py +689 -0
- kalshi_python_async/api/multivariate_api.py +1486 -0
- kalshi_python_async/api/order_groups_api.py +1375 -0
- kalshi_python_async/api/orders_api.py +2913 -0
- kalshi_python_async/api/portfolio_api.py +1572 -0
- kalshi_python_async/api/search_api.py +516 -0
- kalshi_python_async/api/structured_targets_api.py +605 -0
- kalshi_python_async/api_client.py +833 -0
- kalshi_python_async/api_response.py +21 -0
- kalshi_python_async/auth.py +89 -0
- kalshi_python_async/configuration.py +622 -0
- kalshi_python_async/exceptions.py +216 -0
- kalshi_python_async/models/__init__.py +136 -0
- kalshi_python_async/models/accept_quote_request.py +94 -0
- kalshi_python_async/models/amend_order_request.py +120 -0
- kalshi_python_async/models/amend_order_response.py +96 -0
- kalshi_python_async/models/announcement.py +108 -0
- kalshi_python_async/models/api_key.py +89 -0
- kalshi_python_async/models/associated_event.py +105 -0
- kalshi_python_async/models/batch_cancel_orders_individual_response.py +111 -0
- kalshi_python_async/models/batch_cancel_orders_request.py +87 -0
- kalshi_python_async/models/batch_cancel_orders_response.py +95 -0
- kalshi_python_async/models/batch_create_orders_individual_response.py +114 -0
- kalshi_python_async/models/batch_create_orders_request.py +95 -0
- kalshi_python_async/models/batch_create_orders_response.py +95 -0
- kalshi_python_async/models/batch_get_market_candlesticks_response.py +95 -0
- kalshi_python_async/models/bid_ask_distribution.py +101 -0
- kalshi_python_async/models/cancel_order_response.py +93 -0
- kalshi_python_async/models/create_api_key_request.py +89 -0
- kalshi_python_async/models/create_api_key_response.py +87 -0
- kalshi_python_async/models/create_market_in_multivariate_event_collection_request.py +95 -0
- kalshi_python_async/models/create_market_in_multivariate_event_collection_response.py +89 -0
- kalshi_python_async/models/create_order_group_request.py +88 -0
- kalshi_python_async/models/create_order_group_response.py +87 -0
- kalshi_python_async/models/create_order_request.py +159 -0
- kalshi_python_async/models/create_order_response.py +91 -0
- kalshi_python_async/models/create_quote_request.py +93 -0
- kalshi_python_async/models/create_quote_response.py +87 -0
- kalshi_python_async/models/create_rfq_request.py +97 -0
- kalshi_python_async/models/create_rfq_response.py +87 -0
- kalshi_python_async/models/daily_schedule.py +89 -0
- kalshi_python_async/models/decrease_order_request.py +90 -0
- kalshi_python_async/models/decrease_order_response.py +91 -0
- kalshi_python_async/models/error_response.py +93 -0
- kalshi_python_async/models/event_data.py +133 -0
- kalshi_python_async/models/event_position.py +105 -0
- kalshi_python_async/models/exchange_status.py +97 -0
- kalshi_python_async/models/fill.py +134 -0
- kalshi_python_async/models/forecast_percentiles_point.py +101 -0
- kalshi_python_async/models/generate_api_key_request.py +87 -0
- kalshi_python_async/models/generate_api_key_response.py +89 -0
- kalshi_python_async/models/get_api_keys_response.py +95 -0
- kalshi_python_async/models/get_balance_response.py +91 -0
- kalshi_python_async/models/get_communications_id_response.py +87 -0
- kalshi_python_async/models/get_event_candlesticks_response.py +104 -0
- kalshi_python_async/models/get_event_forecast_percentiles_history_response.py +95 -0
- kalshi_python_async/models/get_event_metadata_response.py +123 -0
- kalshi_python_async/models/get_event_response.py +101 -0
- kalshi_python_async/models/get_events_candlesticks_response.py +95 -0
- kalshi_python_async/models/get_events_candlesticks_response_events_inner.py +106 -0
- kalshi_python_async/models/get_events_response.py +107 -0
- kalshi_python_async/models/get_exchange_announcements_response.py +95 -0
- kalshi_python_async/models/get_exchange_schedule_response.py +91 -0
- kalshi_python_async/models/get_fills_response.py +97 -0
- kalshi_python_async/models/get_filters_by_sports_response.py +102 -0
- kalshi_python_async/models/get_incentive_programs_response.py +97 -0
- kalshi_python_async/models/get_live_data_response.py +91 -0
- kalshi_python_async/models/get_live_datas_response.py +95 -0
- kalshi_python_async/models/get_market_candlesticks_response.py +97 -0
- kalshi_python_async/models/get_market_orderbook_response.py +91 -0
- kalshi_python_async/models/get_market_response.py +91 -0
- kalshi_python_async/models/get_markets_response.py +97 -0
- kalshi_python_async/models/get_milestone_response.py +91 -0
- kalshi_python_async/models/get_milestones_response.py +97 -0
- kalshi_python_async/models/get_multivariate_event_collection_lookup_history_response.py +95 -0
- kalshi_python_async/models/get_multivariate_event_collection_response.py +91 -0
- kalshi_python_async/models/get_multivariate_event_collections_response.py +97 -0
- kalshi_python_async/models/get_multivariate_events_response.py +97 -0
- kalshi_python_async/models/get_order_group_response.py +89 -0
- kalshi_python_async/models/get_order_groups_response.py +95 -0
- kalshi_python_async/models/get_order_queue_position_response.py +87 -0
- kalshi_python_async/models/get_order_queue_positions_response.py +95 -0
- kalshi_python_async/models/get_order_response.py +91 -0
- kalshi_python_async/models/get_orders_response.py +97 -0
- kalshi_python_async/models/get_portfolio_resting_order_total_value_response.py +87 -0
- kalshi_python_async/models/get_positions_response.py +107 -0
- kalshi_python_async/models/get_quote_response.py +91 -0
- kalshi_python_async/models/get_quotes_response.py +97 -0
- kalshi_python_async/models/get_rfq_response.py +91 -0
- kalshi_python_async/models/get_rfqs_response.py +97 -0
- kalshi_python_async/models/get_series_fee_changes_response.py +95 -0
- kalshi_python_async/models/get_series_list_response.py +95 -0
- kalshi_python_async/models/get_series_response.py +91 -0
- kalshi_python_async/models/get_settlements_response.py +97 -0
- kalshi_python_async/models/get_structured_target_response.py +91 -0
- kalshi_python_async/models/get_structured_targets_response.py +97 -0
- kalshi_python_async/models/get_tags_for_series_categories_response.py +87 -0
- kalshi_python_async/models/get_trades_response.py +97 -0
- kalshi_python_async/models/get_user_data_timestamp_response.py +88 -0
- kalshi_python_async/models/incentive_program.py +121 -0
- kalshi_python_async/models/live_data.py +91 -0
- kalshi_python_async/models/lookup_point.py +102 -0
- kalshi_python_async/models/lookup_tickers_for_market_in_multivariate_event_collection_request.py +95 -0
- kalshi_python_async/models/lookup_tickers_for_market_in_multivariate_event_collection_response.py +89 -0
- kalshi_python_async/models/maintenance_window.py +90 -0
- kalshi_python_async/models/market.py +307 -0
- kalshi_python_async/models/market_candlestick.py +108 -0
- kalshi_python_async/models/market_candlesticks_response.py +97 -0
- kalshi_python_async/models/market_metadata.py +91 -0
- kalshi_python_async/models/market_position.py +110 -0
- kalshi_python_async/models/milestone.py +120 -0
- kalshi_python_async/models/multivariate_event_collection.py +122 -0
- kalshi_python_async/models/mve_selected_leg.py +91 -0
- kalshi_python_async/models/order.py +189 -0
- kalshi_python_async/models/order_group.py +89 -0
- kalshi_python_async/models/order_queue_position.py +91 -0
- kalshi_python_async/models/order_status.py +38 -0
- kalshi_python_async/models/orderbook.py +94 -0
- kalshi_python_async/models/percentile_point.py +93 -0
- kalshi_python_async/models/price_distribution.py +157 -0
- kalshi_python_async/models/price_range.py +91 -0
- kalshi_python_async/models/quote.py +153 -0
- kalshi_python_async/models/rfq.py +129 -0
- kalshi_python_async/models/schedule.py +105 -0
- kalshi_python_async/models/scope_list.py +87 -0
- kalshi_python_async/models/self_trade_prevention_type.py +37 -0
- kalshi_python_async/models/series.py +129 -0
- kalshi_python_async/models/series_fee_change.py +103 -0
- kalshi_python_async/models/settlement.py +118 -0
- kalshi_python_async/models/settlement_source.py +89 -0
- kalshi_python_async/models/sport_filter_details.py +102 -0
- kalshi_python_async/models/structured_target.py +98 -0
- kalshi_python_async/models/ticker_pair.py +98 -0
- kalshi_python_async/models/trade.py +113 -0
- kalshi_python_async/models/weekly_schedule.py +154 -0
- kalshi_python_async/py.typed +0 -0
- kalshi_python_async/rest.py +213 -0
- kalshi_python_async-3.0.0.dist-info/METADATA +78 -0
- kalshi_python_async-3.0.0.dist-info/RECORD +151 -0
- kalshi_python_async-3.0.0.dist-info/WHEEL +5 -0
- kalshi_python_async-3.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3216 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Kalshi Trade API Manual Endpoints
|
|
5
|
+
|
|
6
|
+
Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt, StrictBool
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import Field, StrictStr
|
|
19
|
+
from typing import Any, Dict, Optional
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from kalshi_python_async.models.accept_quote_request import AcceptQuoteRequest
|
|
22
|
+
from kalshi_python_async.models.create_quote_request import CreateQuoteRequest
|
|
23
|
+
from kalshi_python_async.models.create_quote_response import CreateQuoteResponse
|
|
24
|
+
from kalshi_python_async.models.create_rfq_request import CreateRFQRequest
|
|
25
|
+
from kalshi_python_async.models.create_rfq_response import CreateRFQResponse
|
|
26
|
+
from kalshi_python_async.models.get_communications_id_response import GetCommunicationsIDResponse
|
|
27
|
+
from kalshi_python_async.models.get_quote_response import GetQuoteResponse
|
|
28
|
+
from kalshi_python_async.models.get_quotes_response import GetQuotesResponse
|
|
29
|
+
from kalshi_python_async.models.get_rfq_response import GetRFQResponse
|
|
30
|
+
from kalshi_python_async.models.get_rfqs_response import GetRFQsResponse
|
|
31
|
+
|
|
32
|
+
from kalshi_python_async.api_client import ApiClient, RequestSerialized
|
|
33
|
+
from kalshi_python_async.api_response import ApiResponse
|
|
34
|
+
from kalshi_python_async.rest import RESTResponseType
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class CommunicationsApi:
|
|
38
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
39
|
+
Ref: https://openapi-generator.tech
|
|
40
|
+
|
|
41
|
+
Do not edit the class manually.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
def __init__(self, api_client=None) -> None:
|
|
45
|
+
if api_client is None:
|
|
46
|
+
api_client = ApiClient.get_default()
|
|
47
|
+
self.api_client = api_client
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@validate_call
|
|
51
|
+
async def accept_quote(
|
|
52
|
+
self,
|
|
53
|
+
quote_id: StrictStr,
|
|
54
|
+
# Request body parameters as keyword arguments
|
|
55
|
+
**kwargs: Any,
|
|
56
|
+
) -> None:
|
|
57
|
+
"""Accept Quote
|
|
58
|
+
|
|
59
|
+
Endpoint for accepting a quote. This will require the quoter to confirm
|
|
60
|
+
|
|
61
|
+
:param quote_id: Quote ID (required)
|
|
62
|
+
:type quote_id: str
|
|
63
|
+
:param accept_quote_request: (required)
|
|
64
|
+
:type accept_quote_request: AcceptQuoteRequest
|
|
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
|
+
# Create request object from kwargs
|
|
88
|
+
accept_quote_request = AcceptQuoteRequest(**kwargs) if kwargs else None
|
|
89
|
+
|
|
90
|
+
_param = self._accept_quote_serialize(
|
|
91
|
+
quote_id=quote_id,
|
|
92
|
+
accept_quote_request=accept_quote_request,
|
|
93
|
+
_request_auth=kwargs.get('_request_auth'),
|
|
94
|
+
_content_type=kwargs.get('_content_type'),
|
|
95
|
+
_headers=kwargs.get('_headers'),
|
|
96
|
+
_host_index=kwargs.get('_host_index', 0)
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
100
|
+
'204': None,
|
|
101
|
+
'400': "ErrorResponse",
|
|
102
|
+
'401': "ErrorResponse",
|
|
103
|
+
'404': "ErrorResponse",
|
|
104
|
+
'500': "ErrorResponse",
|
|
105
|
+
}
|
|
106
|
+
response_data = await self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=kwargs.get('_request_timeout'),
|
|
109
|
+
)
|
|
110
|
+
await response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
async def accept_quote_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
quote_id: Annotated[StrictStr, Field(description="Quote ID")],
|
|
121
|
+
accept_quote_request: AcceptQuoteRequest,
|
|
122
|
+
_request_timeout: Union[
|
|
123
|
+
None,
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Tuple[
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
128
|
+
]
|
|
129
|
+
] = None,
|
|
130
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_content_type: Optional[StrictStr] = None,
|
|
132
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
134
|
+
) -> ApiResponse[None]:
|
|
135
|
+
"""Accept Quote
|
|
136
|
+
|
|
137
|
+
Endpoint for accepting a quote. This will require the quoter to confirm
|
|
138
|
+
|
|
139
|
+
:param quote_id: Quote ID (required)
|
|
140
|
+
:type quote_id: str
|
|
141
|
+
:param accept_quote_request: (required)
|
|
142
|
+
:type accept_quote_request: AcceptQuoteRequest
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._accept_quote_serialize(
|
|
166
|
+
quote_id=quote_id,
|
|
167
|
+
accept_quote_request=accept_quote_request,
|
|
168
|
+
_request_auth=_request_auth,
|
|
169
|
+
_content_type=_content_type,
|
|
170
|
+
_headers=_headers,
|
|
171
|
+
_host_index=_host_index
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
175
|
+
'204': None,
|
|
176
|
+
'400': "ErrorResponse",
|
|
177
|
+
'401': "ErrorResponse",
|
|
178
|
+
'404': "ErrorResponse",
|
|
179
|
+
'500': "ErrorResponse",
|
|
180
|
+
}
|
|
181
|
+
response_data = await self.api_client.call_api(
|
|
182
|
+
*_param,
|
|
183
|
+
_request_timeout=_request_timeout
|
|
184
|
+
)
|
|
185
|
+
await response_data.read()
|
|
186
|
+
return self.api_client.response_deserialize(
|
|
187
|
+
response_data=response_data,
|
|
188
|
+
response_types_map=_response_types_map,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@validate_call
|
|
193
|
+
async def accept_quote_without_preload_content(
|
|
194
|
+
self,
|
|
195
|
+
quote_id: Annotated[StrictStr, Field(description="Quote ID")],
|
|
196
|
+
accept_quote_request: AcceptQuoteRequest,
|
|
197
|
+
_request_timeout: Union[
|
|
198
|
+
None,
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Tuple[
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
203
|
+
]
|
|
204
|
+
] = None,
|
|
205
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_content_type: Optional[StrictStr] = None,
|
|
207
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
208
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
209
|
+
) -> RESTResponseType:
|
|
210
|
+
"""Accept Quote
|
|
211
|
+
|
|
212
|
+
Endpoint for accepting a quote. This will require the quoter to confirm
|
|
213
|
+
|
|
214
|
+
:param quote_id: Quote ID (required)
|
|
215
|
+
:type quote_id: str
|
|
216
|
+
:param accept_quote_request: (required)
|
|
217
|
+
:type accept_quote_request: AcceptQuoteRequest
|
|
218
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
219
|
+
number provided, it will be total request
|
|
220
|
+
timeout. It can also be a pair (tuple) of
|
|
221
|
+
(connection, read) timeouts.
|
|
222
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
223
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
224
|
+
request; this effectively ignores the
|
|
225
|
+
authentication in the spec for a single request.
|
|
226
|
+
:type _request_auth: dict, optional
|
|
227
|
+
:param _content_type: force content-type for the request.
|
|
228
|
+
:type _content_type: str, Optional
|
|
229
|
+
:param _headers: set to override the headers for a single
|
|
230
|
+
request; this effectively ignores the headers
|
|
231
|
+
in the spec for a single request.
|
|
232
|
+
:type _headers: dict, optional
|
|
233
|
+
:param _host_index: set to override the host_index for a single
|
|
234
|
+
request; this effectively ignores the host_index
|
|
235
|
+
in the spec for a single request.
|
|
236
|
+
:type _host_index: int, optional
|
|
237
|
+
:return: Returns the result object.
|
|
238
|
+
""" # noqa: E501
|
|
239
|
+
|
|
240
|
+
_param = self._accept_quote_serialize(
|
|
241
|
+
quote_id=quote_id,
|
|
242
|
+
accept_quote_request=accept_quote_request,
|
|
243
|
+
_request_auth=_request_auth,
|
|
244
|
+
_content_type=_content_type,
|
|
245
|
+
_headers=_headers,
|
|
246
|
+
_host_index=_host_index
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
250
|
+
'204': None,
|
|
251
|
+
'400': "ErrorResponse",
|
|
252
|
+
'401': "ErrorResponse",
|
|
253
|
+
'404': "ErrorResponse",
|
|
254
|
+
'500': "ErrorResponse",
|
|
255
|
+
}
|
|
256
|
+
response_data = await self.api_client.call_api(
|
|
257
|
+
*_param,
|
|
258
|
+
_request_timeout=_request_timeout
|
|
259
|
+
)
|
|
260
|
+
return response_data.response
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def _accept_quote_serialize(
|
|
264
|
+
self,
|
|
265
|
+
quote_id,
|
|
266
|
+
accept_quote_request,
|
|
267
|
+
_request_auth,
|
|
268
|
+
_content_type,
|
|
269
|
+
_headers,
|
|
270
|
+
_host_index,
|
|
271
|
+
) -> RequestSerialized:
|
|
272
|
+
|
|
273
|
+
_host = None
|
|
274
|
+
|
|
275
|
+
_collection_formats: Dict[str, str] = {
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
_path_params: Dict[str, str] = {}
|
|
279
|
+
_query_params: List[Tuple[str, str]] = []
|
|
280
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
281
|
+
_form_params: List[Tuple[str, str]] = []
|
|
282
|
+
_files: Dict[
|
|
283
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
284
|
+
] = {}
|
|
285
|
+
_body_params: Optional[bytes] = None
|
|
286
|
+
|
|
287
|
+
# process the path parameters
|
|
288
|
+
if quote_id is not None:
|
|
289
|
+
_path_params['quote_id'] = quote_id
|
|
290
|
+
# process the query parameters
|
|
291
|
+
# process the header parameters
|
|
292
|
+
# process the form parameters
|
|
293
|
+
# process the body parameter
|
|
294
|
+
if accept_quote_request is not None:
|
|
295
|
+
_body_params = accept_quote_request
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
# set the HTTP header `Accept`
|
|
299
|
+
if 'Accept' not in _header_params:
|
|
300
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
301
|
+
[
|
|
302
|
+
'application/json'
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
# set the HTTP header `Content-Type`
|
|
307
|
+
if _content_type:
|
|
308
|
+
_header_params['Content-Type'] = _content_type
|
|
309
|
+
else:
|
|
310
|
+
_default_content_type = (
|
|
311
|
+
self.api_client.select_header_content_type(
|
|
312
|
+
[
|
|
313
|
+
'application/json'
|
|
314
|
+
]
|
|
315
|
+
)
|
|
316
|
+
)
|
|
317
|
+
if _default_content_type is not None:
|
|
318
|
+
_header_params['Content-Type'] = _default_content_type
|
|
319
|
+
|
|
320
|
+
# authentication setting
|
|
321
|
+
_auth_settings: List[str] = [
|
|
322
|
+
'kalshiAccessSignature',
|
|
323
|
+
'kalshiAccessKey',
|
|
324
|
+
'kalshiAccessTimestamp'
|
|
325
|
+
]
|
|
326
|
+
|
|
327
|
+
return self.api_client.param_serialize(
|
|
328
|
+
method='PUT',
|
|
329
|
+
resource_path='/communications/quotes/{quote_id}/accept',
|
|
330
|
+
path_params=_path_params,
|
|
331
|
+
query_params=_query_params,
|
|
332
|
+
header_params=_header_params,
|
|
333
|
+
body=_body_params,
|
|
334
|
+
post_params=_form_params,
|
|
335
|
+
files=_files,
|
|
336
|
+
auth_settings=_auth_settings,
|
|
337
|
+
collection_formats=_collection_formats,
|
|
338
|
+
_host=_host,
|
|
339
|
+
_request_auth=_request_auth
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
@validate_call
|
|
346
|
+
async def confirm_quote(
|
|
347
|
+
self,
|
|
348
|
+
quote_id: StrictStr,
|
|
349
|
+
body: Any = None,
|
|
350
|
+
) -> None:
|
|
351
|
+
"""Confirm Quote
|
|
352
|
+
|
|
353
|
+
Endpoint for confirming a quote. This will start a timer for order execution
|
|
354
|
+
|
|
355
|
+
:param quote_id: Quote ID (required)
|
|
356
|
+
:type quote_id: str
|
|
357
|
+
:param body:
|
|
358
|
+
:type body: object
|
|
359
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
360
|
+
number provided, it will be total request
|
|
361
|
+
timeout. It can also be a pair (tuple) of
|
|
362
|
+
(connection, read) timeouts.
|
|
363
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
364
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
365
|
+
request; this effectively ignores the
|
|
366
|
+
authentication in the spec for a single request.
|
|
367
|
+
:type _request_auth: dict, optional
|
|
368
|
+
:param _content_type: force content-type for the request.
|
|
369
|
+
:type _content_type: str, Optional
|
|
370
|
+
:param _headers: set to override the headers for a single
|
|
371
|
+
request; this effectively ignores the headers
|
|
372
|
+
in the spec for a single request.
|
|
373
|
+
:type _headers: dict, optional
|
|
374
|
+
:param _host_index: set to override the host_index for a single
|
|
375
|
+
request; this effectively ignores the host_index
|
|
376
|
+
in the spec for a single request.
|
|
377
|
+
:type _host_index: int, optional
|
|
378
|
+
:return: Returns the result object.
|
|
379
|
+
""" # noqa: E501
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
_param = self._confirm_quote_serialize(
|
|
383
|
+
quote_id=quote_id,
|
|
384
|
+
body=body,
|
|
385
|
+
_request_auth=None,
|
|
386
|
+
_content_type=None,
|
|
387
|
+
_headers=None,
|
|
388
|
+
_host_index=0
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
392
|
+
'204': None,
|
|
393
|
+
'401': "ErrorResponse",
|
|
394
|
+
'404': "ErrorResponse",
|
|
395
|
+
'500': "ErrorResponse",
|
|
396
|
+
}
|
|
397
|
+
response_data = await self.api_client.call_api(
|
|
398
|
+
*_param,
|
|
399
|
+
_request_timeout=None,
|
|
400
|
+
)
|
|
401
|
+
await response_data.read()
|
|
402
|
+
return self.api_client.response_deserialize(
|
|
403
|
+
response_data=response_data,
|
|
404
|
+
response_types_map=_response_types_map,
|
|
405
|
+
).data
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
@validate_call
|
|
409
|
+
async def confirm_quote_with_http_info(
|
|
410
|
+
self,
|
|
411
|
+
quote_id: Annotated[StrictStr, Field(description="Quote ID")],
|
|
412
|
+
body: Optional[Dict[str, Any]] = None,
|
|
413
|
+
_request_timeout: Union[
|
|
414
|
+
None,
|
|
415
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
416
|
+
Tuple[
|
|
417
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
418
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
419
|
+
]
|
|
420
|
+
] = None,
|
|
421
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
422
|
+
_content_type: Optional[StrictStr] = None,
|
|
423
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
424
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
425
|
+
) -> ApiResponse[None]:
|
|
426
|
+
"""Confirm Quote
|
|
427
|
+
|
|
428
|
+
Endpoint for confirming a quote. This will start a timer for order execution
|
|
429
|
+
|
|
430
|
+
:param quote_id: Quote ID (required)
|
|
431
|
+
:type quote_id: str
|
|
432
|
+
:param body:
|
|
433
|
+
:type body: object
|
|
434
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
435
|
+
number provided, it will be total request
|
|
436
|
+
timeout. It can also be a pair (tuple) of
|
|
437
|
+
(connection, read) timeouts.
|
|
438
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
439
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
440
|
+
request; this effectively ignores the
|
|
441
|
+
authentication in the spec for a single request.
|
|
442
|
+
:type _request_auth: dict, optional
|
|
443
|
+
:param _content_type: force content-type for the request.
|
|
444
|
+
:type _content_type: str, Optional
|
|
445
|
+
:param _headers: set to override the headers for a single
|
|
446
|
+
request; this effectively ignores the headers
|
|
447
|
+
in the spec for a single request.
|
|
448
|
+
:type _headers: dict, optional
|
|
449
|
+
:param _host_index: set to override the host_index for a single
|
|
450
|
+
request; this effectively ignores the host_index
|
|
451
|
+
in the spec for a single request.
|
|
452
|
+
:type _host_index: int, optional
|
|
453
|
+
:return: Returns the result object.
|
|
454
|
+
""" # noqa: E501
|
|
455
|
+
|
|
456
|
+
_param = self._confirm_quote_serialize(
|
|
457
|
+
quote_id=quote_id,
|
|
458
|
+
body=body,
|
|
459
|
+
_request_auth=_request_auth,
|
|
460
|
+
_content_type=_content_type,
|
|
461
|
+
_headers=_headers,
|
|
462
|
+
_host_index=_host_index
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
466
|
+
'204': None,
|
|
467
|
+
'401': "ErrorResponse",
|
|
468
|
+
'404': "ErrorResponse",
|
|
469
|
+
'500': "ErrorResponse",
|
|
470
|
+
}
|
|
471
|
+
response_data = await self.api_client.call_api(
|
|
472
|
+
*_param,
|
|
473
|
+
_request_timeout=_request_timeout
|
|
474
|
+
)
|
|
475
|
+
await response_data.read()
|
|
476
|
+
return self.api_client.response_deserialize(
|
|
477
|
+
response_data=response_data,
|
|
478
|
+
response_types_map=_response_types_map,
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
@validate_call
|
|
483
|
+
async def confirm_quote_without_preload_content(
|
|
484
|
+
self,
|
|
485
|
+
quote_id: Annotated[StrictStr, Field(description="Quote ID")],
|
|
486
|
+
body: Optional[Dict[str, Any]] = None,
|
|
487
|
+
_request_timeout: Union[
|
|
488
|
+
None,
|
|
489
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
490
|
+
Tuple[
|
|
491
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
492
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
493
|
+
]
|
|
494
|
+
] = None,
|
|
495
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
496
|
+
_content_type: Optional[StrictStr] = None,
|
|
497
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
498
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
499
|
+
) -> RESTResponseType:
|
|
500
|
+
"""Confirm Quote
|
|
501
|
+
|
|
502
|
+
Endpoint for confirming a quote. This will start a timer for order execution
|
|
503
|
+
|
|
504
|
+
:param quote_id: Quote ID (required)
|
|
505
|
+
:type quote_id: str
|
|
506
|
+
:param body:
|
|
507
|
+
:type body: object
|
|
508
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
509
|
+
number provided, it will be total request
|
|
510
|
+
timeout. It can also be a pair (tuple) of
|
|
511
|
+
(connection, read) timeouts.
|
|
512
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
513
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
514
|
+
request; this effectively ignores the
|
|
515
|
+
authentication in the spec for a single request.
|
|
516
|
+
:type _request_auth: dict, optional
|
|
517
|
+
:param _content_type: force content-type for the request.
|
|
518
|
+
:type _content_type: str, Optional
|
|
519
|
+
:param _headers: set to override the headers for a single
|
|
520
|
+
request; this effectively ignores the headers
|
|
521
|
+
in the spec for a single request.
|
|
522
|
+
:type _headers: dict, optional
|
|
523
|
+
:param _host_index: set to override the host_index for a single
|
|
524
|
+
request; this effectively ignores the host_index
|
|
525
|
+
in the spec for a single request.
|
|
526
|
+
:type _host_index: int, optional
|
|
527
|
+
:return: Returns the result object.
|
|
528
|
+
""" # noqa: E501
|
|
529
|
+
|
|
530
|
+
_param = self._confirm_quote_serialize(
|
|
531
|
+
quote_id=quote_id,
|
|
532
|
+
body=body,
|
|
533
|
+
_request_auth=_request_auth,
|
|
534
|
+
_content_type=_content_type,
|
|
535
|
+
_headers=_headers,
|
|
536
|
+
_host_index=_host_index
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
540
|
+
'204': None,
|
|
541
|
+
'401': "ErrorResponse",
|
|
542
|
+
'404': "ErrorResponse",
|
|
543
|
+
'500': "ErrorResponse",
|
|
544
|
+
}
|
|
545
|
+
response_data = await self.api_client.call_api(
|
|
546
|
+
*_param,
|
|
547
|
+
_request_timeout=_request_timeout
|
|
548
|
+
)
|
|
549
|
+
return response_data.response
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
def _confirm_quote_serialize(
|
|
553
|
+
self,
|
|
554
|
+
quote_id,
|
|
555
|
+
body,
|
|
556
|
+
_request_auth,
|
|
557
|
+
_content_type,
|
|
558
|
+
_headers,
|
|
559
|
+
_host_index,
|
|
560
|
+
) -> RequestSerialized:
|
|
561
|
+
|
|
562
|
+
_host = None
|
|
563
|
+
|
|
564
|
+
_collection_formats: Dict[str, str] = {
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
_path_params: Dict[str, str] = {}
|
|
568
|
+
_query_params: List[Tuple[str, str]] = []
|
|
569
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
570
|
+
_form_params: List[Tuple[str, str]] = []
|
|
571
|
+
_files: Dict[
|
|
572
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
573
|
+
] = {}
|
|
574
|
+
_body_params: Optional[bytes] = None
|
|
575
|
+
|
|
576
|
+
# process the path parameters
|
|
577
|
+
if quote_id is not None:
|
|
578
|
+
_path_params['quote_id'] = quote_id
|
|
579
|
+
# process the query parameters
|
|
580
|
+
# process the header parameters
|
|
581
|
+
# process the form parameters
|
|
582
|
+
# process the body parameter
|
|
583
|
+
if body is not None:
|
|
584
|
+
_body_params = body
|
|
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
|
+
# set the HTTP header `Content-Type`
|
|
596
|
+
if _content_type:
|
|
597
|
+
_header_params['Content-Type'] = _content_type
|
|
598
|
+
else:
|
|
599
|
+
_default_content_type = (
|
|
600
|
+
self.api_client.select_header_content_type(
|
|
601
|
+
[
|
|
602
|
+
'application/json'
|
|
603
|
+
]
|
|
604
|
+
)
|
|
605
|
+
)
|
|
606
|
+
if _default_content_type is not None:
|
|
607
|
+
_header_params['Content-Type'] = _default_content_type
|
|
608
|
+
|
|
609
|
+
# authentication setting
|
|
610
|
+
_auth_settings: List[str] = [
|
|
611
|
+
'kalshiAccessSignature',
|
|
612
|
+
'kalshiAccessKey',
|
|
613
|
+
'kalshiAccessTimestamp'
|
|
614
|
+
]
|
|
615
|
+
|
|
616
|
+
return self.api_client.param_serialize(
|
|
617
|
+
method='PUT',
|
|
618
|
+
resource_path='/communications/quotes/{quote_id}/confirm',
|
|
619
|
+
path_params=_path_params,
|
|
620
|
+
query_params=_query_params,
|
|
621
|
+
header_params=_header_params,
|
|
622
|
+
body=_body_params,
|
|
623
|
+
post_params=_form_params,
|
|
624
|
+
files=_files,
|
|
625
|
+
auth_settings=_auth_settings,
|
|
626
|
+
collection_formats=_collection_formats,
|
|
627
|
+
_host=_host,
|
|
628
|
+
_request_auth=_request_auth
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
@validate_call
|
|
635
|
+
async def create_quote(
|
|
636
|
+
self,
|
|
637
|
+
# Request body parameters as keyword arguments
|
|
638
|
+
**kwargs: Any,
|
|
639
|
+
) -> CreateQuoteResponse:
|
|
640
|
+
"""Create Quote
|
|
641
|
+
|
|
642
|
+
Endpoint for creating a quote in response to an RFQ
|
|
643
|
+
|
|
644
|
+
:param create_quote_request: (required)
|
|
645
|
+
:type create_quote_request: CreateQuoteRequest
|
|
646
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
647
|
+
number provided, it will be total request
|
|
648
|
+
timeout. It can also be a pair (tuple) of
|
|
649
|
+
(connection, read) timeouts.
|
|
650
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
651
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
652
|
+
request; this effectively ignores the
|
|
653
|
+
authentication in the spec for a single request.
|
|
654
|
+
:type _request_auth: dict, optional
|
|
655
|
+
:param _content_type: force content-type for the request.
|
|
656
|
+
:type _content_type: str, Optional
|
|
657
|
+
:param _headers: set to override the headers for a single
|
|
658
|
+
request; this effectively ignores the headers
|
|
659
|
+
in the spec for a single request.
|
|
660
|
+
:type _headers: dict, optional
|
|
661
|
+
:param _host_index: set to override the host_index for a single
|
|
662
|
+
request; this effectively ignores the host_index
|
|
663
|
+
in the spec for a single request.
|
|
664
|
+
:type _host_index: int, optional
|
|
665
|
+
:return: Returns the result object.
|
|
666
|
+
""" # noqa: E501
|
|
667
|
+
|
|
668
|
+
# Create request object from kwargs
|
|
669
|
+
create_quote_request = CreateQuoteRequest(**kwargs) if kwargs else None
|
|
670
|
+
|
|
671
|
+
_param = self._create_quote_serialize(
|
|
672
|
+
create_quote_request=create_quote_request,
|
|
673
|
+
_request_auth=kwargs.get('_request_auth'),
|
|
674
|
+
_content_type=kwargs.get('_content_type'),
|
|
675
|
+
_headers=kwargs.get('_headers'),
|
|
676
|
+
_host_index=kwargs.get('_host_index', 0)
|
|
677
|
+
)
|
|
678
|
+
|
|
679
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
680
|
+
'201': "CreateQuoteResponse",
|
|
681
|
+
'400': "ErrorResponse",
|
|
682
|
+
'401': "ErrorResponse",
|
|
683
|
+
'500': "ErrorResponse",
|
|
684
|
+
}
|
|
685
|
+
response_data = await self.api_client.call_api(
|
|
686
|
+
*_param,
|
|
687
|
+
_request_timeout=kwargs.get('_request_timeout'),
|
|
688
|
+
)
|
|
689
|
+
await response_data.read()
|
|
690
|
+
return self.api_client.response_deserialize(
|
|
691
|
+
response_data=response_data,
|
|
692
|
+
response_types_map=_response_types_map,
|
|
693
|
+
).data
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
@validate_call
|
|
697
|
+
async def create_quote_with_http_info(
|
|
698
|
+
self,
|
|
699
|
+
create_quote_request: CreateQuoteRequest,
|
|
700
|
+
_request_timeout: Union[
|
|
701
|
+
None,
|
|
702
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
703
|
+
Tuple[
|
|
704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
705
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
706
|
+
]
|
|
707
|
+
] = None,
|
|
708
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
709
|
+
_content_type: Optional[StrictStr] = None,
|
|
710
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
711
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
712
|
+
) -> ApiResponse[CreateQuoteResponse]:
|
|
713
|
+
"""Create Quote
|
|
714
|
+
|
|
715
|
+
Endpoint for creating a quote in response to an RFQ
|
|
716
|
+
|
|
717
|
+
:param create_quote_request: (required)
|
|
718
|
+
:type create_quote_request: CreateQuoteRequest
|
|
719
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
720
|
+
number provided, it will be total request
|
|
721
|
+
timeout. It can also be a pair (tuple) of
|
|
722
|
+
(connection, read) timeouts.
|
|
723
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
724
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
725
|
+
request; this effectively ignores the
|
|
726
|
+
authentication in the spec for a single request.
|
|
727
|
+
:type _request_auth: dict, optional
|
|
728
|
+
:param _content_type: force content-type for the request.
|
|
729
|
+
:type _content_type: str, Optional
|
|
730
|
+
:param _headers: set to override the headers for a single
|
|
731
|
+
request; this effectively ignores the headers
|
|
732
|
+
in the spec for a single request.
|
|
733
|
+
:type _headers: dict, optional
|
|
734
|
+
:param _host_index: set to override the host_index for a single
|
|
735
|
+
request; this effectively ignores the host_index
|
|
736
|
+
in the spec for a single request.
|
|
737
|
+
:type _host_index: int, optional
|
|
738
|
+
:return: Returns the result object.
|
|
739
|
+
""" # noqa: E501
|
|
740
|
+
|
|
741
|
+
_param = self._create_quote_serialize(
|
|
742
|
+
create_quote_request=create_quote_request,
|
|
743
|
+
_request_auth=_request_auth,
|
|
744
|
+
_content_type=_content_type,
|
|
745
|
+
_headers=_headers,
|
|
746
|
+
_host_index=_host_index
|
|
747
|
+
)
|
|
748
|
+
|
|
749
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
750
|
+
'201': "CreateQuoteResponse",
|
|
751
|
+
'400': "ErrorResponse",
|
|
752
|
+
'401': "ErrorResponse",
|
|
753
|
+
'500': "ErrorResponse",
|
|
754
|
+
}
|
|
755
|
+
response_data = await self.api_client.call_api(
|
|
756
|
+
*_param,
|
|
757
|
+
_request_timeout=_request_timeout
|
|
758
|
+
)
|
|
759
|
+
await response_data.read()
|
|
760
|
+
return self.api_client.response_deserialize(
|
|
761
|
+
response_data=response_data,
|
|
762
|
+
response_types_map=_response_types_map,
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
@validate_call
|
|
767
|
+
async def create_quote_without_preload_content(
|
|
768
|
+
self,
|
|
769
|
+
create_quote_request: CreateQuoteRequest,
|
|
770
|
+
_request_timeout: Union[
|
|
771
|
+
None,
|
|
772
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
773
|
+
Tuple[
|
|
774
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
775
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
776
|
+
]
|
|
777
|
+
] = None,
|
|
778
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
779
|
+
_content_type: Optional[StrictStr] = None,
|
|
780
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
781
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
782
|
+
) -> RESTResponseType:
|
|
783
|
+
"""Create Quote
|
|
784
|
+
|
|
785
|
+
Endpoint for creating a quote in response to an RFQ
|
|
786
|
+
|
|
787
|
+
:param create_quote_request: (required)
|
|
788
|
+
:type create_quote_request: CreateQuoteRequest
|
|
789
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
790
|
+
number provided, it will be total request
|
|
791
|
+
timeout. It can also be a pair (tuple) of
|
|
792
|
+
(connection, read) timeouts.
|
|
793
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
794
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
795
|
+
request; this effectively ignores the
|
|
796
|
+
authentication in the spec for a single request.
|
|
797
|
+
:type _request_auth: dict, optional
|
|
798
|
+
:param _content_type: force content-type for the request.
|
|
799
|
+
:type _content_type: str, Optional
|
|
800
|
+
:param _headers: set to override the headers for a single
|
|
801
|
+
request; this effectively ignores the headers
|
|
802
|
+
in the spec for a single request.
|
|
803
|
+
:type _headers: dict, optional
|
|
804
|
+
:param _host_index: set to override the host_index for a single
|
|
805
|
+
request; this effectively ignores the host_index
|
|
806
|
+
in the spec for a single request.
|
|
807
|
+
:type _host_index: int, optional
|
|
808
|
+
:return: Returns the result object.
|
|
809
|
+
""" # noqa: E501
|
|
810
|
+
|
|
811
|
+
_param = self._create_quote_serialize(
|
|
812
|
+
create_quote_request=create_quote_request,
|
|
813
|
+
_request_auth=_request_auth,
|
|
814
|
+
_content_type=_content_type,
|
|
815
|
+
_headers=_headers,
|
|
816
|
+
_host_index=_host_index
|
|
817
|
+
)
|
|
818
|
+
|
|
819
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
820
|
+
'201': "CreateQuoteResponse",
|
|
821
|
+
'400': "ErrorResponse",
|
|
822
|
+
'401': "ErrorResponse",
|
|
823
|
+
'500': "ErrorResponse",
|
|
824
|
+
}
|
|
825
|
+
response_data = await self.api_client.call_api(
|
|
826
|
+
*_param,
|
|
827
|
+
_request_timeout=_request_timeout
|
|
828
|
+
)
|
|
829
|
+
return response_data.response
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
def _create_quote_serialize(
|
|
833
|
+
self,
|
|
834
|
+
create_quote_request,
|
|
835
|
+
_request_auth,
|
|
836
|
+
_content_type,
|
|
837
|
+
_headers,
|
|
838
|
+
_host_index,
|
|
839
|
+
) -> RequestSerialized:
|
|
840
|
+
|
|
841
|
+
_host = None
|
|
842
|
+
|
|
843
|
+
_collection_formats: Dict[str, str] = {
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
_path_params: Dict[str, str] = {}
|
|
847
|
+
_query_params: List[Tuple[str, str]] = []
|
|
848
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
849
|
+
_form_params: List[Tuple[str, str]] = []
|
|
850
|
+
_files: Dict[
|
|
851
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
852
|
+
] = {}
|
|
853
|
+
_body_params: Optional[bytes] = None
|
|
854
|
+
|
|
855
|
+
# process the path parameters
|
|
856
|
+
# process the query parameters
|
|
857
|
+
# process the header parameters
|
|
858
|
+
# process the form parameters
|
|
859
|
+
# process the body parameter
|
|
860
|
+
if create_quote_request is not None:
|
|
861
|
+
_body_params = create_quote_request
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
# set the HTTP header `Accept`
|
|
865
|
+
if 'Accept' not in _header_params:
|
|
866
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
867
|
+
[
|
|
868
|
+
'application/json'
|
|
869
|
+
]
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
# set the HTTP header `Content-Type`
|
|
873
|
+
if _content_type:
|
|
874
|
+
_header_params['Content-Type'] = _content_type
|
|
875
|
+
else:
|
|
876
|
+
_default_content_type = (
|
|
877
|
+
self.api_client.select_header_content_type(
|
|
878
|
+
[
|
|
879
|
+
'application/json'
|
|
880
|
+
]
|
|
881
|
+
)
|
|
882
|
+
)
|
|
883
|
+
if _default_content_type is not None:
|
|
884
|
+
_header_params['Content-Type'] = _default_content_type
|
|
885
|
+
|
|
886
|
+
# authentication setting
|
|
887
|
+
_auth_settings: List[str] = [
|
|
888
|
+
'kalshiAccessSignature',
|
|
889
|
+
'kalshiAccessKey',
|
|
890
|
+
'kalshiAccessTimestamp'
|
|
891
|
+
]
|
|
892
|
+
|
|
893
|
+
return self.api_client.param_serialize(
|
|
894
|
+
method='POST',
|
|
895
|
+
resource_path='/communications/quotes',
|
|
896
|
+
path_params=_path_params,
|
|
897
|
+
query_params=_query_params,
|
|
898
|
+
header_params=_header_params,
|
|
899
|
+
body=_body_params,
|
|
900
|
+
post_params=_form_params,
|
|
901
|
+
files=_files,
|
|
902
|
+
auth_settings=_auth_settings,
|
|
903
|
+
collection_formats=_collection_formats,
|
|
904
|
+
_host=_host,
|
|
905
|
+
_request_auth=_request_auth
|
|
906
|
+
)
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
@validate_call
|
|
912
|
+
async def create_rfq(
|
|
913
|
+
self,
|
|
914
|
+
# Request body parameters as keyword arguments
|
|
915
|
+
**kwargs: Any,
|
|
916
|
+
) -> CreateRFQResponse:
|
|
917
|
+
"""Create RFQ
|
|
918
|
+
|
|
919
|
+
Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time.
|
|
920
|
+
|
|
921
|
+
:param create_rfq_request: (required)
|
|
922
|
+
:type create_rfq_request: CreateRFQRequest
|
|
923
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
924
|
+
number provided, it will be total request
|
|
925
|
+
timeout. It can also be a pair (tuple) of
|
|
926
|
+
(connection, read) timeouts.
|
|
927
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
928
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
929
|
+
request; this effectively ignores the
|
|
930
|
+
authentication in the spec for a single request.
|
|
931
|
+
:type _request_auth: dict, optional
|
|
932
|
+
:param _content_type: force content-type for the request.
|
|
933
|
+
:type _content_type: str, Optional
|
|
934
|
+
:param _headers: set to override the headers for a single
|
|
935
|
+
request; this effectively ignores the headers
|
|
936
|
+
in the spec for a single request.
|
|
937
|
+
:type _headers: dict, optional
|
|
938
|
+
:param _host_index: set to override the host_index for a single
|
|
939
|
+
request; this effectively ignores the host_index
|
|
940
|
+
in the spec for a single request.
|
|
941
|
+
:type _host_index: int, optional
|
|
942
|
+
:return: Returns the result object.
|
|
943
|
+
""" # noqa: E501
|
|
944
|
+
|
|
945
|
+
# Create request object from kwargs
|
|
946
|
+
create_rfq_request = CreateRFQRequest(**kwargs) if kwargs else None
|
|
947
|
+
|
|
948
|
+
_param = self._create_rfq_serialize(
|
|
949
|
+
create_rfq_request=create_rfq_request,
|
|
950
|
+
_request_auth=kwargs.get('_request_auth'),
|
|
951
|
+
_content_type=kwargs.get('_content_type'),
|
|
952
|
+
_headers=kwargs.get('_headers'),
|
|
953
|
+
_host_index=kwargs.get('_host_index', 0)
|
|
954
|
+
)
|
|
955
|
+
|
|
956
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
957
|
+
'201': "CreateRFQResponse",
|
|
958
|
+
'400': "ErrorResponse",
|
|
959
|
+
'401': "ErrorResponse",
|
|
960
|
+
'409': "ErrorResponse",
|
|
961
|
+
'500': "ErrorResponse",
|
|
962
|
+
}
|
|
963
|
+
response_data = await self.api_client.call_api(
|
|
964
|
+
*_param,
|
|
965
|
+
_request_timeout=kwargs.get('_request_timeout'),
|
|
966
|
+
)
|
|
967
|
+
await response_data.read()
|
|
968
|
+
return self.api_client.response_deserialize(
|
|
969
|
+
response_data=response_data,
|
|
970
|
+
response_types_map=_response_types_map,
|
|
971
|
+
).data
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
@validate_call
|
|
975
|
+
async def create_rfq_with_http_info(
|
|
976
|
+
self,
|
|
977
|
+
create_rfq_request: CreateRFQRequest,
|
|
978
|
+
_request_timeout: Union[
|
|
979
|
+
None,
|
|
980
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
981
|
+
Tuple[
|
|
982
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
983
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
984
|
+
]
|
|
985
|
+
] = None,
|
|
986
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
987
|
+
_content_type: Optional[StrictStr] = None,
|
|
988
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
989
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
990
|
+
) -> ApiResponse[CreateRFQResponse]:
|
|
991
|
+
"""Create RFQ
|
|
992
|
+
|
|
993
|
+
Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time.
|
|
994
|
+
|
|
995
|
+
:param create_rfq_request: (required)
|
|
996
|
+
:type create_rfq_request: CreateRFQRequest
|
|
997
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
998
|
+
number provided, it will be total request
|
|
999
|
+
timeout. It can also be a pair (tuple) of
|
|
1000
|
+
(connection, read) timeouts.
|
|
1001
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1002
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1003
|
+
request; this effectively ignores the
|
|
1004
|
+
authentication in the spec for a single request.
|
|
1005
|
+
:type _request_auth: dict, optional
|
|
1006
|
+
:param _content_type: force content-type for the request.
|
|
1007
|
+
:type _content_type: str, Optional
|
|
1008
|
+
:param _headers: set to override the headers for a single
|
|
1009
|
+
request; this effectively ignores the headers
|
|
1010
|
+
in the spec for a single request.
|
|
1011
|
+
:type _headers: dict, optional
|
|
1012
|
+
:param _host_index: set to override the host_index for a single
|
|
1013
|
+
request; this effectively ignores the host_index
|
|
1014
|
+
in the spec for a single request.
|
|
1015
|
+
:type _host_index: int, optional
|
|
1016
|
+
:return: Returns the result object.
|
|
1017
|
+
""" # noqa: E501
|
|
1018
|
+
|
|
1019
|
+
_param = self._create_rfq_serialize(
|
|
1020
|
+
create_rfq_request=create_rfq_request,
|
|
1021
|
+
_request_auth=_request_auth,
|
|
1022
|
+
_content_type=_content_type,
|
|
1023
|
+
_headers=_headers,
|
|
1024
|
+
_host_index=_host_index
|
|
1025
|
+
)
|
|
1026
|
+
|
|
1027
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1028
|
+
'201': "CreateRFQResponse",
|
|
1029
|
+
'400': "ErrorResponse",
|
|
1030
|
+
'401': "ErrorResponse",
|
|
1031
|
+
'409': "ErrorResponse",
|
|
1032
|
+
'500': "ErrorResponse",
|
|
1033
|
+
}
|
|
1034
|
+
response_data = await self.api_client.call_api(
|
|
1035
|
+
*_param,
|
|
1036
|
+
_request_timeout=_request_timeout
|
|
1037
|
+
)
|
|
1038
|
+
await response_data.read()
|
|
1039
|
+
return self.api_client.response_deserialize(
|
|
1040
|
+
response_data=response_data,
|
|
1041
|
+
response_types_map=_response_types_map,
|
|
1042
|
+
)
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
@validate_call
|
|
1046
|
+
async def create_rfq_without_preload_content(
|
|
1047
|
+
self,
|
|
1048
|
+
create_rfq_request: CreateRFQRequest,
|
|
1049
|
+
_request_timeout: Union[
|
|
1050
|
+
None,
|
|
1051
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1052
|
+
Tuple[
|
|
1053
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1054
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1055
|
+
]
|
|
1056
|
+
] = None,
|
|
1057
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1058
|
+
_content_type: Optional[StrictStr] = None,
|
|
1059
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1060
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1061
|
+
) -> RESTResponseType:
|
|
1062
|
+
"""Create RFQ
|
|
1063
|
+
|
|
1064
|
+
Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time.
|
|
1065
|
+
|
|
1066
|
+
:param create_rfq_request: (required)
|
|
1067
|
+
:type create_rfq_request: CreateRFQRequest
|
|
1068
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1069
|
+
number provided, it will be total request
|
|
1070
|
+
timeout. It can also be a pair (tuple) of
|
|
1071
|
+
(connection, read) timeouts.
|
|
1072
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1073
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1074
|
+
request; this effectively ignores the
|
|
1075
|
+
authentication in the spec for a single request.
|
|
1076
|
+
:type _request_auth: dict, optional
|
|
1077
|
+
:param _content_type: force content-type for the request.
|
|
1078
|
+
:type _content_type: str, Optional
|
|
1079
|
+
:param _headers: set to override the headers for a single
|
|
1080
|
+
request; this effectively ignores the headers
|
|
1081
|
+
in the spec for a single request.
|
|
1082
|
+
:type _headers: dict, optional
|
|
1083
|
+
:param _host_index: set to override the host_index for a single
|
|
1084
|
+
request; this effectively ignores the host_index
|
|
1085
|
+
in the spec for a single request.
|
|
1086
|
+
:type _host_index: int, optional
|
|
1087
|
+
:return: Returns the result object.
|
|
1088
|
+
""" # noqa: E501
|
|
1089
|
+
|
|
1090
|
+
_param = self._create_rfq_serialize(
|
|
1091
|
+
create_rfq_request=create_rfq_request,
|
|
1092
|
+
_request_auth=_request_auth,
|
|
1093
|
+
_content_type=_content_type,
|
|
1094
|
+
_headers=_headers,
|
|
1095
|
+
_host_index=_host_index
|
|
1096
|
+
)
|
|
1097
|
+
|
|
1098
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1099
|
+
'201': "CreateRFQResponse",
|
|
1100
|
+
'400': "ErrorResponse",
|
|
1101
|
+
'401': "ErrorResponse",
|
|
1102
|
+
'409': "ErrorResponse",
|
|
1103
|
+
'500': "ErrorResponse",
|
|
1104
|
+
}
|
|
1105
|
+
response_data = await self.api_client.call_api(
|
|
1106
|
+
*_param,
|
|
1107
|
+
_request_timeout=_request_timeout
|
|
1108
|
+
)
|
|
1109
|
+
return response_data.response
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
def _create_rfq_serialize(
|
|
1113
|
+
self,
|
|
1114
|
+
create_rfq_request,
|
|
1115
|
+
_request_auth,
|
|
1116
|
+
_content_type,
|
|
1117
|
+
_headers,
|
|
1118
|
+
_host_index,
|
|
1119
|
+
) -> RequestSerialized:
|
|
1120
|
+
|
|
1121
|
+
_host = None
|
|
1122
|
+
|
|
1123
|
+
_collection_formats: Dict[str, str] = {
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
_path_params: Dict[str, str] = {}
|
|
1127
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1128
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1129
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1130
|
+
_files: Dict[
|
|
1131
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1132
|
+
] = {}
|
|
1133
|
+
_body_params: Optional[bytes] = None
|
|
1134
|
+
|
|
1135
|
+
# process the path parameters
|
|
1136
|
+
# process the query parameters
|
|
1137
|
+
# process the header parameters
|
|
1138
|
+
# process the form parameters
|
|
1139
|
+
# process the body parameter
|
|
1140
|
+
if create_rfq_request is not None:
|
|
1141
|
+
_body_params = create_rfq_request
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
# set the HTTP header `Accept`
|
|
1145
|
+
if 'Accept' not in _header_params:
|
|
1146
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1147
|
+
[
|
|
1148
|
+
'application/json'
|
|
1149
|
+
]
|
|
1150
|
+
)
|
|
1151
|
+
|
|
1152
|
+
# set the HTTP header `Content-Type`
|
|
1153
|
+
if _content_type:
|
|
1154
|
+
_header_params['Content-Type'] = _content_type
|
|
1155
|
+
else:
|
|
1156
|
+
_default_content_type = (
|
|
1157
|
+
self.api_client.select_header_content_type(
|
|
1158
|
+
[
|
|
1159
|
+
'application/json'
|
|
1160
|
+
]
|
|
1161
|
+
)
|
|
1162
|
+
)
|
|
1163
|
+
if _default_content_type is not None:
|
|
1164
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1165
|
+
|
|
1166
|
+
# authentication setting
|
|
1167
|
+
_auth_settings: List[str] = [
|
|
1168
|
+
'kalshiAccessSignature',
|
|
1169
|
+
'kalshiAccessKey',
|
|
1170
|
+
'kalshiAccessTimestamp'
|
|
1171
|
+
]
|
|
1172
|
+
|
|
1173
|
+
return self.api_client.param_serialize(
|
|
1174
|
+
method='POST',
|
|
1175
|
+
resource_path='/communications/rfqs',
|
|
1176
|
+
path_params=_path_params,
|
|
1177
|
+
query_params=_query_params,
|
|
1178
|
+
header_params=_header_params,
|
|
1179
|
+
body=_body_params,
|
|
1180
|
+
post_params=_form_params,
|
|
1181
|
+
files=_files,
|
|
1182
|
+
auth_settings=_auth_settings,
|
|
1183
|
+
collection_formats=_collection_formats,
|
|
1184
|
+
_host=_host,
|
|
1185
|
+
_request_auth=_request_auth
|
|
1186
|
+
)
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
@validate_call
|
|
1192
|
+
async def delete_quote(
|
|
1193
|
+
self,
|
|
1194
|
+
quote_id: StrictStr,
|
|
1195
|
+
) -> None:
|
|
1196
|
+
"""Delete Quote
|
|
1197
|
+
|
|
1198
|
+
Endpoint for deleting a quote, which means it can no longer be accepted.
|
|
1199
|
+
|
|
1200
|
+
:param quote_id: Quote ID (required)
|
|
1201
|
+
:type quote_id: str
|
|
1202
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1203
|
+
number provided, it will be total request
|
|
1204
|
+
timeout. It can also be a pair (tuple) of
|
|
1205
|
+
(connection, read) timeouts.
|
|
1206
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1207
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1208
|
+
request; this effectively ignores the
|
|
1209
|
+
authentication in the spec for a single request.
|
|
1210
|
+
:type _request_auth: dict, optional
|
|
1211
|
+
:param _content_type: force content-type for the request.
|
|
1212
|
+
:type _content_type: str, Optional
|
|
1213
|
+
:param _headers: set to override the headers for a single
|
|
1214
|
+
request; this effectively ignores the headers
|
|
1215
|
+
in the spec for a single request.
|
|
1216
|
+
:type _headers: dict, optional
|
|
1217
|
+
:param _host_index: set to override the host_index for a single
|
|
1218
|
+
request; this effectively ignores the host_index
|
|
1219
|
+
in the spec for a single request.
|
|
1220
|
+
:type _host_index: int, optional
|
|
1221
|
+
:return: Returns the result object.
|
|
1222
|
+
""" # noqa: E501
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
_param = self._delete_quote_serialize(
|
|
1226
|
+
quote_id=quote_id,
|
|
1227
|
+
_request_auth=None,
|
|
1228
|
+
_content_type=None,
|
|
1229
|
+
_headers=None,
|
|
1230
|
+
_host_index=0
|
|
1231
|
+
)
|
|
1232
|
+
|
|
1233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1234
|
+
'204': None,
|
|
1235
|
+
'401': "ErrorResponse",
|
|
1236
|
+
'404': "ErrorResponse",
|
|
1237
|
+
'500': "ErrorResponse",
|
|
1238
|
+
}
|
|
1239
|
+
response_data = await self.api_client.call_api(
|
|
1240
|
+
*_param,
|
|
1241
|
+
_request_timeout=None,
|
|
1242
|
+
)
|
|
1243
|
+
await response_data.read()
|
|
1244
|
+
return self.api_client.response_deserialize(
|
|
1245
|
+
response_data=response_data,
|
|
1246
|
+
response_types_map=_response_types_map,
|
|
1247
|
+
).data
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
@validate_call
|
|
1251
|
+
async def delete_quote_with_http_info(
|
|
1252
|
+
self,
|
|
1253
|
+
quote_id: Annotated[StrictStr, Field(description="Quote ID")],
|
|
1254
|
+
_request_timeout: Union[
|
|
1255
|
+
None,
|
|
1256
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1257
|
+
Tuple[
|
|
1258
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1259
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1260
|
+
]
|
|
1261
|
+
] = None,
|
|
1262
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1263
|
+
_content_type: Optional[StrictStr] = None,
|
|
1264
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1265
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1266
|
+
) -> ApiResponse[None]:
|
|
1267
|
+
"""Delete Quote
|
|
1268
|
+
|
|
1269
|
+
Endpoint for deleting a quote, which means it can no longer be accepted.
|
|
1270
|
+
|
|
1271
|
+
:param quote_id: Quote ID (required)
|
|
1272
|
+
:type quote_id: str
|
|
1273
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1274
|
+
number provided, it will be total request
|
|
1275
|
+
timeout. It can also be a pair (tuple) of
|
|
1276
|
+
(connection, read) timeouts.
|
|
1277
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1278
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1279
|
+
request; this effectively ignores the
|
|
1280
|
+
authentication in the spec for a single request.
|
|
1281
|
+
:type _request_auth: dict, optional
|
|
1282
|
+
:param _content_type: force content-type for the request.
|
|
1283
|
+
:type _content_type: str, Optional
|
|
1284
|
+
:param _headers: set to override the headers for a single
|
|
1285
|
+
request; this effectively ignores the headers
|
|
1286
|
+
in the spec for a single request.
|
|
1287
|
+
:type _headers: dict, optional
|
|
1288
|
+
:param _host_index: set to override the host_index for a single
|
|
1289
|
+
request; this effectively ignores the host_index
|
|
1290
|
+
in the spec for a single request.
|
|
1291
|
+
:type _host_index: int, optional
|
|
1292
|
+
:return: Returns the result object.
|
|
1293
|
+
""" # noqa: E501
|
|
1294
|
+
|
|
1295
|
+
_param = self._delete_quote_serialize(
|
|
1296
|
+
quote_id=quote_id,
|
|
1297
|
+
_request_auth=_request_auth,
|
|
1298
|
+
_content_type=_content_type,
|
|
1299
|
+
_headers=_headers,
|
|
1300
|
+
_host_index=_host_index
|
|
1301
|
+
)
|
|
1302
|
+
|
|
1303
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1304
|
+
'204': None,
|
|
1305
|
+
'401': "ErrorResponse",
|
|
1306
|
+
'404': "ErrorResponse",
|
|
1307
|
+
'500': "ErrorResponse",
|
|
1308
|
+
}
|
|
1309
|
+
response_data = await self.api_client.call_api(
|
|
1310
|
+
*_param,
|
|
1311
|
+
_request_timeout=_request_timeout
|
|
1312
|
+
)
|
|
1313
|
+
await response_data.read()
|
|
1314
|
+
return self.api_client.response_deserialize(
|
|
1315
|
+
response_data=response_data,
|
|
1316
|
+
response_types_map=_response_types_map,
|
|
1317
|
+
)
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
@validate_call
|
|
1321
|
+
async def delete_quote_without_preload_content(
|
|
1322
|
+
self,
|
|
1323
|
+
quote_id: Annotated[StrictStr, Field(description="Quote ID")],
|
|
1324
|
+
_request_timeout: Union[
|
|
1325
|
+
None,
|
|
1326
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1327
|
+
Tuple[
|
|
1328
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1329
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1330
|
+
]
|
|
1331
|
+
] = None,
|
|
1332
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1333
|
+
_content_type: Optional[StrictStr] = None,
|
|
1334
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1335
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1336
|
+
) -> RESTResponseType:
|
|
1337
|
+
"""Delete Quote
|
|
1338
|
+
|
|
1339
|
+
Endpoint for deleting a quote, which means it can no longer be accepted.
|
|
1340
|
+
|
|
1341
|
+
:param quote_id: Quote ID (required)
|
|
1342
|
+
:type quote_id: str
|
|
1343
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1344
|
+
number provided, it will be total request
|
|
1345
|
+
timeout. It can also be a pair (tuple) of
|
|
1346
|
+
(connection, read) timeouts.
|
|
1347
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1348
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1349
|
+
request; this effectively ignores the
|
|
1350
|
+
authentication in the spec for a single request.
|
|
1351
|
+
:type _request_auth: dict, optional
|
|
1352
|
+
:param _content_type: force content-type for the request.
|
|
1353
|
+
:type _content_type: str, Optional
|
|
1354
|
+
:param _headers: set to override the headers for a single
|
|
1355
|
+
request; this effectively ignores the headers
|
|
1356
|
+
in the spec for a single request.
|
|
1357
|
+
:type _headers: dict, optional
|
|
1358
|
+
:param _host_index: set to override the host_index for a single
|
|
1359
|
+
request; this effectively ignores the host_index
|
|
1360
|
+
in the spec for a single request.
|
|
1361
|
+
:type _host_index: int, optional
|
|
1362
|
+
:return: Returns the result object.
|
|
1363
|
+
""" # noqa: E501
|
|
1364
|
+
|
|
1365
|
+
_param = self._delete_quote_serialize(
|
|
1366
|
+
quote_id=quote_id,
|
|
1367
|
+
_request_auth=_request_auth,
|
|
1368
|
+
_content_type=_content_type,
|
|
1369
|
+
_headers=_headers,
|
|
1370
|
+
_host_index=_host_index
|
|
1371
|
+
)
|
|
1372
|
+
|
|
1373
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1374
|
+
'204': None,
|
|
1375
|
+
'401': "ErrorResponse",
|
|
1376
|
+
'404': "ErrorResponse",
|
|
1377
|
+
'500': "ErrorResponse",
|
|
1378
|
+
}
|
|
1379
|
+
response_data = await self.api_client.call_api(
|
|
1380
|
+
*_param,
|
|
1381
|
+
_request_timeout=_request_timeout
|
|
1382
|
+
)
|
|
1383
|
+
return response_data.response
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
def _delete_quote_serialize(
|
|
1387
|
+
self,
|
|
1388
|
+
quote_id,
|
|
1389
|
+
_request_auth,
|
|
1390
|
+
_content_type,
|
|
1391
|
+
_headers,
|
|
1392
|
+
_host_index,
|
|
1393
|
+
) -> RequestSerialized:
|
|
1394
|
+
|
|
1395
|
+
_host = None
|
|
1396
|
+
|
|
1397
|
+
_collection_formats: Dict[str, str] = {
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
_path_params: Dict[str, str] = {}
|
|
1401
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1402
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1403
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1404
|
+
_files: Dict[
|
|
1405
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1406
|
+
] = {}
|
|
1407
|
+
_body_params: Optional[bytes] = None
|
|
1408
|
+
|
|
1409
|
+
# process the path parameters
|
|
1410
|
+
if quote_id is not None:
|
|
1411
|
+
_path_params['quote_id'] = quote_id
|
|
1412
|
+
# process the query parameters
|
|
1413
|
+
# process the header parameters
|
|
1414
|
+
# process the form parameters
|
|
1415
|
+
# process the body parameter
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
# set the HTTP header `Accept`
|
|
1419
|
+
if 'Accept' not in _header_params:
|
|
1420
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1421
|
+
[
|
|
1422
|
+
'application/json'
|
|
1423
|
+
]
|
|
1424
|
+
)
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
# authentication setting
|
|
1428
|
+
_auth_settings: List[str] = [
|
|
1429
|
+
'kalshiAccessSignature',
|
|
1430
|
+
'kalshiAccessKey',
|
|
1431
|
+
'kalshiAccessTimestamp'
|
|
1432
|
+
]
|
|
1433
|
+
|
|
1434
|
+
return self.api_client.param_serialize(
|
|
1435
|
+
method='DELETE',
|
|
1436
|
+
resource_path='/communications/quotes/{quote_id}',
|
|
1437
|
+
path_params=_path_params,
|
|
1438
|
+
query_params=_query_params,
|
|
1439
|
+
header_params=_header_params,
|
|
1440
|
+
body=_body_params,
|
|
1441
|
+
post_params=_form_params,
|
|
1442
|
+
files=_files,
|
|
1443
|
+
auth_settings=_auth_settings,
|
|
1444
|
+
collection_formats=_collection_formats,
|
|
1445
|
+
_host=_host,
|
|
1446
|
+
_request_auth=_request_auth
|
|
1447
|
+
)
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
@validate_call
|
|
1453
|
+
async def delete_rfq(
|
|
1454
|
+
self,
|
|
1455
|
+
rfq_id: StrictStr,
|
|
1456
|
+
) -> None:
|
|
1457
|
+
"""Delete RFQ
|
|
1458
|
+
|
|
1459
|
+
Endpoint for deleting an RFQ by ID
|
|
1460
|
+
|
|
1461
|
+
:param rfq_id: RFQ ID (required)
|
|
1462
|
+
:type rfq_id: str
|
|
1463
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1464
|
+
number provided, it will be total request
|
|
1465
|
+
timeout. It can also be a pair (tuple) of
|
|
1466
|
+
(connection, read) timeouts.
|
|
1467
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1468
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1469
|
+
request; this effectively ignores the
|
|
1470
|
+
authentication in the spec for a single request.
|
|
1471
|
+
:type _request_auth: dict, optional
|
|
1472
|
+
:param _content_type: force content-type for the request.
|
|
1473
|
+
:type _content_type: str, Optional
|
|
1474
|
+
:param _headers: set to override the headers for a single
|
|
1475
|
+
request; this effectively ignores the headers
|
|
1476
|
+
in the spec for a single request.
|
|
1477
|
+
:type _headers: dict, optional
|
|
1478
|
+
:param _host_index: set to override the host_index for a single
|
|
1479
|
+
request; this effectively ignores the host_index
|
|
1480
|
+
in the spec for a single request.
|
|
1481
|
+
:type _host_index: int, optional
|
|
1482
|
+
:return: Returns the result object.
|
|
1483
|
+
""" # noqa: E501
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
_param = self._delete_rfq_serialize(
|
|
1487
|
+
rfq_id=rfq_id,
|
|
1488
|
+
_request_auth=None,
|
|
1489
|
+
_content_type=None,
|
|
1490
|
+
_headers=None,
|
|
1491
|
+
_host_index=0
|
|
1492
|
+
)
|
|
1493
|
+
|
|
1494
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1495
|
+
'204': None,
|
|
1496
|
+
'401': "ErrorResponse",
|
|
1497
|
+
'404': "ErrorResponse",
|
|
1498
|
+
'500': "ErrorResponse",
|
|
1499
|
+
}
|
|
1500
|
+
response_data = await self.api_client.call_api(
|
|
1501
|
+
*_param,
|
|
1502
|
+
_request_timeout=None,
|
|
1503
|
+
)
|
|
1504
|
+
await response_data.read()
|
|
1505
|
+
return self.api_client.response_deserialize(
|
|
1506
|
+
response_data=response_data,
|
|
1507
|
+
response_types_map=_response_types_map,
|
|
1508
|
+
).data
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
@validate_call
|
|
1512
|
+
async def delete_rfq_with_http_info(
|
|
1513
|
+
self,
|
|
1514
|
+
rfq_id: Annotated[StrictStr, Field(description="RFQ ID")],
|
|
1515
|
+
_request_timeout: Union[
|
|
1516
|
+
None,
|
|
1517
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1518
|
+
Tuple[
|
|
1519
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1520
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1521
|
+
]
|
|
1522
|
+
] = None,
|
|
1523
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1524
|
+
_content_type: Optional[StrictStr] = None,
|
|
1525
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1526
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1527
|
+
) -> ApiResponse[None]:
|
|
1528
|
+
"""Delete RFQ
|
|
1529
|
+
|
|
1530
|
+
Endpoint for deleting an RFQ by ID
|
|
1531
|
+
|
|
1532
|
+
:param rfq_id: RFQ ID (required)
|
|
1533
|
+
:type rfq_id: str
|
|
1534
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1535
|
+
number provided, it will be total request
|
|
1536
|
+
timeout. It can also be a pair (tuple) of
|
|
1537
|
+
(connection, read) timeouts.
|
|
1538
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1539
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1540
|
+
request; this effectively ignores the
|
|
1541
|
+
authentication in the spec for a single request.
|
|
1542
|
+
:type _request_auth: dict, optional
|
|
1543
|
+
:param _content_type: force content-type for the request.
|
|
1544
|
+
:type _content_type: str, Optional
|
|
1545
|
+
:param _headers: set to override the headers for a single
|
|
1546
|
+
request; this effectively ignores the headers
|
|
1547
|
+
in the spec for a single request.
|
|
1548
|
+
:type _headers: dict, optional
|
|
1549
|
+
:param _host_index: set to override the host_index for a single
|
|
1550
|
+
request; this effectively ignores the host_index
|
|
1551
|
+
in the spec for a single request.
|
|
1552
|
+
:type _host_index: int, optional
|
|
1553
|
+
:return: Returns the result object.
|
|
1554
|
+
""" # noqa: E501
|
|
1555
|
+
|
|
1556
|
+
_param = self._delete_rfq_serialize(
|
|
1557
|
+
rfq_id=rfq_id,
|
|
1558
|
+
_request_auth=_request_auth,
|
|
1559
|
+
_content_type=_content_type,
|
|
1560
|
+
_headers=_headers,
|
|
1561
|
+
_host_index=_host_index
|
|
1562
|
+
)
|
|
1563
|
+
|
|
1564
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1565
|
+
'204': None,
|
|
1566
|
+
'401': "ErrorResponse",
|
|
1567
|
+
'404': "ErrorResponse",
|
|
1568
|
+
'500': "ErrorResponse",
|
|
1569
|
+
}
|
|
1570
|
+
response_data = await self.api_client.call_api(
|
|
1571
|
+
*_param,
|
|
1572
|
+
_request_timeout=_request_timeout
|
|
1573
|
+
)
|
|
1574
|
+
await response_data.read()
|
|
1575
|
+
return self.api_client.response_deserialize(
|
|
1576
|
+
response_data=response_data,
|
|
1577
|
+
response_types_map=_response_types_map,
|
|
1578
|
+
)
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
@validate_call
|
|
1582
|
+
async def delete_rfq_without_preload_content(
|
|
1583
|
+
self,
|
|
1584
|
+
rfq_id: Annotated[StrictStr, Field(description="RFQ ID")],
|
|
1585
|
+
_request_timeout: Union[
|
|
1586
|
+
None,
|
|
1587
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1588
|
+
Tuple[
|
|
1589
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1590
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1591
|
+
]
|
|
1592
|
+
] = None,
|
|
1593
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1594
|
+
_content_type: Optional[StrictStr] = None,
|
|
1595
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1596
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1597
|
+
) -> RESTResponseType:
|
|
1598
|
+
"""Delete RFQ
|
|
1599
|
+
|
|
1600
|
+
Endpoint for deleting an RFQ by ID
|
|
1601
|
+
|
|
1602
|
+
:param rfq_id: RFQ ID (required)
|
|
1603
|
+
:type rfq_id: str
|
|
1604
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1605
|
+
number provided, it will be total request
|
|
1606
|
+
timeout. It can also be a pair (tuple) of
|
|
1607
|
+
(connection, read) timeouts.
|
|
1608
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1609
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1610
|
+
request; this effectively ignores the
|
|
1611
|
+
authentication in the spec for a single request.
|
|
1612
|
+
:type _request_auth: dict, optional
|
|
1613
|
+
:param _content_type: force content-type for the request.
|
|
1614
|
+
:type _content_type: str, Optional
|
|
1615
|
+
:param _headers: set to override the headers for a single
|
|
1616
|
+
request; this effectively ignores the headers
|
|
1617
|
+
in the spec for a single request.
|
|
1618
|
+
:type _headers: dict, optional
|
|
1619
|
+
:param _host_index: set to override the host_index for a single
|
|
1620
|
+
request; this effectively ignores the host_index
|
|
1621
|
+
in the spec for a single request.
|
|
1622
|
+
:type _host_index: int, optional
|
|
1623
|
+
:return: Returns the result object.
|
|
1624
|
+
""" # noqa: E501
|
|
1625
|
+
|
|
1626
|
+
_param = self._delete_rfq_serialize(
|
|
1627
|
+
rfq_id=rfq_id,
|
|
1628
|
+
_request_auth=_request_auth,
|
|
1629
|
+
_content_type=_content_type,
|
|
1630
|
+
_headers=_headers,
|
|
1631
|
+
_host_index=_host_index
|
|
1632
|
+
)
|
|
1633
|
+
|
|
1634
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1635
|
+
'204': None,
|
|
1636
|
+
'401': "ErrorResponse",
|
|
1637
|
+
'404': "ErrorResponse",
|
|
1638
|
+
'500': "ErrorResponse",
|
|
1639
|
+
}
|
|
1640
|
+
response_data = await self.api_client.call_api(
|
|
1641
|
+
*_param,
|
|
1642
|
+
_request_timeout=_request_timeout
|
|
1643
|
+
)
|
|
1644
|
+
return response_data.response
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
def _delete_rfq_serialize(
|
|
1648
|
+
self,
|
|
1649
|
+
rfq_id,
|
|
1650
|
+
_request_auth,
|
|
1651
|
+
_content_type,
|
|
1652
|
+
_headers,
|
|
1653
|
+
_host_index,
|
|
1654
|
+
) -> RequestSerialized:
|
|
1655
|
+
|
|
1656
|
+
_host = None
|
|
1657
|
+
|
|
1658
|
+
_collection_formats: Dict[str, str] = {
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
_path_params: Dict[str, str] = {}
|
|
1662
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1663
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1664
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1665
|
+
_files: Dict[
|
|
1666
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1667
|
+
] = {}
|
|
1668
|
+
_body_params: Optional[bytes] = None
|
|
1669
|
+
|
|
1670
|
+
# process the path parameters
|
|
1671
|
+
if rfq_id is not None:
|
|
1672
|
+
_path_params['rfq_id'] = rfq_id
|
|
1673
|
+
# process the query parameters
|
|
1674
|
+
# process the header parameters
|
|
1675
|
+
# process the form parameters
|
|
1676
|
+
# process the body parameter
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
# set the HTTP header `Accept`
|
|
1680
|
+
if 'Accept' not in _header_params:
|
|
1681
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1682
|
+
[
|
|
1683
|
+
'application/json'
|
|
1684
|
+
]
|
|
1685
|
+
)
|
|
1686
|
+
|
|
1687
|
+
|
|
1688
|
+
# authentication setting
|
|
1689
|
+
_auth_settings: List[str] = [
|
|
1690
|
+
'kalshiAccessSignature',
|
|
1691
|
+
'kalshiAccessKey',
|
|
1692
|
+
'kalshiAccessTimestamp'
|
|
1693
|
+
]
|
|
1694
|
+
|
|
1695
|
+
return self.api_client.param_serialize(
|
|
1696
|
+
method='DELETE',
|
|
1697
|
+
resource_path='/communications/rfqs/{rfq_id}',
|
|
1698
|
+
path_params=_path_params,
|
|
1699
|
+
query_params=_query_params,
|
|
1700
|
+
header_params=_header_params,
|
|
1701
|
+
body=_body_params,
|
|
1702
|
+
post_params=_form_params,
|
|
1703
|
+
files=_files,
|
|
1704
|
+
auth_settings=_auth_settings,
|
|
1705
|
+
collection_formats=_collection_formats,
|
|
1706
|
+
_host=_host,
|
|
1707
|
+
_request_auth=_request_auth
|
|
1708
|
+
)
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
@validate_call
|
|
1714
|
+
async def get_communications_id(
|
|
1715
|
+
self,
|
|
1716
|
+
) -> GetCommunicationsIDResponse:
|
|
1717
|
+
"""Get Communications ID
|
|
1718
|
+
|
|
1719
|
+
Endpoint for getting the communications ID of the logged-in user.
|
|
1720
|
+
|
|
1721
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1722
|
+
number provided, it will be total request
|
|
1723
|
+
timeout. It can also be a pair (tuple) of
|
|
1724
|
+
(connection, read) timeouts.
|
|
1725
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1726
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1727
|
+
request; this effectively ignores the
|
|
1728
|
+
authentication in the spec for a single request.
|
|
1729
|
+
:type _request_auth: dict, optional
|
|
1730
|
+
:param _content_type: force content-type for the request.
|
|
1731
|
+
:type _content_type: str, Optional
|
|
1732
|
+
:param _headers: set to override the headers for a single
|
|
1733
|
+
request; this effectively ignores the headers
|
|
1734
|
+
in the spec for a single request.
|
|
1735
|
+
:type _headers: dict, optional
|
|
1736
|
+
:param _host_index: set to override the host_index for a single
|
|
1737
|
+
request; this effectively ignores the host_index
|
|
1738
|
+
in the spec for a single request.
|
|
1739
|
+
:type _host_index: int, optional
|
|
1740
|
+
:return: Returns the result object.
|
|
1741
|
+
""" # noqa: E501
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
_param = self._get_communications_id_serialize(
|
|
1745
|
+
_request_auth=None,
|
|
1746
|
+
_content_type=None,
|
|
1747
|
+
_headers=None,
|
|
1748
|
+
_host_index=0
|
|
1749
|
+
)
|
|
1750
|
+
|
|
1751
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1752
|
+
'200': "GetCommunicationsIDResponse",
|
|
1753
|
+
'401': "ErrorResponse",
|
|
1754
|
+
'500': "ErrorResponse",
|
|
1755
|
+
}
|
|
1756
|
+
response_data = await self.api_client.call_api(
|
|
1757
|
+
*_param,
|
|
1758
|
+
_request_timeout=None,
|
|
1759
|
+
)
|
|
1760
|
+
await response_data.read()
|
|
1761
|
+
return self.api_client.response_deserialize(
|
|
1762
|
+
response_data=response_data,
|
|
1763
|
+
response_types_map=_response_types_map,
|
|
1764
|
+
).data
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
@validate_call
|
|
1768
|
+
async def get_communications_id_with_http_info(
|
|
1769
|
+
self,
|
|
1770
|
+
_request_timeout: Union[
|
|
1771
|
+
None,
|
|
1772
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1773
|
+
Tuple[
|
|
1774
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1775
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1776
|
+
]
|
|
1777
|
+
] = None,
|
|
1778
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1779
|
+
_content_type: Optional[StrictStr] = None,
|
|
1780
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1781
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1782
|
+
) -> ApiResponse[GetCommunicationsIDResponse]:
|
|
1783
|
+
"""Get Communications ID
|
|
1784
|
+
|
|
1785
|
+
Endpoint for getting the communications ID of the logged-in user.
|
|
1786
|
+
|
|
1787
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1788
|
+
number provided, it will be total request
|
|
1789
|
+
timeout. It can also be a pair (tuple) of
|
|
1790
|
+
(connection, read) timeouts.
|
|
1791
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1792
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1793
|
+
request; this effectively ignores the
|
|
1794
|
+
authentication in the spec for a single request.
|
|
1795
|
+
:type _request_auth: dict, optional
|
|
1796
|
+
:param _content_type: force content-type for the request.
|
|
1797
|
+
:type _content_type: str, Optional
|
|
1798
|
+
:param _headers: set to override the headers for a single
|
|
1799
|
+
request; this effectively ignores the headers
|
|
1800
|
+
in the spec for a single request.
|
|
1801
|
+
:type _headers: dict, optional
|
|
1802
|
+
:param _host_index: set to override the host_index for a single
|
|
1803
|
+
request; this effectively ignores the host_index
|
|
1804
|
+
in the spec for a single request.
|
|
1805
|
+
:type _host_index: int, optional
|
|
1806
|
+
:return: Returns the result object.
|
|
1807
|
+
""" # noqa: E501
|
|
1808
|
+
|
|
1809
|
+
_param = self._get_communications_id_serialize(
|
|
1810
|
+
_request_auth=_request_auth,
|
|
1811
|
+
_content_type=_content_type,
|
|
1812
|
+
_headers=_headers,
|
|
1813
|
+
_host_index=_host_index
|
|
1814
|
+
)
|
|
1815
|
+
|
|
1816
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1817
|
+
'200': "GetCommunicationsIDResponse",
|
|
1818
|
+
'401': "ErrorResponse",
|
|
1819
|
+
'500': "ErrorResponse",
|
|
1820
|
+
}
|
|
1821
|
+
response_data = await self.api_client.call_api(
|
|
1822
|
+
*_param,
|
|
1823
|
+
_request_timeout=_request_timeout
|
|
1824
|
+
)
|
|
1825
|
+
await response_data.read()
|
|
1826
|
+
return self.api_client.response_deserialize(
|
|
1827
|
+
response_data=response_data,
|
|
1828
|
+
response_types_map=_response_types_map,
|
|
1829
|
+
)
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
@validate_call
|
|
1833
|
+
async def get_communications_id_without_preload_content(
|
|
1834
|
+
self,
|
|
1835
|
+
_request_timeout: Union[
|
|
1836
|
+
None,
|
|
1837
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1838
|
+
Tuple[
|
|
1839
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1840
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1841
|
+
]
|
|
1842
|
+
] = None,
|
|
1843
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1844
|
+
_content_type: Optional[StrictStr] = None,
|
|
1845
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1846
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1847
|
+
) -> RESTResponseType:
|
|
1848
|
+
"""Get Communications ID
|
|
1849
|
+
|
|
1850
|
+
Endpoint for getting the communications ID of the logged-in user.
|
|
1851
|
+
|
|
1852
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1853
|
+
number provided, it will be total request
|
|
1854
|
+
timeout. It can also be a pair (tuple) of
|
|
1855
|
+
(connection, read) timeouts.
|
|
1856
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1857
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1858
|
+
request; this effectively ignores the
|
|
1859
|
+
authentication in the spec for a single request.
|
|
1860
|
+
:type _request_auth: dict, optional
|
|
1861
|
+
:param _content_type: force content-type for the request.
|
|
1862
|
+
:type _content_type: str, Optional
|
|
1863
|
+
:param _headers: set to override the headers for a single
|
|
1864
|
+
request; this effectively ignores the headers
|
|
1865
|
+
in the spec for a single request.
|
|
1866
|
+
:type _headers: dict, optional
|
|
1867
|
+
:param _host_index: set to override the host_index for a single
|
|
1868
|
+
request; this effectively ignores the host_index
|
|
1869
|
+
in the spec for a single request.
|
|
1870
|
+
:type _host_index: int, optional
|
|
1871
|
+
:return: Returns the result object.
|
|
1872
|
+
""" # noqa: E501
|
|
1873
|
+
|
|
1874
|
+
_param = self._get_communications_id_serialize(
|
|
1875
|
+
_request_auth=_request_auth,
|
|
1876
|
+
_content_type=_content_type,
|
|
1877
|
+
_headers=_headers,
|
|
1878
|
+
_host_index=_host_index
|
|
1879
|
+
)
|
|
1880
|
+
|
|
1881
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1882
|
+
'200': "GetCommunicationsIDResponse",
|
|
1883
|
+
'401': "ErrorResponse",
|
|
1884
|
+
'500': "ErrorResponse",
|
|
1885
|
+
}
|
|
1886
|
+
response_data = await self.api_client.call_api(
|
|
1887
|
+
*_param,
|
|
1888
|
+
_request_timeout=_request_timeout
|
|
1889
|
+
)
|
|
1890
|
+
return response_data.response
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
def _get_communications_id_serialize(
|
|
1894
|
+
self,
|
|
1895
|
+
_request_auth,
|
|
1896
|
+
_content_type,
|
|
1897
|
+
_headers,
|
|
1898
|
+
_host_index,
|
|
1899
|
+
) -> RequestSerialized:
|
|
1900
|
+
|
|
1901
|
+
_host = None
|
|
1902
|
+
|
|
1903
|
+
_collection_formats: Dict[str, str] = {
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
_path_params: Dict[str, str] = {}
|
|
1907
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1908
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1909
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1910
|
+
_files: Dict[
|
|
1911
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1912
|
+
] = {}
|
|
1913
|
+
_body_params: Optional[bytes] = None
|
|
1914
|
+
|
|
1915
|
+
# process the path parameters
|
|
1916
|
+
# process the query parameters
|
|
1917
|
+
# process the header parameters
|
|
1918
|
+
# process the form parameters
|
|
1919
|
+
# process the body parameter
|
|
1920
|
+
|
|
1921
|
+
|
|
1922
|
+
# set the HTTP header `Accept`
|
|
1923
|
+
if 'Accept' not in _header_params:
|
|
1924
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1925
|
+
[
|
|
1926
|
+
'application/json'
|
|
1927
|
+
]
|
|
1928
|
+
)
|
|
1929
|
+
|
|
1930
|
+
|
|
1931
|
+
# authentication setting
|
|
1932
|
+
_auth_settings: List[str] = [
|
|
1933
|
+
'kalshiAccessSignature',
|
|
1934
|
+
'kalshiAccessKey',
|
|
1935
|
+
'kalshiAccessTimestamp'
|
|
1936
|
+
]
|
|
1937
|
+
|
|
1938
|
+
return self.api_client.param_serialize(
|
|
1939
|
+
method='GET',
|
|
1940
|
+
resource_path='/communications/id',
|
|
1941
|
+
path_params=_path_params,
|
|
1942
|
+
query_params=_query_params,
|
|
1943
|
+
header_params=_header_params,
|
|
1944
|
+
body=_body_params,
|
|
1945
|
+
post_params=_form_params,
|
|
1946
|
+
files=_files,
|
|
1947
|
+
auth_settings=_auth_settings,
|
|
1948
|
+
collection_formats=_collection_formats,
|
|
1949
|
+
_host=_host,
|
|
1950
|
+
_request_auth=_request_auth
|
|
1951
|
+
)
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
@validate_call
|
|
1957
|
+
async def get_quote(
|
|
1958
|
+
self,
|
|
1959
|
+
quote_id: StrictStr,
|
|
1960
|
+
) -> GetQuoteResponse:
|
|
1961
|
+
"""Get Quote
|
|
1962
|
+
|
|
1963
|
+
Endpoint for getting a particular quote
|
|
1964
|
+
|
|
1965
|
+
:param quote_id: Quote ID (required)
|
|
1966
|
+
:type quote_id: str
|
|
1967
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1968
|
+
number provided, it will be total request
|
|
1969
|
+
timeout. It can also be a pair (tuple) of
|
|
1970
|
+
(connection, read) timeouts.
|
|
1971
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1972
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1973
|
+
request; this effectively ignores the
|
|
1974
|
+
authentication in the spec for a single request.
|
|
1975
|
+
:type _request_auth: dict, optional
|
|
1976
|
+
:param _content_type: force content-type for the request.
|
|
1977
|
+
:type _content_type: str, Optional
|
|
1978
|
+
:param _headers: set to override the headers for a single
|
|
1979
|
+
request; this effectively ignores the headers
|
|
1980
|
+
in the spec for a single request.
|
|
1981
|
+
:type _headers: dict, optional
|
|
1982
|
+
:param _host_index: set to override the host_index for a single
|
|
1983
|
+
request; this effectively ignores the host_index
|
|
1984
|
+
in the spec for a single request.
|
|
1985
|
+
:type _host_index: int, optional
|
|
1986
|
+
:return: Returns the result object.
|
|
1987
|
+
""" # noqa: E501
|
|
1988
|
+
|
|
1989
|
+
|
|
1990
|
+
_param = self._get_quote_serialize(
|
|
1991
|
+
quote_id=quote_id,
|
|
1992
|
+
_request_auth=None,
|
|
1993
|
+
_content_type=None,
|
|
1994
|
+
_headers=None,
|
|
1995
|
+
_host_index=0
|
|
1996
|
+
)
|
|
1997
|
+
|
|
1998
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1999
|
+
'200': "GetQuoteResponse",
|
|
2000
|
+
'401': "ErrorResponse",
|
|
2001
|
+
'404': "ErrorResponse",
|
|
2002
|
+
'500': "ErrorResponse",
|
|
2003
|
+
}
|
|
2004
|
+
response_data = await self.api_client.call_api(
|
|
2005
|
+
*_param,
|
|
2006
|
+
_request_timeout=None,
|
|
2007
|
+
)
|
|
2008
|
+
await response_data.read()
|
|
2009
|
+
return self.api_client.response_deserialize(
|
|
2010
|
+
response_data=response_data,
|
|
2011
|
+
response_types_map=_response_types_map,
|
|
2012
|
+
).data
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
@validate_call
|
|
2016
|
+
async def get_quote_with_http_info(
|
|
2017
|
+
self,
|
|
2018
|
+
quote_id: Annotated[StrictStr, Field(description="Quote ID")],
|
|
2019
|
+
_request_timeout: Union[
|
|
2020
|
+
None,
|
|
2021
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2022
|
+
Tuple[
|
|
2023
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2024
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2025
|
+
]
|
|
2026
|
+
] = None,
|
|
2027
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2028
|
+
_content_type: Optional[StrictStr] = None,
|
|
2029
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2030
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2031
|
+
) -> ApiResponse[GetQuoteResponse]:
|
|
2032
|
+
"""Get Quote
|
|
2033
|
+
|
|
2034
|
+
Endpoint for getting a particular quote
|
|
2035
|
+
|
|
2036
|
+
:param quote_id: Quote ID (required)
|
|
2037
|
+
:type quote_id: str
|
|
2038
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2039
|
+
number provided, it will be total request
|
|
2040
|
+
timeout. It can also be a pair (tuple) of
|
|
2041
|
+
(connection, read) timeouts.
|
|
2042
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2043
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2044
|
+
request; this effectively ignores the
|
|
2045
|
+
authentication in the spec for a single request.
|
|
2046
|
+
:type _request_auth: dict, optional
|
|
2047
|
+
:param _content_type: force content-type for the request.
|
|
2048
|
+
:type _content_type: str, Optional
|
|
2049
|
+
:param _headers: set to override the headers for a single
|
|
2050
|
+
request; this effectively ignores the headers
|
|
2051
|
+
in the spec for a single request.
|
|
2052
|
+
:type _headers: dict, optional
|
|
2053
|
+
:param _host_index: set to override the host_index for a single
|
|
2054
|
+
request; this effectively ignores the host_index
|
|
2055
|
+
in the spec for a single request.
|
|
2056
|
+
:type _host_index: int, optional
|
|
2057
|
+
:return: Returns the result object.
|
|
2058
|
+
""" # noqa: E501
|
|
2059
|
+
|
|
2060
|
+
_param = self._get_quote_serialize(
|
|
2061
|
+
quote_id=quote_id,
|
|
2062
|
+
_request_auth=_request_auth,
|
|
2063
|
+
_content_type=_content_type,
|
|
2064
|
+
_headers=_headers,
|
|
2065
|
+
_host_index=_host_index
|
|
2066
|
+
)
|
|
2067
|
+
|
|
2068
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2069
|
+
'200': "GetQuoteResponse",
|
|
2070
|
+
'401': "ErrorResponse",
|
|
2071
|
+
'404': "ErrorResponse",
|
|
2072
|
+
'500': "ErrorResponse",
|
|
2073
|
+
}
|
|
2074
|
+
response_data = await self.api_client.call_api(
|
|
2075
|
+
*_param,
|
|
2076
|
+
_request_timeout=_request_timeout
|
|
2077
|
+
)
|
|
2078
|
+
await response_data.read()
|
|
2079
|
+
return self.api_client.response_deserialize(
|
|
2080
|
+
response_data=response_data,
|
|
2081
|
+
response_types_map=_response_types_map,
|
|
2082
|
+
)
|
|
2083
|
+
|
|
2084
|
+
|
|
2085
|
+
@validate_call
|
|
2086
|
+
async def get_quote_without_preload_content(
|
|
2087
|
+
self,
|
|
2088
|
+
quote_id: Annotated[StrictStr, Field(description="Quote ID")],
|
|
2089
|
+
_request_timeout: Union[
|
|
2090
|
+
None,
|
|
2091
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2092
|
+
Tuple[
|
|
2093
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2094
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2095
|
+
]
|
|
2096
|
+
] = None,
|
|
2097
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2098
|
+
_content_type: Optional[StrictStr] = None,
|
|
2099
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2100
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2101
|
+
) -> RESTResponseType:
|
|
2102
|
+
"""Get Quote
|
|
2103
|
+
|
|
2104
|
+
Endpoint for getting a particular quote
|
|
2105
|
+
|
|
2106
|
+
:param quote_id: Quote ID (required)
|
|
2107
|
+
:type quote_id: str
|
|
2108
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2109
|
+
number provided, it will be total request
|
|
2110
|
+
timeout. It can also be a pair (tuple) of
|
|
2111
|
+
(connection, read) timeouts.
|
|
2112
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2113
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2114
|
+
request; this effectively ignores the
|
|
2115
|
+
authentication in the spec for a single request.
|
|
2116
|
+
:type _request_auth: dict, optional
|
|
2117
|
+
:param _content_type: force content-type for the request.
|
|
2118
|
+
:type _content_type: str, Optional
|
|
2119
|
+
:param _headers: set to override the headers for a single
|
|
2120
|
+
request; this effectively ignores the headers
|
|
2121
|
+
in the spec for a single request.
|
|
2122
|
+
:type _headers: dict, optional
|
|
2123
|
+
:param _host_index: set to override the host_index for a single
|
|
2124
|
+
request; this effectively ignores the host_index
|
|
2125
|
+
in the spec for a single request.
|
|
2126
|
+
:type _host_index: int, optional
|
|
2127
|
+
:return: Returns the result object.
|
|
2128
|
+
""" # noqa: E501
|
|
2129
|
+
|
|
2130
|
+
_param = self._get_quote_serialize(
|
|
2131
|
+
quote_id=quote_id,
|
|
2132
|
+
_request_auth=_request_auth,
|
|
2133
|
+
_content_type=_content_type,
|
|
2134
|
+
_headers=_headers,
|
|
2135
|
+
_host_index=_host_index
|
|
2136
|
+
)
|
|
2137
|
+
|
|
2138
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2139
|
+
'200': "GetQuoteResponse",
|
|
2140
|
+
'401': "ErrorResponse",
|
|
2141
|
+
'404': "ErrorResponse",
|
|
2142
|
+
'500': "ErrorResponse",
|
|
2143
|
+
}
|
|
2144
|
+
response_data = await self.api_client.call_api(
|
|
2145
|
+
*_param,
|
|
2146
|
+
_request_timeout=_request_timeout
|
|
2147
|
+
)
|
|
2148
|
+
return response_data.response
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
def _get_quote_serialize(
|
|
2152
|
+
self,
|
|
2153
|
+
quote_id,
|
|
2154
|
+
_request_auth,
|
|
2155
|
+
_content_type,
|
|
2156
|
+
_headers,
|
|
2157
|
+
_host_index,
|
|
2158
|
+
) -> RequestSerialized:
|
|
2159
|
+
|
|
2160
|
+
_host = None
|
|
2161
|
+
|
|
2162
|
+
_collection_formats: Dict[str, str] = {
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
_path_params: Dict[str, str] = {}
|
|
2166
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2167
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2168
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2169
|
+
_files: Dict[
|
|
2170
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2171
|
+
] = {}
|
|
2172
|
+
_body_params: Optional[bytes] = None
|
|
2173
|
+
|
|
2174
|
+
# process the path parameters
|
|
2175
|
+
if quote_id is not None:
|
|
2176
|
+
_path_params['quote_id'] = quote_id
|
|
2177
|
+
# process the query parameters
|
|
2178
|
+
# process the header parameters
|
|
2179
|
+
# process the form parameters
|
|
2180
|
+
# process the body parameter
|
|
2181
|
+
|
|
2182
|
+
|
|
2183
|
+
# set the HTTP header `Accept`
|
|
2184
|
+
if 'Accept' not in _header_params:
|
|
2185
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2186
|
+
[
|
|
2187
|
+
'application/json'
|
|
2188
|
+
]
|
|
2189
|
+
)
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
# authentication setting
|
|
2193
|
+
_auth_settings: List[str] = [
|
|
2194
|
+
'kalshiAccessSignature',
|
|
2195
|
+
'kalshiAccessKey',
|
|
2196
|
+
'kalshiAccessTimestamp'
|
|
2197
|
+
]
|
|
2198
|
+
|
|
2199
|
+
return self.api_client.param_serialize(
|
|
2200
|
+
method='GET',
|
|
2201
|
+
resource_path='/communications/quotes/{quote_id}',
|
|
2202
|
+
path_params=_path_params,
|
|
2203
|
+
query_params=_query_params,
|
|
2204
|
+
header_params=_header_params,
|
|
2205
|
+
body=_body_params,
|
|
2206
|
+
post_params=_form_params,
|
|
2207
|
+
files=_files,
|
|
2208
|
+
auth_settings=_auth_settings,
|
|
2209
|
+
collection_formats=_collection_formats,
|
|
2210
|
+
_host=_host,
|
|
2211
|
+
_request_auth=_request_auth
|
|
2212
|
+
)
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
@validate_call
|
|
2218
|
+
async def get_quotes(
|
|
2219
|
+
self,
|
|
2220
|
+
cursor: Any = None,
|
|
2221
|
+
event_ticker: Any = None,
|
|
2222
|
+
market_ticker: Any = None,
|
|
2223
|
+
limit: Any = None,
|
|
2224
|
+
status: Any = None,
|
|
2225
|
+
quote_creator_user_id: Any = None,
|
|
2226
|
+
rfq_creator_user_id: Any = None,
|
|
2227
|
+
rfq_creator_subtrader_id: Any = None,
|
|
2228
|
+
rfq_id: Any = None,
|
|
2229
|
+
) -> GetQuotesResponse:
|
|
2230
|
+
"""Get Quotes
|
|
2231
|
+
|
|
2232
|
+
Endpoint for getting quotes
|
|
2233
|
+
|
|
2234
|
+
:param cursor: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
|
|
2235
|
+
:type cursor: str
|
|
2236
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
2237
|
+
:type event_ticker: str
|
|
2238
|
+
:param market_ticker: Filter by market ticker
|
|
2239
|
+
:type market_ticker: str
|
|
2240
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 500.
|
|
2241
|
+
:type limit: int
|
|
2242
|
+
:param status: Filter quotes by status
|
|
2243
|
+
:type status: str
|
|
2244
|
+
:param quote_creator_user_id: Filter quotes by quote creator user ID
|
|
2245
|
+
:type quote_creator_user_id: str
|
|
2246
|
+
:param rfq_creator_user_id: Filter quotes by RFQ creator user ID
|
|
2247
|
+
:type rfq_creator_user_id: str
|
|
2248
|
+
:param rfq_creator_subtrader_id: Filter quotes by RFQ creator subtrader ID (FCM members only)
|
|
2249
|
+
:type rfq_creator_subtrader_id: str
|
|
2250
|
+
:param rfq_id: Filter quotes by RFQ ID
|
|
2251
|
+
:type rfq_id: str
|
|
2252
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2253
|
+
number provided, it will be total request
|
|
2254
|
+
timeout. It can also be a pair (tuple) of
|
|
2255
|
+
(connection, read) timeouts.
|
|
2256
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2257
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2258
|
+
request; this effectively ignores the
|
|
2259
|
+
authentication in the spec for a single request.
|
|
2260
|
+
:type _request_auth: dict, optional
|
|
2261
|
+
:param _content_type: force content-type for the request.
|
|
2262
|
+
:type _content_type: str, Optional
|
|
2263
|
+
:param _headers: set to override the headers for a single
|
|
2264
|
+
request; this effectively ignores the headers
|
|
2265
|
+
in the spec for a single request.
|
|
2266
|
+
:type _headers: dict, optional
|
|
2267
|
+
:param _host_index: set to override the host_index for a single
|
|
2268
|
+
request; this effectively ignores the host_index
|
|
2269
|
+
in the spec for a single request.
|
|
2270
|
+
:type _host_index: int, optional
|
|
2271
|
+
:return: Returns the result object.
|
|
2272
|
+
""" # noqa: E501
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
_param = self._get_quotes_serialize(
|
|
2276
|
+
cursor=cursor,
|
|
2277
|
+
event_ticker=event_ticker,
|
|
2278
|
+
market_ticker=market_ticker,
|
|
2279
|
+
limit=limit,
|
|
2280
|
+
status=status,
|
|
2281
|
+
quote_creator_user_id=quote_creator_user_id,
|
|
2282
|
+
rfq_creator_user_id=rfq_creator_user_id,
|
|
2283
|
+
rfq_creator_subtrader_id=rfq_creator_subtrader_id,
|
|
2284
|
+
rfq_id=rfq_id,
|
|
2285
|
+
_request_auth=None,
|
|
2286
|
+
_content_type=None,
|
|
2287
|
+
_headers=None,
|
|
2288
|
+
_host_index=0
|
|
2289
|
+
)
|
|
2290
|
+
|
|
2291
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2292
|
+
'200': "GetQuotesResponse",
|
|
2293
|
+
'401': "ErrorResponse",
|
|
2294
|
+
'500': "ErrorResponse",
|
|
2295
|
+
}
|
|
2296
|
+
response_data = await self.api_client.call_api(
|
|
2297
|
+
*_param,
|
|
2298
|
+
_request_timeout=None,
|
|
2299
|
+
)
|
|
2300
|
+
await response_data.read()
|
|
2301
|
+
return self.api_client.response_deserialize(
|
|
2302
|
+
response_data=response_data,
|
|
2303
|
+
response_types_map=_response_types_map,
|
|
2304
|
+
).data
|
|
2305
|
+
|
|
2306
|
+
|
|
2307
|
+
@validate_call
|
|
2308
|
+
async def get_quotes_with_http_info(
|
|
2309
|
+
self,
|
|
2310
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.")] = None,
|
|
2311
|
+
event_ticker: Annotated[Optional[StrictStr], Field(description="Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).")] = None,
|
|
2312
|
+
market_ticker: Annotated[Optional[StrictStr], Field(description="Filter by market ticker")] = None,
|
|
2313
|
+
limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 500.")] = None,
|
|
2314
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter quotes by status")] = None,
|
|
2315
|
+
quote_creator_user_id: Annotated[Optional[StrictStr], Field(description="Filter quotes by quote creator user ID")] = None,
|
|
2316
|
+
rfq_creator_user_id: Annotated[Optional[StrictStr], Field(description="Filter quotes by RFQ creator user ID")] = None,
|
|
2317
|
+
rfq_creator_subtrader_id: Annotated[Optional[StrictStr], Field(description="Filter quotes by RFQ creator subtrader ID (FCM members only)")] = None,
|
|
2318
|
+
rfq_id: Annotated[Optional[StrictStr], Field(description="Filter quotes by RFQ ID")] = None,
|
|
2319
|
+
_request_timeout: Union[
|
|
2320
|
+
None,
|
|
2321
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2322
|
+
Tuple[
|
|
2323
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2324
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2325
|
+
]
|
|
2326
|
+
] = None,
|
|
2327
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2328
|
+
_content_type: Optional[StrictStr] = None,
|
|
2329
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2330
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2331
|
+
) -> ApiResponse[GetQuotesResponse]:
|
|
2332
|
+
"""Get Quotes
|
|
2333
|
+
|
|
2334
|
+
Endpoint for getting quotes
|
|
2335
|
+
|
|
2336
|
+
:param cursor: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
|
|
2337
|
+
:type cursor: str
|
|
2338
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
2339
|
+
:type event_ticker: str
|
|
2340
|
+
:param market_ticker: Filter by market ticker
|
|
2341
|
+
:type market_ticker: str
|
|
2342
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 500.
|
|
2343
|
+
:type limit: int
|
|
2344
|
+
:param status: Filter quotes by status
|
|
2345
|
+
:type status: str
|
|
2346
|
+
:param quote_creator_user_id: Filter quotes by quote creator user ID
|
|
2347
|
+
:type quote_creator_user_id: str
|
|
2348
|
+
:param rfq_creator_user_id: Filter quotes by RFQ creator user ID
|
|
2349
|
+
:type rfq_creator_user_id: str
|
|
2350
|
+
:param rfq_creator_subtrader_id: Filter quotes by RFQ creator subtrader ID (FCM members only)
|
|
2351
|
+
:type rfq_creator_subtrader_id: str
|
|
2352
|
+
:param rfq_id: Filter quotes by RFQ ID
|
|
2353
|
+
:type rfq_id: str
|
|
2354
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2355
|
+
number provided, it will be total request
|
|
2356
|
+
timeout. It can also be a pair (tuple) of
|
|
2357
|
+
(connection, read) timeouts.
|
|
2358
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2359
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2360
|
+
request; this effectively ignores the
|
|
2361
|
+
authentication in the spec for a single request.
|
|
2362
|
+
:type _request_auth: dict, optional
|
|
2363
|
+
:param _content_type: force content-type for the request.
|
|
2364
|
+
:type _content_type: str, Optional
|
|
2365
|
+
:param _headers: set to override the headers for a single
|
|
2366
|
+
request; this effectively ignores the headers
|
|
2367
|
+
in the spec for a single request.
|
|
2368
|
+
:type _headers: dict, optional
|
|
2369
|
+
:param _host_index: set to override the host_index for a single
|
|
2370
|
+
request; this effectively ignores the host_index
|
|
2371
|
+
in the spec for a single request.
|
|
2372
|
+
:type _host_index: int, optional
|
|
2373
|
+
:return: Returns the result object.
|
|
2374
|
+
""" # noqa: E501
|
|
2375
|
+
|
|
2376
|
+
_param = self._get_quotes_serialize(
|
|
2377
|
+
cursor=cursor,
|
|
2378
|
+
event_ticker=event_ticker,
|
|
2379
|
+
market_ticker=market_ticker,
|
|
2380
|
+
limit=limit,
|
|
2381
|
+
status=status,
|
|
2382
|
+
quote_creator_user_id=quote_creator_user_id,
|
|
2383
|
+
rfq_creator_user_id=rfq_creator_user_id,
|
|
2384
|
+
rfq_creator_subtrader_id=rfq_creator_subtrader_id,
|
|
2385
|
+
rfq_id=rfq_id,
|
|
2386
|
+
_request_auth=_request_auth,
|
|
2387
|
+
_content_type=_content_type,
|
|
2388
|
+
_headers=_headers,
|
|
2389
|
+
_host_index=_host_index
|
|
2390
|
+
)
|
|
2391
|
+
|
|
2392
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2393
|
+
'200': "GetQuotesResponse",
|
|
2394
|
+
'401': "ErrorResponse",
|
|
2395
|
+
'500': "ErrorResponse",
|
|
2396
|
+
}
|
|
2397
|
+
response_data = await self.api_client.call_api(
|
|
2398
|
+
*_param,
|
|
2399
|
+
_request_timeout=_request_timeout
|
|
2400
|
+
)
|
|
2401
|
+
await response_data.read()
|
|
2402
|
+
return self.api_client.response_deserialize(
|
|
2403
|
+
response_data=response_data,
|
|
2404
|
+
response_types_map=_response_types_map,
|
|
2405
|
+
)
|
|
2406
|
+
|
|
2407
|
+
|
|
2408
|
+
@validate_call
|
|
2409
|
+
async def get_quotes_without_preload_content(
|
|
2410
|
+
self,
|
|
2411
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.")] = None,
|
|
2412
|
+
event_ticker: Annotated[Optional[StrictStr], Field(description="Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).")] = None,
|
|
2413
|
+
market_ticker: Annotated[Optional[StrictStr], Field(description="Filter by market ticker")] = None,
|
|
2414
|
+
limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 500.")] = None,
|
|
2415
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter quotes by status")] = None,
|
|
2416
|
+
quote_creator_user_id: Annotated[Optional[StrictStr], Field(description="Filter quotes by quote creator user ID")] = None,
|
|
2417
|
+
rfq_creator_user_id: Annotated[Optional[StrictStr], Field(description="Filter quotes by RFQ creator user ID")] = None,
|
|
2418
|
+
rfq_creator_subtrader_id: Annotated[Optional[StrictStr], Field(description="Filter quotes by RFQ creator subtrader ID (FCM members only)")] = None,
|
|
2419
|
+
rfq_id: Annotated[Optional[StrictStr], Field(description="Filter quotes by RFQ ID")] = None,
|
|
2420
|
+
_request_timeout: Union[
|
|
2421
|
+
None,
|
|
2422
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2423
|
+
Tuple[
|
|
2424
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2425
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2426
|
+
]
|
|
2427
|
+
] = None,
|
|
2428
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2429
|
+
_content_type: Optional[StrictStr] = None,
|
|
2430
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2431
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2432
|
+
) -> RESTResponseType:
|
|
2433
|
+
"""Get Quotes
|
|
2434
|
+
|
|
2435
|
+
Endpoint for getting quotes
|
|
2436
|
+
|
|
2437
|
+
:param cursor: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
|
|
2438
|
+
:type cursor: str
|
|
2439
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
2440
|
+
:type event_ticker: str
|
|
2441
|
+
:param market_ticker: Filter by market ticker
|
|
2442
|
+
:type market_ticker: str
|
|
2443
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 500.
|
|
2444
|
+
:type limit: int
|
|
2445
|
+
:param status: Filter quotes by status
|
|
2446
|
+
:type status: str
|
|
2447
|
+
:param quote_creator_user_id: Filter quotes by quote creator user ID
|
|
2448
|
+
:type quote_creator_user_id: str
|
|
2449
|
+
:param rfq_creator_user_id: Filter quotes by RFQ creator user ID
|
|
2450
|
+
:type rfq_creator_user_id: str
|
|
2451
|
+
:param rfq_creator_subtrader_id: Filter quotes by RFQ creator subtrader ID (FCM members only)
|
|
2452
|
+
:type rfq_creator_subtrader_id: str
|
|
2453
|
+
:param rfq_id: Filter quotes by RFQ ID
|
|
2454
|
+
:type rfq_id: str
|
|
2455
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2456
|
+
number provided, it will be total request
|
|
2457
|
+
timeout. It can also be a pair (tuple) of
|
|
2458
|
+
(connection, read) timeouts.
|
|
2459
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2460
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2461
|
+
request; this effectively ignores the
|
|
2462
|
+
authentication in the spec for a single request.
|
|
2463
|
+
:type _request_auth: dict, optional
|
|
2464
|
+
:param _content_type: force content-type for the request.
|
|
2465
|
+
:type _content_type: str, Optional
|
|
2466
|
+
:param _headers: set to override the headers for a single
|
|
2467
|
+
request; this effectively ignores the headers
|
|
2468
|
+
in the spec for a single request.
|
|
2469
|
+
:type _headers: dict, optional
|
|
2470
|
+
:param _host_index: set to override the host_index for a single
|
|
2471
|
+
request; this effectively ignores the host_index
|
|
2472
|
+
in the spec for a single request.
|
|
2473
|
+
:type _host_index: int, optional
|
|
2474
|
+
:return: Returns the result object.
|
|
2475
|
+
""" # noqa: E501
|
|
2476
|
+
|
|
2477
|
+
_param = self._get_quotes_serialize(
|
|
2478
|
+
cursor=cursor,
|
|
2479
|
+
event_ticker=event_ticker,
|
|
2480
|
+
market_ticker=market_ticker,
|
|
2481
|
+
limit=limit,
|
|
2482
|
+
status=status,
|
|
2483
|
+
quote_creator_user_id=quote_creator_user_id,
|
|
2484
|
+
rfq_creator_user_id=rfq_creator_user_id,
|
|
2485
|
+
rfq_creator_subtrader_id=rfq_creator_subtrader_id,
|
|
2486
|
+
rfq_id=rfq_id,
|
|
2487
|
+
_request_auth=_request_auth,
|
|
2488
|
+
_content_type=_content_type,
|
|
2489
|
+
_headers=_headers,
|
|
2490
|
+
_host_index=_host_index
|
|
2491
|
+
)
|
|
2492
|
+
|
|
2493
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2494
|
+
'200': "GetQuotesResponse",
|
|
2495
|
+
'401': "ErrorResponse",
|
|
2496
|
+
'500': "ErrorResponse",
|
|
2497
|
+
}
|
|
2498
|
+
response_data = await self.api_client.call_api(
|
|
2499
|
+
*_param,
|
|
2500
|
+
_request_timeout=_request_timeout
|
|
2501
|
+
)
|
|
2502
|
+
return response_data.response
|
|
2503
|
+
|
|
2504
|
+
|
|
2505
|
+
def _get_quotes_serialize(
|
|
2506
|
+
self,
|
|
2507
|
+
cursor,
|
|
2508
|
+
event_ticker,
|
|
2509
|
+
market_ticker,
|
|
2510
|
+
limit,
|
|
2511
|
+
status,
|
|
2512
|
+
quote_creator_user_id,
|
|
2513
|
+
rfq_creator_user_id,
|
|
2514
|
+
rfq_creator_subtrader_id,
|
|
2515
|
+
rfq_id,
|
|
2516
|
+
_request_auth,
|
|
2517
|
+
_content_type,
|
|
2518
|
+
_headers,
|
|
2519
|
+
_host_index,
|
|
2520
|
+
) -> RequestSerialized:
|
|
2521
|
+
|
|
2522
|
+
_host = None
|
|
2523
|
+
|
|
2524
|
+
_collection_formats: Dict[str, str] = {
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
_path_params: Dict[str, str] = {}
|
|
2528
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2529
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2530
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2531
|
+
_files: Dict[
|
|
2532
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2533
|
+
] = {}
|
|
2534
|
+
_body_params: Optional[bytes] = None
|
|
2535
|
+
|
|
2536
|
+
# process the path parameters
|
|
2537
|
+
# process the query parameters
|
|
2538
|
+
if cursor is not None:
|
|
2539
|
+
|
|
2540
|
+
_query_params.append(('cursor', cursor))
|
|
2541
|
+
|
|
2542
|
+
if event_ticker is not None:
|
|
2543
|
+
|
|
2544
|
+
_query_params.append(('event_ticker', event_ticker))
|
|
2545
|
+
|
|
2546
|
+
if market_ticker is not None:
|
|
2547
|
+
|
|
2548
|
+
_query_params.append(('market_ticker', market_ticker))
|
|
2549
|
+
|
|
2550
|
+
if limit is not None:
|
|
2551
|
+
|
|
2552
|
+
_query_params.append(('limit', limit))
|
|
2553
|
+
|
|
2554
|
+
if status is not None:
|
|
2555
|
+
|
|
2556
|
+
_query_params.append(('status', status))
|
|
2557
|
+
|
|
2558
|
+
if quote_creator_user_id is not None:
|
|
2559
|
+
|
|
2560
|
+
_query_params.append(('quote_creator_user_id', quote_creator_user_id))
|
|
2561
|
+
|
|
2562
|
+
if rfq_creator_user_id is not None:
|
|
2563
|
+
|
|
2564
|
+
_query_params.append(('rfq_creator_user_id', rfq_creator_user_id))
|
|
2565
|
+
|
|
2566
|
+
if rfq_creator_subtrader_id is not None:
|
|
2567
|
+
|
|
2568
|
+
_query_params.append(('rfq_creator_subtrader_id', rfq_creator_subtrader_id))
|
|
2569
|
+
|
|
2570
|
+
if rfq_id is not None:
|
|
2571
|
+
|
|
2572
|
+
_query_params.append(('rfq_id', rfq_id))
|
|
2573
|
+
|
|
2574
|
+
# process the header parameters
|
|
2575
|
+
# process the form parameters
|
|
2576
|
+
# process the body parameter
|
|
2577
|
+
|
|
2578
|
+
|
|
2579
|
+
# set the HTTP header `Accept`
|
|
2580
|
+
if 'Accept' not in _header_params:
|
|
2581
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2582
|
+
[
|
|
2583
|
+
'application/json'
|
|
2584
|
+
]
|
|
2585
|
+
)
|
|
2586
|
+
|
|
2587
|
+
|
|
2588
|
+
# authentication setting
|
|
2589
|
+
_auth_settings: List[str] = [
|
|
2590
|
+
'kalshiAccessSignature',
|
|
2591
|
+
'kalshiAccessKey',
|
|
2592
|
+
'kalshiAccessTimestamp'
|
|
2593
|
+
]
|
|
2594
|
+
|
|
2595
|
+
return self.api_client.param_serialize(
|
|
2596
|
+
method='GET',
|
|
2597
|
+
resource_path='/communications/quotes',
|
|
2598
|
+
path_params=_path_params,
|
|
2599
|
+
query_params=_query_params,
|
|
2600
|
+
header_params=_header_params,
|
|
2601
|
+
body=_body_params,
|
|
2602
|
+
post_params=_form_params,
|
|
2603
|
+
files=_files,
|
|
2604
|
+
auth_settings=_auth_settings,
|
|
2605
|
+
collection_formats=_collection_formats,
|
|
2606
|
+
_host=_host,
|
|
2607
|
+
_request_auth=_request_auth
|
|
2608
|
+
)
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
|
|
2613
|
+
@validate_call
|
|
2614
|
+
async def get_rfq(
|
|
2615
|
+
self,
|
|
2616
|
+
rfq_id: StrictStr,
|
|
2617
|
+
) -> GetRFQResponse:
|
|
2618
|
+
"""Get RFQ
|
|
2619
|
+
|
|
2620
|
+
Endpoint for getting a single RFQ by id
|
|
2621
|
+
|
|
2622
|
+
:param rfq_id: RFQ ID (required)
|
|
2623
|
+
:type rfq_id: str
|
|
2624
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2625
|
+
number provided, it will be total request
|
|
2626
|
+
timeout. It can also be a pair (tuple) of
|
|
2627
|
+
(connection, read) timeouts.
|
|
2628
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2629
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2630
|
+
request; this effectively ignores the
|
|
2631
|
+
authentication in the spec for a single request.
|
|
2632
|
+
:type _request_auth: dict, optional
|
|
2633
|
+
:param _content_type: force content-type for the request.
|
|
2634
|
+
:type _content_type: str, Optional
|
|
2635
|
+
:param _headers: set to override the headers for a single
|
|
2636
|
+
request; this effectively ignores the headers
|
|
2637
|
+
in the spec for a single request.
|
|
2638
|
+
:type _headers: dict, optional
|
|
2639
|
+
:param _host_index: set to override the host_index for a single
|
|
2640
|
+
request; this effectively ignores the host_index
|
|
2641
|
+
in the spec for a single request.
|
|
2642
|
+
:type _host_index: int, optional
|
|
2643
|
+
:return: Returns the result object.
|
|
2644
|
+
""" # noqa: E501
|
|
2645
|
+
|
|
2646
|
+
|
|
2647
|
+
_param = self._get_rfq_serialize(
|
|
2648
|
+
rfq_id=rfq_id,
|
|
2649
|
+
_request_auth=None,
|
|
2650
|
+
_content_type=None,
|
|
2651
|
+
_headers=None,
|
|
2652
|
+
_host_index=0
|
|
2653
|
+
)
|
|
2654
|
+
|
|
2655
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2656
|
+
'200': "GetRFQResponse",
|
|
2657
|
+
'401': "ErrorResponse",
|
|
2658
|
+
'404': "ErrorResponse",
|
|
2659
|
+
'500': "ErrorResponse",
|
|
2660
|
+
}
|
|
2661
|
+
response_data = await self.api_client.call_api(
|
|
2662
|
+
*_param,
|
|
2663
|
+
_request_timeout=None,
|
|
2664
|
+
)
|
|
2665
|
+
await response_data.read()
|
|
2666
|
+
return self.api_client.response_deserialize(
|
|
2667
|
+
response_data=response_data,
|
|
2668
|
+
response_types_map=_response_types_map,
|
|
2669
|
+
).data
|
|
2670
|
+
|
|
2671
|
+
|
|
2672
|
+
@validate_call
|
|
2673
|
+
async def get_rfq_with_http_info(
|
|
2674
|
+
self,
|
|
2675
|
+
rfq_id: Annotated[StrictStr, Field(description="RFQ ID")],
|
|
2676
|
+
_request_timeout: Union[
|
|
2677
|
+
None,
|
|
2678
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2679
|
+
Tuple[
|
|
2680
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2681
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2682
|
+
]
|
|
2683
|
+
] = None,
|
|
2684
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2685
|
+
_content_type: Optional[StrictStr] = None,
|
|
2686
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2687
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2688
|
+
) -> ApiResponse[GetRFQResponse]:
|
|
2689
|
+
"""Get RFQ
|
|
2690
|
+
|
|
2691
|
+
Endpoint for getting a single RFQ by id
|
|
2692
|
+
|
|
2693
|
+
:param rfq_id: RFQ ID (required)
|
|
2694
|
+
:type rfq_id: str
|
|
2695
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2696
|
+
number provided, it will be total request
|
|
2697
|
+
timeout. It can also be a pair (tuple) of
|
|
2698
|
+
(connection, read) timeouts.
|
|
2699
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2700
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2701
|
+
request; this effectively ignores the
|
|
2702
|
+
authentication in the spec for a single request.
|
|
2703
|
+
:type _request_auth: dict, optional
|
|
2704
|
+
:param _content_type: force content-type for the request.
|
|
2705
|
+
:type _content_type: str, Optional
|
|
2706
|
+
:param _headers: set to override the headers for a single
|
|
2707
|
+
request; this effectively ignores the headers
|
|
2708
|
+
in the spec for a single request.
|
|
2709
|
+
:type _headers: dict, optional
|
|
2710
|
+
:param _host_index: set to override the host_index for a single
|
|
2711
|
+
request; this effectively ignores the host_index
|
|
2712
|
+
in the spec for a single request.
|
|
2713
|
+
:type _host_index: int, optional
|
|
2714
|
+
:return: Returns the result object.
|
|
2715
|
+
""" # noqa: E501
|
|
2716
|
+
|
|
2717
|
+
_param = self._get_rfq_serialize(
|
|
2718
|
+
rfq_id=rfq_id,
|
|
2719
|
+
_request_auth=_request_auth,
|
|
2720
|
+
_content_type=_content_type,
|
|
2721
|
+
_headers=_headers,
|
|
2722
|
+
_host_index=_host_index
|
|
2723
|
+
)
|
|
2724
|
+
|
|
2725
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2726
|
+
'200': "GetRFQResponse",
|
|
2727
|
+
'401': "ErrorResponse",
|
|
2728
|
+
'404': "ErrorResponse",
|
|
2729
|
+
'500': "ErrorResponse",
|
|
2730
|
+
}
|
|
2731
|
+
response_data = await self.api_client.call_api(
|
|
2732
|
+
*_param,
|
|
2733
|
+
_request_timeout=_request_timeout
|
|
2734
|
+
)
|
|
2735
|
+
await response_data.read()
|
|
2736
|
+
return self.api_client.response_deserialize(
|
|
2737
|
+
response_data=response_data,
|
|
2738
|
+
response_types_map=_response_types_map,
|
|
2739
|
+
)
|
|
2740
|
+
|
|
2741
|
+
|
|
2742
|
+
@validate_call
|
|
2743
|
+
async def get_rfq_without_preload_content(
|
|
2744
|
+
self,
|
|
2745
|
+
rfq_id: Annotated[StrictStr, Field(description="RFQ ID")],
|
|
2746
|
+
_request_timeout: Union[
|
|
2747
|
+
None,
|
|
2748
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2749
|
+
Tuple[
|
|
2750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2751
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2752
|
+
]
|
|
2753
|
+
] = None,
|
|
2754
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2755
|
+
_content_type: Optional[StrictStr] = None,
|
|
2756
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2757
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2758
|
+
) -> RESTResponseType:
|
|
2759
|
+
"""Get RFQ
|
|
2760
|
+
|
|
2761
|
+
Endpoint for getting a single RFQ by id
|
|
2762
|
+
|
|
2763
|
+
:param rfq_id: RFQ ID (required)
|
|
2764
|
+
:type rfq_id: str
|
|
2765
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2766
|
+
number provided, it will be total request
|
|
2767
|
+
timeout. It can also be a pair (tuple) of
|
|
2768
|
+
(connection, read) timeouts.
|
|
2769
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2770
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2771
|
+
request; this effectively ignores the
|
|
2772
|
+
authentication in the spec for a single request.
|
|
2773
|
+
:type _request_auth: dict, optional
|
|
2774
|
+
:param _content_type: force content-type for the request.
|
|
2775
|
+
:type _content_type: str, Optional
|
|
2776
|
+
:param _headers: set to override the headers for a single
|
|
2777
|
+
request; this effectively ignores the headers
|
|
2778
|
+
in the spec for a single request.
|
|
2779
|
+
:type _headers: dict, optional
|
|
2780
|
+
:param _host_index: set to override the host_index for a single
|
|
2781
|
+
request; this effectively ignores the host_index
|
|
2782
|
+
in the spec for a single request.
|
|
2783
|
+
:type _host_index: int, optional
|
|
2784
|
+
:return: Returns the result object.
|
|
2785
|
+
""" # noqa: E501
|
|
2786
|
+
|
|
2787
|
+
_param = self._get_rfq_serialize(
|
|
2788
|
+
rfq_id=rfq_id,
|
|
2789
|
+
_request_auth=_request_auth,
|
|
2790
|
+
_content_type=_content_type,
|
|
2791
|
+
_headers=_headers,
|
|
2792
|
+
_host_index=_host_index
|
|
2793
|
+
)
|
|
2794
|
+
|
|
2795
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2796
|
+
'200': "GetRFQResponse",
|
|
2797
|
+
'401': "ErrorResponse",
|
|
2798
|
+
'404': "ErrorResponse",
|
|
2799
|
+
'500': "ErrorResponse",
|
|
2800
|
+
}
|
|
2801
|
+
response_data = await self.api_client.call_api(
|
|
2802
|
+
*_param,
|
|
2803
|
+
_request_timeout=_request_timeout
|
|
2804
|
+
)
|
|
2805
|
+
return response_data.response
|
|
2806
|
+
|
|
2807
|
+
|
|
2808
|
+
def _get_rfq_serialize(
|
|
2809
|
+
self,
|
|
2810
|
+
rfq_id,
|
|
2811
|
+
_request_auth,
|
|
2812
|
+
_content_type,
|
|
2813
|
+
_headers,
|
|
2814
|
+
_host_index,
|
|
2815
|
+
) -> RequestSerialized:
|
|
2816
|
+
|
|
2817
|
+
_host = None
|
|
2818
|
+
|
|
2819
|
+
_collection_formats: Dict[str, str] = {
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
_path_params: Dict[str, str] = {}
|
|
2823
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2824
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2825
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2826
|
+
_files: Dict[
|
|
2827
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2828
|
+
] = {}
|
|
2829
|
+
_body_params: Optional[bytes] = None
|
|
2830
|
+
|
|
2831
|
+
# process the path parameters
|
|
2832
|
+
if rfq_id is not None:
|
|
2833
|
+
_path_params['rfq_id'] = rfq_id
|
|
2834
|
+
# process the query parameters
|
|
2835
|
+
# process the header parameters
|
|
2836
|
+
# process the form parameters
|
|
2837
|
+
# process the body parameter
|
|
2838
|
+
|
|
2839
|
+
|
|
2840
|
+
# set the HTTP header `Accept`
|
|
2841
|
+
if 'Accept' not in _header_params:
|
|
2842
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2843
|
+
[
|
|
2844
|
+
'application/json'
|
|
2845
|
+
]
|
|
2846
|
+
)
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
# authentication setting
|
|
2850
|
+
_auth_settings: List[str] = [
|
|
2851
|
+
'kalshiAccessSignature',
|
|
2852
|
+
'kalshiAccessKey',
|
|
2853
|
+
'kalshiAccessTimestamp'
|
|
2854
|
+
]
|
|
2855
|
+
|
|
2856
|
+
return self.api_client.param_serialize(
|
|
2857
|
+
method='GET',
|
|
2858
|
+
resource_path='/communications/rfqs/{rfq_id}',
|
|
2859
|
+
path_params=_path_params,
|
|
2860
|
+
query_params=_query_params,
|
|
2861
|
+
header_params=_header_params,
|
|
2862
|
+
body=_body_params,
|
|
2863
|
+
post_params=_form_params,
|
|
2864
|
+
files=_files,
|
|
2865
|
+
auth_settings=_auth_settings,
|
|
2866
|
+
collection_formats=_collection_formats,
|
|
2867
|
+
_host=_host,
|
|
2868
|
+
_request_auth=_request_auth
|
|
2869
|
+
)
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
|
|
2873
|
+
|
|
2874
|
+
@validate_call
|
|
2875
|
+
async def get_rfqs(
|
|
2876
|
+
self,
|
|
2877
|
+
cursor: Any = None,
|
|
2878
|
+
event_ticker: Any = None,
|
|
2879
|
+
market_ticker: Any = None,
|
|
2880
|
+
limit: Any = None,
|
|
2881
|
+
status: Any = None,
|
|
2882
|
+
creator_user_id: Any = None,
|
|
2883
|
+
) -> GetRFQsResponse:
|
|
2884
|
+
"""Get RFQs
|
|
2885
|
+
|
|
2886
|
+
Endpoint for getting RFQs
|
|
2887
|
+
|
|
2888
|
+
:param cursor: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
|
|
2889
|
+
:type cursor: str
|
|
2890
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
2891
|
+
:type event_ticker: str
|
|
2892
|
+
:param market_ticker: Filter by market ticker
|
|
2893
|
+
:type market_ticker: str
|
|
2894
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100.
|
|
2895
|
+
:type limit: int
|
|
2896
|
+
:param status: Filter RFQs by status
|
|
2897
|
+
:type status: str
|
|
2898
|
+
:param creator_user_id: Filter RFQs by creator user ID
|
|
2899
|
+
:type creator_user_id: str
|
|
2900
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2901
|
+
number provided, it will be total request
|
|
2902
|
+
timeout. It can also be a pair (tuple) of
|
|
2903
|
+
(connection, read) timeouts.
|
|
2904
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2905
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2906
|
+
request; this effectively ignores the
|
|
2907
|
+
authentication in the spec for a single request.
|
|
2908
|
+
:type _request_auth: dict, optional
|
|
2909
|
+
:param _content_type: force content-type for the request.
|
|
2910
|
+
:type _content_type: str, Optional
|
|
2911
|
+
:param _headers: set to override the headers for a single
|
|
2912
|
+
request; this effectively ignores the headers
|
|
2913
|
+
in the spec for a single request.
|
|
2914
|
+
:type _headers: dict, optional
|
|
2915
|
+
:param _host_index: set to override the host_index for a single
|
|
2916
|
+
request; this effectively ignores the host_index
|
|
2917
|
+
in the spec for a single request.
|
|
2918
|
+
:type _host_index: int, optional
|
|
2919
|
+
:return: Returns the result object.
|
|
2920
|
+
""" # noqa: E501
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
_param = self._get_rfqs_serialize(
|
|
2924
|
+
cursor=cursor,
|
|
2925
|
+
event_ticker=event_ticker,
|
|
2926
|
+
market_ticker=market_ticker,
|
|
2927
|
+
limit=limit,
|
|
2928
|
+
status=status,
|
|
2929
|
+
creator_user_id=creator_user_id,
|
|
2930
|
+
_request_auth=None,
|
|
2931
|
+
_content_type=None,
|
|
2932
|
+
_headers=None,
|
|
2933
|
+
_host_index=0
|
|
2934
|
+
)
|
|
2935
|
+
|
|
2936
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2937
|
+
'200': "GetRFQsResponse",
|
|
2938
|
+
'401': "ErrorResponse",
|
|
2939
|
+
'500': "ErrorResponse",
|
|
2940
|
+
}
|
|
2941
|
+
response_data = await self.api_client.call_api(
|
|
2942
|
+
*_param,
|
|
2943
|
+
_request_timeout=None,
|
|
2944
|
+
)
|
|
2945
|
+
await response_data.read()
|
|
2946
|
+
return self.api_client.response_deserialize(
|
|
2947
|
+
response_data=response_data,
|
|
2948
|
+
response_types_map=_response_types_map,
|
|
2949
|
+
).data
|
|
2950
|
+
|
|
2951
|
+
|
|
2952
|
+
@validate_call
|
|
2953
|
+
async def get_rfqs_with_http_info(
|
|
2954
|
+
self,
|
|
2955
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.")] = None,
|
|
2956
|
+
event_ticker: Annotated[Optional[StrictStr], Field(description="Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).")] = None,
|
|
2957
|
+
market_ticker: Annotated[Optional[StrictStr], Field(description="Filter by market ticker")] = None,
|
|
2958
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 100.")] = None,
|
|
2959
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter RFQs by status")] = None,
|
|
2960
|
+
creator_user_id: Annotated[Optional[StrictStr], Field(description="Filter RFQs by creator user ID")] = None,
|
|
2961
|
+
_request_timeout: Union[
|
|
2962
|
+
None,
|
|
2963
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2964
|
+
Tuple[
|
|
2965
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2966
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2967
|
+
]
|
|
2968
|
+
] = None,
|
|
2969
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2970
|
+
_content_type: Optional[StrictStr] = None,
|
|
2971
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2972
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2973
|
+
) -> ApiResponse[GetRFQsResponse]:
|
|
2974
|
+
"""Get RFQs
|
|
2975
|
+
|
|
2976
|
+
Endpoint for getting RFQs
|
|
2977
|
+
|
|
2978
|
+
:param cursor: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
|
|
2979
|
+
:type cursor: str
|
|
2980
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
2981
|
+
:type event_ticker: str
|
|
2982
|
+
:param market_ticker: Filter by market ticker
|
|
2983
|
+
:type market_ticker: str
|
|
2984
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100.
|
|
2985
|
+
:type limit: int
|
|
2986
|
+
:param status: Filter RFQs by status
|
|
2987
|
+
:type status: str
|
|
2988
|
+
:param creator_user_id: Filter RFQs by creator user ID
|
|
2989
|
+
:type creator_user_id: str
|
|
2990
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2991
|
+
number provided, it will be total request
|
|
2992
|
+
timeout. It can also be a pair (tuple) of
|
|
2993
|
+
(connection, read) timeouts.
|
|
2994
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2995
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2996
|
+
request; this effectively ignores the
|
|
2997
|
+
authentication in the spec for a single request.
|
|
2998
|
+
:type _request_auth: dict, optional
|
|
2999
|
+
:param _content_type: force content-type for the request.
|
|
3000
|
+
:type _content_type: str, Optional
|
|
3001
|
+
:param _headers: set to override the headers for a single
|
|
3002
|
+
request; this effectively ignores the headers
|
|
3003
|
+
in the spec for a single request.
|
|
3004
|
+
:type _headers: dict, optional
|
|
3005
|
+
:param _host_index: set to override the host_index for a single
|
|
3006
|
+
request; this effectively ignores the host_index
|
|
3007
|
+
in the spec for a single request.
|
|
3008
|
+
:type _host_index: int, optional
|
|
3009
|
+
:return: Returns the result object.
|
|
3010
|
+
""" # noqa: E501
|
|
3011
|
+
|
|
3012
|
+
_param = self._get_rfqs_serialize(
|
|
3013
|
+
cursor=cursor,
|
|
3014
|
+
event_ticker=event_ticker,
|
|
3015
|
+
market_ticker=market_ticker,
|
|
3016
|
+
limit=limit,
|
|
3017
|
+
status=status,
|
|
3018
|
+
creator_user_id=creator_user_id,
|
|
3019
|
+
_request_auth=_request_auth,
|
|
3020
|
+
_content_type=_content_type,
|
|
3021
|
+
_headers=_headers,
|
|
3022
|
+
_host_index=_host_index
|
|
3023
|
+
)
|
|
3024
|
+
|
|
3025
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3026
|
+
'200': "GetRFQsResponse",
|
|
3027
|
+
'401': "ErrorResponse",
|
|
3028
|
+
'500': "ErrorResponse",
|
|
3029
|
+
}
|
|
3030
|
+
response_data = await self.api_client.call_api(
|
|
3031
|
+
*_param,
|
|
3032
|
+
_request_timeout=_request_timeout
|
|
3033
|
+
)
|
|
3034
|
+
await response_data.read()
|
|
3035
|
+
return self.api_client.response_deserialize(
|
|
3036
|
+
response_data=response_data,
|
|
3037
|
+
response_types_map=_response_types_map,
|
|
3038
|
+
)
|
|
3039
|
+
|
|
3040
|
+
|
|
3041
|
+
@validate_call
|
|
3042
|
+
async def get_rfqs_without_preload_content(
|
|
3043
|
+
self,
|
|
3044
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.")] = None,
|
|
3045
|
+
event_ticker: Annotated[Optional[StrictStr], Field(description="Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).")] = None,
|
|
3046
|
+
market_ticker: Annotated[Optional[StrictStr], Field(description="Filter by market ticker")] = None,
|
|
3047
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 100.")] = None,
|
|
3048
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter RFQs by status")] = None,
|
|
3049
|
+
creator_user_id: Annotated[Optional[StrictStr], Field(description="Filter RFQs by creator user ID")] = None,
|
|
3050
|
+
_request_timeout: Union[
|
|
3051
|
+
None,
|
|
3052
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3053
|
+
Tuple[
|
|
3054
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3055
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3056
|
+
]
|
|
3057
|
+
] = None,
|
|
3058
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3059
|
+
_content_type: Optional[StrictStr] = None,
|
|
3060
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3061
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3062
|
+
) -> RESTResponseType:
|
|
3063
|
+
"""Get RFQs
|
|
3064
|
+
|
|
3065
|
+
Endpoint for getting RFQs
|
|
3066
|
+
|
|
3067
|
+
:param cursor: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
|
|
3068
|
+
:type cursor: str
|
|
3069
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
3070
|
+
:type event_ticker: str
|
|
3071
|
+
:param market_ticker: Filter by market ticker
|
|
3072
|
+
:type market_ticker: str
|
|
3073
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100.
|
|
3074
|
+
:type limit: int
|
|
3075
|
+
:param status: Filter RFQs by status
|
|
3076
|
+
:type status: str
|
|
3077
|
+
:param creator_user_id: Filter RFQs by creator user ID
|
|
3078
|
+
:type creator_user_id: str
|
|
3079
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3080
|
+
number provided, it will be total request
|
|
3081
|
+
timeout. It can also be a pair (tuple) of
|
|
3082
|
+
(connection, read) timeouts.
|
|
3083
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3084
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3085
|
+
request; this effectively ignores the
|
|
3086
|
+
authentication in the spec for a single request.
|
|
3087
|
+
:type _request_auth: dict, optional
|
|
3088
|
+
:param _content_type: force content-type for the request.
|
|
3089
|
+
:type _content_type: str, Optional
|
|
3090
|
+
:param _headers: set to override the headers for a single
|
|
3091
|
+
request; this effectively ignores the headers
|
|
3092
|
+
in the spec for a single request.
|
|
3093
|
+
:type _headers: dict, optional
|
|
3094
|
+
:param _host_index: set to override the host_index for a single
|
|
3095
|
+
request; this effectively ignores the host_index
|
|
3096
|
+
in the spec for a single request.
|
|
3097
|
+
:type _host_index: int, optional
|
|
3098
|
+
:return: Returns the result object.
|
|
3099
|
+
""" # noqa: E501
|
|
3100
|
+
|
|
3101
|
+
_param = self._get_rfqs_serialize(
|
|
3102
|
+
cursor=cursor,
|
|
3103
|
+
event_ticker=event_ticker,
|
|
3104
|
+
market_ticker=market_ticker,
|
|
3105
|
+
limit=limit,
|
|
3106
|
+
status=status,
|
|
3107
|
+
creator_user_id=creator_user_id,
|
|
3108
|
+
_request_auth=_request_auth,
|
|
3109
|
+
_content_type=_content_type,
|
|
3110
|
+
_headers=_headers,
|
|
3111
|
+
_host_index=_host_index
|
|
3112
|
+
)
|
|
3113
|
+
|
|
3114
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3115
|
+
'200': "GetRFQsResponse",
|
|
3116
|
+
'401': "ErrorResponse",
|
|
3117
|
+
'500': "ErrorResponse",
|
|
3118
|
+
}
|
|
3119
|
+
response_data = await self.api_client.call_api(
|
|
3120
|
+
*_param,
|
|
3121
|
+
_request_timeout=_request_timeout
|
|
3122
|
+
)
|
|
3123
|
+
return response_data.response
|
|
3124
|
+
|
|
3125
|
+
|
|
3126
|
+
def _get_rfqs_serialize(
|
|
3127
|
+
self,
|
|
3128
|
+
cursor,
|
|
3129
|
+
event_ticker,
|
|
3130
|
+
market_ticker,
|
|
3131
|
+
limit,
|
|
3132
|
+
status,
|
|
3133
|
+
creator_user_id,
|
|
3134
|
+
_request_auth,
|
|
3135
|
+
_content_type,
|
|
3136
|
+
_headers,
|
|
3137
|
+
_host_index,
|
|
3138
|
+
) -> RequestSerialized:
|
|
3139
|
+
|
|
3140
|
+
_host = None
|
|
3141
|
+
|
|
3142
|
+
_collection_formats: Dict[str, str] = {
|
|
3143
|
+
}
|
|
3144
|
+
|
|
3145
|
+
_path_params: Dict[str, str] = {}
|
|
3146
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3147
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3148
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3149
|
+
_files: Dict[
|
|
3150
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3151
|
+
] = {}
|
|
3152
|
+
_body_params: Optional[bytes] = None
|
|
3153
|
+
|
|
3154
|
+
# process the path parameters
|
|
3155
|
+
# process the query parameters
|
|
3156
|
+
if cursor is not None:
|
|
3157
|
+
|
|
3158
|
+
_query_params.append(('cursor', cursor))
|
|
3159
|
+
|
|
3160
|
+
if event_ticker is not None:
|
|
3161
|
+
|
|
3162
|
+
_query_params.append(('event_ticker', event_ticker))
|
|
3163
|
+
|
|
3164
|
+
if market_ticker is not None:
|
|
3165
|
+
|
|
3166
|
+
_query_params.append(('market_ticker', market_ticker))
|
|
3167
|
+
|
|
3168
|
+
if limit is not None:
|
|
3169
|
+
|
|
3170
|
+
_query_params.append(('limit', limit))
|
|
3171
|
+
|
|
3172
|
+
if status is not None:
|
|
3173
|
+
|
|
3174
|
+
_query_params.append(('status', status))
|
|
3175
|
+
|
|
3176
|
+
if creator_user_id is not None:
|
|
3177
|
+
|
|
3178
|
+
_query_params.append(('creator_user_id', creator_user_id))
|
|
3179
|
+
|
|
3180
|
+
# process the header parameters
|
|
3181
|
+
# process the form parameters
|
|
3182
|
+
# process the body parameter
|
|
3183
|
+
|
|
3184
|
+
|
|
3185
|
+
# set the HTTP header `Accept`
|
|
3186
|
+
if 'Accept' not in _header_params:
|
|
3187
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3188
|
+
[
|
|
3189
|
+
'application/json'
|
|
3190
|
+
]
|
|
3191
|
+
)
|
|
3192
|
+
|
|
3193
|
+
|
|
3194
|
+
# authentication setting
|
|
3195
|
+
_auth_settings: List[str] = [
|
|
3196
|
+
'kalshiAccessSignature',
|
|
3197
|
+
'kalshiAccessKey',
|
|
3198
|
+
'kalshiAccessTimestamp'
|
|
3199
|
+
]
|
|
3200
|
+
|
|
3201
|
+
return self.api_client.param_serialize(
|
|
3202
|
+
method='GET',
|
|
3203
|
+
resource_path='/communications/rfqs',
|
|
3204
|
+
path_params=_path_params,
|
|
3205
|
+
query_params=_query_params,
|
|
3206
|
+
header_params=_header_params,
|
|
3207
|
+
body=_body_params,
|
|
3208
|
+
post_params=_form_params,
|
|
3209
|
+
files=_files,
|
|
3210
|
+
auth_settings=_auth_settings,
|
|
3211
|
+
collection_formats=_collection_formats,
|
|
3212
|
+
_host=_host,
|
|
3213
|
+
_request_auth=_request_auth
|
|
3214
|
+
)
|
|
3215
|
+
|
|
3216
|
+
|