architect-py 5.0.0b2__py3-none-any.whl → 5.0.0b3__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 CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "5.0.0b2"
1
+ __version__ = "5.0.0b3"
2
2
 
3
3
  from .async_client import AsyncClient
4
4
  from .client import Client
@@ -106,6 +106,14 @@ class AsyncClient:
106
106
  f"Resolved endpoint {endpoint}: {grpc_host}:{grpc_port} use_ssl={use_ssl}"
107
107
  )
108
108
 
109
+ # Sanity check paper trading on prod environments
110
+ if paper_trading:
111
+ if grpc_host == "app.architect.co" or grpc_host == "staging.architect.co":
112
+ if grpc_port != 10081:
113
+ raise ValueError("Wrong gRPC port for paper trading")
114
+ if graphql_port is not None and graphql_port != 5678:
115
+ raise ValueError("Wrong GraphQL port for paper trading")
116
+
109
117
  client = AsyncClient(
110
118
  api_key=api_key,
111
119
  api_secret=api_secret,
@@ -152,11 +160,6 @@ class AsyncClient:
152
160
  "API secret must be a Base64-encoded string, 44 characters long"
153
161
  )
154
162
 
155
- if paper_trading and (graphql_port is not None or grpc_port is not None):
156
- raise ValueError(
157
- "If paper_trading is True, graphql_port and grpc_port must be None"
158
- )
159
-
160
163
  if graphql_port is None:
161
164
  if paper_trading:
162
165
  graphql_port = 5678
@@ -150,19 +150,19 @@ async def test_stream_trades(async_client: AsyncClient, venue: str, symbol: str)
150
150
  break
151
151
 
152
152
 
153
- @pytest.mark.asyncio
154
- @pytest.mark.parametrize(
155
- "venue,symbol",
156
- [
157
- ("BINANCE/USDM", "BTC-USDT BINANCE Perpetual/USDT Crypto"),
158
- ],
159
- )
160
- async def test_stream_candles(async_client: AsyncClient, venue: str, symbol: str):
161
- i = 0
162
- async for candle in async_client.stream_candles(
163
- symbol, venue, [CandleWidth.OneSecond]
164
- ):
165
- assert candle is not None
166
- i += 1
167
- if i > 3:
168
- break
153
+ # @pytest.mark.asyncio
154
+ # @pytest.mark.parametrize(
155
+ # "venue,symbol",
156
+ # [
157
+ # ("BINANCE/USDM", "BTC-USDT BINANCE Perpetual/USDT Crypto"),
158
+ # ],
159
+ # )
160
+ # async def test_stream_candles(async_client: AsyncClient, venue: str, symbol: str):
161
+ # i = 0
162
+ # async for candle in async_client.stream_candles(
163
+ # symbol, venue, [CandleWidth.OneSecond]
164
+ # ):
165
+ # assert candle is not None
166
+ # i += 1
167
+ # if i > 3:
168
+ # break
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: architect-py
3
- Version: 5.0.0b2
3
+ Version: 5.0.0b3
4
4
  Summary: Python SDK for the Architect trading platform and brokerage.
5
5
  Author-email: "Architect Financial Technologies, Inc." <hello@architect.co>
6
6
  License-Expression: Apache-2.0
@@ -1,5 +1,5 @@
1
- architect_py/__init__.py,sha256=LCUoVNEkiPsebIurJ0KEF5iwipGtJr6FJHhpPTdVqZ4,318
2
- architect_py/async_client.py,sha256=uEsRtAI2qeu01pQEyoYcDR7YCdHq4BsC6MhIMP8AWuA,57365
1
+ architect_py/__init__.py,sha256=rq7taTogU0hlt8SA9e2p-CRbRhPJyJ2rrCegrThZRdA,318
2
+ architect_py/async_client.py,sha256=Ea1Y3ITTeDrXt9H3Ch9gq2jDNRpeHvgP8zzLRI3Z43g,57586
3
3
  architect_py/client.py,sha256=bpFpYAtLhSPKoCG3bb45GVW55l8iEdozhZefGjXdNc0,5857
4
4
  architect_py/client_interface.py,sha256=kYMat54f5YJZj8L5L0tG-Ijsanklot3VTxpNmpaYiQ0,5778
5
5
  architect_py/common_types/__init__.py,sha256=ghDsHR6cjJUVxIY80N_Q6QXhMBJ5JMdTyBQW1mdLnNs,143
@@ -177,7 +177,7 @@ architect_py/internal_utils/no_pandas.py,sha256=RFlzX85yjI7XnoWHutqvtYlzKVHw8DF2
177
177
  architect_py/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
