architect-py 3.2.2__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.
Files changed (169) hide show
  1. architect_py/__init__.py +8 -2
  2. architect_py/async_client.py +879 -576
  3. architect_py/client.py +25 -26
  4. architect_py/client_interface.py +62 -0
  5. architect_py/common_types/__init__.py +6 -0
  6. architect_py/common_types/order_dir.py +85 -0
  7. architect_py/common_types/scalars.py +25 -0
  8. architect_py/common_types/tradable_product.py +59 -0
  9. architect_py/graphql_client/client.py +3 -6
  10. architect_py/graphql_client/fragments.py +3 -6
  11. architect_py/graphql_client/get_fills_query.py +2 -1
  12. architect_py/graphql_client/search_symbols_query.py +2 -1
  13. architect_py/graphql_client/subscribe_orderflow.py +2 -1
  14. architect_py/graphql_client/subscribe_trades.py +2 -1
  15. architect_py/grpc/__init__.py +125 -0
  16. architect_py/grpc/client.py +86 -0
  17. architect_py/{grpc_client → grpc/models}/Accounts/AccountsRequest.py +2 -2
  18. architect_py/{grpc_client → grpc/models}/Accounts/AccountsResponse.py +1 -1
  19. architect_py/{grpc_client → grpc/models}/Accounts/__init__.py +1 -1
  20. architect_py/{grpc_client → grpc/models}/Algo/AlgoOrderForTwapAlgo.py +1 -1
  21. architect_py/{grpc_client → grpc/models}/Algo/CreateAlgoOrderRequestForTwapAlgo.py +2 -2
  22. architect_py/{grpc_client → grpc/models}/Algo/ModifyAlgoOrderRequestForTwapAlgo.py +2 -2
  23. architect_py/{grpc_client → grpc/models}/Algo/__init__.py +1 -1
  24. architect_py/grpc/models/Auth/CreateJwtRequest.py +47 -0
  25. architect_py/grpc/models/Auth/CreateJwtResponse.py +23 -0
  26. architect_py/{grpc_client/Cpty → grpc/models/Auth}/__init__.py +1 -1
  27. architect_py/grpc/models/Core/ConfigRequest.py +37 -0
  28. architect_py/grpc/models/Core/ConfigResponse.py +25 -0
  29. architect_py/{grpc_client/Folio → grpc/models/Core}/__init__.py +1 -1
  30. architect_py/{grpc_client → grpc/models}/Cpty/CptyRequest.py +2 -2
  31. architect_py/{grpc_client → grpc/models}/Cpty/CptyResponse.py +3 -3
  32. architect_py/{grpc_client → grpc/models}/Cpty/CptyStatus.py +1 -1
  33. architect_py/{grpc_client → grpc/models}/Cpty/CptyStatusRequest.py +2 -2
  34. architect_py/{grpc_client → grpc/models}/Cpty/CptysRequest.py +2 -2
  35. architect_py/{grpc_client → grpc/models}/Cpty/CptysResponse.py +1 -1
  36. architect_py/grpc/models/Cpty/__init__.py +2 -0
  37. architect_py/{grpc_client → grpc/models}/Folio/AccountHistoryRequest.py +2 -2
  38. architect_py/{grpc_client → grpc/models}/Folio/AccountHistoryResponse.py +1 -1
  39. architect_py/{grpc_client → grpc/models}/Folio/AccountSummariesRequest.py +2 -2
  40. architect_py/{grpc_client → grpc/models}/Folio/AccountSummariesResponse.py +1 -1
  41. architect_py/{grpc_client → grpc/models}/Folio/AccountSummary.py +1 -1
  42. architect_py/{grpc_client → grpc/models}/Folio/AccountSummaryRequest.py +2 -2
  43. architect_py/{grpc_client → grpc/models}/Folio/HistoricalFillsRequest.py +3 -3
  44. architect_py/{grpc_client → grpc/models}/Folio/HistoricalFillsResponse.py +1 -1
  45. architect_py/{grpc_client → grpc/models}/Folio/HistoricalOrdersRequest.py +3 -3
  46. architect_py/{grpc_client → grpc/models}/Folio/HistoricalOrdersResponse.py +1 -1
  47. architect_py/grpc/models/Folio/__init__.py +2 -0
  48. architect_py/{grpc_client → grpc/models}/Health/HealthCheckRequest.py +2 -2
  49. architect_py/{grpc_client → grpc/models}/Health/HealthCheckResponse.py +1 -1
  50. architect_py/grpc/models/Health/__init__.py +2 -0
  51. architect_py/{grpc_client → grpc/models}/Marketdata/Candle.py +1 -1
  52. architect_py/{grpc_client → grpc/models}/Marketdata/HistoricalCandlesRequest.py +11 -8
  53. architect_py/{grpc_client → grpc/models}/Marketdata/HistoricalCandlesResponse.py +1 -1
  54. architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshot.py +36 -3
  55. architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshotRequest.py +8 -3
  56. architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshotsRequest.py +6 -3
  57. architect_py/{grpc_client → grpc/models}/Marketdata/L2BookSnapshot.py +1 -1
  58. architect_py/{grpc_client → grpc/models}/Marketdata/L2BookSnapshotRequest.py +2 -2
  59. architect_py/{grpc_client → grpc/models}/Marketdata/Liquidation.py +2 -2
  60. architect_py/{grpc_client → grpc/models}/Marketdata/MarketStatus.py +1 -1
  61. architect_py/{grpc_client → grpc/models}/Marketdata/MarketStatusRequest.py +2 -2
  62. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeCandlesRequest.py +2 -2
  63. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeCurrentCandlesRequest.py +3 -4
  64. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeL1BookSnapshotsRequest.py +6 -3
  65. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeL2BookUpdatesRequest.py +2 -2
  66. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeLiquidationsRequest.py +2 -2
  67. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeManyCandlesRequest.py +2 -2
  68. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeTickersRequest.py +2 -2
  69. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeTradesRequest.py +2 -2
  70. architect_py/{grpc_client → grpc/models}/Marketdata/Ticker.py +1 -1
  71. architect_py/{grpc_client → grpc/models}/Marketdata/TickerRequest.py +2 -2
  72. architect_py/{grpc_client → grpc/models}/Marketdata/TickersRequest.py +2 -2
  73. architect_py/{grpc_client → grpc/models}/Marketdata/TickersResponse.py +1 -1
  74. architect_py/{grpc_client → grpc/models}/Marketdata/Trade.py +2 -2
  75. architect_py/grpc/models/Marketdata/__init__.py +2 -0
  76. architect_py/{grpc_client → grpc/models}/Oms/Cancel.py +1 -1
  77. architect_py/{grpc_client → grpc/models}/Oms/CancelAllOrdersRequest.py +2 -2
  78. architect_py/{grpc_client → grpc/models}/Oms/CancelAllOrdersResponse.py +1 -1
  79. architect_py/{grpc_client → grpc/models}/Oms/CancelOrderRequest.py +2 -2
  80. architect_py/{grpc_client → grpc/models}/Oms/OpenOrdersRequest.py +2 -2
  81. architect_py/{grpc_client → grpc/models}/Oms/OpenOrdersResponse.py +1 -1
  82. architect_py/{grpc_client → grpc/models}/Oms/Order.py +2 -2
  83. architect_py/{grpc_client → grpc/models}/Oms/PendingCancelsRequest.py +2 -2
  84. architect_py/{grpc_client → grpc/models}/Oms/PendingCancelsResponse.py +1 -1
  85. architect_py/{grpc_client → grpc/models}/Oms/PlaceOrderRequest.py +3 -3
  86. architect_py/grpc/models/Oms/__init__.py +2 -0
  87. architect_py/{grpc_client → grpc/models}/Orderflow/DropcopyRequest.py +2 -2
  88. architect_py/{grpc_client → grpc/models}/Orderflow/OrderflowRequest.py +1 -1
  89. architect_py/{grpc_client → grpc/models}/Orderflow/SubscribeOrderflowRequest.py +2 -2
  90. architect_py/grpc/models/Orderflow/__init__.py +2 -0
  91. architect_py/grpc/models/Symbology/DownloadProductCatalogRequest.py +42 -0
  92. architect_py/grpc/models/Symbology/DownloadProductCatalogResponse.py +27 -0
  93. architect_py/{grpc_client → grpc/models}/Symbology/PruneExpiredSymbolsRequest.py +2 -2
  94. architect_py/{grpc_client → grpc/models}/Symbology/PruneExpiredSymbolsResponse.py +1 -1
  95. architect_py/{grpc_client → grpc/models}/Symbology/SubscribeSymbology.py +1 -1
  96. architect_py/{grpc_client → grpc/models}/Symbology/SymbologyRequest.py +2 -2
  97. architect_py/{grpc_client → grpc/models}/Symbology/SymbologySnapshot.py +7 -2
  98. architect_py/{grpc_client → grpc/models}/Symbology/SymbologyUpdate.py +9 -2
  99. architect_py/{grpc_client → grpc/models}/Symbology/SymbolsRequest.py +2 -2
  100. architect_py/{grpc_client → grpc/models}/Symbology/SymbolsResponse.py +1 -1
  101. architect_py/grpc/models/Symbology/UploadProductCatalogRequest.py +49 -0
  102. architect_py/grpc/models/Symbology/UploadProductCatalogResponse.py +20 -0
  103. architect_py/{grpc_client → grpc/models}/Symbology/UploadSymbologyRequest.py +2 -2
  104. architect_py/{grpc_client → grpc/models}/Symbology/UploadSymbologyResponse.py +1 -1
  105. architect_py/grpc/models/Symbology/__init__.py +2 -0
  106. architect_py/grpc/models/__init__.py +2 -0
  107. architect_py/{grpc_client → grpc/models}/definitions.py +248 -66
  108. architect_py/grpc/resolve_endpoint.py +67 -0
  109. architect_py/{grpc_client/grpc_server.py → grpc/server.py} +9 -6
  110. architect_py/grpc/utils.py +32 -0
  111. architect_py/tests/conftest.py +86 -87
  112. architect_py/tests/test_book_building.py +49 -50
  113. architect_py/tests/test_marketdata.py +168 -0
  114. architect_py/tests/test_order_entry.py +37 -0
  115. architect_py/tests/test_orderflow.py +38 -0
  116. architect_py/tests/test_portfolio_management.py +23 -0
  117. architect_py/tests/test_rounding.py +28 -28
  118. architect_py/tests/test_symbology.py +37 -30
  119. architect_py/utils/nearest_tick.py +2 -5
  120. architect_py/utils/nearest_tick_2.py +1 -2
  121. architect_py/utils/orderbook.py +35 -0
  122. architect_py/utils/pandas.py +44 -0
  123. architect_py/utils/price_bands.py +0 -3
  124. architect_py/utils/symbol_parsing.py +29 -0
  125. architect_py-5.0.0b1.dist-info/METADATA +124 -0
  126. architect_py-5.0.0b1.dist-info/RECORD +184 -0
  127. {architect_py-3.2.2.dist-info → architect_py-5.0.0b1.dist-info}/WHEEL +2 -1
  128. architect_py-5.0.0b1.dist-info/top_level.txt +4 -0
  129. examples/__init__.py +0 -0
  130. examples/book_subscription.py +53 -0
  131. examples/candles.py +30 -0
  132. examples/common.py +107 -0
  133. examples/external_cpty.py +77 -0
  134. examples/funding_rate_mean_reversion_algo.py +192 -0
  135. examples/order_sending.py +92 -0
  136. examples/stream_l1_marketdata.py +25 -0
  137. examples/stream_l2_marketdata.py +40 -0
  138. examples/trades.py +21 -0
  139. examples/tutorial_async.py +84 -0
  140. examples/tutorial_sync.py +95 -0
  141. scripts/generate_functions_md.py +164 -0
  142. scripts/generate_sync_interface.py +207 -0
  143. scripts/postprocess_grpc.py +594 -0
  144. scripts/preprocess_grpc_schema.py +647 -0
  145. templates/exceptions.py +83 -0
  146. templates/juniper_base_client.py +371 -0
  147. architect_py/client_protocol.py +0 -53
  148. architect_py/grpc_client/Health/__init__.py +0 -2
  149. architect_py/grpc_client/Marketdata/__init__.py +0 -2
  150. architect_py/grpc_client/Oms/__init__.py +0 -2
  151. architect_py/grpc_client/Orderflow/__init__.py +0 -2
  152. architect_py/grpc_client/Symbology/__init__.py +0 -2
  153. architect_py/grpc_client/__init__.py +0 -2
  154. architect_py/grpc_client/grpc_client.py +0 -413
  155. architect_py/scalars.py +0 -172
  156. architect_py/tests/test_accounts.py +0 -31
  157. architect_py/tests/test_client.py +0 -29
  158. architect_py/tests/test_grpc_client.py +0 -30
  159. architect_py/tests/test_order_sending.py +0 -65
  160. architect_py/tests/test_snapshots.py +0 -52
  161. architect_py/tests/test_subscriptions.py +0 -126
  162. architect_py-3.2.2.dist-info/METADATA +0 -191
  163. architect_py-3.2.2.dist-info/RECORD +0 -148
  164. /architect_py/{grpc_client → grpc/models}/Marketdata/ArrayOfL1BookSnapshot.py +0 -0
  165. /architect_py/{grpc_client → grpc/models}/Marketdata/L2BookUpdate.py +0 -0
  166. /architect_py/{grpc_client → grpc/models}/Marketdata/TickerUpdate.py +0 -0
  167. /architect_py/{grpc_client → grpc/models}/Orderflow/Dropcopy.py +0 -0
  168. /architect_py/{grpc_client → grpc/models}/Orderflow/Orderflow.py +0 -0
  169. {architect_py-3.2.2.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.scalars import OrderDir
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
- # below is a constructor that takes all field titles as arguments for convenience
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
- # below is a constructor that takes all field titles as arguments for convenience
134
+ # Constructor that takes all field titles as arguments for convenience
135
135
  @classmethod
136
136
  def new(
137
137
  cls,
@@ -184,7 +184,7 @@ class CandleWidth(str, Enum):
184
184
  class CptyLogoutRequest(Struct, omit_defaults=True):
185
185
  pass
186
186
 
187
- # below is a constructor that takes all field titles as arguments for convenience
187
+ # Constructor that takes all field titles as arguments for convenience
188
188
  @classmethod
189
189
  def new(
190
190
  cls,
@@ -195,6 +195,9 @@ class CptyLogoutRequest(Struct, omit_defaults=True):
195
195
  return f"CptyLogoutRequest()"
196
196
 
197
197
 
198
+ DateTimeOrUtc = datetime
199
+
200
+
198
201
  class HealthMetric(Struct, omit_defaults=True):
199
202
  timestamp: int
200
203
  value: float
@@ -203,7 +206,7 @@ class HealthMetric(Struct, omit_defaults=True):
203
206
  should_be_less_than: Optional[float] = None
204
207
  should_be_less_than_or_equal_to: Optional[float] = None
205
208
 
206
- # below is a constructor that takes all field titles as arguments for convenience
209
+ # Constructor that takes all field titles as arguments for convenience
207
210
  @classmethod
208
211
  def new(
209
212
  cls,
@@ -270,7 +273,7 @@ class L2BookDiff(Struct, omit_defaults=True):
270
273
  tn: Annotated[int, Meta(ge=0, title="timestamp_ns")]
271
274
  ts: Annotated[int, Meta(title="timestamp")]
272
275
 
273
- # below is a constructor that takes all field titles as arguments for convenience
276
+ # Constructor that takes all field titles as arguments for convenience
274
277
  @classmethod
275
278
  def new(
276
279
  cls,
@@ -358,7 +361,7 @@ class OrderId(Struct, omit_defaults=True):
358
361
  seqid: str
359
362
  seqno: Annotated[int, Meta(ge=0)]
360
363
 
361
- # below is a constructor that takes all field titles as arguments for convenience
364
+ # Constructor that takes all field titles as arguments for convenience
362
365
  @classmethod
363
366
  def new(
364
367
  cls,
@@ -377,7 +380,7 @@ class OrderId(Struct, omit_defaults=True):
377
380
  class OrderOut(Struct, omit_defaults=True):
378
381
  id: OrderId
379
382
 
380
- # below is a constructor that takes all field titles as arguments for convenience
383
+ # Constructor that takes all field titles as arguments for convenience
381
384
  @classmethod
382
385
  def new(
383
386
  cls,
@@ -418,7 +421,7 @@ class OrderSource(str, Enum):
418
421
  class OrderStale(Struct, omit_defaults=True):
419
422
  id: OrderId
420
423
 
421
- # below is a constructor that takes all field titles as arguments for convenience
424
+ # Constructor that takes all field titles as arguments for convenience
422
425
  @classmethod
423
426
  def new(
424
427
  cls,
@@ -444,6 +447,91 @@ class OrderStatus(str, Enum):
444
447
  Unknown = "Unknown"
445
448
 
446
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})"
533
+
534
+
447
535
  class SortTickersBy(str, Enum):
448
536
  VOLUME_DESC = "VOLUME_DESC"
449
537
  CHANGE_ASC = "CHANGE_ASC"
@@ -454,7 +542,7 @@ class SortTickersBy(str, Enum):
454
542
  class GoodTilDate(Struct, omit_defaults=True):
455
543
  GTD: datetime
456
544
 
457
- # below is a constructor that takes all field titles as arguments for convenience
545
+ # Constructor that takes all field titles as arguments for convenience
458
546
  @classmethod
459
547
  def new(
460
548
  cls,
@@ -487,7 +575,7 @@ class TwapStatus(Struct, omit_defaults=True):
487
575
  quantity_filled: Decimal
488
576
  realized_twap: Optional[Decimal] = None
489
577
 
490
- # below is a constructor that takes all field titles as arguments for convenience
578
+ # Constructor that takes all field titles as arguments for convenience
491
579
  @classmethod
492
580
  def new(
493
581
  cls,
@@ -517,7 +605,7 @@ class AccountPermissions(Struct, omit_defaults=True):
517
605
  trade: bool
518
606
  view: bool
519
607
 
520
- # below is a constructor that takes all field titles as arguments for convenience
608
+ # Constructor that takes all field titles as arguments for convenience
521
609
  @classmethod
522
610
  def new(
523
611
  cls,
@@ -567,7 +655,7 @@ class Unit(str, Enum):
567
655
  class MinOrderQuantityUnit(Struct, omit_defaults=True):
568
656
  unit: Unit
569
657
 
570
- # below is a constructor that takes all field titles as arguments for convenience
658
+ # Constructor that takes all field titles as arguments for convenience
571
659
  @classmethod
572
660
  def new(
573
661
  cls,
@@ -593,7 +681,7 @@ PriceDisplayFormat = str
593
681
  class Fiat(Struct, omit_defaults=True):
594
682
  product_type: Literal["Fiat"]
595
683
 
596
- # below is a constructor that takes all field titles as arguments for convenience
684
+ # Constructor that takes all field titles as arguments for convenience
597
685
  @classmethod
598
686
  def new(
599
687
  cls,
@@ -610,7 +698,7 @@ class Fiat(Struct, omit_defaults=True):
610
698
  class Commodity(Struct, omit_defaults=True):
611
699
  product_type: Literal["Commodity"]
612
700
 
613
- # below is a constructor that takes all field titles as arguments for convenience
701
+ # Constructor that takes all field titles as arguments for convenience
614
702
  @classmethod
615
703
  def new(
616
704
  cls,
@@ -627,7 +715,7 @@ class Commodity(Struct, omit_defaults=True):
627
715
  class Crypto(Struct, omit_defaults=True):
628
716
  product_type: Literal["Crypto"]
629
717
 
630
- # below is a constructor that takes all field titles as arguments for convenience
718
+ # Constructor that takes all field titles as arguments for convenience
631
719
  @classmethod
632
720
  def new(
633
721
  cls,
@@ -645,7 +733,7 @@ class Equity(Struct, omit_defaults=True):
645
733
  product_type: Literal["Equity"]
646
734
  easy_to_borrow: Optional[bool] = None
647
735
 
648
- # below is a constructor that takes all field titles as arguments for convenience
736
+ # Constructor that takes all field titles as arguments for convenience
649
737
  @classmethod
650
738
  def new(
651
739
  cls,
@@ -664,7 +752,7 @@ class Equity(Struct, omit_defaults=True):
664
752
  class Index(Struct, omit_defaults=True):
665
753
  product_type: Literal["Index"]
666
754
 
667
- # below is a constructor that takes all field titles as arguments for convenience
755
+ # Constructor that takes all field titles as arguments for convenience
668
756
  @classmethod
669
757
  def new(
670
758
  cls,
@@ -687,7 +775,7 @@ class Future(Struct, omit_defaults=True):
687
775
  series: Optional[str] = None
688
776
  underlying: Optional[str] = None
689
777
 
690
- # below is a constructor that takes all field titles as arguments for convenience
778
+ # Constructor that takes all field titles as arguments for convenience
691
779
  @classmethod
692
780
  def new(
693
781
  cls,
@@ -719,7 +807,7 @@ class Perpetual(Struct, omit_defaults=True):
719
807
  product_type: Literal["Perpetual"]
720
808
  underlying: Optional[str] = None
721
809
 
722
- # below is a constructor that takes all field titles as arguments for convenience
810
+ # Constructor that takes all field titles as arguments for convenience
723
811
  @classmethod
724
812
  def new(
725
813
  cls,
@@ -742,7 +830,7 @@ class Perpetual(Struct, omit_defaults=True):
742
830
  class Unknown(Struct, omit_defaults=True):
743
831
  product_type: Literal["Unknown"]
744
832
 
745
- # below is a constructor that takes all field titles as arguments for convenience
833
+ # Constructor that takes all field titles as arguments for convenience
746
834
  @classmethod
747
835
  def new(
748
836
  cls,
@@ -756,10 +844,57 @@ class Unknown(Struct, omit_defaults=True):
756
844
  return f"Unknown(product_type={self.product_type})"
757
845
 
758
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
+
759
894
  class SnapshotOrUpdateForStringAndString1(Struct, omit_defaults=True):
760
895
  snapshot: Dict[str, str]
761
896
 
762
- # below is a constructor that takes all field titles as arguments for convenience
897
+ # Constructor that takes all field titles as arguments for convenience
763
898
  @classmethod
764
899
  def new(
765
900
  cls,
@@ -773,17 +908,17 @@ class SnapshotOrUpdateForStringAndString1(Struct, omit_defaults=True):
773
908
  return f"SnapshotOrUpdateForStringAndString1(snapshot={self.snapshot})"
774
909
 
775
910
 
776
- Update5 = List[Union[str, Optional[str]]]
911
+ Update7 = List[Union[str, Optional[str]]]
777
912
 
778
913
 
779
914
  class SnapshotOrUpdateForStringAndString2(Struct, omit_defaults=True):
780
- updates: List[Update5]
915
+ updates: List[Update7]
781
916
 
782
- # below is a constructor that takes all field titles as arguments for convenience
917
+ # Constructor that takes all field titles as arguments for convenience
783
918
  @classmethod
784
919
  def new(
785
920
  cls,
786
- updates: List[Update5],
921
+ updates: List[Update7],
787
922
  ):
788
923
  return cls(
789
924
  updates,
@@ -801,7 +936,7 @@ SnapshotOrUpdateForStringAndString = Union[
801
936
  class SimpleDecimal(Struct, omit_defaults=True):
802
937
  simple: Decimal
803
938
 
804
- # below is a constructor that takes all field titles as arguments for convenience
939
+ # Constructor that takes all field titles as arguments for convenience
805
940
  @classmethod
806
941
  def new(
807
942
  cls,
@@ -821,7 +956,7 @@ Threshold = List[Decimal]
821
956
  class Varying1(Struct, omit_defaults=True):
822
957
  thresholds: List[Threshold]
823
958
 
824
- # below is a constructor that takes all field titles as arguments for convenience
959
+ # Constructor that takes all field titles as arguments for convenience
825
960
  @classmethod
826
961
  def new(
827
962
  cls,
@@ -842,7 +977,7 @@ class Varying(Struct, omit_defaults=True):
842
977
 
843
978
  varying: Varying1
844
979
 
845
- # below is a constructor that takes all field titles as arguments for convenience
980
+ # Constructor that takes all field titles as arguments for convenience
846
981
  @classmethod
847
982
  def new(
848
983
  cls,
@@ -1466,7 +1601,7 @@ class OptionLike(Struct, omit_defaults=True):
1466
1601
  strike: Decimal
1467
1602
  expiration: Optional[datetime] = None
1468
1603
 
1469
- # below is a constructor that takes all field titles as arguments for convenience
1604
+ # Constructor that takes all field titles as arguments for convenience
1470
1605
  @classmethod
1471
1606
  def new(
1472
1607
  cls,
@@ -1485,7 +1620,7 @@ class OptionLike(Struct, omit_defaults=True):
1485
1620
  class EventContractSeriesInstance2(Struct, omit_defaults=True):
1486
1621
  OptionLike: OptionLike
1487
1622
 
1488
- # below is a constructor that takes all field titles as arguments for convenience
1623
+ # Constructor that takes all field titles as arguments for convenience
1489
1624
  @classmethod
1490
1625
  def new(
1491
1626
  cls,
@@ -1511,7 +1646,7 @@ class SpreadLeg(Struct, omit_defaults=True):
1511
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
1512
1647
  """
1513
1648
 
1514
- # below is a constructor that takes all field titles as arguments for convenience
1649
+ # Constructor that takes all field titles as arguments for convenience
1515
1650
  @classmethod
1516
1651
  def new(
1517
1652
  cls,
@@ -1530,7 +1665,7 @@ class SpreadLeg(Struct, omit_defaults=True):
1530
1665
  class Outcome(Struct, omit_defaults=True):
1531
1666
  name: str
1532
1667
 
1533
- # below is a constructor that takes all field titles as arguments for convenience
1668
+ # Constructor that takes all field titles as arguments for convenience
1534
1669
  @classmethod
1535
1670
  def new(
1536
1671
  cls,
@@ -1572,7 +1707,7 @@ class AberrantFill(Struct, omit_defaults=True):
1572
1707
  u: Optional[Annotated[Optional[UserId], Meta(title="trader")]] = None
1573
1708
  xid: Optional[Annotated[Optional[str], Meta(title="exchange_fill_id")]] = None
1574
1709
 
1575
- # below is a constructor that takes all field titles as arguments for convenience
1710
+ # Constructor that takes all field titles as arguments for convenience
1576
1711
  @classmethod
1577
1712
  def new(
1578
1713
  cls,
@@ -1759,7 +1894,7 @@ class CancelReject(Struct, omit_defaults=True):
1759
1894
  xid: str
1760
1895
  rm: Optional[str] = None
1761
1896
 
1762
- # below is a constructor that takes all field titles as arguments for convenience
1897
+ # Constructor that takes all field titles as arguments for convenience
1763
1898
  @classmethod
1764
1899
  def new(
1765
1900
  cls,
@@ -1781,7 +1916,7 @@ class CptyLoginRequest(Struct, omit_defaults=True):
1781
1916
  account: str
1782
1917
  trader: UserId
1783
1918
 
1784
- # below is a constructor that takes all field titles as arguments for convenience
1919
+ # Constructor that takes all field titles as arguments for convenience
1785
1920
  @classmethod
1786
1921
  def new(
1787
1922
  cls,
@@ -1822,7 +1957,7 @@ class ExecutionInfo(Struct, omit_defaults=True):
1822
1957
  initial_margin: Optional[Decimal] = None
1823
1958
  maintenance_margin: Optional[Decimal] = None
1824
1959
 
1825
- # below is a constructor that takes all field titles as arguments for convenience
1960
+ # Constructor that takes all field titles as arguments for convenience
1826
1961
  @classmethod
1827
1962
  def new(
1828
1963
  cls,
@@ -1900,7 +2035,7 @@ class Fill(Struct, omit_defaults=True):
1900
2035
  u: Optional[Annotated[Optional[UserId], Meta(title="trader")]] = None
1901
2036
  xid: Optional[Annotated[Optional[str], Meta(title="exchange_fill_id")]] = None
1902
2037
 
1903
- # below is a constructor that takes all field titles as arguments for convenience
2038
+ # Constructor that takes all field titles as arguments for convenience
1904
2039
  @classmethod
1905
2040
  def new(
1906
2041
  cls,
@@ -2105,7 +2240,7 @@ class OptionsSeriesInfo(Struct, omit_defaults=True):
2105
2240
  underlying: str
2106
2241
  venue_discriminant: Optional[str] = None
2107
2242
 
2108
- # below is a constructor that takes all field titles as arguments for convenience
2243
+ # Constructor that takes all field titles as arguments for convenience
2109
2244
  @classmethod
2110
2245
  def new(
2111
2246
  cls,
@@ -2143,7 +2278,7 @@ class OrderAck(Struct, omit_defaults=True):
2143
2278
  id: Annotated[OrderId, Meta(title="order_id")]
2144
2279
  eid: Optional[Annotated[Optional[str], Meta(title="exchange_order_id")]] = None
2145
2280
 
2146
- # below is a constructor that takes all field titles as arguments for convenience
2281
+ # Constructor that takes all field titles as arguments for convenience
2147
2282
  @classmethod
2148
2283
  def new(
2149
2284
  cls,
@@ -2179,7 +2314,7 @@ class OrderCanceled(Struct, omit_defaults=True):
2179
2314
  id: OrderId
2180
2315
  xid: Optional[str] = None
2181
2316
 
2182
- # below is a constructor that takes all field titles as arguments for convenience
2317
+ # Constructor that takes all field titles as arguments for convenience
2183
2318
  @classmethod
2184
2319
  def new(
2185
2320
  cls,
@@ -2199,7 +2334,7 @@ class OrderCanceling(Struct, omit_defaults=True):
2199
2334
  id: OrderId
2200
2335
  xid: Optional[str] = None
2201
2336
 
2202
- # below is a constructor that takes all field titles as arguments for convenience
2337
+ # Constructor that takes all field titles as arguments for convenience
2203
2338
  @classmethod
2204
2339
  def new(
2205
2340
  cls,
@@ -2220,7 +2355,7 @@ class OrderReject(Struct, omit_defaults=True):
2220
2355
  r: OrderRejectReason
2221
2356
  rm: Optional[str] = None
2222
2357
 
2223
- # below is a constructor that takes all field titles as arguments for convenience
2358
+ # Constructor that takes all field titles as arguments for convenience
2224
2359
  @classmethod
2225
2360
  def new(
2226
2361
  cls,
@@ -2243,7 +2378,7 @@ class SnapshotOrUpdateForAliasKindAndSnapshotOrUpdateForStringAndString1(
2243
2378
  ):
2244
2379
  snapshot: Dict[str, SnapshotOrUpdateForStringAndString]
2245
2380
 
2246
- # below is a constructor that takes all field titles as arguments for convenience
2381
+ # Constructor that takes all field titles as arguments for convenience
2247
2382
  @classmethod
2248
2383
  def new(
2249
2384
  cls,
@@ -2265,7 +2400,7 @@ class SnapshotOrUpdateForAliasKindAndSnapshotOrUpdateForStringAndString2(
2265
2400
  ):
2266
2401
  updates: List[Update]
2267
2402
 
2268
- # below is a constructor that takes all field titles as arguments for convenience
2403
+ # Constructor that takes all field titles as arguments for convenience
2269
2404
  @classmethod
2270
2405
  def new(
2271
2406
  cls,
@@ -2288,7 +2423,7 @@ SnapshotOrUpdateForAliasKindAndSnapshotOrUpdateForStringAndString = Union[
2288
2423
  class SnapshotOrUpdateForStringAndOptionsSeriesInfo1(Struct, omit_defaults=True):
2289
2424
  snapshot: Dict[str, OptionsSeriesInfo]
2290
2425
 
2291
- # below is a constructor that takes all field titles as arguments for convenience
2426
+ # Constructor that takes all field titles as arguments for convenience
2292
2427
  @classmethod
2293
2428
  def new(
2294
2429
  cls,
@@ -2310,7 +2445,7 @@ Update1 = List[Union[str, Optional[OptionsSeriesInfo]]]
2310
2445
  class SnapshotOrUpdateForStringAndOptionsSeriesInfo2(Struct, omit_defaults=True):
2311
2446
  updates: List[Update1]
2312
2447
 
2313
- # below is a constructor that takes all field titles as arguments for convenience
2448
+ # Constructor that takes all field titles as arguments for convenience
2314
2449
  @classmethod
2315
2450
  def new(
2316
2451
  cls,
@@ -2330,6 +2465,53 @@ SnapshotOrUpdateForStringAndOptionsSeriesInfo = Union[
2330
2465
  ]
2331
2466
 
2332
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
+
2333
2515
  class TwapParams(Struct, omit_defaults=True):
2334
2516
  dir: OrderDir
2335
2517
  end_time: datetime
@@ -2340,7 +2522,7 @@ class TwapParams(Struct, omit_defaults=True):
2340
2522
  symbol: str
2341
2523
  take_through_frac: Optional[Decimal] = None
2342
2524
 
2343
- # below is a constructor that takes all field titles as arguments for convenience
2525
+ # Constructor that takes all field titles as arguments for convenience
2344
2526
  @classmethod
2345
2527
  def new(
2346
2528
  cls,
@@ -2372,7 +2554,7 @@ class Account(Struct, omit_defaults=True):
2372
2554
  id: str
2373
2555
  name: AccountName
2374
2556
 
2375
- # below is a constructor that takes all field titles as arguments for convenience
2557
+ # Constructor that takes all field titles as arguments for convenience
2376
2558
  @classmethod
2377
2559
  def new(
2378
2560
  cls,
@@ -2392,7 +2574,7 @@ class FutureSpread(Struct, omit_defaults=True):
2392
2574
  legs: List[SpreadLeg]
2393
2575
  product_type: Literal["FutureSpread"]
2394
2576
 
2395
- # below is a constructor that takes all field titles as arguments for convenience
2577
+ # Constructor that takes all field titles as arguments for convenience
2396
2578
  @classmethod
2397
2579
  def new(
2398
2580
  cls,
@@ -2411,7 +2593,7 @@ class FutureSpread(Struct, omit_defaults=True):
2411
2593
  class SnapshotOrUpdateForStringAndExecutionInfo1(Struct, omit_defaults=True):
2412
2594
  snapshot: Dict[str, ExecutionInfo]
2413
2595
 
2414
- # below is a constructor that takes all field titles as arguments for convenience
2596
+ # Constructor that takes all field titles as arguments for convenience
2415
2597
  @classmethod
2416
2598
  def new(
2417
2599
  cls,
@@ -2425,17 +2607,17 @@ class SnapshotOrUpdateForStringAndExecutionInfo1(Struct, omit_defaults=True):
2425
2607
  return f"SnapshotOrUpdateForStringAndExecutionInfo1(snapshot={self.snapshot})"
2426
2608
 
2427
2609
 
2428
- Update4 = List[Union[str, Optional[ExecutionInfo]]]
2610
+ Update5 = List[Union[str, Optional[ExecutionInfo]]]
2429
2611
 
2430
2612
 
2431
2613
  class SnapshotOrUpdateForStringAndExecutionInfo2(Struct, omit_defaults=True):
2432
- updates: List[Update4]
2614
+ updates: List[Update5]
2433
2615
 
2434
- # below is a constructor that takes all field titles as arguments for convenience
2616
+ # Constructor that takes all field titles as arguments for convenience
2435
2617
  @classmethod
2436
2618
  def new(
2437
2619
  cls,
2438
- updates: List[Update4],
2620
+ updates: List[Update5],
2439
2621
  ):
2440
2622
  return cls(
2441
2623
  updates,
@@ -2454,7 +2636,7 @@ SnapshotOrUpdateForStringAndExecutionInfo = Union[
2454
2636
  class Enumerated(Struct, omit_defaults=True):
2455
2637
  outcome: Outcome
2456
2638
 
2457
- # below is a constructor that takes all field titles as arguments for convenience
2639
+ # Constructor that takes all field titles as arguments for convenience
2458
2640
  @classmethod
2459
2641
  def new(
2460
2642
  cls,
@@ -2471,7 +2653,7 @@ class Enumerated(Struct, omit_defaults=True):
2471
2653
  class EventContractSeriesInstance1(Struct, omit_defaults=True):
2472
2654
  Enumerated: Enumerated
2473
2655
 
2474
- # below is a constructor that takes all field titles as arguments for convenience
2656
+ # Constructor that takes all field titles as arguments for convenience
2475
2657
  @classmethod
2476
2658
  def new(
2477
2659
  cls,
@@ -2499,7 +2681,7 @@ class OptionsSeriesInstance(Struct, omit_defaults=True):
2499
2681
  put_or_call: PutOrCall
2500
2682
  strike: Decimal
2501
2683
 
2502
- # below is a constructor that takes all field titles as arguments for convenience
2684
+ # Constructor that takes all field titles as arguments for convenience
2503
2685
  @classmethod
2504
2686
  def new(
2505
2687
  cls,
@@ -2522,7 +2704,7 @@ class AccountWithPermissions(Struct, omit_defaults=True):
2522
2704
  permissions: AccountPermissions
2523
2705
  trader: UserId
2524
2706
 
2525
- # below is a constructor that takes all field titles as arguments for convenience
2707
+ # Constructor that takes all field titles as arguments for convenience
2526
2708
  @classmethod
2527
2709
  def new(
2528
2710
  cls,
@@ -2545,7 +2727,7 @@ class SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndExecutionInfo1(
2545
2727
  ):
2546
2728
  snapshot: Dict[str, SnapshotOrUpdateForStringAndExecutionInfo]
2547
2729
 
2548
- # below is a constructor that takes all field titles as arguments for convenience
2730
+ # Constructor that takes all field titles as arguments for convenience
2549
2731
  @classmethod
2550
2732
  def new(
2551
2733
  cls,
@@ -2567,7 +2749,7 @@ class SnapshotOrUpdateForStringAndSnapshotOrUpdateForStringAndExecutionInfo2(
2567
2749
  ):
2568
2750
  updates: List[Update3]
2569
2751
 
2570
- # below is a constructor that takes all field titles as arguments for convenience
2752
+ # Constructor that takes all field titles as arguments for convenience
2571
2753
  @classmethod
2572
2754
  def new(
2573
2755
  cls,
@@ -2592,7 +2774,7 @@ class Option(Struct, omit_defaults=True):
2592
2774
  product_type: Literal["Option"]
2593
2775
  series: str
2594
2776
 
2595
- # below is a constructor that takes all field titles as arguments for convenience
2777
+ # Constructor that takes all field titles as arguments for convenience
2596
2778
  @classmethod
2597
2779
  def new(
2598
2780
  cls,
@@ -2615,7 +2797,7 @@ class EventContract(Struct, omit_defaults=True):
2615
2797
  product_type: Literal["EventContract"]
2616
2798
  series: str
2617
2799
 
2618
- # below is a constructor that takes all field titles as arguments for convenience
2800
+ # Constructor that takes all field titles as arguments for convenience
2619
2801
  @classmethod
2620
2802
  def new(
2621
2803
  cls,
@@ -2653,7 +2835,7 @@ class ProductInfo(Struct, omit_defaults=True):
2653
2835
  price_display_format: Optional[PriceDisplayFormat] = None
2654
2836
  primary_venue: Optional[str] = None
2655
2837
 
2656
- # below is a constructor that takes all field titles as arguments for convenience
2838
+ # Constructor that takes all field titles as arguments for convenience
2657
2839
  @classmethod
2658
2840
  def new(
2659
2841
  cls,
@@ -2674,7 +2856,7 @@ class ProductInfo(Struct, omit_defaults=True):
2674
2856
  class SnapshotOrUpdateForStringAndProductInfo1(Struct, omit_defaults=True):
2675
2857
  snapshot: Dict[str, ProductInfo]
2676
2858
 
2677
- # below is a constructor that takes all field titles as arguments for convenience
2859
+ # Constructor that takes all field titles as arguments for convenience
2678
2860
  @classmethod
2679
2861
  def new(
2680
2862
  cls,
@@ -2694,7 +2876,7 @@ Update2 = List[Union[str, Optional[ProductInfo]]]
2694
2876
  class SnapshotOrUpdateForStringAndProductInfo2(Struct, omit_defaults=True):
2695
2877
  updates: List[Update2]
2696
2878
 
2697
- # below is a constructor that takes all field titles as arguments for convenience
2879
+ # Constructor that takes all field titles as arguments for convenience
2698
2880
  @classmethod
2699
2881
  def new(
2700
2882
  cls,