HedgeTech 0.2.0b1__py3-none-any.whl → 0.2.2b0__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.
@@ -1,2 +1,2 @@
1
1
  from .__SyncClient import EmsEngine_TseIfb_SyncClient
2
- from .__AsyncClient import EmsEngine_TseIfb_ASyncClient
2
+ from .__AsyncClient import EmsEngine_TseIfb_AsyncClient
@@ -19,7 +19,7 @@ HexUUID = NewType("HexUUID", str)
19
19
  class OrderStatus(TypedDict):
20
20
 
21
21
  order_uuid : HexUUID
22
- OrderInQueue : bool
22
+ order_status : Literal['InQueue','Cancelled','Broken','Settled']
23
23
  Price : int
24
24
  Volume : int
25
25
  RemainedVolume : int
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: HedgeTech
3
- Version: 0.2.0b1
3
+ Version: 0.2.2b0
4
4
  Summary: A unified, high-performance API layer that powers all trading infrastructure across the HedgeTech ecosystem, providing modular, scalable, and real-time interfaces for market data, order management, and execution systems.
5
5
  Author-email: "hedgetech.ir" <info@hedgetech.ir>
6
6
  License: Apache License
@@ -225,6 +225,7 @@ HedgeTech Python SDK is a professional, lightweight, and modular Python package
225
225
 
226
226
  * Secure authentication with both async and sync clients.
227
227
  * Real-time and historical market data retrieval from TSE & IFB.
228
+ * Full EMS Engine order management (buy/sell, edit, status, delete) for both Sync and Async workflows.
228
229
  * Modular and maintainable architecture, designed to support multiple engines (DataEngine engines, WebSocket clients, etc.).
229
230
  * Structured request and response types for robust data handling.
230
231
  * Fully asynchronous support for high-performance applications.
@@ -250,11 +251,11 @@ pip install --upgrade HedgeTech
250
251
 
251
252
  The SDK exposes all major clients through the top-level modules, so you generally do **not** need to import internal implementation files directly.
252
253
 
253
- ### Authentication
254
+ ## Authentication
254
255
 
255
256
  > **Note:** Make sure to use the matching async or sync Auth client depending on your workflow.
256
257
 
257
- #### Async Authentication
258
+ ### Async Authentication
258
259
 
259
260
  ```python
260
261
  from HedgeTech.Auth import AuthAsyncClient
@@ -266,7 +267,7 @@ auth_async_client = await AuthAsyncClient.login(
266
267
  print(auth_async_client.token)
267
268
  ```
268
269
 
269
- #### Sync Authentication
270
+ ### Sync Authentication
270
271
 
271
272
  ```python
272
273
  from HedgeTech.Auth import AuthSyncClient
@@ -278,13 +279,13 @@ auth_sync_client = AuthSyncClient.login(
278
279
  print(auth_sync_client.token)
279
280
  ```
280
281
 
281
- ### DataEngine / TSE IFB
282
+ ## DataEngine / TSE IFB
282
283
 
283
284
  The DataEngine is designed to support multiple engines in a modular way. Each engine provides its own async and sync clients, structured request and response types, and can be integrated with other engines such as WebSocket clients.
284
285
 
285
286
  > **Important Note on Sync vs Async:** All clients have the **same method names and behavior** in both Sync and Async versions. The only difference is how they execute: Sync runs in a blocking manner, while Async requires `await` and an event loop. This design allows you to switch between Sync and Async without changing the logic or input/output of your code.
286
287
 
287
- #### Async Data Client
288
+ ### Async Data Client
288
289
 
289
290
  ```python
290
291
  from HedgeTech.DataEngine import DataEngine_TseIfb_AsyncClient
@@ -301,11 +302,10 @@ async for update in client.websocket_by_name(
301
302
  channels=["best-limit", "order-book"],
302
303
  symbol_names=["فملی","اطلس"]
303
304
  ):
304
-
305
305
  print(update["data"])
306
306
  ```
307
307
 
308
- #### Sync Data Client
308
+ ### Sync Data Client
309
309
 
