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
@@ -0,0 +1,184 @@
|
|
1
|
+
architect_py/__init__.py,sha256=0Puk_VxuKMiRaSR0j4M527ur6k4ediLw_w1Bu5eyTTE,255
|
2
|
+
architect_py/async_client.py,sha256=BLkNZ4P3UZhGLglYZGzS5P_Zsv6adloMdqqcP_F0Lyg,53144
|
3
|
+
architect_py/client.py,sha256=bpFpYAtLhSPKoCG3bb45GVW55l8iEdozhZefGjXdNc0,5857
|
4
|
+
architect_py/client_interface.py,sha256=pPw4QfGI1S3XJTii-vsgMpIdQiTel669_uFA90sYPQE,5561
|
5
|
+
architect_py/common_types/__init__.py,sha256=ghDsHR6cjJUVxIY80N_Q6QXhMBJ5JMdTyBQW1mdLnNs,143
|
6
|
+
architect_py/common_types/order_dir.py,sha256=CTvINS-Hq2pAASUQqeyUdAK3kKzEG6fB_5mfP2edIu8,2098
|
7
|
+
architect_py/common_types/scalars.py,sha256=YSgSXbw2ONMQF7w1JPY4NiFV2rIjLQNmIMafX57iHPo,919
|
8
|
+
architect_py/common_types/tradable_product.py,sha256=wZ3HdQWV3P_k_nD964_Gn4LbAP2thNjTODBBiHjRzqA,1929
|
9
|
+
architect_py/graphql_client/__init__.py,sha256=HscnI0xDeyLY2SveYrtDPJyA4Qir1sfoHC1JxuHWQZE,8955
|
10
|
+
architect_py/graphql_client/base_model.py,sha256=o2d-DixASFCGztr3rTiGX0AwgFu7Awr7EgD70FI8a-I,620
|
11
|
+
architect_py/graphql_client/cancel_all_orders_mutation.py,sha256=h8S_lUy7rdSu1UgcUloiX2CCnuPIDaPCmfL2X2MOq8Y,352
|
12
|
+
architect_py/graphql_client/cancel_order_mutation.py,sha256=FGCNrbLFmPXAYQ1vmpGC44viu2K2lZSCtXiO3O214ic,499
|
13
|
+
architect_py/graphql_client/client.py,sha256=2umynBj67CiQg8PDt4o8S6GAu4eYecxtk5-i_068hLg,43266
|
14
|
+
architect_py/graphql_client/create_jwt.py,sha256=PiiOOjGnHLXro8AU7FSu_vQA_adEK1iZM6XAzHpJP5E,285
|
15
|
+
architect_py/graphql_client/enums.py,sha256=FRcMJma0Rgjh9FY_gGGcXuuezAPy69yqFaXr4ZQwOZE,1468
|
16
|
+
architect_py/graphql_client/exceptions.py,sha256=OQu-ZYCCV4VyMWTd1HR8gIjIK2CrA_JMlFxqOAJugWY,2411
|
17
|
+
architect_py/graphql_client/fragments.py,sha256=Uj__FkVqkaSWeKZimw-_r7wxHZwgNBLfjXaTOlopLMM,6483
|
18
|
+
architect_py/graphql_client/get_account_history_query.py,sha256=eRx07b_vAroTOMvIxnigtSguQ3GmGBL8l8veS-ABRAM,605
|
19
|
+
architect_py/graphql_client/get_account_query.py,sha256=l3eUIFkWJXxDWDKmqltJC3qT0UcOlO4BPMRJZ24El8M,478
|
20
|
+
architect_py/graphql_client/get_account_summaries_query.py,sha256=3ZKIvNFqb4xLOLYuMg4Z4ZGQGZAd7W31yBIyqgKkhbA,627
|
21
|
+
architect_py/graphql_client/get_account_summary_query.py,sha256=15MgJMzNG8mmDd1-NFZK65E8vvR6LoMRe_5wwRBuXnE,574
|
22
|
+
architect_py/graphql_client/get_candle_snapshot_query.py,sha256=KjY1gCkfVTIJ-JXmHc2CzHgi9LB51w66Lvc0qHZ-Bok,633
|
23
|
+
architect_py/graphql_client/get_execution_info_query.py,sha256=SFrCAAI3nBOezy0uz7VViWcyLlDgfWjbjdR66-lqSF8,585
|
24
|
+
architect_py/graphql_client/get_execution_infos_query.py,sha256=fa5_sVw2xghrZiX8uSDx5rPbbV4wW_XpE5LxeaTID78,627
|
25
|
+
architect_py/graphql_client/get_fills_query.py,sha256=4CvsyULxPuDkHQgCuwB2ooIMnCqKmT1aX7gLL1KqbSE,2294
|
26
|
+
architect_py/graphql_client/get_first_notice_date_query.py,sha256=YT9nzW0GihGwr3eQ1_NULnb68RezVnT3xUnQNYcDTn0,665
|
27
|
+
architect_py/graphql_client/get_future_series_query.py,sha256=pRfdJ31gW2bxYotmXvll6PtwFz8K6eNAZSo3DYBj1jI,383
|
28
|
+
architect_py/graphql_client/get_historical_orders_query.py,sha256=FwxWPICnnfvdcQ7zftOLiROWOvaCrBLEibtaLsG_bnk,609
|
29
|
+
architect_py/graphql_client/get_l_1_book_snapshot_query.py,sha256=UVfuPb7Rw62S5xwyS2Z8ynpNzY8WKroEmyCcFQ-HUWg,501
|
30
|
+
architect_py/graphql_client/get_l_1_book_snapshots_query.py,sha256=CejehYMtqbibcat8pO8CICZo3Vhl1N1zRaiPaJWMhVw,542
|
31
|
+
architect_py/graphql_client/get_l_2_book_snapshot_query.py,sha256=paAIdFw-YWZEFrbD1YdidzgTIyYHuG3AUmxEn3x8oOM,590
|
32
|
+
architect_py/graphql_client/get_market_status_query.py,sha256=0O5KqC1kgbB5uHqESmZ505ORE5SZdCZT7h2kI0riEVY,578
|
33
|
+
architect_py/graphql_client/get_open_orders_query.py,sha256=23Qk_RwXrDK8Ub_r-ma3N_YYwm_FWnVjv7QKuVuZE5Y,517
|
34
|
+
architect_py/graphql_client/get_product_info_query.py,sha256=oxDDx3J2jGSnNXQZw-lDHdzZO33XCOC0hpNSofjqKQ0,598
|
35
|
+
architect_py/graphql_client/get_product_infos_query.py,sha256=vZImiKh19LCG0yKiw9aP9y1lnUgxgywW7whj1FeSnGk,601
|
36
|
+
architect_py/graphql_client/input_types.py,sha256=6Obe-vvDm4TDgH3oRZUzbEvkbquaQOHYRK_62B1_0FA,57
|
37
|
+
architect_py/graphql_client/juniper_base_client.py,sha256=njikUx3G2PLqYmx6PGhT_EHALUwD9EHlI2o4W1XMnMk,12609
|
38
|
+
architect_py/graphql_client/list_accounts_query.py,sha256=C-CpCZfbIfrT_4KJbvQlLIRKQb2DWGQCNWYFJy-K87g,487
|
39
|
+
architect_py/graphql_client/place_order_mutation.py,sha256=KG45qNafDPvbuy3gfrBtre1zdLanam_gBKMmdf6GtFs,486
|
40
|
+
architect_py/graphql_client/search_symbols_query.py,sha256=hbGa6gF-gMWtRYQm2vlCTPDex8RWrJ4Yn4nT0VRQnCQ,614
|
41
|
+
architect_py/graphql_client/subscribe_candles.py,sha256=IWc1Rjs8aAPR4nDhDe_IzMYRVjdSSy5k7MpvSsTIH6w,295
|
42
|
+
architect_py/graphql_client/subscribe_orderflow.py,sha256=64GvkTUsHlkRFtZLa3NLnNs7kmGETxmS8zq6MF_5k8Q,3402
|
43
|
+
architect_py/graphql_client/subscribe_trades.py,sha256=105LyG0kPvYHk_IsJaEjpEQh2AGP9Wqmp93Q8HF89BA,654
|
44
|
+
architect_py/graphql_client/user_email_query.py,sha256=KDFLFfLW5YtAptBm6CMQ_dVpcuEBofv4XlaYkW-VmcA,305
|
45
|
+
architect_py/graphql_client/user_id_query.py,sha256=tWKJJLgEINzd8e7rYlGklQCnwcwHzYFpCGQvhxQGX20,334
|
46
|
+
architect_py/grpc/__init__.py,sha256=Mg5-rb2sMMvX_aV4fVKXeHfjx2mDX8Zxxhvvi6KcbQQ,5050
|
47
|
+
architect_py/grpc/client.py,sha256=Jwq4Vq2a-JMiP-wh5LVMm4Xauam8XS6_6lWO79bPHjY,2840
|
48
|
+
architect_py/grpc/resolve_endpoint.py,sha256=9SYbeKLPjFo16oOVlx4GXarFoCY_WsDzXBb0UEn9MQ0,2351
|
49
|
+
architect_py/grpc/server.py,sha256=Abmdfe1eYbctVgzoJYBBBLpd7UD70FbYQLtJImSyRzs,1934
|
50
|
+
architect_py/grpc/utils.py,sha256=0GV57DFY21ZNX1LWdoL-90W3ge_KuXymEH8bDRdvsfo,760
|
51
|
+
architect_py/grpc/models/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
52
|
+
architect_py/grpc/models/definitions.py,sha256=7iyfZiL2bHw5H3rV19972WbRjg1W5ijHH57lHK-ikHY,84796
|
53
|
+
architect_py/grpc/models/Accounts/AccountsRequest.py,sha256=se8HzjObq_m3x49pjNhkjfqCnZYGmViGCFjGc5FFL_U,1413
|
54
|
+
architect_py/grpc/models/Accounts/AccountsResponse.py,sha256=DlXbkd3UbRybblBAfokw-K6nRvLNZgqz7cc0EKiW1zI,636
|
55
|
+
architect_py/grpc/models/Accounts/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
56
|
+
architect_py/grpc/models/Algo/AlgoOrderForTwapAlgo.py,sha256=Mm8qmcDDGbnOG3oknRaiuGaszHHTtBGifgDJ3XNXJc4,2062
|
57
|
+
architect_py/grpc/models/Algo/CreateAlgoOrderRequestForTwapAlgo.py,sha256=gU5Q62UPc4YXU2Sle_ligqrIlshzvnCXyZBXM4vAiko,1798
|
58
|
+
architect_py/grpc/models/Algo/ModifyAlgoOrderRequestForTwapAlgo.py,sha256=B6WR1uyk1kjDHK3B0x9mmvOcFq2rqLosLPzjs7X42FE,1194
|
59
|
+
architect_py/grpc/models/Algo/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
60
|
+
architect_py/grpc/models/Auth/CreateJwtRequest.py,sha256=3ezxlv3LbqZhM00kUrdn5OtYBGVMCZtw05m8NNOYMTI,1110
|
61
|
+
architect_py/grpc/models/Auth/CreateJwtResponse.py,sha256=G1rsG7f4gMiWK4WVxTZMzFSy08z80nQCnZHJWWfXDNQ,483
|
62
|
+
architect_py/grpc/models/Auth/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
63
|
+
architect_py/grpc/models/Core/ConfigRequest.py,sha256=9taH97J4b-_Co7d-o_zHOPg_vckc_InvnADXYpd_MlM,809
|
64
|
+
architect_py/grpc/models/Core/ConfigResponse.py,sha256=pQimTNwdE-FL2Z1Pq6_YRPmagt-ZgJoub9P1lpj0gVk,556
|
65
|
+
architect_py/grpc/models/Core/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
66
|
+
architect_py/grpc/models/Cpty/CptyRequest.py,sha256=eWBayFNnhAZgszneP7f6hDvzQ82JQrFLDSeOPAyiRlg,1711
|
67
|
+
architect_py/grpc/models/Cpty/CptyResponse.py,sha256=UObbkmbtD3sWWklml4hx-Ggc1RaI1v1-J5QW9doWpe4,2865
|
68
|
+
architect_py/grpc/models/Cpty/CptyStatus.py,sha256=QArnE_viYbiKLW5gctN2Pdy-R0lmKhC3bDiGPPKPjgw,1423
|
69
|
+
architect_py/grpc/models/Cpty/CptyStatusRequest.py,sha256=5eYYL2L5TmFKgoUuAInvFS0qlSh7YKw4j05Z9ftpxaA,1027
|
70
|
+
architect_py/grpc/models/Cpty/CptysRequest.py,sha256=th1vto4vclExgZD4HwXaNy87amRP2oM1ix4WLetnIW8,801
|
71
|
+
architect_py/grpc/models/Cpty/CptysResponse.py,sha256=cQiRp3VEewfcCKRxqdXpMT2EEZujO3h9LZtHATBDPtk,568
|
72
|
+
architect_py/grpc/models/Cpty/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
73
|
+
architect_py/grpc/models/Folio/AccountHistoryRequest.py,sha256=dAPd5pFHCcw1CauCbbTx_foKnPB2PTtbv6BZUh5H0dI,1407
|
74
|
+
architect_py/grpc/models/Folio/AccountHistoryResponse.py,sha256=3CUKPrqbUpH1MRYFZi2Q4dfN-nzcM6OxM_FA5pA_OyQ,622
|
75
|
+
architect_py/grpc/models/Folio/AccountSummariesRequest.py,sha256=epYjLFc1cMblp04li_WSCIcl4bFJEjDedJNO9D2x1bg,1595
|
76
|
+
architect_py/grpc/models/Folio/AccountSummariesResponse.py,sha256=YoJddUl0TB1pkoI7C_avt94RSL9ZCf2u8_kOYpewRGI,678
|
77
|
+
architect_py/grpc/models/Folio/AccountSummary.py,sha256=MtIzJ4v78gD1jZPoa4ooV6H3sctfOf1FV2vgiUiXDp4,3633
|
78
|
+
architect_py/grpc/models/Folio/AccountSummaryRequest.py,sha256=qu9f-liMEOqxq8LM2h9EosCj2vtTJwduUKjiwYO8GTo,1002
|
79
|
+
architect_py/grpc/models/Folio/HistoricalFillsRequest.py,sha256=3WncFKh91r6d-BHOtLx0TyTDS_AzhU3uWuiimvslCsg,2129
|
80
|
+
architect_py/grpc/models/Folio/HistoricalFillsResponse.py,sha256=MmHFvt-FuLgw93fHN8lfcyMsG2qHys1gUD0gq0QZGyM,775
|
81
|
+
architect_py/grpc/models/Folio/HistoricalOrdersRequest.py,sha256=SN_msSU5bHYxPEG4qW8Np_9U40E6OWgZQ534qPTUP1g,2558
|
82
|
+
architect_py/grpc/models/Folio/HistoricalOrdersResponse.py,sha256=_h3XgnGOGaHfVjtkTcyi5t805QLHNytPhjHgoiEzYV4,592
|
83
|
+
architect_py/grpc/models/Folio/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
84
|
+
architect_py/grpc/models/Health/HealthCheckRequest.py,sha256=uKxA8HbItw-MF-LfHk72zjh1C2mCtbRvksaX7GbO3GY,1793
|
85
|
+
architect_py/grpc/models/Health/HealthCheckResponse.py,sha256=0yh75XgiyrJdNet4xx5_u7gyW6Qx8fwTPO9h6E_HVWU,755
|
86
|
+
architect_py/grpc/models/Health/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
87
|
+
architect_py/grpc/models/Marketdata/ArrayOfL1BookSnapshot.py,sha256=Os13kKncZgwoCqrorTspvcj8EO7u4Xr3fNQV8mWONFM,329
|
88
|
+
architect_py/grpc/models/Marketdata/Candle.py,sha256=VDGh7cDiDhu91dAxARLMJkE2CqJvOLL4m1Z8u-cK9KE,8259
|
89
|
+
architect_py/grpc/models/Marketdata/HistoricalCandlesRequest.py,sha256=uJvsHOn2gXD9w4ybk1iXu4Z1LJ4g5g89y_DIwAMUChY,1587
|
90
|
+
architect_py/grpc/models/Marketdata/HistoricalCandlesResponse.py,sha256=_LGtTw6dVMtF0U6N7l68IbxDDMcooOEW7YsJaoLtniY,604
|
91
|
+
architect_py/grpc/models/Marketdata/L1BookSnapshot.py,sha256=B1jNliDRYACncFxcOuxy7lbyofmJn5k2BmYcgR9qz2o,3327
|
92
|
+
architect_py/grpc/models/Marketdata/L1BookSnapshotRequest.py,sha256=9TxfqAivsmZgmIuIemmX6A9bTvMvVU6rWYDGi86gZZg,1072
|
93
|
+
architect_py/grpc/models/Marketdata/L1BookSnapshotsRequest.py,sha256=TFGnuPfTcHMSO849WnEPj1a52RsVReAEWqQ9Fb3La1g,1189
|
94
|
+
architect_py/grpc/models/Marketdata/L2BookSnapshot.py,sha256=MEyDSZ6LfAtyujGLRZ6pts5o7UNIp8A9_kqV6K7Y-k8,2572
|
95
|
+
architect_py/grpc/models/Marketdata/L2BookSnapshotRequest.py,sha256=9qRKbwY2KLtW2F-40XOvRfT73kVPTymL0Q3JCR2EbtU,1072
|
96
|
+
architect_py/grpc/models/Marketdata/L2BookUpdate.py,sha256=i-kWdJZvAoYEI280TfC3sTH46VIpMoj8N2UxWAkTDLs,2602
|
97
|
+
architect_py/grpc/models/Marketdata/Liquidation.py,sha256=5cSGGSIwvbr1bsk6-WBJ8tzBuCQAutGZkX5Av2apdDs,2447
|
98
|
+
architect_py/grpc/models/Marketdata/MarketStatus.py,sha256=4Kt2z16t7dpjpiELWshJyyH1b-D07YdQchjGMvZkSRM,977
|
99
|
+
architect_py/grpc/models/Marketdata/MarketStatusRequest.py,sha256=ajyI4UlvFusyM0743dukT4KFZTlp9iUh0lTGWl6n7nw,1056
|
100
|
+
architect_py/grpc/models/Marketdata/SubscribeCandlesRequest.py,sha256=ck5pQx54uymlpR-jxFpxcW0LPDLU7R8GvqLqF-7GmoU,1508
|
101
|
+
architect_py/grpc/models/Marketdata/SubscribeCurrentCandlesRequest.py,sha256=QuSNIXARFT--djk_Kl3SUWHfUwAfaasqzZ0cyZfzeN0,1930
|
102
|
+
architect_py/grpc/models/Marketdata/SubscribeL1BookSnapshotsRequest.py,sha256=dMyz0aPYxNiOg3CjWPQxUu0kf4QznFfm-adl4EotWls,1384
|
103
|
+
architect_py/grpc/models/Marketdata/SubscribeL2BookUpdatesRequest.py,sha256=8olH2zWguzq1RnmIAZ59tFTmGIBLAYuGanbiI3kamm0,1133
|
104
|
+
architect_py/grpc/models/Marketdata/SubscribeLiquidationsRequest.py,sha256=6BhC4FJvHxm4yq9l_TmEioegdu8ZMFaoEA-bRC8WY7A,1039
|
105
|
+
architect_py/grpc/models/Marketdata/SubscribeManyCandlesRequest.py,sha256=pel2GGysDsJXjPY7rkyqqyGS3MPl13YezJS7apihiFc,1512
|
106
|
+
architect_py/grpc/models/Marketdata/SubscribeTickersRequest.py,sha256=7g2LBAYd97OJ9FrxpUvZKO7hSMng-K4KfnsN08O4XSM,1437
|
107
|
+
architect_py/grpc/models/Marketdata/SubscribeTradesRequest.py,sha256=7P8FyNx6wijNUBGry0vaMhaEKuG1ik8kTibJBvdol2k,1299
|
108
|
+
architect_py/grpc/models/Marketdata/Ticker.py,sha256=XOZbaSwCOyE8sDQi4aKA7jc39igXay63JCFOpeQN1Fo,11091
|
109
|
+
architect_py/grpc/models/Marketdata/TickerRequest.py,sha256=Ay--5JKgCfdvlVWD2H6YSa_66NC3Dt6c-XK8JkbWhus,1008
|
110
|
+
architect_py/grpc/models/Marketdata/TickerUpdate.py,sha256=sJ4wvCeGckMV30HwAcAsEMQbCzjN31OxF19q70jdxok,437
|
111
|
+
architect_py/grpc/models/Marketdata/TickersRequest.py,sha256=Hzjj3vIdLHI3Iyw3NcjDqUl4WElI8y6g3JNemF9hSQ8,1438
|
112
|
+
architect_py/grpc/models/Marketdata/TickersResponse.py,sha256=CLzKx-ItwH9-Qq8YruFhXh7TmtHwzNRMEOPJ9LQD9co,574
|
113
|
+
architect_py/grpc/models/Marketdata/Trade.py,sha256=iJOEhcObcNa9SLVug3rjKnNxDuQRyOpxYQnGi1OA2Rw,2503
|
114
|
+
architect_py/grpc/models/Marketdata/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
115
|
+
architect_py/grpc/models/Oms/Cancel.py,sha256=-wA4NCVkVqgN9lLZAciE_41eR_4JTX3NTr_wwflXkIo,934
|
116
|
+
architect_py/grpc/models/Oms/CancelAllOrdersRequest.py,sha256=oCRbluj6nyoDCHQszPDRIBt4ygFyO7QHZhCf8T8-fYM,1474
|
117
|
+
architect_py/grpc/models/Oms/CancelAllOrdersResponse.py,sha256=YM1H_nrV4RhpLMEwS6LHASZnS6tasDLtVGoa7UlbQ5U,438
|
118
|
+
architect_py/grpc/models/Oms/CancelOrderRequest.py,sha256=0yJysCf0IcwUevEqVnAkIm-OkOAbp_vOwh1p1ljSsp8,1939
|
119
|
+
architect_py/grpc/models/Oms/OpenOrdersRequest.py,sha256=5Uv9ndI2WqRJgOWNLeKcIV8czb0ff6wHUW0gokeBktg,1804
|
120
|
+
architect_py/grpc/models/Oms/OpenOrdersResponse.py,sha256=HT4YXjbbwdp2rLLXxoetF33DGe2j403soMLme2p18ts,592
|
121
|
+
architect_py/grpc/models/Oms/Order.py,sha256=XGI9ineU1AM7xK4ox8jDekLPk5NLXUr1g9s43tg1yQE,9804
|
122
|
+
architect_py/grpc/models/Oms/PendingCancelsRequest.py,sha256=jdbBOpCHBlZFAZfF6urJZXXa5Dr5cTRR3AJ9ss4rY6E,1620
|
123
|
+
architect_py/grpc/models/Oms/PendingCancelsResponse.py,sha256=mWRNRDa489Vdg-r7dJMOmfOO8l57yg8lBMynBDcY60A,628
|
124
|
+
architect_py/grpc/models/Oms/PlaceOrderRequest.py,sha256=Z2kExAIp0483TGcOe9h96D37SkWbaVxBnG1DVWb4-ac,8082
|
125
|
+
architect_py/grpc/models/Oms/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
126
|
+
architect_py/grpc/models/Orderflow/Dropcopy.py,sha256=hjcGXX1V-pWJNjirLW2a2-oLbb9WUw_h1nhFh-hPthM,621
|
127
|
+
architect_py/grpc/models/Orderflow/DropcopyRequest.py,sha256=LPJgD2wj4a7p1s8O32q6w7lU_pm4I2lqriPdLqyimUM,1831
|
128
|
+
architect_py/grpc/models/Orderflow/Orderflow.py,sha256=5y8d33GvVspOg5Nn_kXrV3VYKCts-MXiiFevrpRTORA,1894
|
129
|
+
architect_py/grpc/models/Orderflow/OrderflowRequest.py,sha256=ckFZyoYSy_24oesQ49r0owcvCuJl-3Z8jnJL8QLCtGA,1646
|
130
|
+
architect_py/grpc/models/Orderflow/SubscribeOrderflowRequest.py,sha256=98Qs3jHXDWh5DT5XTs-ImsPrr1JBRQtMlk6lHQQCEfo,2089
|
131
|
+
architect_py/grpc/models/Orderflow/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
132
|
+
architect_py/grpc/models/Symbology/DownloadProductCatalogRequest.py,sha256=67YWaTuNykzCoNRrTkN-KMDvhc68dNYZm6KBeW1h1DU,1048
|
133
|
+
architect_py/grpc/models/Symbology/DownloadProductCatalogResponse.py,sha256=dz8d7T4vzVIhY3Gia7SGJa5ZV1uHmjczTixKOpYkEBA,706
|
134
|
+
architect_py/grpc/models/Symbology/PruneExpiredSymbolsRequest.py,sha256=Yp-YyJRpvwBIumllqke1joFjaUsCyq21VkOHDyb06Xw,1431
|
135
|
+
architect_py/grpc/models/Symbology/PruneExpiredSymbolsResponse.py,sha256=vHldBb0QqXqGzM1yjUYrbiO3LCmojIKvdAU4inlYS3c,456
|
136
|
+
architect_py/grpc/models/Symbology/SubscribeSymbology.py,sha256=Cyyf6x1Syb40UNAA_ZrroNul3ccxHanvEHzBCajpArI,429
|
137
|
+
architect_py/grpc/models/Symbology/SymbologyRequest.py,sha256=DocloPaZ4CPBCtB_mdY2VLk9nDyxDZGa6GrFH9w6E-Q,848
|
138
|
+
architect_py/grpc/models/Symbology/SymbologySnapshot.py,sha256=7jT2ncbzQY1S9a-RPzomc5qSO2doBCZq-7w5Wb78JN8,2201
|
139
|
+
architect_py/grpc/models/Symbology/SymbologyUpdate.py,sha256=hxRzFP_KZGHGcAmnCBrXSmGSoxhfnxeBBqLGyfSNw8s,2729
|
140
|
+
architect_py/grpc/models/Symbology/SymbolsRequest.py,sha256=BqjF11Y23__a-jcPOsiyKmPmGqYusynZXUdlhb7FRfE,860
|
141
|
+
architect_py/grpc/models/Symbology/SymbolsResponse.py,sha256=t13vIKJ-KjSa8MZti0CpUdg6CZZ6B95nA6zyZHwzGto,539
|
142
|
+
architect_py/grpc/models/Symbology/UploadProductCatalogRequest.py,sha256=Qkvbik5f-KlywKm3SEi1hSdGCVTAU6-LRkRxB5MW5m4,1274
|
143
|
+
architect_py/grpc/models/Symbology/UploadProductCatalogResponse.py,sha256=AiUFNc0mAKF5-EtGh1cuYLobTCrxQZvaKwFE3zd-xFw,459
|
144
|
+
architect_py/grpc/models/Symbology/UploadSymbologyRequest.py,sha256=XRMC6W6LLG0dyAU54RitAD0p0dCZTs16NFxubK_WNI0,1840
|
145
|
+
architect_py/grpc/models/Symbology/UploadSymbologyResponse.py,sha256=LM6iHjta4yZY784qMR5etG9gKjiBsBCntZqAcmaOHac,444
|
146
|
+
architect_py/grpc/models/Symbology/__init__.py,sha256=sIyaEvJdP-VmGTGPPqZuRjKn4bc7NUClJ76Gd5uq-5s,57
|
147
|
+
architect_py/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
148
|
+
architect_py/tests/conftest.py,sha256=IUPb6U1xEIvcnE7yf_GeAqC1KIP17XtVqItWdLQmGRc,3334
|
149
|
+
architect_py/tests/test_book_building.py,sha256=biqs8X9bw1YSb6mrCDS-ELesdD-P5F6bE3MYXP0BeQ4,1236
|
150
|
+
architect_py/tests/test_marketdata.py,sha256=hs2Z8mOdAP6lKO2w2c188byKIDmmxHj4BYr3YG5fntE,4706
|
151
|
+
architect_py/tests/test_order_entry.py,sha256=ytfvJVMsl6c0nyKP-oTwquxoOkrI57BlQsC6SKlWfSM,1193
|
152
|
+
architect_py/tests/test_orderflow.py,sha256=k3zbjHE0PdX4af6KO7_edN4TfQ_sxpfU-rVl0TxDqxU,1108
|
153
|
+
architect_py/tests/test_portfolio_management.py,sha256=LPlkLP2SllLPm0Un7OptfVo96uqiDI7-osTaHxH5m54,677
|
154
|
+
architect_py/tests/test_rounding.py,sha256=cAQ1-tWOVgxENt0Fzs9YcFDdDDYmCtOHvAA_w76wy9g,1417
|
155
|
+
architect_py/tests/test_symbology.py,sha256=892FN_FGwE8t4lVQtUMGKav69MGzHACeF5RAYrAEdBw,2707
|
156
|
+
architect_py/utils/nearest_tick.py,sha256=i1cCGMSi-sP4Grbp0RCwEsoLzMWN9iC6gPMBm2daDWM,4810
|
157
|
+
architect_py/utils/nearest_tick_2.py,sha256=f-o6b73Mo8epCIaOYBS9F0k_6UHUDSVG1N_VWg7iFBU,3641
|
158
|
+
architect_py/utils/orderbook.py,sha256=JM02NhHbmK3sNaS2Ara8FBY4TvKvtMIzJW1oVd8KC3s,1004
|
159
|
+
architect_py/utils/pandas.py,sha256=a8P_jKPIhDubAyUjdhKnFMasZM_m_sDGNx4fq5ONOpo,982
|
160
|
+
architect_py/utils/price_bands.py,sha256=j7ioSA3dx025CD5E2Vg7XQvmjPvxQb-gzQBfQTovpTw,21874
|
161
|
+
architect_py/utils/symbol_parsing.py,sha256=OjJzk2c6QU2s0aJMSyVEzlWD5Vy-RlakJVW7jNHVDJk,845
|
162
|
+
architect_py-5.0.0b1.dist-info/licenses/LICENSE,sha256=6P0_5gYN8iPWPZeqA9nxiO3tRQmcSA1ijAVR7C8j1SI,11362
|
163
|
+
examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
164
|
+
examples/book_subscription.py,sha256=YIUYh5etELCMMo8BKGc7H-bxEYhQSH65ADSF_TauQJ0,1559
|
165
|
+
examples/candles.py,sha256=Mq9hoIKQDLjyLdZXVat-7DCAP7zMEA67bj0cyjmmcuU,838
|
166
|
+
examples/common.py,sha256=oG0JL4_i2peG0dFozRh2W61ywHQwoOc0YSzbcdwdSmk,2575
|
167
|
+
examples/external_cpty.py,sha256=Xdm6nqV8_BvUlk8gaQF168BwPV1-rTG12O8cZzZEFYU,2553
|
168
|
+
examples/funding_rate_mean_reversion_algo.py,sha256=K01vcRoxMdyKgCHzYVZixY_ogAwGh-6XToy-C5SJKiU,7030
|
169
|
+
examples/order_sending.py,sha256=OGMpcbglo_Ihai7MZxMetogIiZRX_hs8aBTIE9VELcY,2353
|
170
|
+
examples/stream_l1_marketdata.py,sha256=z6NLfXCZSJ_imJheuqnelXe77Z0ekLAXBiEBA_Eq4PM,752
|
171
|
+
examples/stream_l2_marketdata.py,sha256=l5s1WKC651y8qdArjxa6X6IauVftUGhTdoB943jx3wU,1269
|
172
|
+
examples/trades.py,sha256=DDBuCe5Q350OdBBXOal-0nfZBFW4f6fKYONcbj7bCGE,595
|
173
|
+
examples/tutorial_async.py,sha256=2SM2QtH-sl7pgKoZweUqg9VuzcKvEsKThWV_SqbRvIM,2686
|
174
|
+
examples/tutorial_sync.py,sha256=PQdEniQhDg1u7t6AcND0L0EIhB8p0H7edGfHaYagNP0,2829
|
175
|
+
scripts/generate_functions_md.py,sha256=TSlnf7eakrBUsizz-xKw_v9nJinxzTdV65bSzsj4RjQ,6109
|
176
|
+
scripts/generate_sync_interface.py,sha256=qmwLhujbSxT_6fcpfR4R5Bl9GlL3YA-X645P26073Ao,7627
|
177
|
+
scripts/postprocess_grpc.py,sha256=2mCoV8-LpyZP2jNTtokgrfgjzZs3NSPFpXfnRMaTLdY,21459
|
178
|
+
scripts/preprocess_grpc_schema.py,sha256=PDBTZdPv8O5H4_5YZb2o5q8axQeZgoHXCmx7LSLpix4,20788
|
179
|
+
templates/exceptions.py,sha256=tIHbiO5Q114h9nPwJXsgHvW_bERLwxuNp9Oj41p6t3A,2379
|
180
|
+
templates/juniper_base_client.py,sha256=x3W5bRmeAK-oznsjJm_4TvrRJJICW23jKHcCKUIj7Vg,12577
|
181
|
+
architect_py-5.0.0b1.dist-info/METADATA,sha256=DxJgf1eAg70piOHThtPDQTAM4KFAObag5kYFnn81mQQ,3967
|
182
|
+
architect_py-5.0.0b1.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
183
|
+
architect_py-5.0.0b1.dist-info/top_level.txt,sha256=UjtO97OACFQ9z5MzS-X2wBlt5Ovk1vxakQPKfokI454,40
|
184
|
+
architect_py-5.0.0b1.dist-info/RECORD,,
|
examples/__init__.py
ADDED
File without changes
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import asyncio
|
2
|
+
import os
|
3
|
+
|
4
|
+
from pydantic import ValidationError
|
5
|
+
|
6
|
+
from architect_py.async_client import AsyncClient
|
7
|
+
from architect_py.graphql_client.exceptions import GraphQLClientHttpError
|
8
|
+
from architect_py.scalars import TradableProduct
|
9
|
+
|
10
|
+
from .common import connect_async_client
|
11
|
+
|
12
|
+
buy_columns = "{:>15} {:>15} {:>15}"
|
13
|
+
sell_columns = "{:<15} {:<15} {:<15}"
|
14
|
+
green = "\033[32m"
|
15
|
+
red = "\033[31m"
|
16
|
+
normal = "\033[0m"
|
17
|
+
|
18
|
+
|
19
|
+
def print_book(book):
|
20
|
+
os.system("clear")
|
21
|
+
print(
|
22
|
+
(buy_columns + " " + sell_columns).format(
|
23
|
+
"Total", "Size", "Bid", "Ask", "Size", "Total"
|
24
|
+
)
|
25
|
+
)
|
26
|
+
for i in range(min(20, len(book.bids), len(book.asks))):
|
27
|
+
b = book.bids[i]
|
28
|
+
s = book.asks[i]
|
29
|
+
print(
|
30
|
+
(green + buy_columns).format(b.total, b.amount, b.price),
|
31
|
+
(red + sell_columns).format(s.price, s.amount, s.total),
|
32
|
+
)
|
33
|
+
print(normal)
|
34
|
+
|
35
|
+
|
36
|
+
async def main():
|
37
|
+
c: AsyncClient = await connect_async_client()
|
38
|
+
await c.grpc_client.change_channel("binance.marketdata.architect.co")
|
39
|
+
symbol = TradableProduct("SOL-USDC BINANCE Perpetual/USDC Crypto")
|
40
|
+
try:
|
41
|
+
stream = c.subscribe_l1_book_stream(symbols=[symbol], venue="BINANCE")
|
42
|
+
# it is better to do `Decimal("0.1")` instead of Decimal(0.1) to avoid floating point errors
|
43
|
+
async for book in stream:
|
44
|
+
print_book(book)
|
45
|
+
except GraphQLClientHttpError as e:
|
46
|
+
print(e.status_code)
|
47
|
+
print(e.response.json())
|
48
|
+
except ValidationError as e:
|
49
|
+
print(e)
|
50
|
+
|
51
|
+
|
52
|
+
if __name__ == "__main__":
|
53
|
+
asyncio.run(main())
|
examples/candles.py
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
import asyncio
|
2
|
+
|
3
|
+
from architect_py.async_client import AsyncClient
|
4
|
+
from architect_py.graphql_client.exceptions import GraphQLClientHttpError
|
5
|
+
from architect_py.grpc_client.definitions import CandleWidth
|
6
|
+
from architect_py.scalars import TradableProduct
|
7
|
+
|
8
|
+
from .common import connect_async_client
|
9
|
+
|
10
|
+
|
11
|
+
async def main():
|
12
|
+
c: AsyncClient = await connect_async_client()
|
13
|
+
symbol = "ES 20250321 CME Future"
|
14
|
+
quote = "USD"
|
15
|
+
tradable_product = TradableProduct(symbol, quote)
|
16
|
+
venue = "CME"
|
17
|
+
try:
|
18
|
+
stream = c.subscribe_candles_stream(
|
19
|
+
tradable_product,
|
20
|
+
venue,
|
21
|
+
candle_widths=[CandleWidth.OneHour],
|
22
|
+
)
|
23
|
+
async for candle in stream:
|
24
|
+
print(candle)
|
25
|
+
except GraphQLClientHttpError as e:
|
26
|
+
print(e.status_code)
|
27
|
+
print(e.response.json())
|
28
|
+
|
29
|
+
|
30
|
+
asyncio.run(main())
|
examples/common.py
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
import os
|
2
|
+
from dataclasses import dataclass
|
3
|
+
|
4
|
+
from dotenv import load_dotenv
|
5
|
+
|
6
|
+
from architect_py.async_client import AsyncClient
|
7
|
+
from architect_py.client import Client
|
8
|
+
|
9
|
+
|
10
|
+
@dataclass
|
11
|
+
class Config:
|
12
|
+
host: str
|
13
|
+
api_key: str
|
14
|
+
api_secret: str
|
15
|
+
use_tls: bool
|
16
|
+
|
17
|
+
|
18
|
+
def load_config() -> Config:
|
19
|
+
load_dotenv()
|
20
|
+
host = os.environ["ARCHITECT_HOST"]
|
21
|
+
api_key = os.getenv("ARCHITECT_API_KEY")
|
22
|
+
api_secret = os.getenv("ARCHITECT_API_SECRET")
|
23
|
+
implicit_use_tls = api_key is not None or api_secret is not None
|
24
|
+
explicit_use_tls = os.getenv("ARCHITECT_USE_TLS")
|
25
|
+
use_tls = False
|
26
|
+
|
27
|
+
if explicit_use_tls == "true" or explicit_use_tls == "1":
|
28
|
+
use_tls = True
|
29
|
+
elif explicit_use_tls is None:
|
30
|
+
use_tls = implicit_use_tls
|
31
|
+
|
32
|
+
if api_key is None:
|
33
|
+
raise ValueError("API key is required")
|
34
|
+
|
35
|
+
if api_secret is None:
|
36
|
+
raise ValueError("API secret is required")
|
37
|
+
|
38
|
+
return Config(host, api_key, api_secret, use_tls)
|
39
|
+
|
40
|
+
|
41
|
+
def connect_client():
|
42
|
+
config = load_config()
|
43
|
+
|
44
|
+
c = Client(
|
45
|
+
host=config.host,
|
46
|
+
api_key=config.api_key,
|
47
|
+
api_secret=config.api_secret,
|
48
|
+
use_tls=config.use_tls,
|
49
|
+
)
|
50
|
+
return c
|
51
|
+
|
52
|
+
|
53
|
+
async def connect_async_client():
|
54
|
+
config = load_config()
|
55
|
+
c = await AsyncClient.connect(
|
56
|
+
host=config.host,
|
57
|
+
api_key=config.api_key,
|
58
|
+
api_secret=config.api_secret,
|
59
|
+
paper_trading=True,
|
60
|
+
use_tls=config.use_tls,
|
61
|
+
)
|
62
|
+
return c
|
63
|
+
|
64
|
+
|
65
|
+
buy_columns = "{:>15} {:>15} {:>15}"
|
66
|
+
sell_columns = "{:<15} {:<15} {:<15}"
|
67
|
+
green = "\033[32m"
|
68
|
+
red = "\033[31m"
|
69
|
+
normal = "\033[0m"
|
70
|
+
|
71
|
+
|
72
|
+
def print_book(book):
|
73
|
+
print(
|
74
|
+
(buy_columns + " " + sell_columns).format(
|
75
|
+
"Total", "Size", "Bid", "Ask", "Size", "Total"
|
76
|
+
)
|
77
|
+
)
|
78
|
+
for i in range(min(20, len(book.bids), len(book.asks))):
|
79
|
+
b = book.bids[i]
|
80
|
+
s = book.asks[i]
|
81
|
+
print(
|
82
|
+
(green + buy_columns).format(b.total, b.amount, b.price),
|
83
|
+
(red + sell_columns).format(s.price, s.amount, s.total),
|
84
|
+
)
|
85
|
+
print(normal)
|
86
|
+
|
87
|
+
|
88
|
+
def print_open_orders(orders):
|
89
|
+
if len(orders) == 0:
|
90
|
+
print("No open orders")
|
91
|
+
else:
|
92
|
+
for o in orders:
|
93
|
+
print(
|
94
|
+
f" • {o.order.market.name} {o.order.dir} {o.order.quantity} {o.order.order_type.limit_price}"
|
95
|
+
)
|
96
|
+
|
97
|
+
|
98
|
+
def confirm(prompt: str):
|
99
|
+
"""
|
100
|
+
Ask user to enter Y or N (case-insensitive).
|
101
|
+
:return: True if the answer is Y.
|
102
|
+
:rtype: bool
|
103
|
+
"""
|
104
|
+
answer = ""
|
105
|
+
while answer not in ["y", "n"]:
|
106
|
+
answer = input(f"{prompt} [Y/N]? ").lower()
|
107
|
+
return answer == "y"
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import time
|
2
|
+
from concurrent import futures
|
3
|
+
from decimal import Decimal
|
4
|
+
from typing import Iterator
|
5
|
+
|
6
|
+
import grpc
|
7
|
+
|
8
|
+
from architect_py.grpc_client.Cpty.CptyRequest import CancelOrder, PlaceOrder
|
9
|
+
from architect_py.grpc_client.Cpty.CptyResponse import Symbology
|
10
|
+
from architect_py.grpc_client.definitions import (
|
11
|
+
CptyLoginRequest,
|
12
|
+
CptyLogoutRequest,
|
13
|
+
ExecutionInfo,
|
14
|
+
MinOrderQuantityUnit,
|
15
|
+
SimpleDecimal,
|
16
|
+
Unit,
|
17
|
+
)
|
18
|
+
from architect_py.grpc_client.grpc_server import (
|
19
|
+
CptyServicer,
|
20
|
+
OrderflowServicer,
|
21
|
+
add_CptyServicer_to_server,
|
22
|
+
add_OrderflowServicer_to_server,
|
23
|
+
)
|
24
|
+
|
25
|
+
|
26
|
+
class MockCptyServicer(CptyServicer, OrderflowServicer):
|
27
|
+
def Cpty(self, request_iterator: Iterator, context):
|
28
|
+
context.set_code(grpc.StatusCode.OK)
|
29
|
+
context.send_initial_metadata({})
|
30
|
+
# send symbology
|
31
|
+
yield Symbology(
|
32
|
+
execution_info={
|
33
|
+
"FOO Crypto/USD": {
|
34
|
+
"MOCK": ExecutionInfo(
|
35
|
+
execution_venue="MOCK",
|
36
|
+
exchange_symbol=None,
|
37
|
+
tick_size=SimpleDecimal(Decimal("0.01")),
|
38
|
+
step_size=Decimal("0.1"),
|
39
|
+
min_order_quantity=Decimal(0),
|
40
|
+
min_order_quantity_unit=MinOrderQuantityUnit(Unit.base),
|
41
|
+
is_delisted=False,
|
42
|
+
initial_margin=None,
|
43
|
+
maintenance_margin=None,
|
44
|
+
),
|
45
|
+
}
|
46
|
+
}
|
47
|
+
)
|
48
|
+
for req in request_iterator:
|
49
|
+
if isinstance(req, CptyLoginRequest):
|
50
|
+
print("login message received", req)
|
51
|
+
elif isinstance(req, CptyLogoutRequest):
|
52
|
+
print("logout message received", req)
|
53
|
+
elif isinstance(req, PlaceOrder):
|
54
|
+
print("place_order message received", req)
|
55
|
+
elif isinstance(req, CancelOrder):
|
56
|
+
print("cancel_order message received", req)
|
57
|
+
|
58
|
+
def SubscribeOrderflow(self, request, context):
|
59
|
+
context.set_code(grpc.StatusCode.OK)
|
60
|
+
context.send_initial_metadata({})
|
61
|
+
time.sleep(100)
|
62
|
+
|
63
|
+
|
64
|
+
def serve():
|
65
|
+
thread_pool = futures.ThreadPoolExecutor(max_workers=10)
|
66
|
+
server = grpc.server(thread_pool)
|
67
|
+
servicer = MockCptyServicer()
|
68
|
+
add_CptyServicer_to_server(servicer, server)
|
69
|
+
add_OrderflowServicer_to_server(servicer, server)
|
70
|
+
server.add_insecure_port("[::]:50051")
|
71
|
+
server.start()
|
72
|
+
print("server started on port 50051")
|
73
|
+
server.wait_for_termination()
|
74
|
+
|
75
|
+
|
76
|
+
if __name__ == "__main__":
|
77
|
+
serve()
|
@@ -0,0 +1,192 @@
|
|
1
|
+
"""
|
2
|
+
Do *NOT* run this script in production. This script is for educational purposes only.
|
3
|
+
"""
|
4
|
+
|
5
|
+
import asyncio
|
6
|
+
from decimal import Decimal
|
7
|
+
from typing import AsyncIterator, Optional
|
8
|
+
|
9
|
+
from architect_py.async_client import AsyncClient
|
10
|
+
from architect_py.graphql_client.exceptions import GraphQLClientHttpError
|
11
|
+
from architect_py.grpc_client.definitions import TimeInForceEnum
|
12
|
+
from architect_py.grpc_client.Marketdata.TickerRequest import TickerRequest
|
13
|
+
from architect_py.grpc_client.Oms.PlaceOrderRequest import PlaceOrderRequestType
|
14
|
+
from architect_py.grpc_client.Orderflow.Orderflow import (
|
15
|
+
TaggedOrderAck,
|
16
|
+
TaggedOrderOut,
|
17
|
+
TaggedOrderReject,
|
18
|
+
)
|
19
|
+
from architect_py.grpc_client.Orderflow.OrderflowRequest import (
|
20
|
+
OrderflowRequest,
|
21
|
+
PlaceOrder,
|
22
|
+
)
|
23
|
+
from architect_py.scalars import OrderDir, TradableProduct
|
24
|
+
|
25
|
+
from .common import connect_async_client
|
26
|
+
|
27
|
+
venue = "BINANCE"
|
28
|
+
product = "BTC-USDT Perpetual"
|
29
|
+
tradable_product = TradableProduct(product, "USDT Crypto")
|
30
|
+
best_bid_price: Optional[Decimal] = None
|
31
|
+
best_ask_price: Optional[Decimal] = None
|
32
|
+
current_funding_rate: Optional[Decimal] = None # as fraction, e.g. 0.0001 = 1 bp
|
33
|
+
target_position = 0
|
34
|
+
current_position = 0
|
35
|
+
|
36
|
+
|
37
|
+
class OrderflowRequester:
|
38
|
+
def __init__(self):
|
39
|
+
self.queue: asyncio.Queue[OrderflowRequest] = asyncio.Queue()
|
40
|
+
|
41
|
+
async def __aiter__(self) -> AsyncIterator[OrderflowRequest]:
|
42
|
+
while True:
|
43
|
+
value = await self.queue.get() # Wait for a value
|
44
|
+
yield value # Yield it when available
|
45
|
+
|
46
|
+
async def __anext__(self) -> OrderflowRequest:
|
47
|
+
return await self.queue.get()
|
48
|
+
|
49
|
+
async def put(self, value: OrderflowRequest) -> None:
|
50
|
+
# OrderflowRequest contains: PlaceOrder, CancelOrder, CancelAllOrders
|
51
|
+
await self.queue.put(value) # Put value into the queue
|
52
|
+
|
53
|
+
|
54
|
+
async def update_marketdata(c: AsyncClient):
|
55
|
+
ticker_request = TickerRequest(symbol=tradable_product)
|
56
|
+
s = c.grpc_client.subscribe(ticker_request)
|
57
|
+
async for ticker in s:
|
58
|
+
if ticker.funding_rate:
|
59
|
+
global current_funding_rate
|
60
|
+
global target_position
|
61
|
+
current_funding_rate = ticker.funding_rate
|
62
|
+
# set target_position based on funding rate
|
63
|
+
if current_funding_rate >= 0.1:
|
64
|
+
target_position = -10
|
65
|
+
elif current_funding_rate >= 0.05:
|
66
|
+
target_position = -5
|
67
|
+
elif current_funding_rate >= 0.0001:
|
68
|
+
target_position = 1
|
69
|
+
elif current_funding_rate >= -0.05:
|
70
|
+
target_position = 5
|
71
|
+
else:
|
72
|
+
target_position = 10
|
73
|
+
if ticker.bid_price:
|
74
|
+
global best_bid_price
|
75
|
+
best_bid_price = ticker.bid_price
|
76
|
+
if ticker.ask_price:
|
77
|
+
global best_ask_price
|
78
|
+
best_ask_price = ticker.ask_price
|
79
|
+
|
80
|
+
|
81
|
+
async def subscribe_and_print_orderflow(
|
82
|
+
c: AsyncClient, orderflow_requester: OrderflowRequester
|
83
|
+
):
|
84
|
+
try:
|
85
|
+
stream = c.grpc_client.subscribe_orderflow_stream(orderflow_requester)
|
86
|
+
"""
|
87
|
+
subscribe_orderflow_stream is a duplex_stream meaning that it is a stream that can be read from and written to.
|
88
|
+
This is a stream that will be used to send orders to the Architect and receive order updates from the Architect.
|
89
|
+
"""
|
90
|
+
async for orderflow in stream:
|
91
|
+
if isinstance(orderflow, TaggedOrderAck):
|
92
|
+
print(f"<!> ACK {orderflow.order_id}")
|
93
|
+
if isinstance(orderflow, TaggedOrderReject):
|
94
|
+
print(f"<!> REJECT {orderflow.id} {orderflow.r}: {orderflow.rm}")
|
95
|
+
# reject reason, reject message
|
96
|
+
elif isinstance(orderflow, TaggedOrderOut):
|
97
|
+
print(f"<!> OUT {orderflow.id}")
|
98
|
+
except GraphQLClientHttpError as e:
|
99
|
+
print(e.status_code)
|
100
|
+
print(e.response.json())
|
101
|
+
|
102
|
+
|
103
|
+
async def step_to_target_position(
|
104
|
+
c: AsyncClient, orderflow_requester: OrderflowRequester
|
105
|
+
):
|
106
|
+
while True:
|
107
|
+
await asyncio.sleep(10)
|
108
|
+
# check open orders
|
109
|
+
open_orders = await c.get_open_orders()
|
110
|
+
n = len(open_orders)
|
111
|
+
if n > 0:
|
112
|
+
print("there are {n} open orders, skipping step")
|
113
|
+
continue
|
114
|
+
|
115
|
+
order = None
|
116
|
+
# send orders to step to target position
|
117
|
+
if current_position < target_position:
|
118
|
+
if best_ask_price is not None:
|
119
|
+
# buy 1 contract
|
120
|
+
|
121
|
+
# make sure to import the correct PlaceOrder from architect_py.grpc_client.Orderflow.OrderflowRequest
|
122
|
+
order = PlaceOrder.new(
|
123
|
+
symbol=tradable_product,
|
124
|
+
dir=OrderDir.BUY,
|
125
|
+
quantity=Decimal(1),
|
126
|
+
execution_venue=None,
|
127
|
+
limit_price=best_ask_price,
|
128
|
+
time_in_force=TimeInForceEnum.DAY,
|
129
|
+
place_order_request_type=PlaceOrderRequestType.LIMIT,
|
130
|
+
)
|
131
|
+
|
132
|
+
elif current_position > target_position:
|
133
|
+
if best_bid_price is not None:
|
134
|
+
# sell 1 contract
|
135
|
+
|
136
|
+
# make sure to import the correct PlaceOrder from architect_py.grpc_client.Orderflow.OrderflowRequest
|
137
|
+
order = PlaceOrder.new(
|
138
|
+
symbol=tradable_product,
|
139
|
+
dir=OrderDir.SELL,
|
140
|
+
quantity=Decimal(1),
|
141
|
+
execution_venue=None,
|
142
|
+
limit_price=best_bid_price,
|
143
|
+
time_in_force=TimeInForceEnum.DAY,
|
144
|
+
place_order_request_type=PlaceOrderRequestType.LIMIT,
|
145
|
+
)
|
146
|
+
|
147
|
+
if order is not None:
|
148
|
+
await orderflow_requester.put(
|
149
|
+
order
|
150
|
+
) # this will add the order to the queue to send over
|
151
|
+
|
152
|
+
|
153
|
+
async def print_info(c: AsyncClient):
|
154
|
+
accounts = await c.list_accounts()
|
155
|
+
while True:
|
156
|
+
await asyncio.sleep(3)
|
157
|
+
account_summaries = await c.get_account_summaries(
|
158
|
+
accounts=[account.account.name for account in accounts]
|
159
|
+
)
|
160
|
+
pos = Decimal(0)
|
161
|
+
for account in account_summaries:
|
162
|
+
for balance in account.balances:
|
163
|
+
if balance.product is None:
|
164
|
+
name = "UNKNOWN NAME"
|
165
|
+
else:
|
166
|
+
name = balance.product
|
167
|
+
print(f"balance for {name}: {balance.balance}")
|
168
|
+
if name and balance.balance is not None:
|
169
|
+
pos += balance.balance
|
170
|
+
global current_position
|
171
|
+
current_position = pos
|
172
|
+
print("---")
|
173
|
+
print(f"info : funding_rate: {current_funding_rate}")
|
174
|
+
print(f"info : bbo: {best_bid_price} {best_ask_price}")
|
175
|
+
print(f"info : current_position: {current_position}")
|
176
|
+
print(f"info : target_position: {target_position}")
|
177
|
+
|
178
|
+
|
179
|
+
async def main():
|
180
|
+
c = await connect_async_client()
|
181
|
+
|
182
|
+
orderflow_requester = OrderflowRequester()
|
183
|
+
|
184
|
+
await asyncio.gather(
|
185
|
+
update_marketdata(c),
|
186
|
+
step_to_target_position(c, orderflow_requester),
|
187
|
+
print_info(c),
|
188
|
+
subscribe_and_print_orderflow(c, orderflow_requester),
|
189
|
+
)
|
190
|
+
|
191
|
+
|
192
|
+
asyncio.run(main())
|