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
@@ -13,7 +13,7 @@ from .. import definitions
|
|
13
13
|
class AccountsResponse(Struct, omit_defaults=True):
|
14
14
|
accounts: List[definitions.AccountWithPermissions]
|
15
15
|
|
16
|
-
#
|
16
|
+
# Constructor that takes all field titles as arguments for convenience
|
17
17
|
@classmethod
|
18
18
|
def new(
|
19
19
|
cls,
|
@@ -1,2 +1,2 @@
|
|
1
1
|
# generated by datamodel-codegen:
|
2
|
-
# filename:
|
2
|
+
# filename: schemas
|
@@ -25,7 +25,7 @@ class AlgoOrderForTwapAlgo(Struct, omit_defaults=True):
|
|
25
25
|
last_error_time: Optional[datetime] = None
|
26
26
|
parent_order_id: Optional[definitions.OrderId] = None
|
27
27
|
|
28
|
-
#
|
28
|
+
# Constructor that takes all field titles as arguments for convenience
|
29
29
|
@classmethod
|
30
30
|
def new(
|
31
31
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Algo/CreateAlgoOrderRequestForTwapAlgo.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Algo.AlgoOrderForTwapAlgo import AlgoOrderForTwapAlgo
|
6
6
|
|
7
7
|
from typing import Optional
|
8
8
|
|
@@ -19,7 +19,7 @@ class CreateAlgoOrderRequestForTwapAlgo(Struct, omit_defaults=True):
|
|
19
19
|
parent_order_id: Optional[definitions.OrderId] = None
|
20
20
|
trader: Optional[definitions.UserId] = None
|
21
21
|
|
22
|
-
#
|
22
|
+
# Constructor that takes all field titles as arguments for convenience
|
23
23
|
@classmethod
|
24
24
|
def new(
|
25
25
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Algo/ModifyAlgoOrderRequestForTwapAlgo.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Algo.AlgoOrderForTwapAlgo import AlgoOrderForTwapAlgo
|
6
6
|
|
7
7
|
from msgspec import Struct
|
8
8
|
|
@@ -13,7 +13,7 @@ class ModifyAlgoOrderRequestForTwapAlgo(Struct, omit_defaults=True):
|
|
13
13
|
algo_order_id: definitions.OrderId
|
14
14
|
params: definitions.TwapParams
|
15
15
|
|
16
|
-
#
|
16
|
+
# Constructor that takes all field titles as arguments for convenience
|
17
17
|
@classmethod
|
18
18
|
def new(
|
19
19
|
cls,
|
@@ -1,2 +1,2 @@
|
|
1
1
|
# generated by datamodel-codegen:
|
2
|
-
# filename:
|
2
|
+
# filename: schemas
|
@@ -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:
|
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})"
|
@@ -1,2 +1,2 @@
|
|
1
1
|
# generated by datamodel-codegen:
|
2
|
-
# filename:
|
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.
|
5
|
+
from architect_py.grpc.models.Cpty.CptyResponse import (
|
6
6
|
CptyResponse,
|
7
7
|
Symbology,
|
8
8
|
ReconcileOrder,
|
9
|
-
|
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
|
-
#
|
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 |
|
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
|
-
#
|
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
|
-
#
|
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
|
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
|
-
#
|
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"
|
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,
|
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"
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# generated by datamodel-codegen:
|
2
|
+
# filename: Cpty/CptysRequest.json
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
from architect_py.grpc.models.Cpty.CptysResponse import CptysResponse
|
6
|
+
|
7
|
+
from msgspec import Struct
|
8
|
+
|
9
|
+
|
10
|
+
class CptysRequest(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"CptysRequest()"
|
22
|
+
|
23
|
+
@staticmethod
|
24
|
+
def get_response_type():
|
25
|
+
return CptysResponse
|
26
|
+
|
27
|
+
@staticmethod
|
28
|
+
def get_unannotated_response_type():
|
29
|
+
return CptysResponse
|
30
|
+
|
31
|
+
@staticmethod
|
32
|
+
def get_route() -> str:
|
33
|
+
return "/json.architect.Cpty/Cptys"
|
34
|
+
|
35
|
+
@staticmethod
|
36
|
+
def get_rpc_method():
|
37
|
+
return "unary"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# generated by datamodel-codegen:
|
2
|
+
# filename: Cpty/CptysResponse.json
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import List
|
7
|
+
|
8
|
+
from msgspec import Struct
|
9
|
+
|
10
|
+
from .CptyStatus import CptyStatus
|
11
|
+
|
12
|
+
|
13
|
+
class CptysResponse(Struct, omit_defaults=True):
|
14
|
+
cptys: List[CptyStatus]
|
15
|
+
|
16
|
+
# Constructor that takes all field titles as arguments for convenience
|
17
|
+
@classmethod
|
18
|
+
def new(
|
19
|
+
cls,
|
20
|
+
cptys: List[CptyStatus],
|
21
|
+
):
|
22
|
+
return cls(
|
23
|
+
cptys,
|
24
|
+
)
|
25
|
+
|
26
|
+
def __str__(self) -> str:
|
27
|
+
return f"CptysResponse(cptys={self.cptys})"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Folio/AccountHistoryRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Folio.AccountHistoryResponse import AccountHistoryResponse
|
6
6
|
|
7
7
|
from datetime import datetime
|
8
8
|
from typing import Optional
|
@@ -17,7 +17,7 @@ class AccountHistoryRequest(Struct, omit_defaults=True):
|
|
17
17
|
from_inclusive: Optional[datetime] = None
|
18
18
|
to_exclusive: Optional[datetime] = None
|
19
19
|
|
20
|
-
#
|
20
|
+
# Constructor that takes all field titles as arguments for convenience
|
21
21
|
@classmethod
|
22
22
|
def new(
|
23
23
|
cls,
|
@@ -13,7 +13,7 @@ from .AccountSummary import AccountSummary
|
|
13
13
|
class AccountHistoryResponse(Struct, omit_defaults=True):
|
14
14
|
history: List[AccountSummary]
|
15
15
|
|
16
|
-
#
|
16
|
+
# Constructor that takes all field titles as arguments for convenience
|
17
17
|
@classmethod
|
18
18
|
def new(
|
19
19
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Folio/AccountSummariesRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Folio.AccountSummariesResponse import (
|
6
6
|
AccountSummariesResponse,
|
7
7
|
)
|
8
8
|
|
@@ -27,7 +27,7 @@ class AccountSummariesRequest(Struct, omit_defaults=True):
|
|
27
27
|
"""
|
28
28
|
trader: Optional[definitions.TraderIdOrEmail] = None
|
29
29
|
|
30
|
-
#
|
30
|
+
# Constructor that takes all field titles as arguments for convenience
|
31
31
|
@classmethod
|
32
32
|
def new(
|
33
33
|
cls,
|
@@ -13,7 +13,7 @@ from .AccountSummary import AccountSummary
|
|
13
13
|
class AccountSummariesResponse(Struct, omit_defaults=True):
|
14
14
|
account_summaries: List[AccountSummary]
|
15
15
|
|
16
|
-
#
|
16
|
+
# Constructor that takes all field titles as arguments for convenience
|
17
17
|
@classmethod
|
18
18
|
def new(
|
19
19
|
cls,
|
@@ -74,7 +74,7 @@ class AccountSummary(Struct, omit_defaults=True):
|
|
74
74
|
Yesterday total account equity.
|
75
75
|
"""
|
76
76
|
|
77
|
-
#
|
77
|
+
# Constructor that takes all field titles as arguments for convenience
|
78
78
|
@classmethod
|
79
79
|
def new(
|
80
80
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Folio/AccountSummaryRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Folio.AccountSummary import AccountSummary
|
6
6
|
|
7
7
|
from msgspec import Struct
|
8
8
|
|
@@ -12,7 +12,7 @@ from .. import definitions
|
|
12
12
|
class AccountSummaryRequest(Struct, omit_defaults=True):
|
13
13
|
account: definitions.AccountIdOrName
|
14
14
|
|
15
|
-
#
|
15
|
+
# Constructor that takes all field titles as arguments for convenience
|
16
16
|
@classmethod
|
17
17
|
def new(
|
18
18
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Folio/HistoricalFillsRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Folio.HistoricalFillsResponse import (
|
6
6
|
HistoricalFillsResponse,
|
7
7
|
)
|
8
8
|
|
@@ -18,7 +18,7 @@ class HistoricalFillsRequest(Struct, omit_defaults=True):
|
|
18
18
|
account: Optional[definitions.AccountIdOrName] = None
|
19
19
|
from_inclusive: Optional[datetime] = None
|
20
20
|
limit: Optional[
|
21
|
-
Annotated[Optional[int], Meta(description="Default maximum is 1000."
|
21
|
+
Annotated[Optional[int], Meta(description="Default maximum is 1000.")]
|
22
22
|
] = None
|
23
23
|
"""
|
24
24
|
Default maximum is 1000.
|
@@ -28,7 +28,7 @@ class HistoricalFillsRequest(Struct, omit_defaults=True):
|
|
28
28
|
trader: Optional[definitions.TraderIdOrEmail] = None
|
29
29
|
venue: Optional[str] = None
|
30
30
|
|
31
|
-
#
|
31
|
+
# Constructor that takes all field titles as arguments for convenience
|
32
32
|
@classmethod
|
33
33
|
def new(
|
34
34
|
cls,
|
@@ -14,7 +14,7 @@ class HistoricalFillsResponse(Struct, omit_defaults=True):
|
|
14
14
|
aberrant_fills: List[definitions.AberrantFill]
|
15
15
|
fills: List[definitions.Fill]
|
16
16
|
|
17
|
-
#
|
17
|
+
# Constructor that takes all field titles as arguments for convenience
|
18
18
|
@classmethod
|
19
19
|
def new(
|
20
20
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Folio/HistoricalOrdersRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Folio.HistoricalOrdersResponse import (
|
6
6
|
HistoricalOrdersResponse,
|
7
7
|
)
|
8
8
|
|
@@ -18,7 +18,7 @@ class HistoricalOrdersRequest(Struct, omit_defaults=True):
|
|
18
18
|
account: Optional[definitions.AccountIdOrName] = None
|
19
19
|
from_inclusive: Optional[datetime] = None
|
20
20
|
limit: Optional[
|
21
|
-
Annotated[Optional[int], Meta(description="Default maximum is 1000."
|
21
|
+
Annotated[Optional[int], Meta(description="Default maximum is 1000.")]
|
22
22
|
] = None
|
23
23
|
"""
|
24
24
|
Default maximum is 1000.
|
@@ -37,7 +37,7 @@ class HistoricalOrdersRequest(Struct, omit_defaults=True):
|
|
37
37
|
trader: Optional[definitions.TraderIdOrEmail] = None
|
38
38
|
venue: Optional[str] = None
|
39
39
|
|
40
|
-
#
|
40
|
+
# Constructor that takes all field titles as arguments for convenience
|
41
41
|
@classmethod
|
42
42
|
def new(
|
43
43
|
cls,
|
@@ -13,7 +13,7 @@ from ..Oms.Order import Order
|
|
13
13
|
class HistoricalOrdersResponse(Struct, omit_defaults=True):
|
14
14
|
orders: List[Order]
|
15
15
|
|
16
|
-
#
|
16
|
+
# Constructor that takes all field titles as arguments for convenience
|
17
17
|
@classmethod
|
18
18
|
def new(
|
19
19
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Health/HealthCheckRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Health.HealthCheckResponse import HealthCheckResponse
|
6
6
|
|
7
7
|
from typing import Annotated, Optional
|
8
8
|
|
@@ -25,7 +25,7 @@ class HealthCheckRequest(Struct, omit_defaults=True):
|
|
25
25
|
Generally, this will only be set when querying the API gateway. It's not recommended to rely on internal subservice names being stable.
|
26
26
|
"""
|
27
27
|
|
28
|
-
#
|
28
|
+
# Constructor that takes all field titles as arguments for convenience
|
29
29
|
@classmethod
|
30
30
|
def new(
|
31
31
|
cls,
|
@@ -14,7 +14,7 @@ class HealthCheckResponse(Struct, omit_defaults=True):
|
|
14
14
|
status: definitions.HealthStatus
|
15
15
|
metrics: Optional[Dict[str, Any]] = None
|
16
16
|
|
17
|
-
#
|
17
|
+
# Constructor that takes all field titles as arguments for convenience
|
18
18
|
@classmethod
|
19
19
|
def new(
|
20
20
|
cls,
|