310
310
  ```python
311
311
  from HedgeTech.DataEngine import DataEngine_TseIfb_SyncClient
@@ -326,10 +326,83 @@ for update in client.websocket_by_isin(
326
326
  channels=["best-limit", "order-book"],
327
327
  symbol_isins=["IR1234567890"]
328
328
  ):
329
-
330
329
  print(update["data"])
331
330
  ```
332
331
 
332
+ ## EMS Engine / Order Management
333
+
334
+ The SDK provides full **order lifecycle management** for TSE/IFB markets. You can create, edit, delete, and check the status of buy/sell orders with both Sync and Async clients.
335
+
336
+ ### Features
337
+
338
+ * Create buy/sell orders by symbol name or ISIN.
339
+ * Edit orders (price, volume, validity type/date).
340
+ * Retrieve current order status including executed and remaining volume.
341
+ * Delete/cancel orders.
342
+ * Fully Async/Sync compatible with identical method names.
343
+
344
+ ### Async Example
345
+
346
+ ```python
347
+ from HedgeTech.EMSEngine import EmsEngine_TseIfb_AsyncClient
348
+
349
+ ems_client = EmsEngine_TseIfb_AsyncClient(auth_async_client)
350
+
351
+ # Login to OMS
352
+ await ems_client.oms_login("username", "password", "captcha_value")
353
+
354
+ # Create a buy order
355
+ order = await ems_client.Buy_by_Name(
356
+ symbolName="اطلس",
357
+ Price=100000,
358
+ Volume=10
359
+ )
360
+ await order.send()
361
+
362
+ # Check status
363
+ status = await order.Status()
364
+ print(status)
365
+
366
+ # Edit order
367
+ await order.Edit(Price=105000, Volume=12)
368
+
369
+ # Delete order
370
+ await order.Delete()
371
+ print(order.is_deleted) # True
372
+ ```
373
+
374
+ ### Sync Example
375
+
376
+ ```python
377
+ from HedgeTech.EMSEngine import EmsEngine_TseIfb_SyncClient
378
+
379
+ ems_client = EmsEngine_TseIfb_SyncClient(auth_sync_client)
380
+
381
+ # Login to OMS
382
+ ems_client.oms_login("username", "password", "captcha_value")
383
+
384
+ # Create a sell order
385
+ order = ems_client.Sell_by_Name(
386
+ symbolName="فملی",
387
+ Price=50000,
388
+ Volume=5
389
+ )
390
+ order.send()
391
+
392
+ # Check status
393
+ status = order.Status()
394
+ print(status)
395
+
396
+ # Edit order
397
+ order.Edit(Price=52000, Volume=6)
398
+
399
+ # Delete order
400
+ order.Delete()
401
+ print(order.is_deleted) # True
402
+ ```
403
+
404
+ > All methods for Async and Sync clients have the same parameters and naming for easy switching.
405
+
333
406
  ## Important Notes for Users
334
407
 
335
408
  * This SDK requires Python >=3.10.
@@ -353,6 +426,15 @@ Handles interactions with the Tehran Stock Exchange IFB and other engines. Provi
353
426
  * Structured request and response types for predictable and robust data handling.
354
427
  * Modular design that allows integration of additional engines, such as WebSocket clients or future data engines, without modifying the main interface.
355
428
 
429
+ ### HedgeTech.EMSEngine
430
+
431
+ Handles TSE/IFB order management (EMS Engine):
432
+
433
+ * `EmsEngine_TseIfb_AsyncClient` / `EmsEngine_TseIfb_SyncClient`
434
+ * `Order` class for individual order lifecycle
435
+ * Methods: `Buy_by_Name`, `Sell_by_Name`, `Buy_by_isin`, `Sell_by_isin`, `Edit`, `Status`, `Delete`
436
+ * Fully compatible with both Async and Sync workflows
437
+
356
438
  ## Contributing
357
439
 
358
440
  We welcome contributions from the community! Please follow standard Python coding conventions, write clear documentation for any new features, and submit pull requests for improvements or bug fixes.
