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.
- architect_py/__init__.py +18 -2
- architect_py/async_client.py +1089 -658
- architect_py/client.py +36 -33
- architect_py/client_interface.py +63 -0
- architect_py/common_types/__init__.py +6 -0
- architect_py/common_types/order_dir.py +91 -0
- architect_py/common_types/scalars.py +25 -0
- architect_py/common_types/tradable_product.py +59 -0
- architect_py/graphql_client/__init__.py +2 -0
- architect_py/graphql_client/client.py +3 -6
- architect_py/graphql_client/enums.py +5 -0
- 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 +145 -0
- architect_py/grpc/client.py +94 -0
- architect_py/{grpc_client → grpc/models}/Accounts/AccountsRequest.py +6 -3
- 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/models/Algo/AlgoOrder.py +114 -0
- architect_py/grpc/models/Algo/AlgoOrderRequest.py +46 -0
- architect_py/grpc/models/Algo/AlgoOrdersRequest.py +72 -0
- architect_py/grpc/models/Algo/AlgoOrdersResponse.py +27 -0
- architect_py/grpc/models/Algo/CreateAlgoOrderRequest.py +56 -0
- architect_py/grpc/models/Algo/PauseAlgoRequest.py +42 -0
- architect_py/grpc/models/Algo/PauseAlgoResponse.py +20 -0
- architect_py/grpc/models/Algo/StartAlgoRequest.py +42 -0
- architect_py/grpc/models/Algo/StartAlgoResponse.py +20 -0
- architect_py/grpc/models/Algo/StopAlgoRequest.py +42 -0
- architect_py/grpc/models/Algo/StopAlgoResponse.py +20 -0
- 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/Boss/DepositsRequest.py +40 -0
- architect_py/grpc/models/Boss/DepositsResponse.py +27 -0
- architect_py/grpc/models/Boss/RqdAccountStatisticsRequest.py +42 -0
- architect_py/grpc/models/Boss/RqdAccountStatisticsResponse.py +25 -0
- architect_py/grpc/models/Boss/StatementUrlRequest.py +40 -0
- architect_py/grpc/models/Boss/StatementUrlResponse.py +23 -0
- architect_py/grpc/models/Boss/StatementsRequest.py +40 -0
- architect_py/grpc/models/Boss/StatementsResponse.py +27 -0
- architect_py/grpc/models/Boss/WithdrawalsRequest.py +40 -0
- architect_py/grpc/models/Boss/WithdrawalsResponse.py +27 -0
- architect_py/{grpc_client/Folio → grpc/models/Boss}/__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/models/Core/__init__.py +2 -0
- 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 +7 -4
- 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 +52 -5
- 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/models/Oms/Cancel.py +90 -0
- 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 +6 -13
- 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 +16 -23
- architect_py/grpc/models/Oms/__init__.py +2 -0
- architect_py/grpc/models/OptionsMarketdata/OptionsChain.py +30 -0
- architect_py/grpc/models/OptionsMarketdata/OptionsChainGreeks.py +30 -0
- architect_py/grpc/models/OptionsMarketdata/OptionsChainGreeksRequest.py +47 -0
- architect_py/grpc/models/OptionsMarketdata/OptionsChainRequest.py +45 -0
- architect_py/grpc/models/OptionsMarketdata/OptionsExpirations.py +29 -0
- architect_py/grpc/models/OptionsMarketdata/OptionsExpirationsRequest.py +42 -0
- architect_py/grpc/models/OptionsMarketdata/__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/models/Symbology/ExecutionInfoRequest.py +47 -0
- architect_py/grpc/models/Symbology/ExecutionInfoResponse.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 +671 -934
- architect_py/grpc/resolve_endpoint.py +70 -0
- architect_py/{grpc_client/grpc_server.py → grpc/server.py} +13 -9
- architect_py/grpc/utils.py +32 -0
- architect_py/internal_utils/__init__.py +0 -0
- architect_py/internal_utils/no_pandas.py +3 -0
- architect_py/tests/conftest.py +91 -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 +41 -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.0.dist-info/METADATA +54 -0
- architect_py-5.0.0.dist-info/RECORD +214 -0
- {architect_py-3.2.1.dist-info → architect_py-5.0.0.dist-info}/WHEEL +2 -1
- architect_py-5.0.0.dist-info/top_level.txt +4 -0
- examples/__init__.py +0 -0
- examples/book_subscription.py +52 -0
- examples/candles.py +30 -0
- examples/common.py +116 -0
- examples/external_cpty.py +77 -0
- examples/funding_rate_mean_reversion_algo.py +186 -0
- examples/order_sending.py +91 -0
- examples/stream_l1_marketdata.py +25 -0
- examples/stream_l2_marketdata.py +38 -0
- examples/trades.py +21 -0
- examples/tutorial_async.py +86 -0
- examples/tutorial_sync.py +95 -0
- scripts/generate_functions_md.py +166 -0
- scripts/generate_sync_interface.py +226 -0
- scripts/postprocess_grpc.py +604 -0
- scripts/preprocess_grpc_schema.py +708 -0
- templates/exceptions.py +83 -0
- templates/juniper_base_client.py +371 -0
- architect_py/client_protocol.py +0 -52
- architect_py/grpc_client/Algo/AlgoOrderForTwapAlgo.py +0 -61
- architect_py/grpc_client/Algo/CreateAlgoOrderRequestForTwapAlgo.py +0 -59
- architect_py/grpc_client/Algo/ModifyAlgoOrderRequestForTwapAlgo.py +0 -45
- 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/Cancel.py +0 -42
- 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.0.dist-info/licenses}/LICENSE +0 -0
@@ -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,17 +18,18 @@ 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.
|
25
25
|
"""
|
26
26
|
order_id: Optional[definitions.OrderId] = None
|
27
|
+
symbol: Optional[str] = None
|
27
28
|
to_exclusive: Optional[datetime] = None
|
28
29
|
trader: Optional[definitions.TraderIdOrEmail] = None
|
29
30
|
venue: Optional[str] = None
|
30
31
|
|
31
|
-
#
|
32
|
+
# Constructor that takes all field titles as arguments for convenience
|
32
33
|
@classmethod
|
33
34
|
def new(
|
34
35
|
cls,
|
@@ -36,6 +37,7 @@ class HistoricalFillsRequest(Struct, omit_defaults=True):
|
|
36
37
|
from_inclusive: Optional[datetime] = None,
|
37
38
|
limit: Optional[int] = None,
|
38
39
|
order_id: Optional[definitions.OrderId] = None,
|
40
|
+
symbol: Optional[str] = None,
|
39
41
|
to_exclusive: Optional[datetime] = None,
|
40
42
|
trader: Optional[definitions.TraderIdOrEmail] = None,
|
41
43
|
venue: Optional[str] = None,
|
@@ -45,13 +47,14 @@ class HistoricalFillsRequest(Struct, omit_defaults=True):
|
|
45
47
|
from_inclusive,
|
46
48
|
limit,
|
47
49
|
order_id,
|
50
|
+
symbol,
|
48
51
|
to_exclusive,
|
49
52
|
trader,
|
50
53
|
venue,
|
51
54
|
)
|
52
55
|
|
53
56
|
def __str__(self) -> str:
|
54
|
-
return f"HistoricalFillsRequest(account={self.account},from_inclusive={self.from_inclusive},limit={self.limit},order_id={self.order_id},to_exclusive={self.to_exclusive},trader={self.trader},venue={self.venue})"
|
57
|
+
return f"HistoricalFillsRequest(account={self.account},from_inclusive={self.from_inclusive},limit={self.limit},order_id={self.order_id},symbol={self.symbol},to_exclusive={self.to_exclusive},trader={self.trader},venue={self.venue})"
|
55
58
|
|
56
59
|
@staticmethod
|
57
60
|
def get_response_type():
|
@@ -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,
|
@@ -37,7 +37,7 @@ class Candle(Struct, omit_defaults=True):
|
|
37
37
|
mo: Optional[Annotated[Optional[Decimal], Meta(title="mid_open")]] = None
|
38
38
|
o: Optional[Annotated[Optional[Decimal], Meta(title="open")]] = 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,
|
@@ -2,11 +2,11 @@
|
|
2
2
|
# filename: Marketdata/HistoricalCandlesRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.HistoricalCandlesResponse import (
|
6
6
|
HistoricalCandlesResponse,
|
7
7
|
)
|
8
8
|
|
9
|
-
from
|
9
|
+
from typing import Optional
|
10
10
|
|
11
11
|
from msgspec import Struct
|
12
12
|
|
@@ -15,28 +15,31 @@ from .. import definitions
|
|
15
15
|
|
16
16
|
class HistoricalCandlesRequest(Struct, omit_defaults=True):
|
17
17
|
candle_width: definitions.CandleWidth
|
18
|
-
end_date:
|
19
|
-
start_date:
|
18
|
+
end_date: definitions.DateTimeOrUtc
|
19
|
+
start_date: definitions.DateTimeOrUtc
|
20
20
|
symbol: str
|
21
|
+
venue: Optional[str] = None
|
21
22
|
|
22
|
-
#
|
23
|
+
# Constructor that takes all field titles as arguments for convenience
|
23
24
|
@classmethod
|
24
25
|
def new(
|
25
26
|
cls,
|
26
27
|
candle_width: definitions.CandleWidth,
|
27
|
-
end_date:
|
28
|
-
start_date:
|
28
|
+
end_date: definitions.DateTimeOrUtc,
|
29
|
+
start_date: definitions.DateTimeOrUtc,
|
29
30
|
symbol: str,
|
31
|
+
venue: Optional[str] = None,
|
30
32
|
):
|
31
33
|
return cls(
|
32
34
|
candle_width,
|
33
35
|
end_date,
|
34
36
|
start_date,
|
35
37
|
symbol,
|
38
|
+
venue,
|
36
39
|
)
|
37
40
|
|
38
41
|
def __str__(self) -> str:
|
39
|
-
return f"HistoricalCandlesRequest(candle_width={self.candle_width},end_date={self.end_date},start_date={self.start_date},symbol={self.symbol})"
|
42
|
+
return f"HistoricalCandlesRequest(candle_width={self.candle_width},end_date={self.end_date},start_date={self.start_date},symbol={self.symbol},venue={self.venue})"
|
40
43
|
|
41
44
|
@staticmethod
|
42
45
|
def get_response_type():
|
@@ -13,7 +13,7 @@ from .Candle import Candle
|
|
13
13
|
class HistoricalCandlesResponse(Struct, omit_defaults=True):
|
14
14
|
candles: List[Candle]
|
15
15
|
|
16
|
-
#
|
16
|
+
# Constructor that takes all field titles as arguments for convenience
|
17
17
|
@classmethod
|
18
18
|
def new(
|
19
19
|
cls,
|
@@ -14,10 +14,37 @@ class L1BookSnapshot(Struct, omit_defaults=True):
|
|
14
14
|
s: Annotated[str, Meta(title="symbol")]
|
15
15
|
tn: Annotated[int, Meta(ge=0, title="timestamp_ns")]
|
16
16
|
ts: Annotated[int, Meta(title="timestamp")]
|
17
|
-
a: Optional[
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
a: Optional[
|
18
|
+
Annotated[
|
19
|
+
List[Decimal], Meta(description="(price, quantity)", title="best_ask")
|
20
|
+
]
|
21
|
+
] = None
|
22
|
+
"""
|
23
|
+
(price, quantity)
|
24
|
+
"""
|
25
|
+
b: Optional[
|
26
|
+
Annotated[
|
27
|
+
List[Decimal], Meta(description="(price, quantity)", title="best_bid")
|
28
|
+
]
|
29
|
+
] = None
|
30
|
+
"""
|
31
|
+
(price, quantity)
|
32
|
+
"""
|
33
|
+
rt: Optional[
|
34
|
+
Annotated[
|
35
|
+
Optional[int],
|
36
|
+
Meta(
|
37
|
+
description="Time that Architect feed received the message; only set if streaming from direct L1 feeds",
|
38
|
+
title="recv_time",
|
39
|
+
),
|
40
|
+
]
|
41
|
+
] = None
|
42
|
+
"""
|
43
|
+
Time that Architect feed received the message; only set if streaming from direct L1 feeds
|
44
|
+
"""
|
45
|
+
rtn: Optional[Annotated[Optional[int], Meta(title="recv_time_ns")]] = None
|
46
|
+
|
47
|
+
# Constructor that takes all field titles as arguments for convenience
|
21
48
|
@classmethod
|
22
49
|
def new(
|
23
50
|
cls,
|
@@ -26,6 +53,8 @@ class L1BookSnapshot(Struct, omit_defaults=True):
|
|
26
53
|
timestamp: int,
|
27
54
|
best_ask: Optional[List[Decimal]] = None,
|
28
55
|
best_bid: Optional[List[Decimal]] = None,
|
56
|
+
recv_time: Optional[int] = None,
|
57
|
+
recv_time_ns: Optional[int] = None,
|
29
58
|
):
|
30
59
|
return cls(
|
31
60
|
symbol,
|
@@ -33,10 +62,12 @@ class L1BookSnapshot(Struct, omit_defaults=True):
|
|
33
62
|
timestamp,
|
34
63
|
best_ask,
|
35
64
|
best_bid,
|
65
|
+
recv_time,
|
66
|
+
recv_time_ns,
|
36
67
|
)
|
37
68
|
|
38
69
|
def __str__(self) -> str:
|
39
|
-
return f"L1BookSnapshot(symbol={self.s},timestamp_ns={self.tn},timestamp={self.ts},best_ask={self.a},best_bid={self.b})"
|
70
|
+
return f"L1BookSnapshot(symbol={self.s},timestamp_ns={self.tn},timestamp={self.ts},best_ask={self.a},best_bid={self.b},recv_time={self.rt},recv_time_ns={self.rtn})"
|
40
71
|
|
41
72
|
@property
|
42
73
|
def symbol(self) -> str:
|
@@ -85,3 +116,19 @@ class L1BookSnapshot(Struct, omit_defaults=True):
|
|
85
116
|
@best_bid.setter
|
86
117
|
def best_bid(self, value: Optional[List[Decimal]]) -> None:
|
87
118
|
self.b = value
|
119
|
+
|
120
|
+
@property
|
121
|
+
def recv_time(self) -> Optional[int]:
|
122
|
+
return self.rt
|
123
|
+
|
124
|
+
@recv_time.setter
|
125
|
+
def recv_time(self, value: Optional[int]) -> None:
|
126
|
+
self.rt = value
|
127
|
+
|
128
|
+
@property
|
129
|
+
def recv_time_ns(self) -> Optional[int]:
|
130
|
+
return self.rtn
|
131
|
+
|
132
|
+
@recv_time_ns.setter
|
133
|
+
def recv_time_ns(self, value: Optional[int]) -> None:
|
134
|
+
self.rtn = value
|
@@ -2,26 +2,31 @@
|
|
2
2
|
# filename: Marketdata/L1BookSnapshotRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.L1BookSnapshot import L1BookSnapshot
|
6
|
+
|
7
|
+
from typing import Optional
|
6
8
|
|
7
9
|
from msgspec import Struct
|
8
10
|
|
9
11
|
|
10
12
|
class L1BookSnapshotRequest(Struct, omit_defaults=True):
|
11
13
|
symbol: str
|
14
|
+
venue: Optional[str] = None
|
12
15
|
|
13
|
-
#
|
16
|
+
# Constructor that takes all field titles as arguments for convenience
|
14
17
|
@classmethod
|
15
18
|
def new(
|
16
19
|
cls,
|
17
20
|
symbol: str,
|
21
|
+
venue: Optional[str] = None,
|
18
22
|
):
|
19
23
|
return cls(
|
20
24
|
symbol,
|
25
|
+
venue,
|
21
26
|
)
|
22
27
|
|
23
28
|
def __str__(self) -> str:
|
24
|
-
return f"L1BookSnapshotRequest(symbol={self.symbol})"
|
29
|
+
return f"L1BookSnapshotRequest(symbol={self.symbol},venue={self.venue})"
|
25
30
|
|
26
31
|
@staticmethod
|
27
32
|
def get_response_type():
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Marketdata/L1BookSnapshotsRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.ArrayOfL1BookSnapshot import (
|
6
6
|
ArrayOfL1BookSnapshot,
|
7
7
|
L1BookSnapshot,
|
8
8
|
)
|
@@ -14,19 +14,22 @@ from msgspec import Struct
|
|
14
14
|
|
15
15
|
class L1BookSnapshotsRequest(Struct, omit_defaults=True):
|
16
16
|
symbols: Optional[List[str]] = None
|
17
|
+
venue: Optional[str] = None
|
17
18
|
|
18
|
-
#
|
19
|
+
# Constructor that takes all field titles as arguments for convenience
|
19
20
|
@classmethod
|
20
21
|
def new(
|
21
22
|
cls,
|
22
23
|
symbols: Optional[List[str]] = None,
|
24
|
+
venue: Optional[str] = None,
|
23
25
|
):
|
24
26
|
return cls(
|
25
27
|
symbols,
|
28
|
+
venue,
|
26
29
|
)
|
27
30
|
|
28
31
|
def __str__(self) -> str:
|
29
|
-
return f"L1BookSnapshotsRequest(symbols={self.symbols})"
|
32
|
+
return f"L1BookSnapshotsRequest(symbols={self.symbols},venue={self.venue})"
|
30
33
|
|
31
34
|
@staticmethod
|
32
35
|
def get_response_type():
|
@@ -27,7 +27,7 @@ class L2BookSnapshot(Struct, omit_defaults=True):
|
|
27
27
|
tn: Annotated[int, Meta(ge=0, title="timestamp_ns")]
|
28
28
|
ts: Annotated[int, Meta(title="timestamp")]
|
29
29
|
|
30
|
-
#
|
30
|
+
# Constructor that takes all field titles as arguments for convenience
|
31
31
|
@classmethod
|
32
32
|
def new(
|
33
33
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Marketdata/L2BookSnapshotRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.L2BookSnapshot import L2BookSnapshot
|
6
6
|
|
7
7
|
from typing import Optional
|
8
8
|
|
@@ -13,7 +13,7 @@ class L2BookSnapshotRequest(Struct, omit_defaults=True):
|
|
13
13
|
symbol: str
|
14
14
|
venue: Optional[str] = None
|
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: Marketdata/Liquidation.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.common_types import OrderDir
|
6
6
|
from datetime import datetime, timezone
|
7
7
|
|
8
8
|
from decimal import Decimal
|
@@ -21,7 +21,7 @@ class Liquidation(Struct, omit_defaults=True):
|
|
21
21
|
tn: Annotated[int, Meta(ge=0, title="timestamp_ns")]
|
22
22
|
ts: Annotated[int, Meta(title="timestamp")]
|
23
23
|
|
24
|
-
#
|
24
|
+
# Constructor that takes all field titles as arguments for convenience
|
25
25
|
@classmethod
|
26
26
|
def new(
|
27
27
|
cls,
|
@@ -13,7 +13,7 @@ class MarketStatus(Struct, omit_defaults=True):
|
|
13
13
|
is_quoting: Optional[bool] = None
|
14
14
|
is_trading: Optional[bool] = None
|
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: Marketdata/MarketStatusRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.MarketStatus import MarketStatus
|
6
6
|
|
7
7
|
from typing import Optional
|
8
8
|
|
@@ -13,7 +13,7 @@ class MarketStatusRequest(Struct, omit_defaults=True):
|
|
13
13
|
symbol: str
|
14
14
|
venue: Optional[str] = None
|
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: Marketdata/SubscribeCandlesRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.Candle import Candle
|
6
6
|
|
7
7
|
from typing import Annotated, List, Optional
|
8
8
|
|
@@ -24,7 +24,7 @@ class SubscribeCandlesRequest(Struct, omit_defaults=True):
|
|
24
24
|
"""
|
25
25
|
venue: Optional[str] = None
|
26
26
|
|
27
|
-
#
|
27
|
+
# Constructor that takes all field titles as arguments for convenience
|
28
28
|
@classmethod
|
29
29
|
def new(
|
30
30
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Marketdata/SubscribeCurrentCandlesRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.Candle import Candle
|
6
6
|
|
7
7
|
from typing import Annotated, Optional
|
8
8
|
|
@@ -22,8 +22,7 @@ class SubscribeCurrentCandlesRequest(Struct, omit_defaults=True):
|
|
22
22
|
Annotated[
|
23
23
|
Optional[int],
|
24
24
|
Meta(
|
25
|
-
description="If None, send the current candle on every trade or candle tick. Otherwise, send a candle every `tick_period_ms`."
|
26
|
-
ge=0,
|
25
|
+
description="If None, send the current candle on every trade or candle tick. Otherwise, send a candle every `tick_period_ms`."
|
27
26
|
),
|
28
27
|
]
|
29
28
|
] = None
|
@@ -32,7 +31,7 @@ class SubscribeCurrentCandlesRequest(Struct, omit_defaults=True):
|
|
32
31
|
"""
|
33
32
|
venue: Optional[str] = None
|
34
33
|
|
35
|
-
#
|
34
|
+
# Constructor that takes all field titles as arguments for convenience
|
36
35
|
@classmethod
|
37
36
|
def new(
|
38
37
|
cls,
|