architect-py 3.2.2__py3-none-any.whl → 5.0.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- architect_py/__init__.py +8 -2
- architect_py/async_client.py +879 -576
- architect_py/client.py +25 -26
- 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 +2 -2
- architect_py/{grpc_client → grpc/models}/Cpty/CptyResponse.py +3 -3
- architect_py/{grpc_client → grpc/models}/Cpty/CptyStatus.py +1 -1
- architect_py/{grpc_client → grpc/models}/Cpty/CptyStatusRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Cpty/CptysRequest.py +2 -2
- architect_py/{grpc_client → grpc/models}/Cpty/CptysResponse.py +1 -1
- 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 +1 -1
- 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 +1 -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 +248 -66
- architect_py/grpc/resolve_endpoint.py +67 -0
- architect_py/{grpc_client/grpc_server.py → grpc/server.py} +9 -6
- architect_py/grpc/utils.py +32 -0
- architect_py/tests/conftest.py +86 -87
- 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.2.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 -53
- 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 -413
- 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 -65
- architect_py/tests/test_snapshots.py +0 -52
- architect_py/tests/test_subscriptions.py +0 -126
- architect_py-3.2.2.dist-info/METADATA +0 -191
- architect_py-3.2.2.dist-info/RECORD +0 -148
- /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.2.dist-info → architect_py-5.0.0b1.dist-info/licenses}/LICENSE +0 -0
@@ -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,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Marketdata/SubscribeL1BookSnapshotsRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.L1BookSnapshot import L1BookSnapshot
|
6
6
|
|
7
7
|
from typing import Annotated, List, Optional
|
8
8
|
|
@@ -19,19 +19,22 @@ class SubscribeL1BookSnapshotsRequest(Struct, omit_defaults=True):
|
|
19
19
|
"""
|
20
20
|
If None, subscribe from all symbols on the feed
|
21
21
|
"""
|
22
|
+
venue: Optional[str] = None
|
22
23
|
|
23
|
-
#
|
24
|
+
# Constructor that takes all field titles as arguments for convenience
|
24
25
|
@classmethod
|
25
26
|
def new(
|
26
27
|
cls,
|
27
28
|
symbols: Optional[List[str]] = None,
|
29
|
+
venue: Optional[str] = None,
|
28
30
|
):
|
29
31
|
return cls(
|
30
32
|
symbols,
|
33
|
+
venue,
|
31
34
|
)
|
32
35
|
|
33
36
|
def __str__(self) -> str:
|
34
|
-
return f"SubscribeL1BookSnapshotsRequest(symbols={self.symbols})"
|
37
|
+
return f"SubscribeL1BookSnapshotsRequest(symbols={self.symbols},venue={self.venue})"
|
35
38
|
|
36
39
|
@staticmethod
|
37
40
|
def get_response_type():
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Marketdata/SubscribeL2BookUpdatesRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.L2BookUpdate import (
|
6
6
|
L2BookUpdate,
|
7
7
|
Snapshot,
|
8
8
|
Diff,
|
@@ -17,7 +17,7 @@ class SubscribeL2BookUpdatesRequest(Struct, omit_defaults=True):
|
|
17
17
|
symbol: str
|
18
18
|
venue: Optional[str] = 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,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Marketdata/SubscribeLiquidationsRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.Liquidation import Liquidation
|
6
6
|
|
7
7
|
from typing import List, Optional
|
8
8
|
|
@@ -12,7 +12,7 @@ from msgspec import Struct
|
|
12
12
|
class SubscribeLiquidationsRequest(Struct, omit_defaults=True):
|
13
13
|
symbols: Optional[List[str]] = None
|
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: Marketdata/SubscribeManyCandlesRequest.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 SubscribeManyCandlesRequest(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/SubscribeTickersRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.TickerUpdate import (
|
6
6
|
TickerUpdate,
|
7
7
|
Snapshot,
|
8
8
|
Diff,
|
@@ -28,7 +28,7 @@ class SubscribeTickersRequest(Struct, omit_defaults=True):
|
|
28
28
|
If None, subscribe from all symbols on the feed
|
29
29
|
"""
|
30
30
|
|
31
|
-
#
|
31
|
+
# Constructor that takes all field titles as arguments for convenience
|
32
32
|
@classmethod
|
33
33
|
def new(
|
34
34
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Marketdata/SubscribeTradesRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.Trade import Trade
|
6
6
|
|
7
7
|
from typing import Annotated, Optional
|
8
8
|
|
@@ -21,7 +21,7 @@ class SubscribeTradesRequest(Struct, omit_defaults=True):
|
|
21
21
|
"""
|
22
22
|
venue: Optional[str] = None
|
23
23
|
|
24
|
-
#
|
24
|
+
# Constructor that takes all field titles as arguments for convenience
|
25
25
|
@classmethod
|
26
26
|
def new(
|
27
27
|
cls,
|
@@ -49,7 +49,7 @@ class Ticker(Struct, omit_defaults=True):
|
|
49
49
|
xo: Optional[Annotated[Optional[Decimal], Meta(title="session_open")]] = None
|
50
50
|
xv: Optional[Annotated[Optional[Decimal], Meta(title="session_volume")]] = None
|
51
51
|
|
52
|
-
#
|
52
|
+
# Constructor that takes all field titles as arguments for convenience
|
53
53
|
@classmethod
|
54
54
|
def new(
|
55
55
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Marketdata/TickerRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.Ticker import Ticker
|
6
6
|
|
7
7
|
from typing import Optional
|
8
8
|
|
@@ -13,7 +13,7 @@ class TickerRequest(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/TickersRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Marketdata.TickersResponse import TickersResponse
|
6
6
|
|
7
7
|
from typing import List, Optional
|
8
8
|
|
@@ -18,7 +18,7 @@ class TickersRequest(Struct, omit_defaults=True):
|
|
18
18
|
symbols: Optional[List[str]] = None
|
19
19
|
venue: Optional[str] = None
|
20
20
|
|
21
|
-
#
|
21
|
+
# Constructor that takes all field titles as arguments for convenience
|
22
22
|
@classmethod
|
23
23
|
def new(
|
24
24
|
cls,
|
@@ -13,7 +13,7 @@ from .Ticker import Ticker
|
|
13
13
|
class TickersResponse(Struct, omit_defaults=True):
|
14
14
|
tickers: List[Ticker]
|
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/Trade.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 Trade(Struct, omit_defaults=True):
|
|
21
21
|
ts: Annotated[int, Meta(title="timestamp")]
|
22
22
|
d: Optional[Annotated[Optional[OrderDir], Meta(title="direction")]] = None
|
23
23
|
|
24
|
-
#
|
24
|
+
# Constructor that takes all field titles as arguments for convenience
|
25
25
|
@classmethod
|
26
26
|
def new(
|
27
27
|
cls,
|
@@ -18,7 +18,7 @@ class Cancel(Struct, omit_defaults=True):
|
|
18
18
|
xid: str
|
19
19
|
r: Optional[str] = None
|
20
20
|
|
21
|
-
#
|
21
|
+
# Constructor that takes all field titles as arguments for convenience
|
22
22
|
@classmethod
|
23
23
|
def new(
|
24
24
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Oms/CancelAllOrdersRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Oms.CancelAllOrdersResponse import CancelAllOrdersResponse
|
6
6
|
|
7
7
|
from typing import Optional
|
8
8
|
|
@@ -17,7 +17,7 @@ class CancelAllOrdersRequest(Struct, omit_defaults=True):
|
|
17
17
|
execution_venue: Optional[str] = None
|
18
18
|
trader: Optional[definitions.TraderIdOrEmail] = 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,
|
@@ -9,7 +9,7 @@ from msgspec import Struct
|
|
9
9
|
class CancelAllOrdersResponse(Struct, omit_defaults=True):
|
10
10
|
pass
|
11
11
|
|
12
|
-
#
|
12
|
+
# Constructor that takes all field titles as arguments for convenience
|
13
13
|
@classmethod
|
14
14
|
def new(
|
15
15
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Oms/CancelOrderRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Oms.Cancel import Cancel
|
6
6
|
|
7
7
|
from typing import Annotated, Optional
|
8
8
|
|
@@ -26,7 +26,7 @@ class CancelOrderRequest(Struct, omit_defaults=True):
|
|
26
26
|
If not specified, one will be generated for you; note, in that case, you won't know for sure if the specific request went through.
|
27
27
|
"""
|
28
28
|
|
29
|
-
#
|
29
|
+
# Constructor that takes all field titles as arguments for convenience
|
30
30
|
@classmethod
|
31
31
|
def new(
|
32
32
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Oms/OpenOrdersRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Oms.OpenOrdersResponse import OpenOrdersResponse
|
6
6
|
|
7
7
|
from typing import List, Optional
|
8
8
|
|
@@ -19,7 +19,7 @@ class OpenOrdersRequest(Struct, omit_defaults=True):
|
|
19
19
|
trader: Optional[definitions.TraderIdOrEmail] = None
|
20
20
|
venue: Optional[str] = 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,
|
@@ -13,7 +13,7 @@ from .Order import Order
|
|
13
13
|
class OpenOrdersResponse(Struct, omit_defaults=True):
|
14
14
|
open_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: Oms/Order.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.common_types import OrderDir
|
6
6
|
|
7
7
|
from decimal import Decimal
|
8
8
|
from enum import Enum
|
@@ -48,7 +48,7 @@ class Order(Struct, omit_defaults=True):
|
|
48
48
|
po: Optional[Annotated[bool, Meta(title="post_only")]] = None
|
49
49
|
tp: Optional[Annotated[Decimal, Meta(title="trigger_price")]] = None
|
50
50
|
|
51
|
-
#
|
51
|
+
# Constructor that takes all field titles as arguments for convenience
|
52
52
|
@classmethod
|
53
53
|
def new(
|
54
54
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Oms/PendingCancelsRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Oms.PendingCancelsResponse import PendingCancelsResponse
|
6
6
|
|
7
7
|
from typing import List, Optional
|
8
8
|
|
@@ -18,7 +18,7 @@ class PendingCancelsRequest(Struct, omit_defaults=True):
|
|
18
18
|
trader: Optional[definitions.TraderIdOrEmail] = None
|
19
19
|
venue: Optional[str] = None
|
20
20
|
|
21
|
-
#
|
21
|
+
# Constructor that takes all field titles as arguments for convenience
|
22
22
|
@classmethod
|
23
23
|
def new(
|
24
24
|
cls,
|
@@ -13,7 +13,7 @@ from .Cancel import Cancel
|
|
13
13
|
class PendingCancelsResponse(Struct, omit_defaults=True):
|
14
14
|
pending_cancels: List[Cancel]
|
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,8 +2,8 @@
|
|
2
2
|
# filename: Oms/PlaceOrderRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
6
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Oms.Order import Order
|
6
|
+
from architect_py.common_types import OrderDir
|
7
7
|
|
8
8
|
from decimal import Decimal
|
9
9
|
from enum import Enum
|
@@ -54,7 +54,7 @@ class PlaceOrderRequest(Struct, omit_defaults=True):
|
|
54
54
|
po: Optional[Annotated[bool, Meta(title="post_only")]] = None
|
55
55
|
tp: Optional[Annotated[Decimal, Meta(title="trigger_price")]] = None
|
56
56
|
|
57
|
-
#
|
57
|
+
# Constructor that takes all field titles as arguments for convenience
|
58
58
|
@classmethod
|
59
59
|
def new(
|
60
60
|
cls,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# filename: Orderflow/DropcopyRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Orderflow.Dropcopy import (
|
6
6
|
Dropcopy,
|
7
7
|
TaggedOrder,
|
8
8
|
TaggedFill,
|
@@ -24,7 +24,7 @@ class DropcopyRequest(Struct, omit_defaults=True):
|
|
24
24
|
orders: Optional[bool] = False
|
25
25
|
trader: Optional[definitions.TraderIdOrEmail] = 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: Orderflow/SubscribeOrderflowRequest.json
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
|
-
from architect_py.
|
5
|
+
from architect_py.grpc.models.Orderflow.Orderflow import (
|
6
6
|
Orderflow,
|
7
7
|
OrderPending,
|
8
8
|
TaggedOrderAck,
|
@@ -34,7 +34,7 @@ class SubscribeOrderflowRequest(Struct, omit_defaults=True):
|
|
34
34
|
execution_venue: Optional[str] = None
|
35
35
|
trader: Optional[definitions.TraderIdOrEmail] = None
|
36
36
|
|
37
|
-
#
|
37
|
+
# Constructor that takes all field titles as arguments for convenience
|
38
38
|
@classmethod
|
39
39
|
def new(
|
40
40
|
cls,
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# generated by datamodel-codegen:
|
2
|
+
# filename: Symbology/DownloadProductCatalogRequest.json
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
from architect_py.grpc.models.Symbology.DownloadProductCatalogResponse import (
|
6
|
+
DownloadProductCatalogResponse,
|
7
|
+
)
|
8
|
+
|
9
|
+
from msgspec import Struct
|
10
|
+
|
11
|
+
|
12
|
+
class DownloadProductCatalogRequest(Struct, omit_defaults=True):
|
13
|
+
exchange: str
|
14
|
+
|
15
|
+
# Constructor that takes all field titles as arguments for convenience
|
16
|
+
@classmethod
|
17
|
+
def new(
|
18
|
+
cls,
|
19
|
+
exchange: str,
|
20
|
+
):
|
21
|
+
return cls(
|
22
|
+
exchange,
|
23
|
+
)
|
24
|
+
|
25
|
+
def __str__(self) -> str:
|
26
|
+
return f"DownloadProductCatalogRequest(exchange={self.exchange})"
|
27
|
+
|
28
|
+
@staticmethod
|
29
|
+
def get_response_type():
|
30
|
+
return DownloadProductCatalogResponse
|
31
|
+
|
32
|
+
@staticmethod
|
33
|
+
def get_unannotated_response_type():
|
34
|
+
return DownloadProductCatalogResponse
|
35
|
+
|
36
|
+
@staticmethod
|
37
|
+
def get_route() -> str:
|
38
|
+
return "/json.architect.Symbology/DownloadProductCatalog"
|
39
|
+
|
40
|
+
@staticmethod
|
41
|
+
def get_rpc_method():
|
42
|
+
return "unary"
|