@@ -0,0 +1,24 @@
1
+ HedgeTech/Auth/__AuthAsyncClient.py,sha256=IgV6f4bycGjIcyttmtqFLm4m_nzxH3S8QlQLKEHkyGQ,5050
2
+ HedgeTech/Auth/__AuthSyncClient.py,sha256=aSk_3q-AGTY4TFT_5q5pzteJVQk6yitw0liT5lkiNdg,4979
3
+ HedgeTech/Auth/__init__.py,sha256=2Ek8ZkhrRi0D7ewhMH4pyK0iqxe_FfpGBSEIu3-tsik,91
4
+ HedgeTech/Auth/__utils/__RetriableAsyncClient.py,sha256=TVaGrX1QdwKgsKUjBZFyBTyjGtgzBnH-TWkFhFG010Q,1899
5
+ HedgeTech/Auth/__utils/__RetriableSyncClient.py,sha256=dNq3SquxjDzvy3_zPz6nVU6Vv9SBIa-_neGg_mfY3qE,1880
6
+ HedgeTech/Auth/__utils/__init__.py,sha256=RV0K2gIq6ePb0he32i5x6HsU6kZ_8J3cqe5lxAqrov0,75
7
+ HedgeTech/DataEngine/__init__.py,sha256=qoIZgB8J3UFDDGr0-ViiyEirTzcOy0hhL4a6E6rl2d8,94
8
+ HedgeTech/DataEngine/__tse_ifb/__AsyncClient.py,sha256=8cBF_f5ekKyH9Xceb0fMdUK1sWyLQQlfp_LB1rMyrl0,60357
9
+ HedgeTech/DataEngine/__tse_ifb/__SyncClient.py,sha256=84yexoW7Vb_sMlT3VnXTDPA7HGEfmkiC7AEYbryJF4Y,58431
10
+ HedgeTech/DataEngine/__tse_ifb/__init__.py,sha256=fNfmOjNXiOYTAcOgIzSXP5J1XzyX4v5urviCSwYpoyY,111
11
+ HedgeTech/DataEngine/__tse_ifb/__io_types/__init__.py,sha256=k4ssbz6f_ZWwSPPkTCfZe9m-v8byzoUShGOcc1FSuWc,832
12
+ HedgeTech/DataEngine/__tse_ifb/__io_types/__response.py,sha256=pMzjM8biVuEya62MHGU4guUCqNmhOHOToGXLS21uxc0,70442
13
+ HedgeTech/EmsEngine/__init__.py,sha256=u8qT8zXvb7cV_tYL9G6YxIHMiM-KoYiTVjls1We5uLc,92
14
+ HedgeTech/EmsEngine/__tse_ifb/__AsyncClient.py,sha256=4MZH_RzhD99GiSqgD-Xb8ZCojDGu2PZ8TOzR6cMHBCk,23384
15
+ HedgeTech/EmsEngine/__tse_ifb/__SyncClient.py,sha256=7aMiHsxAQyWoEuqi62L-nYNUxGpHcfJG7-tgz1qHtxs,21699
16
+ HedgeTech/EmsEngine/__tse_ifb/__init__.py,sha256=7ibnB8BhijhBUP2jRAQosB-UZgbAOFHso6ih3Up_590,109
17
+ HedgeTech/EmsEngine/__tse_ifb/__io_types/__init__.py,sha256=yuU2_SgUzNJpbW8AWunZu4aUzA7-OgUjqCMZ22_wyys,57
18
+ HedgeTech/EmsEngine/__tse_ifb/__io_types/__response.py,sha256=TpMSMK9SsTwiVHofqdvhTP4E6bUdRpraNxJ9rdrETWk,1030
19
+ hedgetech-0.2.2b0.dist-info/licenses/LICENSE,sha256=RzVH4fFelGlKDPcfQUnkbkri8Xu-bsauTM5FpraQ4NM,10251
20
+ hedgetech-0.2.2b0.dist-info/licenses/NOTICE,sha256=as8VRMsbPsDe5W_cX1xPxPVHPDL8PqGGzHgn5IZF26U,171
21
+ hedgetech-0.2.2b0.dist-info/METADATA,sha256=7ebchgWE9Q1XQVrFQYYi1zNVLQD7rlDAhi9JqmLbTKE,21132
22
+ hedgetech-0.2.2b0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
23
+ hedgetech-0.2.2b0.dist-info/top_level.txt,sha256=dlpgpN4ktclL9B5cS_dchuncCOf5JYPs_bobRAw3-ng,10
24
+ hedgetech-0.2.2b0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,21 +0,0 @@
1
- HedgeTech/Auth/__AuthAsyncClient.py,sha256=ZWYTxg-idzFxOChbVvHbEmfZRMyiinI-yzPuWZGQeag,4850
2
- HedgeTech/Auth/__AuthSyncClient.py,sha256=e5KiQ9aQD-_ztUrLr_GP3EcCzCeS6_wLkdRzl_nQ8Y8,4804
3
- HedgeTech/Auth/__init__.py,sha256=2Ek8ZkhrRi0D7ewhMH4pyK0iqxe_FfpGBSEIu3-tsik,91
4
- HedgeTech/DataEngine/__init__.py,sha256=qoIZgB8J3UFDDGr0-ViiyEirTzcOy0hhL4a6E6rl2d8,94
5
- HedgeTech/DataEngine/__tse_ifb/__AsyncClient.py,sha256=8cBF_f5ekKyH9Xceb0fMdUK1sWyLQQlfp_LB1rMyrl0,60357
6
- HedgeTech/DataEngine/__tse_ifb/__SyncClient.py,sha256=84yexoW7Vb_sMlT3VnXTDPA7HGEfmkiC7AEYbryJF4Y,58431
7
- HedgeTech/DataEngine/__tse_ifb/__init__.py,sha256=fNfmOjNXiOYTAcOgIzSXP5J1XzyX4v5urviCSwYpoyY,111
8
- HedgeTech/DataEngine/__tse_ifb/__io_types/__init__.py,sha256=k4ssbz6f_ZWwSPPkTCfZe9m-v8byzoUShGOcc1FSuWc,832
9
- HedgeTech/DataEngine/__tse_ifb/__io_types/__response.py,sha256=pMzjM8biVuEya62MHGU4guUCqNmhOHOToGXLS21uxc0,70442
10
- HedgeTech/EmsEngine/__init__.py,sha256=E8ftTXv-gGjyvlEH-4spu0dRdgQGnpM6X9iE1UZBq2Y,92
11
- HedgeTech/EmsEngine/__tse_ifb/__AsyncClient.py,sha256=0N0mrzXvwGWJNefT8cChP1Po9ryTHJWgOkUs9SZD41k,15043
12
- HedgeTech/EmsEngine/__tse_ifb/__SyncClient.py,sha256=R76dRDHWLTnDy8KnoftrlspHqkW1LNZ5wFe3NPvSslo,14920
13
- HedgeTech/EmsEngine/__tse_ifb/__init__.py,sha256=gKs9x0L-e8aytXFsUKmlbqopOIlBV8HfpM5q6uJrPqw,109
14
- HedgeTech/EmsEngine/__tse_ifb/__io_types/__init__.py,sha256=yuU2_SgUzNJpbW8AWunZu4aUzA7-OgUjqCMZ22_wyys,57
15
- HedgeTech/EmsEngine/__tse_ifb/__io_types/__response.py,sha256=XUeItP7tdttAU50qEkQeCknnRs4-r4sqmgW1NuQxTGE,985
16
- hedgetech-0.2.0b1.dist-info/licenses/LICENSE,sha256=RzVH4fFelGlKDPcfQUnkbkri8Xu-bsauTM5FpraQ4NM,10251
17
- hedgetech-0.2.0b1.dist-info/licenses/NOTICE,sha256=as8VRMsbPsDe5W_cX1xPxPVHPDL8PqGGzHgn5IZF26U,171
18
- hedgetech-0.2.0b1.dist-info/METADATA,sha256=gb9Ze6qzZ9_kE_fRBQpoqh1PnRvaMTTuezlLPMJwRys,19025
19
- hedgetech-0.2.0b1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- hedgetech-0.2.0b1.dist-info/top_level.txt,sha256=dlpgpN4ktclL9B5cS_dchuncCOf5JYPs_bobRAw3-ng,10
21
- hedgetech-0.2.0b1.dist-info/RECORD,,