architect-py 3.2.1__py3-none-any.whl → 5.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. architect_py/__init__.py +18 -2
  2. architect_py/async_client.py +1089 -658
  3. architect_py/client.py +36 -33
  4. architect_py/client_interface.py +63 -0
  5. architect_py/common_types/__init__.py +6 -0
  6. architect_py/common_types/order_dir.py +91 -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/__init__.py +2 -0
  10. architect_py/graphql_client/client.py +3 -6
  11. architect_py/graphql_client/enums.py +5 -0
  12. architect_py/graphql_client/fragments.py +3 -6
  13. architect_py/graphql_client/get_fills_query.py +2 -1
  14. architect_py/graphql_client/search_symbols_query.py +2 -1
  15. architect_py/graphql_client/subscribe_orderflow.py +2 -1
  16. architect_py/graphql_client/subscribe_trades.py +2 -1
  17. architect_py/grpc/__init__.py +145 -0
  18. architect_py/grpc/client.py +94 -0
  19. architect_py/{grpc_client → grpc/models}/Accounts/AccountsRequest.py +6 -3
  20. architect_py/{grpc_client → grpc/models}/Accounts/AccountsResponse.py +1 -1
  21. architect_py/{grpc_client → grpc/models}/Accounts/__init__.py +1 -1
  22. architect_py/grpc/models/Algo/AlgoOrder.py +114 -0
  23. architect_py/grpc/models/Algo/AlgoOrderRequest.py +46 -0
  24. architect_py/grpc/models/Algo/AlgoOrdersRequest.py +72 -0
  25. architect_py/grpc/models/Algo/AlgoOrdersResponse.py +27 -0
  26. architect_py/grpc/models/Algo/CreateAlgoOrderRequest.py +56 -0
  27. architect_py/grpc/models/Algo/PauseAlgoRequest.py +42 -0
  28. architect_py/grpc/models/Algo/PauseAlgoResponse.py +20 -0
  29. architect_py/grpc/models/Algo/StartAlgoRequest.py +42 -0
  30. architect_py/grpc/models/Algo/StartAlgoResponse.py +20 -0
  31. architect_py/grpc/models/Algo/StopAlgoRequest.py +42 -0
  32. architect_py/grpc/models/Algo/StopAlgoResponse.py +20 -0
  33. architect_py/{grpc_client → grpc/models}/Algo/__init__.py +1 -1
  34. architect_py/grpc/models/Auth/CreateJwtRequest.py +47 -0
  35. architect_py/grpc/models/Auth/CreateJwtResponse.py +23 -0
  36. architect_py/{grpc_client/Cpty → grpc/models/Auth}/__init__.py +1 -1
  37. architect_py/grpc/models/Boss/DepositsRequest.py +40 -0
  38. architect_py/grpc/models/Boss/DepositsResponse.py +27 -0
  39. architect_py/grpc/models/Boss/RqdAccountStatisticsRequest.py +42 -0
  40. architect_py/grpc/models/Boss/RqdAccountStatisticsResponse.py +25 -0
  41. architect_py/grpc/models/Boss/StatementUrlRequest.py +40 -0
  42. architect_py/grpc/models/Boss/StatementUrlResponse.py +23 -0
  43. architect_py/grpc/models/Boss/StatementsRequest.py +40 -0
  44. architect_py/grpc/models/Boss/StatementsResponse.py +27 -0
  45. architect_py/grpc/models/Boss/WithdrawalsRequest.py +40 -0
  46. architect_py/grpc/models/Boss/WithdrawalsResponse.py +27 -0
  47. architect_py/{grpc_client/Folio → grpc/models/Boss}/__init__.py +1 -1
  48. architect_py/grpc/models/Core/ConfigRequest.py +37 -0
  49. architect_py/grpc/models/Core/ConfigResponse.py +25 -0
  50. architect_py/grpc/models/Core/__init__.py +2 -0
  51. architect_py/{grpc_client → grpc/models}/Cpty/CptyRequest.py +5 -4
  52. architect_py/{grpc_client → grpc/models}/Cpty/CptyResponse.py +6 -6
  53. architect_py/grpc/models/Cpty/CptyStatus.py +48 -0
  54. architect_py/grpc/models/Cpty/CptyStatusRequest.py +45 -0
  55. architect_py/grpc/models/Cpty/CptysRequest.py +37 -0
  56. architect_py/grpc/models/Cpty/CptysResponse.py +27 -0
  57. architect_py/grpc/models/Cpty/__init__.py +2 -0
  58. architect_py/{grpc_client → grpc/models}/Folio/AccountHistoryRequest.py +2 -2
  59. architect_py/{grpc_client → grpc/models}/Folio/AccountHistoryResponse.py +1 -1
  60. architect_py/{grpc_client → grpc/models}/Folio/AccountSummariesRequest.py +2 -2
  61. architect_py/{grpc_client → grpc/models}/Folio/AccountSummariesResponse.py +1 -1
  62. architect_py/{grpc_client → grpc/models}/Folio/AccountSummary.py +1 -1
  63. architect_py/{grpc_client → grpc/models}/Folio/AccountSummaryRequest.py +2 -2
  64. architect_py/{grpc_client → grpc/models}/Folio/HistoricalFillsRequest.py +7 -4
  65. architect_py/{grpc_client → grpc/models}/Folio/HistoricalFillsResponse.py +1 -1
  66. architect_py/{grpc_client → grpc/models}/Folio/HistoricalOrdersRequest.py +3 -3
  67. architect_py/{grpc_client → grpc/models}/Folio/HistoricalOrdersResponse.py +1 -1
  68. architect_py/grpc/models/Folio/__init__.py +2 -0
  69. architect_py/{grpc_client → grpc/models}/Health/HealthCheckRequest.py +2 -2
  70. architect_py/{grpc_client → grpc/models}/Health/HealthCheckResponse.py +1 -1
  71. architect_py/grpc/models/Health/__init__.py +2 -0
  72. architect_py/{grpc_client → grpc/models}/Marketdata/Candle.py +1 -1
  73. architect_py/{grpc_client → grpc/models}/Marketdata/HistoricalCandlesRequest.py +11 -8
  74. architect_py/{grpc_client → grpc/models}/Marketdata/HistoricalCandlesResponse.py +1 -1
  75. architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshot.py +52 -5
  76. architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshotRequest.py +8 -3
  77. architect_py/{grpc_client → grpc/models}/Marketdata/L1BookSnapshotsRequest.py +6 -3
  78. architect_py/{grpc_client → grpc/models}/Marketdata/L2BookSnapshot.py +1 -1
  79. architect_py/{grpc_client → grpc/models}/Marketdata/L2BookSnapshotRequest.py +2 -2
  80. architect_py/{grpc_client → grpc/models}/Marketdata/Liquidation.py +2 -2
  81. architect_py/{grpc_client → grpc/models}/Marketdata/MarketStatus.py +1 -1
  82. architect_py/{grpc_client → grpc/models}/Marketdata/MarketStatusRequest.py +2 -2
  83. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeCandlesRequest.py +2 -2
  84. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeCurrentCandlesRequest.py +3 -4
  85. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeL1BookSnapshotsRequest.py +6 -3
  86. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeL2BookUpdatesRequest.py +2 -2
  87. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeLiquidationsRequest.py +2 -2
  88. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeManyCandlesRequest.py +2 -2
  89. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeTickersRequest.py +2 -2
  90. architect_py/{grpc_client → grpc/models}/Marketdata/SubscribeTradesRequest.py +2 -2
  91. architect_py/{grpc_client → grpc/models}/Marketdata/Ticker.py +14 -3
  92. architect_py/{grpc_client → grpc/models}/Marketdata/TickerRequest.py +2 -2
  93. architect_py/{grpc_client → grpc/models}/Marketdata/TickersRequest.py +2 -2
  94. architect_py/{grpc_client → grpc/models}/Marketdata/TickersResponse.py +1 -1
  95. architect_py/{grpc_client → grpc/models}/Marketdata/Trade.py +2 -2
  96. architect_py/grpc/models/Marketdata/__init__.py +2 -0
  97. architect_py/grpc/models/Oms/Cancel.py +90 -0
  98. architect_py/{grpc_client → grpc/models}/Oms/CancelAllOrdersRequest.py +2 -2
  99. architect_py/{grpc_client → grpc/models}/Oms/CancelAllOrdersResponse.py +1 -1
  100. architect_py/{grpc_client → grpc/models}/Oms/CancelOrderRequest.py +2 -2
  101. architect_py/{grpc_client → grpc/models}/Oms/OpenOrdersRequest.py +2 -2
  102. architect_py/{grpc_client → grpc/models}/Oms/OpenOrdersResponse.py +1 -1
  103. architect_py/{grpc_client → grpc/models}/Oms/Order.py +6 -13
  104. architect_py/{grpc_client → grpc/models}/Oms/PendingCancelsRequest.py +2 -2
  105. architect_py/{grpc_client → grpc/models}/Oms/PendingCancelsResponse.py +1 -1
  106. architect_py/{grpc_client → grpc/models}/Oms/PlaceOrderRequest.py +16 -23
  107. architect_py/grpc/models/Oms/__init__.py +2 -0
  108. architect_py/grpc/models/OptionsMarketdata/OptionsChain.py +30 -0
  109. architect_py/grpc/models/OptionsMarketdata/OptionsChainGreeks.py +30 -0
  110. architect_py/grpc/models/OptionsMarketdata/OptionsChainGreeksRequest.py +47 -0
  111. architect_py/grpc/models/OptionsMarketdata/OptionsChainRequest.py +45 -0
  112. architect_py/grpc/models/OptionsMarketdata/OptionsExpirations.py +29 -0
  113. architect_py/grpc/models/OptionsMarketdata/OptionsExpirationsRequest.py +42 -0
  114. architect_py/grpc/models/OptionsMarketdata/__init__.py +2 -0
  115. architect_py/{grpc_client → grpc/models}/Orderflow/DropcopyRequest.py +2 -2
  116. architect_py/{grpc_client → grpc/models}/Orderflow/OrderflowRequest.py +2 -1
  117. architect_py/{grpc_client → grpc/models}/Orderflow/SubscribeOrderflowRequest.py +2 -2
  118. architect_py/grpc/models/Orderflow/__init__.py +2 -0
  119. architect_py/grpc/models/Symbology/DownloadProductCatalogRequest.py +42 -0
  120. architect_py/grpc/models/Symbology/DownloadProductCatalogResponse.py +27 -0
  121. architect_py/grpc/models/Symbology/ExecutionInfoRequest.py +47 -0
  122. architect_py/grpc/models/Symbology/ExecutionInfoResponse.py +27 -0
  123. architect_py/{grpc_client → grpc/models}/Symbology/PruneExpiredSymbolsRequest.py +2 -2
  124. architect_py/{grpc_client → grpc/models}/Symbology/PruneExpiredSymbolsResponse.py +1 -1
  125. architect_py/{grpc_client → grpc/models}/Symbology/SubscribeSymbology.py +1 -1
  126. architect_py/{grpc_client → grpc/models}/Symbology/SymbologyRequest.py +2 -2
  127. architect_py/{grpc_client → grpc/models}/Symbology/SymbologySnapshot.py +7 -2
  128. architect_py/{grpc_client → grpc/models}/Symbology/SymbologyUpdate.py +9 -2
  129. architect_py/{grpc_client → grpc/models}/Symbology/SymbolsRequest.py +2 -2
  130. architect_py/{grpc_client → grpc/models}/Symbology/SymbolsResponse.py +1 -1
  131. architect_py/grpc/models/Symbology/UploadProductCatalogRequest.py +49 -0
  132. architect_py/grpc/models/Symbology/UploadProductCatalogResponse.py +20 -0
  133. architect_py/{grpc_client → grpc/models}/Symbology/UploadSymbologyRequest.py +2 -2
  134. architect_py/{grpc_client → grpc/models}/Symbology/UploadSymbologyResponse.py +1 -1
  135. architect_py/grpc/models/Symbology/__init__.py +2 -0
  136. architect_py/grpc/models/__init__.py +2 -0
  137. architect_py/{grpc_client → grpc/models}/definitions.py +671 -934
  138. architect_py/grpc/resolve_endpoint.py +70 -0
  139. architect_py/{grpc_client/grpc_server.py → grpc/server.py} +13 -9
  140. architect_py/grpc/utils.py +32 -0
  141. architect_py/internal_utils/__init__.py +0 -0
  142. architect_py/internal_utils/no_pandas.py +3 -0
  143. architect_py/tests/conftest.py +91 -85
  144. architect_py/tests/test_book_building.py +49 -50
  145. architect_py/tests/test_marketdata.py +168 -0
  146. architect_py/tests/test_order_entry.py +37 -0
  147. architect_py/tests/test_orderflow.py +41 -0
  148. architect_py/tests/test_portfolio_management.py +23 -0
  149. architect_py/tests/test_rounding.py +28 -28
  150. architect_py/tests/test_symbology.py +37 -30
  151. architect_py/utils/nearest_tick.py +2 -5
  152. architect_py/utils/nearest_tick_2.py +1 -2
  153. architect_py/utils/orderbook.py +35 -0
  154. architect_py/utils/pandas.py +44 -0
  155. architect_py/utils/price_bands.py +0 -3
  156. architect_py/utils/symbol_parsing.py +29 -0
  157. architect_py-5.0.0.dist-info/METADATA +54 -0
  158. architect_py-5.0.0.dist-info/RECORD +214 -0
  159. {architect_py-3.2.1.dist-info → architect_py-5.0.0.dist-info}/WHEEL +2 -1
  160. architect_py-5.0.0.dist-info/top_level.txt +4 -0
  161. examples/__init__.py +0 -0
  162. examples/book_subscription.py +52 -0
  163. examples/candles.py +30 -0
  164. examples/common.py +116 -0
  165. examples/external_cpty.py +77 -0
  166. examples/funding_rate_mean_reversion_algo.py +186 -0
  167. examples/order_sending.py +91 -0
  168. examples/stream_l1_marketdata.py +25 -0
  169. examples/stream_l2_marketdata.py +38 -0
  170. examples/trades.py +21 -0
  171. examples/tutorial_async.py +86 -0
  172. examples/tutorial_sync.py +95 -0
  173. scripts/generate_functions_md.py +166 -0
  174. scripts/generate_sync_interface.py +226 -0
  175. scripts/postprocess_grpc.py +604 -0
  176. scripts/preprocess_grpc_schema.py +708 -0
  177. templates/exceptions.py +83 -0
  178. templates/juniper_base_client.py +371 -0
  179. architect_py/client_protocol.py +0 -52
  180. architect_py/grpc_client/Algo/AlgoOrderForTwapAlgo.py +0 -61
  181. architect_py/grpc_client/Algo/CreateAlgoOrderRequestForTwapAlgo.py +0 -59
  182. architect_py/grpc_client/Algo/ModifyAlgoOrderRequestForTwapAlgo.py +0 -45
  183. architect_py/grpc_client/Folio/AggregatedAccountSummariesRequest.py +0 -59
  184. architect_py/grpc_client/Folio/AggregatedAccountSummariesResponse.py +0 -27
  185. architect_py/grpc_client/Health/__init__.py +0 -2
  186. architect_py/grpc_client/Marketdata/__init__.py +0 -2
  187. architect_py/grpc_client/Oms/Cancel.py +0 -42
  188. architect_py/grpc_client/Oms/__init__.py +0 -2
  189. architect_py/grpc_client/Orderflow/__init__.py +0 -2
  190. architect_py/grpc_client/Symbology/__init__.py +0 -2
  191. architect_py/grpc_client/__init__.py +0 -2
  192. architect_py/grpc_client/grpc_client.py +0 -405
  193. architect_py/scalars.py +0 -172
  194. architect_py/tests/test_accounts.py +0 -31
  195. architect_py/tests/test_client.py +0 -29
  196. architect_py/tests/test_grpc_client.py +0 -30
  197. architect_py/tests/test_order_sending.py +0 -61
  198. architect_py/tests/test_snapshots.py +0 -52
  199. architect_py/tests/test_subscriptions.py +0 -129
  200. architect_py-3.2.1.dist-info/METADATA +0 -212
  201. architect_py-3.2.1.dist-info/RECORD +0 -146
  202. /architect_py/{grpc_client → grpc/models}/Marketdata/ArrayOfL1BookSnapshot.py +0 -0
  203. /architect_py/{grpc_client → grpc/models}/Marketdata/L2BookUpdate.py +0 -0
  204. /architect_py/{grpc_client → grpc/models}/Marketdata/TickerUpdate.py +0 -0
  205. /architect_py/{grpc_client → grpc/models}/Orderflow/Dropcopy.py +0 -0
  206. /architect_py/{grpc_client → grpc/models}/Orderflow/Orderflow.py +0 -0
  207. {architect_py-3.2.1.dist-info → architect_py-5.0.0.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,47 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Auth/CreateJwtRequest.json
3
+
4
+ from __future__ import annotations
5
+ from architect_py.grpc.models.Auth.CreateJwtResponse import CreateJwtResponse
6
+
7
+ from msgspec import Struct
8
+
9
+
10
+ class CreateJwtRequest(Struct, omit_defaults=True):
11
+ """
12
+ Create a session JWT to use for authentication with upstream gRPC services.
13
+ """
14
+
15
+ api_key: str
16
+ api_secret: str
17
+
18
+ # Constructor that takes all field titles as arguments for convenience
19
+ @classmethod
20
+ def new(
21
+ cls,
22
+ api_key: str,
23
+ api_secret: str,
24
+ ):
25
+ return cls(
26
+ api_key,
27
+ api_secret,
28
+ )
29
+
30
+ def __str__(self) -> str:
31
+ return f"CreateJwtRequest(api_key={self.api_key},api_secret={self.api_secret})"
32
+
33
+ @staticmethod
34
+ def get_response_type():
35
+ return CreateJwtResponse
36
+
37
+ @staticmethod
38
+ def get_unannotated_response_type():
39
+ return CreateJwtResponse
40
+
41
+ @staticmethod
42
+ def get_route() -> str:
43
+ return "/json.architect.Auth/CreateJwt"
44
+
45
+ @staticmethod
46
+ def get_rpc_method():
47
+ return "unary"
@@ -0,0 +1,23 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Auth/CreateJwtResponse.json
3
+
4
+ from __future__ import annotations
5
+
6
+ from msgspec import Struct
7
+
8
+
9
+ class CreateJwtResponse(Struct, omit_defaults=True):
10
+ jwt: str
11
+
12
+ # Constructor that takes all field titles as arguments for convenience
13
+ @classmethod
14
+ def new(
15
+ cls,
16
+ jwt: str,
17
+ ):
18
+ return cls(
19
+ jwt,
20
+ )
21
+
22
+ def __str__(self) -> str:
23
+ return f"CreateJwtResponse(jwt={self.jwt})"
@@ -1,2 +1,2 @@
1
1
  # generated by datamodel-codegen:
2
- # filename: processed_schemas
2
+ # filename: schemas
@@ -0,0 +1,40 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/DepositsRequest.json
3
+
4
+ from __future__ import annotations
5
+ from architect_py.grpc.models.Boss.DepositsResponse import DepositsResponse
6
+
7
+ from msgspec import Struct
8
+
9
+
10
+ class DepositsRequest(Struct, omit_defaults=True):
11
+ account_id: str
12
+
13
+ # Constructor that takes all field titles as arguments for convenience
14
+ @classmethod
15
+ def new(
16
+ cls,
17
+ account_id: str,
18
+ ):
19
+ return cls(
20
+ account_id,
21
+ )
22
+
23
+ def __str__(self) -> str:
24
+ return f"DepositsRequest(account_id={self.account_id})"
25
+
26
+ @staticmethod
27
+ def get_response_type():
28
+ return DepositsResponse
29
+
30
+ @staticmethod
31
+ def get_unannotated_response_type():
32
+ return DepositsResponse
33
+
34
+ @staticmethod
35
+ def get_route() -> str:
36
+ return "/json.architect.Boss/Deposits"
37
+
38
+ @staticmethod
39
+ def get_rpc_method():
40
+ return "unary"
@@ -0,0 +1,27 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/DepositsResponse.json
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import List
7
+
8
+ from msgspec import Struct
9
+
10
+ from .. import definitions
11
+
12
+
13
+ class DepositsResponse(Struct, omit_defaults=True):
14
+ deposits: List[definitions.Deposit]
15
+
16
+ # Constructor that takes all field titles as arguments for convenience
17
+ @classmethod
18
+ def new(
19
+ cls,
20
+ deposits: List[definitions.Deposit],
21
+ ):
22
+ return cls(
23
+ deposits,
24
+ )
25
+
26
+ def __str__(self) -> str:
27
+ return f"DepositsResponse(deposits={self.deposits})"
@@ -0,0 +1,42 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/RqdAccountStatisticsRequest.json
3
+
4
+ from __future__ import annotations
5
+ from architect_py.grpc.models.Boss.RqdAccountStatisticsResponse import (
6
+ RqdAccountStatisticsResponse,
7
+ )
8
+
9
+ from msgspec import Struct
10
+
11
+
12
+ class RqdAccountStatisticsRequest(Struct, omit_defaults=True):
13
+ account_id: str
14
+
15
+ # Constructor that takes all field titles as arguments for convenience
16
+ @classmethod
17
+ def new(
18
+ cls,
19
+ account_id: str,
20
+ ):
21
+ return cls(
22
+ account_id,
23
+ )
24
+
25
+ def __str__(self) -> str:
26
+ return f"RqdAccountStatisticsRequest(account_id={self.account_id})"
27
+
28
+ @staticmethod
29
+ def get_response_type():
30
+ return RqdAccountStatisticsResponse
31
+
32
+ @staticmethod
33
+ def get_unannotated_response_type():
34
+ return RqdAccountStatisticsResponse
35
+
36
+ @staticmethod
37
+ def get_route() -> str:
38
+ return "/json.architect.Boss/RqdAccountStatistics"
39
+
40
+ @staticmethod
41
+ def get_rpc_method():
42
+ return "unary"
@@ -0,0 +1,25 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/RqdAccountStatisticsResponse.json
3
+
4
+ from __future__ import annotations
5
+
6
+ from msgspec import Struct
7
+
8
+ from .. import definitions
9
+
10
+
11
+ class RqdAccountStatisticsResponse(Struct, omit_defaults=True):
12
+ rqd_account_statistics: definitions.RqdAccountStatistics
13
+
14
+ # Constructor that takes all field titles as arguments for convenience
15
+ @classmethod
16
+ def new(
17
+ cls,
18
+ rqd_account_statistics: definitions.RqdAccountStatistics,
19
+ ):
20
+ return cls(
21
+ rqd_account_statistics,
22
+ )
23
+
24
+ def __str__(self) -> str:
25
+ return f"RqdAccountStatisticsResponse(rqd_account_statistics={self.rqd_account_statistics})"
@@ -0,0 +1,40 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/StatementUrlRequest.json
3
+
4
+ from __future__ import annotations
5
+ from architect_py.grpc.models.Boss.StatementUrlResponse import StatementUrlResponse
6
+
7
+ from msgspec import Struct
8
+
9
+
10
+ class StatementUrlRequest(Struct, omit_defaults=True):
11
+ statement_uuid: str
12
+
13
+ # Constructor that takes all field titles as arguments for convenience
14
+ @classmethod
15
+ def new(
16
+ cls,
17
+ statement_uuid: str,
18
+ ):
19
+ return cls(
20
+ statement_uuid,
21
+ )
22
+
23
+ def __str__(self) -> str:
24
+ return f"StatementUrlRequest(statement_uuid={self.statement_uuid})"
25
+
26
+ @staticmethod
27
+ def get_response_type():
28
+ return StatementUrlResponse
29
+
30
+ @staticmethod
31
+ def get_unannotated_response_type():
32
+ return StatementUrlResponse
33
+
34
+ @staticmethod
35
+ def get_route() -> str:
36
+ return "/json.architect.Boss/StatementUrl"
37
+
38
+ @staticmethod
39
+ def get_rpc_method():
40
+ return "unary"
@@ -0,0 +1,23 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/StatementUrlResponse.json
3
+
4
+ from __future__ import annotations
5
+
6
+ from msgspec import Struct
7
+
8
+
9
+ class StatementUrlResponse(Struct, omit_defaults=True):
10
+ statement_url: str
11
+
12
+ # Constructor that takes all field titles as arguments for convenience
13
+ @classmethod
14
+ def new(
15
+ cls,
16
+ statement_url: str,
17
+ ):
18
+ return cls(
19
+ statement_url,
20
+ )
21
+
22
+ def __str__(self) -> str:
23
+ return f"StatementUrlResponse(statement_url={self.statement_url})"
@@ -0,0 +1,40 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/StatementsRequest.json
3
+
4
+ from __future__ import annotations
5
+ from architect_py.grpc.models.Boss.StatementsResponse import StatementsResponse
6
+
7
+ from msgspec import Struct
8
+
9
+
10
+ class StatementsRequest(Struct, omit_defaults=True):
11
+ account_id: str
12
+
13
+ # Constructor that takes all field titles as arguments for convenience
14
+ @classmethod
15
+ def new(
16
+ cls,
17
+ account_id: str,
18
+ ):
19
+ return cls(
20
+ account_id,
21
+ )
22
+
23
+ def __str__(self) -> str:
24
+ return f"StatementsRequest(account_id={self.account_id})"
25
+
26
+ @staticmethod
27
+ def get_response_type():
28
+ return StatementsResponse
29
+
30
+ @staticmethod
31
+ def get_unannotated_response_type():
32
+ return StatementsResponse
33
+
34
+ @staticmethod
35
+ def get_route() -> str:
36
+ return "/json.architect.Boss/Statements"
37
+
38
+ @staticmethod
39
+ def get_rpc_method():
40
+ return "unary"
@@ -0,0 +1,27 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/StatementsResponse.json
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import List
7
+
8
+ from msgspec import Struct
9
+
10
+ from .. import definitions
11
+
12
+
13
+ class StatementsResponse(Struct, omit_defaults=True):
14
+ statements: List[definitions.Statement]
15
+
16
+ # Constructor that takes all field titles as arguments for convenience
17
+ @classmethod
18
+ def new(
19
+ cls,
20
+ statements: List[definitions.Statement],
21
+ ):
22
+ return cls(
23
+ statements,
24
+ )
25
+
26
+ def __str__(self) -> str:
27
+ return f"StatementsResponse(statements={self.statements})"
@@ -0,0 +1,40 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/WithdrawalsRequest.json
3
+
4
+ from __future__ import annotations
5
+ from architect_py.grpc.models.Boss.WithdrawalsResponse import WithdrawalsResponse
6
+
7
+ from msgspec import Struct
8
+
9
+
10
+ class WithdrawalsRequest(Struct, omit_defaults=True):
11
+ account_id: str
12
+
13
+ # Constructor that takes all field titles as arguments for convenience
14
+ @classmethod
15
+ def new(
16
+ cls,
17
+ account_id: str,
18
+ ):
19
+ return cls(
20
+ account_id,
21
+ )
22
+
23
+ def __str__(self) -> str:
24
+ return f"WithdrawalsRequest(account_id={self.account_id})"
25
+
26
+ @staticmethod
27
+ def get_response_type():
28
+ return WithdrawalsResponse
29
+
30
+ @staticmethod
31
+ def get_unannotated_response_type():
32
+ return WithdrawalsResponse
33
+
34
+ @staticmethod
35
+ def get_route() -> str:
36
+ return "/json.architect.Boss/Withdrawals"
37
+
38
+ @staticmethod
39
+ def get_rpc_method():
40
+ return "unary"
@@ -0,0 +1,27 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Boss/WithdrawalsResponse.json
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import List
7
+
8
+ from msgspec import Struct
9
+
10
+ from .. import definitions
11
+
12
+
13
+ class WithdrawalsResponse(Struct, omit_defaults=True):
14
+ withdrawals: List[definitions.Withdrawal]
15
+
16
+ # Constructor that takes all field titles as arguments for convenience
17
+ @classmethod
18
+ def new(
19
+ cls,
20
+ withdrawals: List[definitions.Withdrawal],
21
+ ):
22
+ return cls(
23
+ withdrawals,
24
+ )
25
+
26
+ def __str__(self) -> str:
27
+ return f"WithdrawalsResponse(withdrawals={self.withdrawals})"
@@ -1,2 +1,2 @@
1
1
  # generated by datamodel-codegen:
2
- # filename: processed_schemas
2
+ # filename: schemas
@@ -0,0 +1,37 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Core/ConfigRequest.json
3
+
4
+ from __future__ import annotations
5
+ from architect_py.grpc.models.Core.ConfigResponse import ConfigResponse
6
+
7
+ from msgspec import Struct
8
+
9
+
10
+ class ConfigRequest(Struct, omit_defaults=True):
11
+ pass
12
+
13
+ # Constructor that takes all field titles as arguments for convenience
14
+ @classmethod
15
+ def new(
16
+ cls,
17
+ ):
18
+ return cls()
19
+
20
+ def __str__(self) -> str:
21
+ return f"ConfigRequest()"
22
+
23
+ @staticmethod
24
+ def get_response_type():
25
+ return ConfigResponse
26
+
27
+ @staticmethod
28
+ def get_unannotated_response_type():
29
+ return ConfigResponse
30
+
31
+ @staticmethod
32
+ def get_route() -> str:
33
+ return "/json.architect.Core/Config"
34
+
35
+ @staticmethod
36
+ def get_rpc_method():
37
+ return "unary"
@@ -0,0 +1,25 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Core/ConfigResponse.json
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import Dict
7
+
8
+ from msgspec import Struct
9
+
10
+
11
+ class ConfigResponse(Struct, omit_defaults=True):
12
+ marketdata: Dict[str, str]
13
+
14
+ # Constructor that takes all field titles as arguments for convenience
15
+ @classmethod
16
+ def new(
17
+ cls,
18
+ marketdata: Dict[str, str],
19
+ ):
20
+ return cls(
21
+ marketdata,
22
+ )
23
+
24
+ def __str__(self) -> str:
25
+ return f"ConfigResponse(marketdata={self.marketdata})"
@@ -0,0 +1,2 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: schemas
@@ -2,11 +2,11 @@
2
2
  # filename: Cpty/CptyRequest.json
3
3
 
4
4
  from __future__ import annotations
5
- from architect_py.grpc_client.Cpty.CptyResponse import (
5
+ from architect_py.grpc.models.Cpty.CptyResponse import (
6
6
  CptyResponse,
7
7
  Symbology,
8
8
  ReconcileOrder,
9
- ReconcileOpenOrder,
9
+ ReconcileOpenOrders,
10
10
  UpdateAccountSummary,
11
11
  )
12
12
 
@@ -23,7 +23,7 @@ class CancelOrder(Struct, omit_defaults=True, tag_field="t", tag="cancel_order")
23
23
  cancel: Cancel
24
24
  original_order: Optional[Order] = None
25
25
 
26
- # below is a constructor that takes all field titles as arguments for convenience
26
+ # Constructor that takes all field titles as arguments for convenience
27
27
  @classmethod
28
28
  def new(
29
29
  cls,
@@ -60,8 +60,9 @@ CptyRequest = Annotated[
60
60
  ]
61
61
 
62
62
  CptyRequest_rpc_method = "duplex_stream"
63
+ UnannotatedCptyRequest = Login | Logout | PlaceOrder | CancelOrder
63
64
  CptyRequestResponseType = CptyResponse
64
65
  CptyRequestUnannotatedResponseType = (
65
- Symbology | ReconcileOrder | ReconcileOpenOrder | UpdateAccountSummary
66
+ Symbology | ReconcileOrder | ReconcileOpenOrders | UpdateAccountSummary
66
67
  )
67
68
  CptyRequest_route = "/json.architect.Cpty/Cpty"
@@ -20,7 +20,7 @@ class UpdateAccountSummary(Struct, omit_defaults=True, tag_field="t", tag="as"):
20
20
  positions: Optional[Dict[str, Any]] = None
21
21
  statistics: Optional[definitions.AccountStatistics] = None
22
22
 
23
- # below is a constructor that takes all field titles as arguments for convenience
23
+ # Constructor that takes all field titles as arguments for convenience
24
24
  @classmethod
25
25
  def new(
26
26
  cls,
@@ -49,7 +49,7 @@ class UpdateAccountSummary(Struct, omit_defaults=True, tag_field="t", tag="as"):
49
49
  class Symbology(Struct, omit_defaults=True, tag_field="t", tag="xs"):
50
50
  execution_info: Dict[str, Dict[str, definitions.ExecutionInfo]]
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,
@@ -63,11 +63,11 @@ class Symbology(Struct, omit_defaults=True, tag_field="t", tag="xs"):
63
63
  return f"Symbology(execution_info={self.execution_info})"
64
64
 
65
65
 
66
- class ReconcileOpenOrder(Struct, omit_defaults=True, tag_field="t", tag="oo"):
66
+ class ReconcileOpenOrders(Struct, omit_defaults=True, tag_field="t", tag="oo"):
67
67
  orders: List[Order]
68
68
  snapshot_for_account: Optional[definitions.AccountIdOrName] = None
69
69
 
70
- # below is a constructor that takes all field titles as arguments for convenience
70
+ # Constructor that takes all field titles as arguments for convenience
71
71
  @classmethod
72
72
  def new(
73
73
  cls,
@@ -80,7 +80,7 @@ class ReconcileOpenOrder(Struct, omit_defaults=True, tag_field="t", tag="oo"):
80
80
  )
81
81
 
82
82
  def __str__(self) -> str:
83
- return f"ReconcileOpenOrder(orders={self.orders},snapshot_for_account={self.snapshot_for_account})"
83
+ return f"ReconcileOpenOrders(orders={self.orders},snapshot_for_account={self.snapshot_for_account})"
84
84
 
85
85
 
86
86
  class ReconcileOrder(Order, omit_defaults=True, tag_field="t", tag="ro"):
@@ -88,6 +88,6 @@ class ReconcileOrder(Order, omit_defaults=True, tag_field="t", tag="ro"):
88
88
 
89
89
 
90
90
  CptyResponse = Annotated[
91
- Union[Symbology, ReconcileOrder, ReconcileOpenOrder, UpdateAccountSummary],
91
+ Union[Symbology, ReconcileOrder, ReconcileOpenOrders, UpdateAccountSummary],
92
92
  Meta(title="CptyResponse"),
93
93
  ]
@@ -0,0 +1,48 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Cpty/CptyStatus.json
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import Annotated, Optional
7
+
8
+ from msgspec import Meta, Struct
9
+
10
+
11
+ class CptyStatus(Struct, omit_defaults=True):
12
+ connected: bool
13
+ kind: str
14
+ last_heartbeat: Annotated[int, Meta(description="UNIX epoch time or -1 for never")]
15
+ """
16
+ UNIX epoch time or -1 for never
17
+ """
18
+ last_heartbeat_stale_threshold: Annotated[
19
+ int, Meta(description="Stale threshold in seconds, or -1 for never stale")
20
+ ]
21
+ """
22
+ Stale threshold in seconds, or -1 for never stale
23
+ """
24
+ logged_in: bool
25
+ instance: Optional[str] = None
26
+
27
+ # Constructor that takes all field titles as arguments for convenience
28
+ @classmethod
29
+ def new(
30
+ cls,
31
+ connected: bool,
32
+ kind: str,
33
+ last_heartbeat: int,
34
+ last_heartbeat_stale_threshold: int,
35
+ logged_in: bool,
36
+ instance: Optional[str] = None,
37
+ ):
38
+ return cls(
39
+ connected,
40
+ kind,
41
+ last_heartbeat,
42
+ last_heartbeat_stale_threshold,
43
+ logged_in,
44
+ instance,
45
+ )
46
+
47
+ def __str__(self) -> str:
48
+ return f"CptyStatus(connected={self.connected},kind={self.kind},last_heartbeat={self.last_heartbeat},last_heartbeat_stale_threshold={self.last_heartbeat_stale_threshold},logged_in={self.logged_in},instance={self.instance})"
@@ -0,0 +1,45 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: Cpty/CptyStatusRequest.json
3
+
4
+ from __future__ import annotations
5
+ from architect_py.grpc.models.Cpty.CptyStatus import CptyStatus
6
+
7
+ from typing import Optional
8
+
9
+ from msgspec import Struct
10
+
11
+
12
+ class CptyStatusRequest(Struct, omit_defaults=True):
13
+ kind: str
14
+ instance: Optional[str] = None
15
+
16
+ # Constructor that takes all field titles as arguments for convenience
17
+ @classmethod
18
+ def new(
19
+ cls,
20
+ kind: str,
21
+ instance: Optional[str] = None,
22
+ ):
23
+ return cls(
24
+ kind,
25
+ instance,
26
+ )
27
+
28
+ def __str__(self) -> str:
29
+ return f"CptyStatusRequest(kind={self.kind},instance={self.instance})"
30
+
31
+ @staticmethod
32
+ def get_response_type():
33
+ return CptyStatus
34
+
35
+ @staticmethod
36
+ def get_unannotated_response_type():
37
+ return CptyStatus
38
+
39
+ @staticmethod
40
+ def get_route() -> str:
41
+ return "/json.architect.Cpty/CptyStatus"
42
+
43
+ @staticmethod
44
+ def get_rpc_method():
45
+ return "unary"