178
178
  architect_py/tests/conftest.py,sha256=5CcEuqakcU-ZapywYZRcLI5y1GicrTeOxiEixt--R0w,3552
179
179
  architect_py/tests/test_book_building.py,sha256=biqs8X9bw1YSb6mrCDS-ELesdD-P5F6bE3MYXP0BeQ4,1236
180
- architect_py/tests/test_marketdata.py,sha256=ZHxnnUdKZVwRtfFbVh3cYwh-3BdVEDN2RxwDGOXzTP8,4682
180
+ architect_py/tests/test_marketdata.py,sha256=mhYIiNhmsY706PQD3Nvto0l4uDl5dPHn8BcqGPgFCA8,4714
181
181
  architect_py/tests/test_order_entry.py,sha256=ytfvJVMsl6c0nyKP-oTwquxoOkrI57BlQsC6SKlWfSM,1193
182
182
  architect_py/tests/test_orderflow.py,sha256=_EN-Y1NM8171KHhZ41xUg8f5ZFO0-r2HGjIWOTTJZ9s,1051
183
183
  architect_py/tests/test_portfolio_management.py,sha256=LPlkLP2SllLPm0Un7OptfVo96uqiDI7-osTaHxH5m54,677
@@ -189,7 +189,7 @@ architect_py/utils/orderbook.py,sha256=JM02NhHbmK3sNaS2Ara8FBY4TvKvtMIzJW1oVd8KC
189
189
  architect_py/utils/pandas.py,sha256=a8P_jKPIhDubAyUjdhKnFMasZM_m_sDGNx4fq5ONOpo,982
190
190
  architect_py/utils/price_bands.py,sha256=j7ioSA3dx025CD5E2Vg7XQvmjPvxQb-gzQBfQTovpTw,21874
191
191
  architect_py/utils/symbol_parsing.py,sha256=OjJzk2c6QU2s0aJMSyVEzlWD5Vy-RlakJVW7jNHVDJk,845
192
- architect_py-5.0.0b2.dist-info/licenses/LICENSE,sha256=6P0_5gYN8iPWPZeqA9nxiO3tRQmcSA1ijAVR7C8j1SI,11362
192
+ architect_py-5.0.0b3.dist-info/licenses/LICENSE,sha256=6P0_5gYN8iPWPZeqA9nxiO3tRQmcSA1ijAVR7C8j1SI,11362
193
193
  examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
194
194
  examples/book_subscription.py,sha256=jw629X6V0kpIQp2WBBUdBQ_O-lsR6zwnIH1AnyrrINQ,1507
195
195
  examples/candles.py,sha256=GKQcpsbMfG5gdgwinC1MdYNRGXjb629TFVWzu_raZ3I,850
@@ -208,7 +208,7 @@ scripts/postprocess_grpc.py,sha256=-yPbnSnK_JMzMiyCcQQe3Pc76Wu_LQT6Al03UzwyU60,2
208
208
  scripts/preprocess_grpc_schema.py,sha256=ZCMdJpOtkL5sZ4n6DxD8198zvsiC9jCFipwZGk3pN80,22828
209
209
  templates/exceptions.py,sha256=tIHbiO5Q114h9nPwJXsgHvW_bERLwxuNp9Oj41p6t3A,2379
210
210
  templates/juniper_base_client.py,sha256=x3W5bRmeAK-oznsjJm_4TvrRJJICW23jKHcCKUIj7Vg,12577
211
- architect_py-5.0.0b2.dist-info/METADATA,sha256=Nk5wPMOplFwIDb86kDBU3aXCaM1DS_oBlj0xwz5wwhg,3925
212
- architect_py-5.0.0b2.dist-info/WHEEL,sha256=A8Eltl-h0W-qZDVezsLjjslosEH_pdYC2lQ0JcbgCzs,91
213
- architect_py-5.0.0b2.dist-info/top_level.txt,sha256=UjtO97OACFQ9z5MzS-X2wBlt5Ovk1vxakQPKfokI454,40
214
- architect_py-5.0.0b2.dist-info/RECORD,,
211
+ architect_py-5.0.0b3.dist-info/METADATA,sha256=2C40fxOMCJCu1muCYIbJ80TblcXBatzAdhUQYIMAeIE,3925
212
+ architect_py-5.0.0b3.dist-info/WHEEL,sha256=QZxptf4Y1BKFRCEDxD4h2V0mBFQOVFLFEpvxHmIs52A,91
213
+ architect_py-5.0.0b3.dist-info/top_level.txt,sha256=UjtO97OACFQ9z5MzS-X2wBlt5Ovk1vxakQPKfokI454,40
214
+ architect_py-5.0.0b3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.0)
2
+ Generator: setuptools (80.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5