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,792 @@
|
|
|
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, StrictInt, StrictStr, field_validator
|
|
19
|
+
from typing import Optional
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from kalshi_python_async.models.get_orders_response import GetOrdersResponse
|
|
22
|
+
from kalshi_python_async.models.get_positions_response import GetPositionsResponse
|
|
23
|
+
|
|
24
|
+
from kalshi_python_async.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from kalshi_python_async.api_response import ApiResponse
|
|
26
|
+
from kalshi_python_async.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class FcmApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
async def get_fcm_orders(
|
|
44
|
+
self,
|
|
45
|
+
subtrader_id: Any,
|
|
46
|
+
cursor: Any = None,
|
|
47
|
+
event_ticker: Any = None,
|
|
48
|
+
ticker: Any = None,
|
|
49
|
+
min_ts: Any = None,
|
|
50
|
+
max_ts: Any = None,
|
|
51
|
+
status: Any = None,
|
|
52
|
+
limit: Any = None,
|
|
53
|
+
) -> GetOrdersResponse:
|
|
54
|
+
"""Get FCM Orders
|
|
55
|
+
|
|
56
|
+
Endpoint for FCM members to get orders filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering orders by subtrader ID.
|
|
57
|
+
|
|
58
|
+
:param subtrader_id: Restricts the response to orders for a specific subtrader (FCM members only) (required)
|
|
59
|
+
:type subtrader_id: str
|
|
60
|
+
: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.
|
|
61
|
+
:type cursor: str
|
|
62
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
63
|
+
:type event_ticker: str
|
|
64
|
+
:param ticker: Filter by market ticker
|
|
65
|
+
:type ticker: str
|
|
66
|
+
:param min_ts: Restricts the response to orders after a timestamp, formatted as a Unix Timestamp
|
|
67
|
+
:type min_ts: int
|
|
68
|
+
:param max_ts: Restricts the response to orders before a timestamp, formatted as a Unix Timestamp
|
|
69
|
+
:type max_ts: int
|
|
70
|
+
:param status: Restricts the response to orders that have a certain status
|
|
71
|
+
:type status: str
|
|
72
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100
|
|
73
|
+
:type limit: int
|
|
74
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
75
|
+
number provided, it will be total request
|
|
76
|
+
timeout. It can also be a pair (tuple) of
|
|
77
|
+
(connection, read) timeouts.
|
|
78
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
79
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
80
|
+
request; this effectively ignores the
|
|
81
|
+
authentication in the spec for a single request.
|
|
82
|
+
:type _request_auth: dict, optional
|
|
83
|
+
:param _content_type: force content-type for the request.
|
|
84
|
+
:type _content_type: str, Optional
|
|
85
|
+
:param _headers: set to override the headers for a single
|
|
86
|
+
request; this effectively ignores the headers
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _headers: dict, optional
|
|
89
|
+
:param _host_index: set to override the host_index for a single
|
|
90
|
+
request; this effectively ignores the host_index
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _host_index: int, optional
|
|
93
|
+
:return: Returns the result object.
|
|
94
|
+
""" # noqa: E501
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
_param = self._get_fcm_orders_serialize(
|
|
98
|
+
subtrader_id=subtrader_id,
|
|
99
|
+
cursor=cursor,
|
|
100
|
+
event_ticker=event_ticker,
|
|
101
|
+
ticker=ticker,
|
|
102
|
+
min_ts=min_ts,
|
|
103
|
+
max_ts=max_ts,
|
|
104
|
+
status=status,
|
|
105
|
+
limit=limit,
|
|
106
|
+
_request_auth=None,
|
|
107
|
+
_content_type=None,
|
|
108
|
+
_headers=None,
|
|
109
|
+
_host_index=0
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
113
|
+
'200': "GetOrdersResponse",
|
|
114
|
+
'400': None,
|
|
115
|
+
'401': None,
|
|
116
|
+
'404': None,
|
|
117
|
+
'500': None,
|
|
118
|
+
}
|
|
119
|
+
response_data = await self.api_client.call_api(
|
|
120
|
+
*_param,
|
|
121
|
+
_request_timeout=None,
|
|
122
|
+
)
|
|
123
|
+
await response_data.read()
|
|
124
|
+
return self.api_client.response_deserialize(
|
|
125
|
+
response_data=response_data,
|
|
126
|
+
response_types_map=_response_types_map,
|
|
127
|
+
).data
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@validate_call
|
|
131
|
+
async def get_fcm_orders_with_http_info(
|
|
132
|
+
self,
|
|
133
|
+
subtrader_id: Annotated[StrictStr, Field(description="Restricts the response to orders for a specific subtrader (FCM members only)")],
|
|
134
|
+
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,
|
|
135
|
+
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,
|
|
136
|
+
ticker: Annotated[Optional[StrictStr], Field(description="Filter by market ticker")] = None,
|
|
137
|
+
min_ts: Annotated[Optional[StrictInt], Field(description="Restricts the response to orders after a timestamp, formatted as a Unix Timestamp")] = None,
|
|
138
|
+
max_ts: Annotated[Optional[StrictInt], Field(description="Restricts the response to orders before a timestamp, formatted as a Unix Timestamp")] = None,
|
|
139
|
+
status: Annotated[Optional[StrictStr], Field(description="Restricts the response to orders that have a certain status")] = None,
|
|
140
|
+
limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 100")] = None,
|
|
141
|
+
_request_timeout: Union[
|
|
142
|
+
None,
|
|
143
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
144
|
+
Tuple[
|
|
145
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
146
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
147
|
+
]
|
|
148
|
+
] = None,
|
|
149
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
150
|
+
_content_type: Optional[StrictStr] = None,
|
|
151
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
152
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
153
|
+
) -> ApiResponse[GetOrdersResponse]:
|
|
154
|
+
"""Get FCM Orders
|
|
155
|
+
|
|
156
|
+
Endpoint for FCM members to get orders filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering orders by subtrader ID.
|
|
157
|
+
|
|
158
|
+
:param subtrader_id: Restricts the response to orders for a specific subtrader (FCM members only) (required)
|
|
159
|
+
:type subtrader_id: str
|
|
160
|
+
: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.
|
|
161
|
+
:type cursor: str
|
|
162
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
163
|
+
:type event_ticker: str
|
|
164
|
+
:param ticker: Filter by market ticker
|
|
165
|
+
:type ticker: str
|
|
166
|
+
:param min_ts: Restricts the response to orders after a timestamp, formatted as a Unix Timestamp
|
|
167
|
+
:type min_ts: int
|
|
168
|
+
:param max_ts: Restricts the response to orders before a timestamp, formatted as a Unix Timestamp
|
|
169
|
+
:type max_ts: int
|
|
170
|
+
:param status: Restricts the response to orders that have a certain status
|
|
171
|
+
:type status: str
|
|
172
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100
|
|
173
|
+
:type limit: int
|
|
174
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
175
|
+
number provided, it will be total request
|
|
176
|
+
timeout. It can also be a pair (tuple) of
|
|
177
|
+
(connection, read) timeouts.
|
|
178
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
179
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
180
|
+
request; this effectively ignores the
|
|
181
|
+
authentication in the spec for a single request.
|
|
182
|
+
:type _request_auth: dict, optional
|
|
183
|
+
:param _content_type: force content-type for the request.
|
|
184
|
+
:type _content_type: str, Optional
|
|
185
|
+
:param _headers: set to override the headers for a single
|
|
186
|
+
request; this effectively ignores the headers
|
|
187
|
+
in the spec for a single request.
|
|
188
|
+
:type _headers: dict, optional
|
|
189
|
+
:param _host_index: set to override the host_index for a single
|
|
190
|
+
request; this effectively ignores the host_index
|
|
191
|
+
in the spec for a single request.
|
|
192
|
+
:type _host_index: int, optional
|
|
193
|
+
:return: Returns the result object.
|
|
194
|
+
""" # noqa: E501
|
|
195
|
+
|
|
196
|
+
_param = self._get_fcm_orders_serialize(
|
|
197
|
+
subtrader_id=subtrader_id,
|
|
198
|
+
cursor=cursor,
|
|
199
|
+
event_ticker=event_ticker,
|
|
200
|
+
ticker=ticker,
|
|
201
|
+
min_ts=min_ts,
|
|
202
|
+
max_ts=max_ts,
|
|
203
|
+
status=status,
|
|
204
|
+
limit=limit,
|
|
205
|
+
_request_auth=_request_auth,
|
|
206
|
+
_content_type=_content_type,
|
|
207
|
+
_headers=_headers,
|
|
208
|
+
_host_index=_host_index
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
212
|
+
'200': "GetOrdersResponse",
|
|
213
|
+
'400': None,
|
|
214
|
+
'401': None,
|
|
215
|
+
'404': None,
|
|
216
|
+
'500': None,
|
|
217
|
+
}
|
|
218
|
+
response_data = await self.api_client.call_api(
|
|
219
|
+
*_param,
|
|
220
|
+
_request_timeout=_request_timeout
|
|
221
|
+
)
|
|
222
|
+
await response_data.read()
|
|
223
|
+
return self.api_client.response_deserialize(
|
|
224
|
+
response_data=response_data,
|
|
225
|
+
response_types_map=_response_types_map,
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
@validate_call
|
|
230
|
+
async def get_fcm_orders_without_preload_content(
|
|
231
|
+
self,
|
|
232
|
+
subtrader_id: Annotated[StrictStr, Field(description="Restricts the response to orders for a specific subtrader (FCM members only)")],
|
|
233
|
+
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,
|
|
234
|
+
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,
|
|
235
|
+
ticker: Annotated[Optional[StrictStr], Field(description="Filter by market ticker")] = None,
|
|
236
|
+
min_ts: Annotated[Optional[StrictInt], Field(description="Restricts the response to orders after a timestamp, formatted as a Unix Timestamp")] = None,
|
|
237
|
+
max_ts: Annotated[Optional[StrictInt], Field(description="Restricts the response to orders before a timestamp, formatted as a Unix Timestamp")] = None,
|
|
238
|
+
status: Annotated[Optional[StrictStr], Field(description="Restricts the response to orders that have a certain status")] = None,
|
|
239
|
+
limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 100")] = None,
|
|
240
|
+
_request_timeout: Union[
|
|
241
|
+
None,
|
|
242
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
243
|
+
Tuple[
|
|
244
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
245
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
246
|
+
]
|
|
247
|
+
] = None,
|
|
248
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
249
|
+
_content_type: Optional[StrictStr] = None,
|
|
250
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
251
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
252
|
+
) -> RESTResponseType:
|
|
253
|
+
"""Get FCM Orders
|
|
254
|
+
|
|
255
|
+
Endpoint for FCM members to get orders filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering orders by subtrader ID.
|
|
256
|
+
|
|
257
|
+
:param subtrader_id: Restricts the response to orders for a specific subtrader (FCM members only) (required)
|
|
258
|
+
:type subtrader_id: str
|
|
259
|
+
: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.
|
|
260
|
+
:type cursor: str
|
|
261
|
+
:param event_ticker: Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10).
|
|
262
|
+
:type event_ticker: str
|
|
263
|
+
:param ticker: Filter by market ticker
|
|
264
|
+
:type ticker: str
|
|
265
|
+
:param min_ts: Restricts the response to orders after a timestamp, formatted as a Unix Timestamp
|
|
266
|
+
:type min_ts: int
|
|
267
|
+
:param max_ts: Restricts the response to orders before a timestamp, formatted as a Unix Timestamp
|
|
268
|
+
:type max_ts: int
|
|
269
|
+
:param status: Restricts the response to orders that have a certain status
|
|
270
|
+
:type status: str
|
|
271
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100
|
|
272
|
+
:type limit: int
|
|
273
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
274
|
+
number provided, it will be total request
|
|
275
|
+
timeout. It can also be a pair (tuple) of
|
|
276
|
+
(connection, read) timeouts.
|
|
277
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
278
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
279
|
+
request; this effectively ignores the
|
|
280
|
+
authentication in the spec for a single request.
|
|
281
|
+
:type _request_auth: dict, optional
|
|
282
|
+
:param _content_type: force content-type for the request.
|
|
283
|
+
:type _content_type: str, Optional
|
|
284
|
+
:param _headers: set to override the headers for a single
|
|
285
|
+
request; this effectively ignores the headers
|
|
286
|
+
in the spec for a single request.
|
|
287
|
+
:type _headers: dict, optional
|
|
288
|
+
:param _host_index: set to override the host_index for a single
|
|
289
|
+
request; this effectively ignores the host_index
|
|
290
|
+
in the spec for a single request.
|
|
291
|
+
:type _host_index: int, optional
|
|
292
|
+
:return: Returns the result object.
|
|
293
|
+
""" # noqa: E501
|
|
294
|
+
|
|
295
|
+
_param = self._get_fcm_orders_serialize(
|
|
296
|
+
subtrader_id=subtrader_id,
|
|
297
|
+
cursor=cursor,
|
|
298
|
+
event_ticker=event_ticker,
|
|
299
|
+
ticker=ticker,
|
|
300
|
+
min_ts=min_ts,
|
|
301
|
+
max_ts=max_ts,
|
|
302
|
+
status=status,
|
|
303
|
+
limit=limit,
|
|
304
|
+
_request_auth=_request_auth,
|
|
305
|
+
_content_type=_content_type,
|
|
306
|
+
_headers=_headers,
|
|
307
|
+
_host_index=_host_index
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
311
|
+
'200': "GetOrdersResponse",
|
|
312
|
+
'400': None,
|
|
313
|
+
'401': None,
|
|
314
|
+
'404': None,
|
|
315
|
+
'500': None,
|
|
316
|
+
}
|
|
317
|
+
response_data = await self.api_client.call_api(
|
|
318
|
+
*_param,
|
|
319
|
+
_request_timeout=_request_timeout
|
|
320
|
+
)
|
|
321
|
+
return response_data.response
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
def _get_fcm_orders_serialize(
|
|
325
|
+
self,
|
|
326
|
+
subtrader_id,
|
|
327
|
+
cursor,
|
|
328
|
+
event_ticker,
|
|
329
|
+
ticker,
|
|
330
|
+
min_ts,
|
|
331
|
+
max_ts,
|
|
332
|
+
status,
|
|
333
|
+
limit,
|
|
334
|
+
_request_auth,
|
|
335
|
+
_content_type,
|
|
336
|
+
_headers,
|
|
337
|
+
_host_index,
|
|
338
|
+
) -> RequestSerialized:
|
|
339
|
+
|
|
340
|
+
_host = None
|
|
341
|
+
|
|
342
|
+
_collection_formats: Dict[str, str] = {
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
_path_params: Dict[str, str] = {}
|
|
346
|
+
_query_params: List[Tuple[str, str]] = []
|
|
347
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
348
|
+
_form_params: List[Tuple[str, str]] = []
|
|
349
|
+
_files: Dict[
|
|
350
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
351
|
+
] = {}
|
|
352
|
+
_body_params: Optional[bytes] = None
|
|
353
|
+
|
|
354
|
+
# process the path parameters
|
|
355
|
+
# process the query parameters
|
|
356
|
+
if subtrader_id is not None:
|
|
357
|
+
|
|
358
|
+
_query_params.append(('subtrader_id', subtrader_id))
|
|
359
|
+
|
|
360
|
+
if cursor is not None:
|
|
361
|
+
|
|
362
|
+
_query_params.append(('cursor', cursor))
|
|
363
|
+
|
|
364
|
+
if event_ticker is not None:
|
|
365
|
+
|
|
366
|
+
_query_params.append(('event_ticker', event_ticker))
|
|
367
|
+
|
|
368
|
+
if ticker is not None:
|
|
369
|
+
|
|
370
|
+
_query_params.append(('ticker', ticker))
|
|
371
|
+
|
|
372
|
+
if min_ts is not None:
|
|
373
|
+
|
|
374
|
+
_query_params.append(('min_ts', min_ts))
|
|
375
|
+
|
|
376
|
+
if max_ts is not None:
|
|
377
|
+
|
|
378
|
+
_query_params.append(('max_ts', max_ts))
|
|
379
|
+
|
|
380
|
+
if status is not None:
|
|
381
|
+
|
|
382
|
+
_query_params.append(('status', status))
|
|
383
|
+
|
|
384
|
+
if limit is not None:
|
|
385
|
+
|
|
386
|
+
_query_params.append(('limit', limit))
|
|
387
|
+
|
|
388
|
+
# process the header parameters
|
|
389
|
+
# process the form parameters
|
|
390
|
+
# process the body parameter
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
# set the HTTP header `Accept`
|
|
394
|
+
if 'Accept' not in _header_params:
|
|
395
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
396
|
+
[
|
|
397
|
+
'application/json'
|
|
398
|
+
]
|
|
399
|
+
)
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
# authentication setting
|
|
403
|
+
_auth_settings: List[str] = [
|
|
404
|
+
'kalshiAccessSignature',
|
|
405
|
+
'kalshiAccessKey',
|
|
406
|
+
'kalshiAccessTimestamp'
|
|
407
|
+
]
|
|
408
|
+
|
|
409
|
+
return self.api_client.param_serialize(
|
|
410
|
+
method='GET',
|
|
411
|
+
resource_path='/fcm/orders',
|
|
412
|
+
path_params=_path_params,
|
|
413
|
+
query_params=_query_params,
|
|
414
|
+
header_params=_header_params,
|
|
415
|
+
body=_body_params,
|
|
416
|
+
post_params=_form_params,
|
|
417
|
+
files=_files,
|
|
418
|
+
auth_settings=_auth_settings,
|
|
419
|
+
collection_formats=_collection_formats,
|
|
420
|
+
_host=_host,
|
|
421
|
+
_request_auth=_request_auth
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
@validate_call
|
|
428
|
+
async def get_fcm_positions(
|
|
429
|
+
self,
|
|
430
|
+
subtrader_id: Any,
|
|
431
|
+
ticker: Any = None,
|
|
432
|
+
event_ticker: Any = None,
|
|
433
|
+
count_filter: Any = None,
|
|
434
|
+
settlement_status: Any = None,
|
|
435
|
+
limit: Any = None,
|
|
436
|
+
cursor: Any = None,
|
|
437
|
+
) -> GetPositionsResponse:
|
|
438
|
+
"""Get FCM Positions
|
|
439
|
+
|
|
440
|
+
Endpoint for FCM members to get market positions filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering positions by subtrader ID.
|
|
441
|
+
|
|
442
|
+
:param subtrader_id: Restricts the response to positions for a specific subtrader (FCM members only) (required)
|
|
443
|
+
:type subtrader_id: str
|
|
444
|
+
:param ticker: Ticker of desired positions
|
|
445
|
+
:type ticker: str
|
|
446
|
+
:param event_ticker: Event ticker of desired positions
|
|
447
|
+
:type event_ticker: str
|
|
448
|
+
:param count_filter: Restricts the positions to those with any of following fields with non-zero values, as a comma separated list
|
|
449
|
+
:type count_filter: str
|
|
450
|
+
:param settlement_status: Settlement status of the markets to return. Defaults to unsettled
|
|
451
|
+
:type settlement_status: str
|
|
452
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100
|
|
453
|
+
:type limit: int
|
|
454
|
+
:param cursor: The Cursor represents a pointer to the next page of records in the pagination
|
|
455
|
+
:type cursor: str
|
|
456
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
457
|
+
number provided, it will be total request
|
|
458
|
+
timeout. It can also be a pair (tuple) of
|
|
459
|
+
(connection, read) timeouts.
|
|
460
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
461
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
462
|
+
request; this effectively ignores the
|
|
463
|
+
authentication in the spec for a single request.
|
|
464
|
+
:type _request_auth: dict, optional
|
|
465
|
+
:param _content_type: force content-type for the request.
|
|
466
|
+
:type _content_type: str, Optional
|
|
467
|
+
:param _headers: set to override the headers for a single
|
|
468
|
+
request; this effectively ignores the headers
|
|
469
|
+
in the spec for a single request.
|
|
470
|
+
:type _headers: dict, optional
|
|
471
|
+
:param _host_index: set to override the host_index for a single
|
|
472
|
+
request; this effectively ignores the host_index
|
|
473
|
+
in the spec for a single request.
|
|
474
|
+
:type _host_index: int, optional
|
|
475
|
+
:return: Returns the result object.
|
|
476
|
+
""" # noqa: E501
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
_param = self._get_fcm_positions_serialize(
|
|
480
|
+
subtrader_id=subtrader_id,
|
|
481
|
+
ticker=ticker,
|
|
482
|
+
event_ticker=event_ticker,
|
|
483
|
+
count_filter=count_filter,
|
|
484
|
+
settlement_status=settlement_status,
|
|
485
|
+
limit=limit,
|
|
486
|
+
cursor=cursor,
|
|
487
|
+
_request_auth=None,
|
|
488
|
+
_content_type=None,
|
|
489
|
+
_headers=None,
|
|
490
|
+
_host_index=0
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
494
|
+
'200': "GetPositionsResponse",
|
|
495
|
+
'400': None,
|
|
496
|
+
'401': None,
|
|
497
|
+
'404': None,
|
|
498
|
+
'500': None,
|
|
499
|
+
}
|
|
500
|
+
response_data = await self.api_client.call_api(
|
|
501
|
+
*_param,
|
|
502
|
+
_request_timeout=None,
|
|
503
|
+
)
|
|
504
|
+
await response_data.read()
|
|
505
|
+
return self.api_client.response_deserialize(
|
|
506
|
+
response_data=response_data,
|
|
507
|
+
response_types_map=_response_types_map,
|
|
508
|
+
).data
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
@validate_call
|
|
512
|
+
async def get_fcm_positions_with_http_info(
|
|
513
|
+
self,
|
|
514
|
+
subtrader_id: Annotated[StrictStr, Field(description="Restricts the response to positions for a specific subtrader (FCM members only)")],
|
|
515
|
+
ticker: Annotated[Optional[StrictStr], Field(description="Ticker of desired positions")] = None,
|
|
516
|
+
event_ticker: Annotated[Optional[StrictStr], Field(description="Event ticker of desired positions")] = None,
|
|
517
|
+
count_filter: Annotated[Optional[StrictStr], Field(description="Restricts the positions to those with any of following fields with non-zero values, as a comma separated list")] = None,
|
|
518
|
+
settlement_status: Annotated[Optional[StrictStr], Field(description="Settlement status of the markets to return. Defaults to unsettled")] = None,
|
|
519
|
+
limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 100")] = None,
|
|
520
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The Cursor represents a pointer to the next page of records in the pagination")] = None,
|
|
521
|
+
_request_timeout: Union[
|
|
522
|
+
None,
|
|
523
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
524
|
+
Tuple[
|
|
525
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
526
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
527
|
+
]
|
|
528
|
+
] = None,
|
|
529
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
530
|
+
_content_type: Optional[StrictStr] = None,
|
|
531
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
532
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
533
|
+
) -> ApiResponse[GetPositionsResponse]:
|
|
534
|
+
"""Get FCM Positions
|
|
535
|
+
|
|
536
|
+
Endpoint for FCM members to get market positions filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering positions by subtrader ID.
|
|
537
|
+
|
|
538
|
+
:param subtrader_id: Restricts the response to positions for a specific subtrader (FCM members only) (required)
|
|
539
|
+
:type subtrader_id: str
|
|
540
|
+
:param ticker: Ticker of desired positions
|
|
541
|
+
:type ticker: str
|
|
542
|
+
:param event_ticker: Event ticker of desired positions
|
|
543
|
+
:type event_ticker: str
|
|
544
|
+
:param count_filter: Restricts the positions to those with any of following fields with non-zero values, as a comma separated list
|
|
545
|
+
:type count_filter: str
|
|
546
|
+
:param settlement_status: Settlement status of the markets to return. Defaults to unsettled
|
|
547
|
+
:type settlement_status: str
|
|
548
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100
|
|
549
|
+
:type limit: int
|
|
550
|
+
:param cursor: The Cursor represents a pointer to the next page of records in the pagination
|
|
551
|
+
:type cursor: str
|
|
552
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
553
|
+
number provided, it will be total request
|
|
554
|
+
timeout. It can also be a pair (tuple) of
|
|
555
|
+
(connection, read) timeouts.
|
|
556
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
557
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
558
|
+
request; this effectively ignores the
|
|
559
|
+
authentication in the spec for a single request.
|
|
560
|
+
:type _request_auth: dict, optional
|
|
561
|
+
:param _content_type: force content-type for the request.
|
|
562
|
+
:type _content_type: str, Optional
|
|
563
|
+
:param _headers: set to override the headers for a single
|
|
564
|
+
request; this effectively ignores the headers
|
|
565
|
+
in the spec for a single request.
|
|
566
|
+
:type _headers: dict, optional
|
|
567
|
+
:param _host_index: set to override the host_index for a single
|
|
568
|
+
request; this effectively ignores the host_index
|
|
569
|
+
in the spec for a single request.
|
|
570
|
+
:type _host_index: int, optional
|
|
571
|
+
:return: Returns the result object.
|
|
572
|
+
""" # noqa: E501
|
|
573
|
+
|
|
574
|
+
_param = self._get_fcm_positions_serialize(
|
|
575
|
+
subtrader_id=subtrader_id,
|
|
576
|
+
ticker=ticker,
|
|
577
|
+
event_ticker=event_ticker,
|
|
578
|
+
count_filter=count_filter,
|
|
579
|
+
settlement_status=settlement_status,
|
|
580
|
+
limit=limit,
|
|
581
|
+
cursor=cursor,
|
|
582
|
+
_request_auth=_request_auth,
|
|
583
|
+
_content_type=_content_type,
|
|
584
|
+
_headers=_headers,
|
|
585
|
+
_host_index=_host_index
|
|
586
|
+
)
|
|
587
|
+
|
|
588
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
589
|
+
'200': "GetPositionsResponse",
|
|
590
|
+
'400': None,
|
|
591
|
+
'401': None,
|
|
592
|
+
'404': None,
|
|
593
|
+
'500': None,
|
|
594
|
+
}
|
|
595
|
+
response_data = await self.api_client.call_api(
|
|
596
|
+
*_param,
|
|
597
|
+
_request_timeout=_request_timeout
|
|
598
|
+
)
|
|
599
|
+
await response_data.read()
|
|
600
|
+
return self.api_client.response_deserialize(
|
|
601
|
+
response_data=response_data,
|
|
602
|
+
response_types_map=_response_types_map,
|
|
603
|
+
)
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
@validate_call
|
|
607
|
+
async def get_fcm_positions_without_preload_content(
|
|
608
|
+
self,
|
|
609
|
+
subtrader_id: Annotated[StrictStr, Field(description="Restricts the response to positions for a specific subtrader (FCM members only)")],
|
|
610
|
+
ticker: Annotated[Optional[StrictStr], Field(description="Ticker of desired positions")] = None,
|
|
611
|
+
event_ticker: Annotated[Optional[StrictStr], Field(description="Event ticker of desired positions")] = None,
|
|
612
|
+
count_filter: Annotated[Optional[StrictStr], Field(description="Restricts the positions to those with any of following fields with non-zero values, as a comma separated list")] = None,
|
|
613
|
+
settlement_status: Annotated[Optional[StrictStr], Field(description="Settlement status of the markets to return. Defaults to unsettled")] = None,
|
|
614
|
+
limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 100")] = None,
|
|
615
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The Cursor represents a pointer to the next page of records in the pagination")] = None,
|
|
616
|
+
_request_timeout: Union[
|
|
617
|
+
None,
|
|
618
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
619
|
+
Tuple[
|
|
620
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
621
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
622
|
+
]
|
|
623
|
+
] = None,
|
|
624
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
625
|
+
_content_type: Optional[StrictStr] = None,
|
|
626
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
627
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
628
|
+
) -> RESTResponseType:
|
|
629
|
+
"""Get FCM Positions
|
|
630
|
+
|
|
631
|
+
Endpoint for FCM members to get market positions filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering positions by subtrader ID.
|
|
632
|
+
|
|
633
|
+
:param subtrader_id: Restricts the response to positions for a specific subtrader (FCM members only) (required)
|
|
634
|
+
:type subtrader_id: str
|
|
635
|
+
:param ticker: Ticker of desired positions
|
|
636
|
+
:type ticker: str
|
|
637
|
+
:param event_ticker: Event ticker of desired positions
|
|
638
|
+
:type event_ticker: str
|
|
639
|
+
:param count_filter: Restricts the positions to those with any of following fields with non-zero values, as a comma separated list
|
|
640
|
+
:type count_filter: str
|
|
641
|
+
:param settlement_status: Settlement status of the markets to return. Defaults to unsettled
|
|
642
|
+
:type settlement_status: str
|
|
643
|
+
:param limit: Parameter to specify the number of results per page. Defaults to 100
|
|
644
|
+
:type limit: int
|
|
645
|
+
:param cursor: The Cursor represents a pointer to the next page of records in the pagination
|
|
646
|
+
:type cursor: str
|
|
647
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
648
|
+
number provided, it will be total request
|
|
649
|
+
timeout. It can also be a pair (tuple) of
|
|
650
|
+
(connection, read) timeouts.
|
|
651
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
652
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
653
|
+
request; this effectively ignores the
|
|
654
|
+
authentication in the spec for a single request.
|
|
655
|
+
:type _request_auth: dict, optional
|
|
656
|
+
:param _content_type: force content-type for the request.
|
|
657
|
+
:type _content_type: str, Optional
|
|
658
|
+
:param _headers: set to override the headers for a single
|
|
659
|
+
request; this effectively ignores the headers
|
|
660
|
+
in the spec for a single request.
|
|
661
|
+
:type _headers: dict, optional
|
|
662
|
+
:param _host_index: set to override the host_index for a single
|
|
663
|
+
request; this effectively ignores the host_index
|
|
664
|
+
in the spec for a single request.
|
|
665
|
+
:type _host_index: int, optional
|
|
666
|
+
:return: Returns the result object.
|
|
667
|
+
""" # noqa: E501
|
|
668
|
+
|
|
669
|
+
_param = self._get_fcm_positions_serialize(
|
|
670
|
+
subtrader_id=subtrader_id,
|
|
671
|
+
ticker=ticker,
|
|
672
|
+
event_ticker=event_ticker,
|
|
673
|
+
count_filter=count_filter,
|
|
674
|
+
settlement_status=settlement_status,
|
|
675
|
+
limit=limit,
|
|
676
|
+
cursor=cursor,
|
|
677
|
+
_request_auth=_request_auth,
|
|
678
|
+
_content_type=_content_type,
|
|
679
|
+
_headers=_headers,
|
|
680
|
+
_host_index=_host_index
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
684
|
+
'200': "GetPositionsResponse",
|
|
685
|
+
'400': None,
|
|
686
|
+
'401': None,
|
|
687
|
+
'404': None,
|
|
688
|
+
'500': None,
|
|
689
|
+
}
|
|
690
|
+
response_data = await self.api_client.call_api(
|
|
691
|
+
*_param,
|
|
692
|
+
_request_timeout=_request_timeout
|
|
693
|
+
)
|
|
694
|
+
return response_data.response
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
def _get_fcm_positions_serialize(
|
|
698
|
+
self,
|
|
699
|
+
subtrader_id,
|
|
700
|
+
ticker,
|
|
701
|
+
event_ticker,
|
|
702
|
+
count_filter,
|
|
703
|
+
settlement_status,
|
|
704
|
+
limit,
|
|
705
|
+
cursor,
|
|
706
|
+
_request_auth,
|
|
707
|
+
_content_type,
|
|
708
|
+
_headers,
|
|
709
|
+
_host_index,
|
|
710
|
+
) -> RequestSerialized:
|
|
711
|
+
|
|
712
|
+
_host = None
|
|
713
|
+
|
|
714
|
+
_collection_formats: Dict[str, str] = {
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
_path_params: Dict[str, str] = {}
|
|
718
|
+
_query_params: List[Tuple[str, str]] = []
|
|
719
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
720
|
+
_form_params: List[Tuple[str, str]] = []
|
|
721
|
+
_files: Dict[
|
|
722
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
723
|
+
] = {}
|
|
724
|
+
_body_params: Optional[bytes] = None
|
|
725
|
+
|
|
726
|
+
# process the path parameters
|
|
727
|
+
# process the query parameters
|
|
728
|
+
if subtrader_id is not None:
|
|
729
|
+
|
|
730
|
+
_query_params.append(('subtrader_id', subtrader_id))
|
|
731
|
+
|
|
732
|
+
if ticker is not None:
|
|
733
|
+
|
|
734
|
+
_query_params.append(('ticker', ticker))
|
|
735
|
+
|
|
736
|
+
if event_ticker is not None:
|
|
737
|
+
|
|
738
|
+
_query_params.append(('event_ticker', event_ticker))
|
|
739
|
+
|
|
740
|
+
if count_filter is not None:
|
|
741
|
+
|
|
742
|
+
_query_params.append(('count_filter', count_filter))
|
|
743
|
+
|
|
744
|
+
if settlement_status is not None:
|
|
745
|
+
|
|
746
|
+
_query_params.append(('settlement_status', settlement_status))
|
|
747
|
+
|
|
748
|
+
if limit is not None:
|
|
749
|
+
|
|
750
|
+
_query_params.append(('limit', limit))
|
|
751
|
+
|
|
752
|
+
if cursor is not None:
|
|
753
|
+
|
|
754
|
+
_query_params.append(('cursor', cursor))
|
|
755
|
+
|
|
756
|
+
# process the header parameters
|
|
757
|
+
# process the form parameters
|
|
758
|
+
# process the body parameter
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
# set the HTTP header `Accept`
|
|
762
|
+
if 'Accept' not in _header_params:
|
|
763
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
764
|
+
[
|
|
765
|
+
'application/json'
|
|
766
|
+
]
|
|
767
|
+
)
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
# authentication setting
|
|
771
|
+
_auth_settings: List[str] = [
|
|
772
|
+
'kalshiAccessSignature',
|
|
773
|
+
'kalshiAccessKey',
|
|
774
|
+
'kalshiAccessTimestamp'
|
|
775
|
+
]
|
|
776
|
+
|
|
777
|
+
return self.api_client.param_serialize(
|
|
778
|
+
method='GET',
|
|
779
|
+
resource_path='/fcm/positions',
|
|
780
|
+
path_params=_path_params,
|
|
781
|
+
query_params=_query_params,
|
|
782
|
+
header_params=_header_params,
|
|
783
|
+
body=_body_params,
|
|
784
|
+
post_params=_form_params,
|
|
785
|
+
files=_files,
|
|
786
|
+
auth_settings=_auth_settings,
|
|
787
|
+
collection_formats=_collection_formats,
|
|
788
|
+
_host=_host,
|
|
789
|
+
_request_auth=_request_auth
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
|