architect-py 3.2.1__py3-none-any.whl → 5.0.0b1__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.
- architect_py/__init__.py +8 -2
- architect_py/async_client.py +887 -575
- architect_py/client.py +36 -33
- architect_py/client_interface.py +62 -0
- architect_py/common_types/__init__.py +6 -0
- architect_py/common_types/order_dir.py +85 -0
- architect_py/common_types/scalars.py +25 -0
- architect_py/common_types/tradable_product.py +59 -0
- architect_py/graphql_client/client.py +3 -6
- architect_py/graphql_client/fragments.py +3 -6
- architect_py/graphql_client/get_fills_query.py +2 -1
- architect_py/graphql_client/search_symbols_query.py +2 -1
- architect_py/graphql_client/subscribe_orderflow.py +2 -1
- architect_py/graphql_client/subscribe_trades.py +2 -1
- architect_py/grpc/__init__.py +125 -0
- architect_py/grpc/client.py +86 -0
- architect_py/{grpc_client → grpc/models}/Accounts/AccountsRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Accounts/AccountsResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Accounts/__init__.py +1 -1
- architect_py/{grpc_client → grpc/models}/Algo/AlgoOrderForTwapAlgo.py +1 -1
- architect_py/{grpc_client → grpc/models}/Algo/CreateAlgoOrderRequestForTwapAlgo.py +2 -2
- architect_py/{grpc_client → grpc/models}/Algo/ModifyAlgoOrderRequestForTwapAlgo.py +2 -2
- architect_py/{grpc_client → grpc/models}/Algo/__init__.py +1 -1
- architect_py/grpc/models/Auth/CreateJwtRequest.py +47 -0
- architect_py/grpc/models/Auth/CreateJwtResponse.py +23 -0
- architect_py/{grpc_client/Cpty → grpc/models/Auth}/__init__.py +1 -1
- architect_py/grpc/models/Core/ConfigRequest.py +37 -0
- architect_py/grpc/models/Core/ConfigResponse.py +25 -0
- architect_py/{grpc_client/Folio → grpc/models/Core}/__init__.py +1 -1
- architect_py/{grpc_client → grpc/models}/Cpty/CptyRequest.py +5 -4
- architect_py/{grpc_client → grpc/models}/Cpty/CptyResponse.py +6 -6
- architect_py/grpc/models/Cpty/CptyStatus.py +48 -0
- architect_py/grpc/models/Cpty/CptyStatusRequest.py +45 -0
- architect_py/grpc/models/Cpty/CptysRequest.py +37 -0
- architect_py/grpc/models/Cpty/CptysResponse.py +27 -0
- architect_py/grpc/models/Cpty/__init__.py +2 -0
- architect_py/{grpc_client → grpc/models}/Folio/AccountHistoryRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Folio/AccountHistoryResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Folio/AccountSummariesRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Folio/AccountSummariesResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Folio/AccountSummary.py +1 -1
- architect_py/{grpc_client → grpc/models}/Folio/AccountSummaryRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Folio/HistoricalFillsRequest.py +3 -3
- architect_py/{grpc_client → grpc/models}/Folio/HistoricalFillsResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Folio/HistoricalOrdersRequest.py +3 -3
- architect_py/{grpc_client → grpc/models}/Folio/HistoricalOrdersResponse.py +1 -1
- architect_py/grpc/models/Folio/__init__.py +2 -0
- architect_py/{grpc_client → grpc/models}/Health/HealthCheckRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Health/HealthCheckResponse.py +1 -1
- architect_py/grpc/models/Health/__init__.py +2 -0
- architect_py/{grpc_client → grpc/models}/Marketdata/Candle.py +1 -1
- architect_py/{grpc_client → grpc/models}/Marketdata/HistoricalCandlesRequest.py +11 -8
- architect_py/{grpc_client → grpc/models}/Marketdata/HistoricalCandlesResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshot.py +36 -3
- architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshotRequest.py +8 -3
- architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshotsRequest.py +6 -3
- architect_py/{grpc_client → grpc/models}/Marketdata/L2BookSnapshot.py +1 -1
- architect_py/{grpc_client → grpc/models}/Marketdata/L2BookSnapshotRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/Liquidation.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/MarketStatus.py +1 -1
- architect_py/{grpc_client → grpc/models}/Marketdata/MarketStatusRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeCandlesRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeCurrentCandlesRequest.py +3 -4
- architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeL1BookSnapshotsRequest.py +6 -3
- architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeL2BookUpdatesRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeLiquidationsRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeManyCandlesRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeTickersRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeTradesRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/Ticker.py +14 -3
- architect_py/{grpc_client → grpc/models}/Marketdata/TickerRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/TickersRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Marketdata/TickersResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Marketdata/Trade.py +2 -2
- architect_py/grpc/models/Marketdata/__init__.py +2 -0
- architect_py/{grpc_client → grpc/models}/Oms/Cancel.py +1 -1
- architect_py/{grpc_client → grpc/models}/Oms/CancelAllOrdersRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Oms/CancelAllOrdersResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Oms/CancelOrderRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Oms/OpenOrdersRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Oms/OpenOrdersResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Oms/Order.py +2 -2
- architect_py/{grpc_client → grpc/models}/Oms/PendingCancelsRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Oms/PendingCancelsResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Oms/PlaceOrderRequest.py +3 -3
- architect_py/grpc/models/Oms/__init__.py +2 -0
- architect_py/{grpc_client → grpc/models}/Orderflow/DropcopyRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Orderflow/OrderflowRequest.py +2 -1
- architect_py/{grpc_client → grpc/models}/Orderflow/SubscribeOrderflowRequest.py +2 -2
- architect_py/grpc/models/Orderflow/__init__.py +2 -0
- architect_py/grpc/models/Symbology/DownloadProductCatalogRequest.py +42 -0
- architect_py/grpc/models/Symbology/DownloadProductCatalogResponse.py +27 -0
- architect_py/{grpc_client → grpc/models}/Symbology/PruneExpiredSymbolsRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Symbology/PruneExpiredSymbolsResponse.py +1 -1
- architect_py/{grpc_client → grpc/models}/Symbology/SubscribeSymbology.py +1 -1
- architect_py/{grpc_client → grpc/models}/Symbology/SymbologyRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Symbology/SymbologySnapshot.py +7 -2
- architect_py/{grpc_client → grpc/models}/Symbology/SymbologyUpdate.py +9 -2
- architect_py/{grpc_client → grpc/models}/Symbology/SymbolsRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Symbology/SymbolsResponse.py +1 -1
- architect_py/grpc/models/Symbology/UploadProductCatalogRequest.py +49 -0
- architect_py/grpc/models/Symbology/UploadProductCatalogResponse.py +20 -0
- architect_py/{grpc_client → grpc/models}/Symbology/UploadSymbologyRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Symbology/UploadSymbologyResponse.py +1 -1
- architect_py/grpc/models/Symbology/__init__.py +2 -0
- architect_py/grpc/models/__init__.py +2 -0
- architect_py/{grpc_client → grpc/models}/definitions.py +293 -223
- architect_py/grpc/resolve_endpoint.py +67 -0
- architect_py/{grpc_client/grpc_server.py → grpc/server.py} +13 -9
- architect_py/grpc/utils.py +32 -0
- architect_py/tests/conftest.py +86 -85
- architect_py/tests/test_book_building.py +49 -50
- architect_py/tests/test_marketdata.py +168 -0
- architect_py/tests/test_order_entry.py +37 -0
- architect_py/tests/test_orderflow.py +38 -0
- architect_py/tests/test_portfolio_management.py +23 -0
- architect_py/tests/test_rounding.py +28 -28
- architect_py/tests/test_symbology.py +37 -30
- architect_py/utils/nearest_tick.py +2 -5
- architect_py/utils/nearest_tick_2.py +1 -2
- architect_py/utils/orderbook.py +35 -0
- architect_py/utils/pandas.py +44 -0
- architect_py/utils/price_bands.py +0 -3
- architect_py/utils/symbol_parsing.py +29 -0
- architect_py-5.0.0b1.dist-info/METADATA +124 -0
- architect_py-5.0.0b1.dist-info/RECORD +184 -0
- {architect_py-3.2.1.dist-info → architect_py-5.0.0b1.dist-info}/WHEEL +2 -1
- architect_py-5.0.0b1.dist-info/top_level.txt +4 -0
- examples/__init__.py +0 -0
- examples/book_subscription.py +53 -0
- examples/candles.py +30 -0
- examples/common.py +107 -0
- examples/external_cpty.py +77 -0
- examples/funding_rate_mean_reversion_algo.py +192 -0
- examples/order_sending.py +92 -0
- examples/stream_l1_marketdata.py +25 -0
- examples/stream_l2_marketdata.py +40 -0
- examples/trades.py +21 -0
- examples/tutorial_async.py +84 -0
- examples/tutorial_sync.py +95 -0
- scripts/generate_functions_md.py +164 -0
- scripts/generate_sync_interface.py +207 -0
- scripts/postprocess_grpc.py +594 -0
- scripts/preprocess_grpc_schema.py +647 -0
- templates/exceptions.py +83 -0
- templates/juniper_base_client.py +371 -0
- architect_py/client_protocol.py +0 -52
- architect_py/grpc_client/Folio/AggregatedAccountSummariesRequest.py +0 -59
- architect_py/grpc_client/Folio/AggregatedAccountSummariesResponse.py +0 -27
- architect_py/grpc_client/Health/__init__.py +0 -2
- architect_py/grpc_client/Marketdata/__init__.py +0 -2
- architect_py/grpc_client/Oms/__init__.py +0 -2
- architect_py/grpc_client/Orderflow/__init__.py +0 -2
- architect_py/grpc_client/Symbology/__init__.py +0 -2
- architect_py/grpc_client/__init__.py +0 -2
- architect_py/grpc_client/grpc_client.py +0 -405
- architect_py/scalars.py +0 -172
- architect_py/tests/test_accounts.py +0 -31
- architect_py/tests/test_client.py +0 -29
- architect_py/tests/test_grpc_client.py +0 -30
- architect_py/tests/test_order_sending.py +0 -61
- architect_py/tests/test_snapshots.py +0 -52
- architect_py/tests/test_subscriptions.py +0 -129
- architect_py-3.2.1.dist-info/METADATA +0 -212
- architect_py-3.2.1.dist-info/RECORD +0 -146
- /architect_py/{grpc_client → grpc/models}/Marketdata/ArrayOfL1BookSnapshot.py +0 -0
- /architect_py/{grpc_client → grpc/models}/Marketdata/L2BookUpdate.py +0 -0
- /architect_py/{grpc_client → grpc/models}/Marketdata/TickerUpdate.py +0 -0
- /architect_py/{grpc_client → grpc/models}/Orderflow/Dropcopy.py +0 -0
- /architect_py/{grpc_client → grpc/models}/Orderflow/Orderflow.py +0 -0
- {architect_py-3.2.1.dist-info → architect_py-5.0.0b1.dist-info/licenses}/LICENSE +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: definitions.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.common_types import OrderDir
|
6
6
|
from datetime import datetime, timezone
|
7
7
|
|
8
8
|
from datetime import date, datetime, time
|
@@ -49,7 +49,7 @@ class AccountPosition(Struct, omit_defaults=True):
|
|
49
49
|
Unrealized PNL of the position, if known.
|
50
50
|
"""
|
51
51
|
|
52
|
-
#
|
52
|
+
# Constructor that takes all field titles as arguments for convenience
|
53
53
|
@classmethod
|
54
54
|
def new(
|
55
55
|
cls,
|
@@ -131,7 +131,7 @@ class AccountStatistics(Struct, omit_defaults=True):
|
|
131
131
|
Yesterday total account equity.
|
132
132
|
"""
|
133
133
|
|
134
|
-
#
|
134
|
+
# Constructor that takes all field titles as arguments for convenience
|
135
135
|
@classmethod
|
136
136
|
def new(
|
137
137
|
cls,
|
@@ -159,130 +159,32 @@ class AccountStatistics(Struct, omit_defaults=True):
|
|
159
159
|
return f"AccountStatistics(cash_excess={self.cash_excess},equity={self.equity},position_margin={self.position_margin},purchasing_power={self.purchasing_power},realized_pnl={self.realized_pnl},total_margin={self.total_margin},unrealized_pnl={self.unrealized_pnl},yesterday_equity={self.yesterday_equity})"
|
160
160
|
|
161
161
|
|
162
|
-
class AggregatedAccountSummary(Struct, omit_defaults=True):
|
163
|
-
account: str
|
164
|
-
balances: Dict[str, Decimal]
|
165
|
-
positions: Dict[str, AccountPosition]
|
166
|
-
timestamp: datetime
|
167
|
-
cash_excess: Optional[
|
168
|
-
Annotated[Optional[Decimal], Meta(description="Cash available to withdraw.")]
|
169
|
-
] = None
|
170
|
-
"""
|
171
|
-
Cash available to withdraw.
|
172
|
-
"""
|
173
|
-
equity: Optional[
|
174
|
-
Annotated[
|
175
|
-
Optional[Decimal],
|
176
|
-
Meta(description="Total account equity; net liquidation value."),
|
177
|
-
]
|
178
|
-
] = None
|
179
|
-
"""
|
180
|
-
Total account equity; net liquidation value.
|
181
|
-
"""
|
182
|
-
position_margin: Optional[
|
183
|
-
Annotated[
|
184
|
-
Optional[Decimal],
|
185
|
-
Meta(description="Margin requirement based on current positions only."),
|
186
|
-
]
|
187
|
-
] = None
|
188
|
-
"""
|
189
|
-
Margin requirement based on current positions only.
|
190
|
-
"""
|
191
|
-
purchasing_power: Optional[
|
192
|
-
Annotated[
|
193
|
-
Optional[Decimal],
|
194
|
-
Meta(
|
195
|
-
description="Total purchasing power; post-multiplied. (e.g. for cash margin account could be 2x available cash)"
|
196
|
-
),
|
197
|
-
]
|
198
|
-
] = None
|
199
|
-
"""
|
200
|
-
Total purchasing power; post-multiplied. (e.g. for cash margin account could be 2x available cash)
|
201
|
-
"""
|
202
|
-
realized_pnl: Optional[Decimal] = None
|
203
|
-
total_margin: Optional[
|
204
|
-
Annotated[
|
205
|
-
Optional[Decimal],
|
206
|
-
Meta(
|
207
|
-
description="Margin requirement calculated for worst-case based on open positions and working orders."
|
208
|
-
),
|
209
|
-
]
|
210
|
-
] = None
|
211
|
-
"""
|
212
|
-
Margin requirement calculated for worst-case based on open positions and working orders.
|
213
|
-
"""
|
214
|
-
unrealized_pnl: Optional[Decimal] = None
|
215
|
-
yesterday_equity: Optional[
|
216
|
-
Annotated[
|
217
|
-
Optional[Decimal], Meta(description="Yesterday total account equity.")
|
218
|
-
]
|
219
|
-
] = None
|
220
|
-
"""
|
221
|
-
Yesterday total account equity.
|
222
|
-
"""
|
223
|
-
|
224
|
-
# below is a constructor that takes all field titles as arguments for convenience
|
225
|
-
@classmethod
|
226
|
-
def new(
|
227
|
-
cls,
|
228
|
-
account: str,
|
229
|
-
balances: Dict[str, Decimal],
|
230
|
-
positions: Dict[str, AccountPosition],
|
231
|
-
timestamp: datetime,
|
232
|
-
cash_excess: Optional[Decimal] = None,
|
233
|
-
equity: Optional[Decimal] = None,
|
234
|
-
position_margin: Optional[Decimal] = None,
|
235
|
-
purchasing_power: Optional[Decimal] = None,
|
236
|
-
realized_pnl: Optional[Decimal] = None,
|
237
|
-
total_margin: Optional[Decimal] = None,
|
238
|
-
unrealized_pnl: Optional[Decimal] = None,
|
239
|
-
yesterday_equity: Optional[Decimal] = None,
|
240
|
-
):
|
241
|
-
return cls(
|
242
|
-
account,
|
243
|
-
balances,
|
244
|
-
positions,
|
245
|
-
timestamp,
|
246
|
-
cash_excess,
|
247
|
-
equity,
|
248
|
-
position_margin,
|
249
|
-
purchasing_power,
|
250
|
-
realized_pnl,
|
251
|
-
total_margin,
|
252
|
-
unrealized_pnl,
|
253
|
-
yesterday_equity,
|
254
|
-
)
|
255
|
-
|
256
|
-
def __str__(self) -> str:
|
257
|
-
return f"AggregatedAccountSummary(account={self.account},balances={self.balances},positions={self.positions},timestamp={self.timestamp},cash_excess={self.cash_excess},equity={self.equity},position_margin={self.position_margin},purchasing_power={self.purchasing_power},realized_pnl={self.realized_pnl},total_margin={self.total_margin},unrealized_pnl={self.unrealized_pnl},yesterday_equity={self.yesterday_equity})"
|
258
|
-
|
259
|
-
|
260
162
|
class AlgoState(str, Enum):
|
261
163
|
Pending = "Pending"
|
262
164
|
Running = "Running"
|
263
165
|
Stopped = "Stopped"
|
264
166
|
|
265
167
|
|
266
|
-
class CancelStatus(
|
267
|
-
Pending =
|
268
|
-
Acked =
|
269
|
-
Rejected =
|
270
|
-
Out =
|
168
|
+
class CancelStatus(str, Enum):
|
169
|
+
Pending = "Pending"
|
170
|
+
Acked = "Acked"
|
171
|
+
Rejected = "Rejected"
|
172
|
+
Out = "Out"
|
271
173
|
|
272
174
|
|
273
|
-
class CandleWidth(
|
274
|
-
OneSecond =
|
275
|
-
FiveSecond =
|
276
|
-
OneMinute =
|
277
|
-
FifteenMinute =
|
278
|
-
OneHour =
|
279
|
-
OneDay =
|
175
|
+
class CandleWidth(str, Enum):
|
176
|
+
OneSecond = "OneSecond"
|
177
|
+
FiveSecond = "FiveSecond"
|
178
|
+
OneMinute = "OneMinute"
|
179
|
+
FifteenMinute = "FifteenMinute"
|
180
|
+
OneHour = "OneHour"
|
181
|
+
OneDay = "OneDay"
|
280
182
|
|
281
183
|
|
282
184
|
class CptyLogoutRequest(Struct, omit_defaults=True):
|
283
185
|
pass
|
284
186
|
|
285
|
-
#
|
187
|
+
# Constructor that takes all field titles as arguments for convenience
|
286
188
|
@classmethod
|
287
189
|
def new(
|
288
190
|
cls,
|
@@ -293,6 +195,9 @@ class CptyLogoutRequest(Struct, omit_defaults=True):
|
|
293
195
|
return f"CptyLogoutRequest()"
|
294
196
|
|
295
197
|
|
198
|
+
DateTimeOrUtc = datetime
|
199
|
+
|
200
|
+
|
296
201
|
class HealthMetric(Struct, omit_defaults=True):
|
297
202
|
timestamp: int
|
298
203
|
value: float
|
@@ -301,7 +206,7 @@ class HealthMetric(Struct, omit_defaults=True):
|
|
301
206
|
should_be_less_than: Optional[float] = None
|
302
207
|
should_be_less_than_or_equal_to: Optional[float] = None
|
303
208
|
|
304
|
-
#
|
209
|
+
# Constructor that takes all field titles as arguments for convenience
|
305
210
|
@classmethod
|
306
211
|
def new(
|
307
212
|
cls,
|
@@ -368,7 +273,7 @@ class L2BookDiff(Struct, omit_defaults=True):
|
|
368
273
|
tn: Annotated[int, Meta(ge=0, title="timestamp_ns")]
|
369
274
|
ts: Annotated[int, Meta(title="timestamp")]
|
370
275
|
|
371
|
-
#
|
276
|
+
# Constructor that takes all field titles as arguments for convenience
|
372
277
|
@classmethod
|
373
278
|
def new(
|
374
279
|
cls,
|
@@ -456,7 +361,7 @@ class OrderId(Struct, omit_defaults=True):
|
|
456
361
|
seqid: str
|
457
362
|
seqno: Annotated[int, Meta(ge=0)]
|
458
363
|
|
459
|
-
#
|
364
|
+
# Constructor that takes all field titles as arguments for convenience
|
460
365
|
@classmethod
|
461
366
|
def new(
|
462
367
|
cls,
|
@@ -475,7 +380,7 @@ class OrderId(Struct, omit_defaults=True):
|
|
475
380
|
class OrderOut(Struct, omit_defaults=True):
|
476
381
|
id: OrderId
|
477
382
|
|
478
|
-
#
|
383
|
+
# Constructor that takes all field titles as arguments for convenience
|
479
384
|
@classmethod
|
480
385
|
def new(
|
481
386
|
cls,
|
@@ -503,20 +408,20 @@ class OrderRejectReason(str, Enum):
|
|
503
408
|
Unknown = "Unknown"
|
504
409
|
|
505
410
|
|
506
|
-
class OrderSource(
|
507
|
-
API =
|
508
|
-
GUI =
|
509
|
-
Algo =
|
510
|
-
Reconciled =
|
511
|
-
CLI =
|
512
|
-
Telegram =
|
513
|
-
Other =
|
411
|
+
class OrderSource(str, Enum):
|
412
|
+
API = "API"
|
413
|
+
GUI = "GUI"
|
414
|
+
Algo = "Algo"
|
415
|
+
Reconciled = "Reconciled"
|
416
|
+
CLI = "CLI"
|
417
|
+
Telegram = "Telegram"
|
418
|
+
Other = "Other"
|
514
419
|
|
515
420
|
|
516
421
|
class OrderStale(Struct, omit_defaults=True):
|
517
422
|
id: OrderId
|
518
423
|
|
519
|
-
#
|
424
|
+
# Constructor that takes all field titles as arguments for convenience
|
520
425
|
@classmethod
|
521
426
|
def new(
|
522
427
|
cls,
|
@@ -530,16 +435,101 @@ class OrderStale(Struct, omit_defaults=True):
|
|
530
435
|
return f"OrderStale(id={self.id})"
|
531
436
|
|
532
437
|
|
533
|
-
class OrderStatus(
|
534
|
-
Pending =
|
535
|
-
Open =
|
536
|
-
Rejected =
|
537
|
-
Out =
|
538
|
-
Canceling =
|
539
|
-
Canceled =
|
540
|
-
ReconciledOut =
|
541
|
-
Stale =
|
542
|
-
Unknown =
|
438
|
+
class OrderStatus(str, Enum):
|
439
|
+
Pending = "Pending"
|
440
|
+
Open = "Open"
|
441
|
+
Rejected = "Rejected"
|
442
|
+
Out = "Out"
|
443
|
+
Canceling = "Canceling"
|
444
|
+
Canceled = "Canceled"
|
445
|
+
ReconciledOut = "ReconciledOut"
|
446
|
+
Stale = "Stale"
|
447
|
+
Unknown = "Unknown"
|
448
|
+
|
449
|
+
|
450
|
+
class ProductCatalogInfo(Struct, omit_defaults=True):
|
451
|
+
"""
|
452
|
+
Loosely normalized information about exchange products; used to seed symbology loaders and populate extended product info;
|
453
|
+
|
454
|
+
Symbology loaders will use catalog fields to augment and/or cross-check any other load source.
|
455
|
+
"""
|
456
|
+
|
457
|
+
exchange: str
|
458
|
+
exchange_product: Annotated[str, Meta(description="Could be anything really")]
|
459
|
+
"""
|
460
|
+
Could be anything really
|
461
|
+
"""
|
462
|
+
category: Optional[str] = None
|
463
|
+
cqg_contract_symbol: Optional[str] = None
|
464
|
+
info_url: Optional[
|
465
|
+
Annotated[Optional[str], Meta(description="URL to more product info")]
|
466
|
+
] = None
|
467
|
+
"""
|
468
|
+
URL to more product info
|
469
|
+
"""
|
470
|
+
long_description: Optional[str] = None
|
471
|
+
multiplier: Optional[
|
472
|
+
Annotated[
|
473
|
+
Optional[Decimal],
|
474
|
+
Meta(description="For derivatives contracts, the multiplier"),
|
475
|
+
]
|
476
|
+
] = None
|
477
|
+
"""
|
478
|
+
For derivatives contracts, the multiplier
|
479
|
+
"""
|
480
|
+
price_display_format: Optional[str] = None
|
481
|
+
quote_currency: Optional[str] = None
|
482
|
+
schedule_description: Optional[str] = None
|
483
|
+
settle_method: Optional[str] = None
|
484
|
+
short_description: Optional[
|
485
|
+
Annotated[
|
486
|
+
Optional[str],
|
487
|
+
Meta(
|
488
|
+
description="Short description of the product, suitable for display in a bubble, for example"
|
489
|
+
),
|
490
|
+
]
|
491
|
+
] = None
|
492
|
+
"""
|
493
|
+
Short description of the product, suitable for display in a bubble, for example
|
494
|
+
"""
|
495
|
+
sub_category: Optional[str] = None
|
496
|
+
|
497
|
+
# Constructor that takes all field titles as arguments for convenience
|
498
|
+
@classmethod
|
499
|
+
def new(
|
500
|
+
cls,
|
501
|
+
exchange: str,
|
502
|
+
exchange_product: str,
|
503
|
+
category: Optional[str] = None,
|
504
|
+
cqg_contract_symbol: Optional[str] = None,
|
505
|
+
info_url: Optional[str] = None,
|
506
|
+
long_description: Optional[str] = None,
|
507
|
+
multiplier: Optional[Decimal] = None,
|
508
|
+
price_display_format: Optional[str] = None,
|
509
|
+
quote_currency: Optional[str] = None,
|
510
|
+
schedule_description: Optional[str] = None,
|
511
|
+
settle_method: Optional[str] = None,
|
512
|
+
short_description: Optional[str] = None,
|
513
|
+
sub_category: Optional[str] = None,
|
514
|
+
):
|
515
|
+
return cls(
|
516
|
+
exchange,
|
517
|
+
exchange_product,
|
518
|
+
category,
|
519
|
+
cqg_contract_symbol,
|
520
|
+
info_url,
|
521
|
+
long_description,
|
522
|
+
multiplier,
|
523
|
+
price_display_format,
|
524
|
+
quote_currency,
|
525
|
+
schedule_description,
|
526
|
+
settle_method,
|
527
|
+
short_description,
|
528
|
+
sub_category,
|
529
|
+
)
|
530
|
+
|
531
|
+
def __str__(self) -> str:
|
532
|
+
return f"ProductCatalogInfo(exchange={self.exchange},exchange_product={self.exchange_product},category={self.category},cqg_contract_symbol={self.cqg_contract_symbol},info_url={self.info_url},long_description={self.long_description},multiplier={self.multiplier},price_display_format={self.price_display_format},quote_currency={self.quote_currency},schedule_description={self.schedule_description},settle_method={self.settle_method},short_description={self.short_description},sub_category={self.sub_category})"
|
543
533
|
|
544
534
|
|
545
535
|
class SortTickersBy(str, Enum):
|
@@ -552,7 +542,7 @@ class SortTickersBy(str, Enum):
|
|
552
542
|
class GoodTilDate(Struct, omit_defaults=True):
|
553
543
|
GTD: datetime
|
554
544
|
|
555
|
-
#
|
545
|
+
# Constructor that takes all field titles as arguments for convenience
|
556
546
|
@classmethod
|
557
547
|
def new(
|
558
548
|
cls,
|
@@ -585,7 +575,7 @@ class TwapStatus(Struct, omit_defaults=True):
|
|
585
575
|
quantity_filled: Decimal
|
586
576
|
realized_twap: Optional[Decimal] = None
|
587
577
|
|
588
|
-
#
|
578
|
+
# Constructor that takes all field titles as arguments for convenience
|
589
579
|
@classmethod
|
590
580
|
def new(
|
591
581
|
cls,
|
@@ -615,7 +605,7 @@ class AccountPermissions(Struct, omit_defaults=True):
|
|
615
605
|
trade: bool
|
616
606
|
view: bool
|
617
607
|
|
618
|
-
#
|
608
|
+
# Constructor that takes all field titles as arguments for convenience
|
619
609
|
@classmethod
|
620
610
|
def new(
|
621
611
|
cls,
|
@@ -648,50 +638,35 @@ class DerivativeKind(str, Enum):
|
|
648
638
|
Quanto = "Quanto"
|
649
639
|
|
650
640
|
|
651
|
-
class FillKind(
|
652
|
-
Normal =
|
653
|
-
Reversal =
|
654
|
-
Correction =
|
641
|
+
class FillKind(str, Enum):
|
642
|
+
Normal = "Normal"
|
643
|
+
Reversal = "Reversal"
|
644
|
+
Correction = "Correction"
|
655
645
|
|
656
646
|
|
657
647
|
HumanDuration = str
|
658
648
|
|
659
649
|
|
660
|
-
class
|
661
|
-
|
650
|
+
class Unit(str, Enum):
|
651
|
+
base = "base"
|
652
|
+
quote = "quote"
|
662
653
|
|
663
|
-
# below is a constructor that takes all field titles as arguments for convenience
|
664
|
-
@classmethod
|
665
|
-
def new(
|
666
|
-
cls,
|
667
|
-
unit: Literal["base"],
|
668
|
-
):
|
669
|
-
return cls(
|
670
|
-
unit,
|
671
|
-
)
|
672
|
-
|
673
|
-
def __str__(self) -> str:
|
674
|
-
return f"Base(unit={self.unit})"
|
675
654
|
|
655
|
+
class MinOrderQuantityUnit(Struct, omit_defaults=True):
|
656
|
+
unit: Unit
|
676
657
|
|
677
|
-
|
678
|
-
unit: Literal["quote"]
|
679
|
-
|
680
|
-
# below is a constructor that takes all field titles as arguments for convenience
|
658
|
+
# Constructor that takes all field titles as arguments for convenience
|
681
659
|
@classmethod
|
682
660
|
def new(
|
683
661
|
cls,
|
684
|
-
unit:
|
662
|
+
unit: Unit,
|
685
663
|
):
|
686
664
|
return cls(
|
687
665
|
unit,
|
688
666
|
)
|
689
667
|
|
690
668
|
def __str__(self) -> str:
|
691
|
-
return f"
|
692
|
-
|
693
|
-
|
694
|
-
MinOrderQuantityUnit = Union[Base, Quote]
|
669
|
+
return f"MinOrderQuantityUnit(unit={self.unit})"
|
695
670
|
|
696
671
|
|
697
672
|
class OptionsExerciseType(str, Enum):
|
@@ -706,7 +681,7 @@ PriceDisplayFormat = str
|
|
706
681
|
class Fiat(Struct, omit_defaults=True):
|
707
682
|
product_type: Literal["Fiat"]
|
708
683
|
|
709
|
-
#
|
684
|
+
# Constructor that takes all field titles as arguments for convenience
|
710
685
|
@classmethod
|
711
686
|
def new(
|
712
687
|
cls,
|
@@ -723,7 +698,7 @@ class Fiat(Struct, omit_defaults=True):
|
|
723
698
|
class Commodity(Struct, omit_defaults=True):
|
724
699
|
product_type: Literal["Commodity"]
|
725
700
|
|
726
|
-
#
|
701
|
+
# Constructor that takes all field titles as arguments for convenience
|
727
702
|
@classmethod
|
728
703
|
def new(
|
729
704
|
cls,
|
@@ -740,7 +715,7 @@ class Commodity(Struct, omit_defaults=True):
|
|
740
715
|
class Crypto(Struct, omit_defaults=True):
|
741
716
|
product_type: Literal["Crypto"]
|
742
717
|
|
743
|
-
#
|
718
|
+
# Constructor that takes all field titles as arguments for convenience
|
744
719
|
@classmethod
|
745
720
|
def new(
|
746
721
|
cls,
|
@@ -758,7 +733,7 @@ class Equity(Struct, omit_defaults=True):
|
|
758
733
|
product_type: Literal["Equity"]
|
759
734
|
easy_to_borrow: Optional[bool] = None
|
760
735
|
|
761
|
-
#
|
736
|
+
# Constructor that takes all field titles as arguments for convenience
|
762
737
|
@classmethod
|
763
738
|
def new(
|
764
739
|
cls,
|
@@ -777,7 +752,7 @@ class Equity(Struct, omit_defaults=True):
|
|
777
752
|
class Index(Struct, omit_defaults=True):
|
778
753
|
product_type: Literal["Index"]
|
779
754
|
|
780
|
-
#
|
755
|
+
# Constructor that takes all field titles as arguments for convenience
|
781
756
|
@classmethod
|
782
757
|
def new(
|
783
758
|
cls,
|
@@ -800,7 +775,7 @@ class Future(Struct, omit_defaults=True):
|
|
800
775
|
series: Optional[str] = None
|
801
776
|
underlying: Optional[str] = None
|
802
777
|
|
803
|
-
#
|
778
|
+
# Constructor that takes all field titles as arguments for convenience
|
804
779
|
@classmethod
|
805
780
|
def new(
|
806
781
|
cls,
|
@@ -832,7 +807,7 @@ class Perpetual(Struct, omit_defaults=True):
|
|
832
807
|
product_type: Literal["Perpetual"]
|
833
808
|
underlying: Optional[str] = None
|
834
809
|
|
835
|
-
#
|
810
|
+
# Constructor that takes all field titles as arguments for convenience
|
836
811
|
@classmethod
|
837
812
|
def new(
|
838
813
|
cls,
|
@@ -855,7 +830,7 @@ class Perpetual(Struct, omit_defaults=True):
|
|
855
830
|
class Unknown(Struct, omit_defaults=True):
|
856
831
|
product_type: Literal["Unknown"]
|
857
832
|
|
858
|
-
#
|
833
|
+
# Constructor that takes all field titles as arguments for convenience
|
859
834
|
@classmethod
|
860
835
|
def new(
|
861
836
|
cls,
|
@@ -869,10 +844,57 @@ class Unknown(Struct, omit_defaults=True):
|
|
869
844
|
return f"Unknown(product_type={self.product_type})"
|
870
845
|
|
871
846
|
|
847
|
+
class SnapshotOrUpdateForStringAndProductCatalogInfo1(Struct, omit_defaults=True):
|
848
|
+
snapshot: Dict[str, ProductCatalogInfo]
|
849
|
+
|
850
|
+
# Constructor that takes all field titles as arguments for convenience
|
851
|
+
@classmethod
|
852
|
+
def new(
|
853
|
+
cls,
|
854
|
+
snapshot: Dict[str, ProductCatalogInfo],
|
855
|
+
):
|
856
|
+
return cls(
|
857
|
+
snapshot,
|
858
|
+
)
|
859
|
+
|
860
|
+
def __str__(self) -> str:
|
861
|
+
return (
|
862
|
+
f"SnapshotOrUpdateForStringAndProductCatalogInfo1(snapshot={self.snapshot})"
|
863
|
+
)
|
864
|
+
|
865
|
+
|
866
|
+
Update6 = List[Union[str, Optional[ProductCatalogInfo]]]
|
867
|
+
|
868
|
+
|
869
|
+
class SnapshotOrUpdateForStringAndProductCatalogInfo2(Struct, omit_defaults=True):
|
870
|
+
updates: List[Update6]
|
871
|
+
|
872
|
+
# Constructor that takes all field titles as arguments for convenience
|
873
|
+
@classmethod
|
874
|
+
def new(
|
875
|
+
cls,
|
876
|
+
updates: List[Update6],
|
877
|
+
):
|
878
|
+
return cls(
|
879
|
+
updates,
|
880
|
+
)
|
881
|
+
|
882
|
+
def __str__(self) -> str:
|
883
|
+
return (
|
884
|
+
f"SnapshotOrUpdateForStringAndProductCatalogInfo2(updates={self.updates})"
|
885
|
+
)
|
886
|
+
|
887
|
+
|
888
|
+
SnapshotOrUpdateForStringAndProductCatalogInfo = Union[
|
889
|
+
SnapshotOrUpdateForStringAndProductCatalogInfo1,
|
890
|
+
SnapshotOrUpdateForStringAndProductCatalogInfo2,
|
891
|
+
]
|
892
|
+
|
893
|
+
|
872
894
|
class SnapshotOrUpdateForStringAndString1(Struct, omit_defaults=True):
|
873
895
|
snapshot: Dict[str, str]
|
874
896
|
|
875
|
-
#
|
897
|
+
# Constructor that takes all field titles as arguments for convenience
|
876
898
|
@classmethod
|
877
899
|
def new(
|
878
900
|
cls,
|
@@ -886,17 +908,17 @@ class SnapshotOrUpdateForStringAndString1(Struct, omit_defaults=True):
|
|
886
908
|
return f"SnapshotOrUpdateForStringAndString1(snapshot={self.snapshot})"
|
887
909
|
|
888
910
|
|
889
|
-
|
911
|
+
Update7 = List[Union[str, Optional[str]]]
|
890
912
|
|
891
913
|
|
892
914
|
class SnapshotOrUpdateForStringAndString2(Struct, omit_defaults=True):
|
893
|
-
updates: List[
|
915
|
+
updates: List[Update7]
|
894
916
|
|
895
|
-
#
|
917
|
+
# Constructor that takes all field titles as arguments for convenience
|
896
918
|
@classmethod
|
897
919
|
def new(
|
898
920
|
cls,
|
899
|
-
updates: List[
|
921
|
+
updates: List[Update7],
|
900
922
|
):
|
901
923
|
return cls(
|
902
924
|
updates,
|
@@ -914,7 +936,7 @@ SnapshotOrUpdateForStringAndString = Union[
|
|
914
936
|
class SimpleDecimal(Struct, omit_defaults=True):
|
915
937
|
simple: Decimal
|
916
938
|
|
917
|
-
#
|
939
|
+
# Constructor that takes all field titles as arguments for convenience
|
918
940
|
@classmethod
|
919
941
|
def new(
|
920
942
|
cls,
|
@@ -934,7 +956,7 @@ Threshold = List[Decimal]
|
|
934
956
|
class Varying1(Struct, omit_defaults=True):
|
935
957
|
thresholds: List[Threshold]
|
936
958
|
|
937
|
-
#
|
959
|
+
# Constructor that takes all field titles as arguments for convenience
|
938
960
|
@classmethod
|
939
961
|
def new(
|
940
962
|
cls,
|
@@ -955,7 +977,7 @@ class Varying(Struct, omit_defaults=True):
|
|
955
977
|
|
956
978
|
varying: Varying1
|
957
979
|
|
958
|
-
#
|
980
|
+
# Constructor that takes all field titles as arguments for convenience
|
959
981
|
@classmethod
|
960
982
|
def new(
|
961
983
|
cls,
|
@@ -1072,6 +1094,7 @@ class TimeZone(str, Enum):
|
|
1072
1094
|
America_Coral_Harbour = "America/Coral_Harbour"
|
1073
1095
|
America_Cordoba = "America/Cordoba"
|
1074
1096
|
America_Costa_Rica = "America/Costa_Rica"
|
1097
|
+
America_Coyhaique = "America/Coyhaique"
|
1075
1098
|
America_Creston = "America/Creston"
|
1076
1099
|
America_Cuiaba = "America/Cuiaba"
|
1077
1100
|
America_Curacao = "America/Curacao"
|
@@ -1578,7 +1601,7 @@ class OptionLike(Struct, omit_defaults=True):
|
|
1578
1601
|
strike: Decimal
|
1579
1602
|
expiration: Optional[datetime] = None
|
1580
1603
|
|
1581
|
-
#
|
1604
|
+
# Constructor that takes all field titles as arguments for convenience
|
1582
1605
|
@classmethod
|
1583
1606
|
def new(
|
1584
1607
|
cls,
|
@@ -1597,7 +1620,7 @@ class OptionLike(Struct, omit_defaults=True):
|
|
1597
1620
|
class EventContractSeriesInstance2(Struct, omit_defaults=True):
|
1598
1621
|
OptionLike: OptionLike
|
1599
1622
|
|
1600
|
-
#
|
1623
|
+
# Constructor that takes all field titles as arguments for convenience
|
1601
1624
|
@classmethod
|
1602
1625
|
def new(
|
1603
1626
|
cls,
|
@@ -1623,7 +1646,7 @@ class SpreadLeg(Struct, omit_defaults=True):
|
|
1623
1646
|
Some spreads have different ratios for their legs, like buy 1 A, sell 2 B, buy 1 C; We would represent that with quantities in the legs: 1, -2, 1
|
1624
1647
|
"""
|
1625
1648
|
|
1626
|
-
#
|
1649
|
+
# Constructor that takes all field titles as arguments for convenience
|
1627
1650
|
@classmethod
|
1628
1651
|
def new(
|
1629
1652
|
cls,
|
@@ -1642,7 +1665,7 @@ class SpreadLeg(Struct, omit_defaults=True):
|
|
1642
1665
|
class Outcome(Struct, omit_defaults=True):
|
1643
1666
|
name: str
|
1644
1667
|
|
1645
|
-
#
|
1668
|
+
# Constructor that takes all field titles as arguments for convenience
|
1646
1669
|
@classmethod
|
1647
1670
|
def new(
|
1648
1671
|
cls,
|
@@ -1669,7 +1692,7 @@ class AberrantFill(Struct, omit_defaults=True):
|
|
1669
1692
|
id: Annotated[str, Meta(title="fill_id")]
|
1670
1693
|
x: Annotated[str, Meta(title="execution_venue")]
|
1671
1694
|
a: Optional[Annotated[Optional[str], Meta(title="account")]] = None
|
1672
|
-
atn: Optional[Annotated[Optional[int], Meta(
|
1695
|
+
atn: Optional[Annotated[Optional[int], Meta(title="recv_time_ns")]] = None
|
1673
1696
|
ats: Optional[Annotated[Optional[int], Meta(title="recv_time")]] = None
|
1674
1697
|
d: Optional[Annotated[Optional[OrderDir], Meta(title="direction")]] = None
|
1675
1698
|
f: Optional[Annotated[Optional[Decimal], Meta(title="fee")]] = None
|
@@ -1679,12 +1702,12 @@ class AberrantFill(Struct, omit_defaults=True):
|
|
1679
1702
|
p: Optional[Annotated[Optional[Decimal], Meta(title="price")]] = None
|
1680
1703
|
q: Optional[Annotated[Optional[Decimal], Meta(title="quantity")]] = None
|
1681
1704
|
s: Optional[Annotated[Optional[str], Meta(title="symbol")]] = None
|
1682
|
-
tn: Optional[Annotated[Optional[int], Meta(
|
1705
|
+
tn: Optional[Annotated[Optional[int], Meta(title="trade_time_ns")]] = None
|
1683
1706
|
ts: Optional[Annotated[Optional[int], Meta(title="trade_time")]] = None
|
1684
1707
|
u: Optional[Annotated[Optional[UserId], Meta(title="trader")]] = None
|
1685
1708
|
xid: Optional[Annotated[Optional[str], Meta(title="exchange_fill_id")]] = None
|
1686
1709
|
|
1687
|
-
#
|
1710
|
+
# Constructor that takes all field titles as arguments for convenience
|
1688
1711
|
@classmethod
|
1689
1712
|
def new(
|
1690
1713
|
cls,
|
@@ -1871,7 +1894,7 @@ class CancelReject(Struct, omit_defaults=True):
|
|
1871
1894
|
xid: str
|
1872
1895
|
rm: Optional[str] = None
|
1873
1896
|
|
1874
|
-
#
|
1897
|
+
# Constructor that takes all field titles as arguments for convenience
|
1875
1898
|
@classmethod
|
1876
1899
|
def new(
|
1877
1900
|
cls,
|
@@ -1893,7 +1916,7 @@ class CptyLoginRequest(Struct, omit_defaults=True):
|
|
1893
1916
|
account: str
|
1894
1917
|
trader: UserId
|
1895
1918
|
|
1896
|
-
#
|
1919
|
+
# Constructor that takes all field titles as arguments for convenience
|
1897
1920
|
@classmethod
|
1898
1921
|
def new(
|
1899
1922
|
cls,
|
@@ -1934,7 +1957,7 @@ class ExecutionInfo(Struct, omit_defaults=True):
|
|
1934
1957
|
initial_margin: Optional[Decimal] = None
|
1935
1958
|
maintenance_margin: Optional[Decimal] = None
|
1936
1959
|
|
1937
|
-
#
|
1960
|
+
# Constructor that takes all field titles as arguments for convenience
|
1938
1961
|
@classmethod
|
1939
1962
|
def new(
|
1940
1963
|
cls,
|
@@ -1982,7 +2005,7 @@ class Fill(Struct, omit_defaults=True):
|
|
1982
2005
|
x: Annotated[str, Meta(title="execution_venue")]
|
1983
2006
|
a: Optional[Annotated[Optional[str], Meta(title="account")]] = None
|
1984
2007
|
agg: Optional[Annotated[int, Meta(title="is_taker")]] = None
|
1985
|
-
atn: Optional[Annotated[Optional[int], Meta(
|
2008
|
+
atn: Optional[Annotated[Optional[int], Meta(title="recv_time_ns")]] = None
|
1986
2009
|
ats: Optional[
|
1987
2010
|
Annotated[
|
1988
2011
|
Optional[int],
|
@@ -2012,7 +2035,7 @@ class Fill(Struct, omit_defaults=True):
|
|
2012
2035
|
u: Optional[Annotated[Optional[UserId], Meta(title="trader")]] = None
|
2013
2036
|
xid: Optional[Annotated[Optional[str], Meta(title="exchange_fill_id")]] = None
|
2014
2037
|
|
2015
|
-
#
|
2038
|
+
# Constructor that takes all field titles as arguments for convenience
|
2016
2039
|
@classmethod
|
2017
2040
|
def new(
|
2018
2041
|
cls,
|
@@ -2217,7 +2240,7 @@ class OptionsSeriesInfo(Struct, omit_defaults=True):
|
|
2217
2240
|
underlying: str
|
2218
2241
|
venue_discriminant: Optional[str] = None
|
2219
2242
|
|
2220
|
-
#
|
2243
|
+
# Constructor that takes all field titles as arguments for convenience
|
2221
2244
|
@classmethod
|
2222
2245
|
def new(
|
2223
2246
|
cls,
|
@@ -2255,7 +2278,7 @@ class OrderAck(Struct, omit_defaults=True):
|
|
2255
2278
|
id: Annotated[OrderId, Meta(title="order_id")]
|
2256
2279
|
eid: Optional[Annotated[Optional[str], Meta(title="exchange_order_id")]] = None
|
2257
2280
|
|
2258
|
-
#
|
2281
|
+
# Constructor that takes all field titles as arguments for convenience
|
2259
2282
|
@classmethod
|
2260
2283
|
def new(
|
2261
2284
|
cls,
|
@@ -2291,7 +2314,7 @@ class OrderCanceled(Struct, omit_defaults=True):
|
|
2291
2314
|
id: OrderId
|
2292
2315
|
xid: Optional[str] = None
|
2293
2316
|
|
2294
|
-
#
|
2317
|
+
# Constructor that takes all field titles as arguments for convenience
|
2295
2318
|
@classmethod
|
2296
2319
|
def new(
|
2297
2320
|
cls,
|
@@ -2311,7 +2334,7 @@ class OrderCanceling(Struct, omit_defaults=True):
|
|
2311
2334
|
id: OrderId
|
2312
2335
|
xid: Optional[str] = None
|
2313
2336
|
|
2314
|
-
#
|
2337
|
+
# Constructor that takes all field titles as arguments for convenience
|
2315
2338
|
@classmethod
|
2316
2339
|
def new(
|
2317
2340
|
cls,
|
@@ -2332,7 +2355,7 @@ class OrderReject(Struct, omit_defaults=True):
|
|
2332
2355
|
r: OrderRejectReason
|
2333
2356
|
rm: Optional[str] = None
|
2334
2357
|
|
2335
|
-
#
|
2358
|
+
# Constructor that takes all field titles as arguments for convenience
|
2336
2359
|
@classmethod
|
2337
2360
|
def new(
|
2338
2361
|
cls,
|
@@ -2355,7 +2378,7 @@ class SnapshotOrUpdateForAliasKindAndSnapshotOrUpdateForStringAndString1(
|
|
2355
2378
|
):
|
2356
2379
|
snapshot: Dict[str, SnapshotOrUpdateForStringAndString]
|
2357
2380
|
|
2358
|
-
#
|
2381
|
+
# Constructor that takes all field titles as arguments for convenience
|
2359
2382
|
@classmethod
|
2360
2383
|
def new(
|
2361
2384
|
cls,
|
@@ -2377,7 +2400,7 @@ class SnapshotOrUpdateForAliasKindAndSnapshotOrUpdateForStringAndString2(
|
|
2377
2400
|
):
|
2378
2401
|
updates: List[Update]
|
2379
2402
|
|
2380
|
-
#
|
2403
|
+
# Constructor that takes all field titles as arguments for convenience
|
2381
2404
|
@classmethod
|
2382
2405
|
def new(
|
2383
2406
|
cls,
|
@@ -2400,7 +2423,7 @@ SnapshotOrUpdateForAliasKindAndSnapshotOrUpdateForStringAndString = Union[
|
|
2400
2423
|
class SnapshotOrUpdateForStringAndOptionsSeriesInfo1(Struct, omit_defaults=True):
|
2401
2424
|
snapshot: Dict[str, OptionsSeriesInfo]
|
2402
2425
|
|
2403
|
-
#
|
2426
|
+
# Constructor that takes all field titles as arguments for convenience
|
2404
2427
|
@classmethod
|
2405
2428
|
def new(
|
2406
2429
|
cls,
|
@@ -2422,7 +2445,7 @@ Update1 = List[Union[str, Optional[OptionsSeriesInfo]]]
|
|
2422
2445
|
class SnapshotOrUpdateForStringAndOptionsSeriesInfo2(Struct, omit_defaults=True):
|
2423
2446
|
updates: List[Update1]
|
2424
2447
|
|
2425
|
-
#
|
2448
|
+
# Constructor that takes all field titles as arguments for convenience
|
2426
2449
|
@classmethod
|
2427
2450
|
def new(
|
2428
2451
|
cls,
|
@@ -2442,6 +2465,53 @@ SnapshotOrUpdateForStringAndOptionsSeriesInfo = Union[
|
|
2442
2465
|
]
|
2443
2466
|
|
2444
2467
|
|
2468
|
+
class SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndProductCatalogInfo1(
|
2469
|
+
Struct
|
2470
|
+
):
|
2471
|
+
snapshot: Dict[str, SnapshotOrUpdateForStringAndProductCatalogInfo]
|
2472
|
+
|
2473
|
+
# Constructor that takes all field titles as arguments for convenience
|
2474
|
+
@classmethod
|
2475
|
+
def new(
|
2476
|
+
cls,
|
2477
|
+
snapshot: Dict[str, SnapshotOrUpdateForStringAndProductCatalogInfo],
|
2478
|
+
):
|
2479
|
+
return cls(
|
2480
|
+
snapshot,
|
2481
|
+
)
|
2482
|
+
|
2483
|
+
def __str__(self) -> str:
|
2484
|
+
return f"SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndProductCatalogInfo1(snapshot={self.snapshot})"
|
2485
|
+
|
2486
|
+
|
2487
|
+
Update4 = List[Union[str, Optional[SnapshotOrUpdateForStringAndProductCatalogInfo]]]
|
2488
|
+
|
2489
|
+
|
2490
|
+
class SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndProductCatalogInfo2(
|
2491
|
+
Struct
|
2492
|
+
):
|
2493
|
+
updates: List[Update4]
|
2494
|
+
|
2495
|
+
# Constructor that takes all field titles as arguments for convenience
|
2496
|
+
@classmethod
|
2497
|
+
def new(
|
2498
|
+
cls,
|
2499
|
+
updates: List[Update4],
|
2500
|
+
):
|
2501
|
+
return cls(
|
2502
|
+
updates,
|
2503
|
+
)
|
2504
|
+
|
2505
|
+
def __str__(self) -> str:
|
2506
|
+
return f"SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndProductCatalogInfo2(updates={self.updates})"
|
2507
|
+
|
2508
|
+
|
2509
|
+
SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndProductCatalogInfo = Union[
|
2510
|
+
SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndProductCatalogInfo1,
|
2511
|
+
SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndProductCatalogInfo2,
|
2512
|
+
]
|
2513
|
+
|
2514
|
+
|
2445
2515
|
class TwapParams(Struct, omit_defaults=True):
|
2446
2516
|
dir: OrderDir
|
2447
2517
|
end_time: datetime
|
@@ -2452,7 +2522,7 @@ class TwapParams(Struct, omit_defaults=True):
|
|
2452
2522
|
symbol: str
|
2453
2523
|
take_through_frac: Optional[Decimal] = None
|
2454
2524
|
|
2455
|
-
#
|
2525
|
+
# Constructor that takes all field titles as arguments for convenience
|
2456
2526
|
@classmethod
|
2457
2527
|
def new(
|
2458
2528
|
cls,
|
@@ -2484,7 +2554,7 @@ class Account(Struct, omit_defaults=True):
|
|
2484
2554
|
id: str
|
2485
2555
|
name: AccountName
|
2486
2556
|
|
2487
|
-
#
|
2557
|
+
# Constructor that takes all field titles as arguments for convenience
|
2488
2558
|
@classmethod
|
2489
2559
|
def new(
|
2490
2560
|
cls,
|
@@ -2504,7 +2574,7 @@ class FutureSpread(Struct, omit_defaults=True):
|
|
2504
2574
|
legs: List[SpreadLeg]
|
2505
2575
|
product_type: Literal["FutureSpread"]
|
2506
2576
|
|
2507
|
-
#
|
2577
|
+
# Constructor that takes all field titles as arguments for convenience
|
2508
2578
|
@classmethod
|
2509
2579
|
def new(
|
2510
2580
|
cls,
|
@@ -2523,7 +2593,7 @@ class FutureSpread(Struct, omit_defaults=True):
|
|
2523
2593
|
class SnapshotOrUpdateForStringAndExecutionInfo1(Struct, omit_defaults=True):
|
2524
2594
|
snapshot: Dict[str, ExecutionInfo]
|
2525
2595
|
|
2526
|
-
#
|
2596
|
+
# Constructor that takes all field titles as arguments for convenience
|
2527
2597
|
@classmethod
|
2528
2598
|
def new(
|
2529
2599
|
cls,
|
@@ -2537,17 +2607,17 @@ class SnapshotOrUpdateForStringAndExecutionInfo1(Struct, omit_defaults=True):
|
|
2537
2607
|
return f"SnapshotOrUpdateForStringAndExecutionInfo1(snapshot={self.snapshot})"
|
2538
2608
|
|
2539
2609
|
|
2540
|
-
|
2610
|
+
Update5 = List[Union[str, Optional[ExecutionInfo]]]
|
2541
2611
|
|
2542
2612
|
|
2543
2613
|
class SnapshotOrUpdateForStringAndExecutionInfo2(Struct, omit_defaults=True):
|
2544
|
-
updates: List[
|
2614
|
+
updates: List[Update5]
|
2545
2615
|
|
2546
|
-
#
|
2616
|
+
# Constructor that takes all field titles as arguments for convenience
|
2547
2617
|
@classmethod
|
2548
2618
|
def new(
|
2549
2619
|
cls,
|
2550
|
-
updates: List[
|
2620
|
+
updates: List[Update5],
|
2551
2621
|
):
|
2552
2622
|
return cls(
|
2553
2623
|
updates,
|
@@ -2566,7 +2636,7 @@ SnapshotOrUpdateForStringAndExecutionInfo = Union[
|
|
2566
2636
|
class Enumerated(Struct, omit_defaults=True):
|
2567
2637
|
outcome: Outcome
|
2568
2638
|
|
2569
|
-
#
|
2639
|
+
# Constructor that takes all field titles as arguments for convenience
|
2570
2640
|
@classmethod
|
2571
2641
|
def new(
|
2572
2642
|
cls,
|
@@ -2583,7 +2653,7 @@ class Enumerated(Struct, omit_defaults=True):
|
|
2583
2653
|
class EventContractSeriesInstance1(Struct, omit_defaults=True):
|
2584
2654
|
Enumerated: Enumerated
|
2585
2655
|
|
2586
|
-
#
|
2656
|
+
# Constructor that takes all field titles as arguments for convenience
|
2587
2657
|
@classmethod
|
2588
2658
|
def new(
|
2589
2659
|
cls,
|
@@ -2611,7 +2681,7 @@ class OptionsSeriesInstance(Struct, omit_defaults=True):
|
|
2611
2681
|
put_or_call: PutOrCall
|
2612
2682
|
strike: Decimal
|
2613
2683
|
|
2614
|
-
#
|
2684
|
+
# Constructor that takes all field titles as arguments for convenience
|
2615
2685
|
@classmethod
|
2616
2686
|
def new(
|
2617
2687
|
cls,
|
@@ -2634,7 +2704,7 @@ class AccountWithPermissions(Struct, omit_defaults=True):
|
|
2634
2704
|
permissions: AccountPermissions
|
2635
2705
|
trader: UserId
|
2636
2706
|
|
2637
|
-
#
|
2707
|
+
# Constructor that takes all field titles as arguments for convenience
|
2638
2708
|
@classmethod
|
2639
2709
|
def new(
|
2640
2710
|
cls,
|
@@ -2657,7 +2727,7 @@ class SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndExecutionInfo1(
|
|
2657
2727
|
):
|
2658
2728
|
snapshot: Dict[str, SnapshotOrUpdateForStringAndExecutionInfo]
|
2659
2729
|
|
2660
|
-
#
|
2730
|
+
# Constructor that takes all field titles as arguments for convenience
|
2661
2731
|
@classmethod
|
2662
2732
|
def new(
|
2663
2733
|
cls,
|
@@ -2679,7 +2749,7 @@ class SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndExecutionInfo2(
|
|
2679
2749
|
):
|
2680
2750
|
updates: List[Update3]
|
2681
2751
|
|
2682
|
-
#
|
2752
|
+
# Constructor that takes all field titles as arguments for convenience
|
2683
2753
|
@classmethod
|
2684
2754
|
def new(
|
2685
2755
|
cls,
|
@@ -2704,7 +2774,7 @@ class Option(Struct, omit_defaults=True):
|
|
2704
2774
|
product_type: Literal["Option"]
|
2705
2775
|
series: str
|
2706
2776
|
|
2707
|
-
#
|
2777
|
+
# Constructor that takes all field titles as arguments for convenience
|
2708
2778
|
@classmethod
|
2709
2779
|
def new(
|
2710
2780
|
cls,
|
@@ -2727,7 +2797,7 @@ class EventContract(Struct, omit_defaults=True):
|
|
2727
2797
|
product_type: Literal["EventContract"]
|
2728
2798
|
series: str
|
2729
2799
|
|
2730
|
-
#
|
2800
|
+
# Constructor that takes all field titles as arguments for convenience
|
2731
2801
|
@classmethod
|
2732
2802
|
def new(
|
2733
2803
|
cls,
|
@@ -2765,7 +2835,7 @@ class ProductInfo(Struct, omit_defaults=True):
|
|
2765
2835
|
price_display_format: Optional[PriceDisplayFormat] = None
|
2766
2836
|
primary_venue: Optional[str] = None
|
2767
2837
|
|
2768
|
-
#
|
2838
|
+
# Constructor that takes all field titles as arguments for convenience
|
2769
2839
|
@classmethod
|
2770
2840
|
def new(
|
2771
2841
|
cls,
|
@@ -2786,7 +2856,7 @@ class ProductInfo(Struct, omit_defaults=True):
|
|
2786
2856
|
class SnapshotOrUpdateForStringAndProductInfo1(Struct, omit_defaults=True):
|
2787
2857
|
snapshot: Dict[str, ProductInfo]
|
2788
2858
|
|
2789
|
-
#
|
2859
|
+
# Constructor that takes all field titles as arguments for convenience
|
2790
2860
|
@classmethod
|
2791
2861
|
def new(
|
2792
2862
|
cls,
|
@@ -2806,7 +2876,7 @@ Update2 = List[Union[str, Optional[ProductInfo]]]
|
|
2806
2876
|
class SnapshotOrUpdateForStringAndProductInfo2(Struct, omit_defaults=True):
|
2807
2877
|
updates: List[Update2]
|
2808
2878
|
|
2809
|
-
#
|
2879
|
+
# Constructor that takes all field titles as arguments for convenience
|
2810
2880
|
@classmethod
|
2811
2881
|
def new(
|
2812
2882
|
cls,
|