HedgeTech 0.2.3__tar.gz → 0.2.4__tar.gz
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.
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/DataEngine/__tse_ifb/__AsyncClient.py +24 -11
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/DataEngine/__tse_ifb/__SyncClient.py +10 -11
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech.egg-info/PKG-INFO +1 -1
- {hedgetech-0.2.3 → hedgetech-0.2.4}/PKG-INFO +1 -1
- {hedgetech-0.2.3 → hedgetech-0.2.4}/pyproject.toml +1 -1
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/Auth/__AuthAsyncClient.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/Auth/__AuthSyncClient.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/Auth/__init__.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/Auth/__utils/__RetriableAsyncClient.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/Auth/__utils/__RetriableSyncClient.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/Auth/__utils/__init__.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/DataEngine/__init__.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/DataEngine/__tse_ifb/__init__.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/DataEngine/__tse_ifb/__io_types/__init__.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/DataEngine/__tse_ifb/__io_types/__response.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/EmsEngine/__init__.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/EmsEngine/__tse_ifb/__AsyncClient.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/EmsEngine/__tse_ifb/__SyncClient.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/EmsEngine/__tse_ifb/__init__.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/EmsEngine/__tse_ifb/__io_types/__init__.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech/EmsEngine/__tse_ifb/__io_types/__response.py +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech.egg-info/SOURCES.txt +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech.egg-info/dependency_links.txt +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech.egg-info/requires.txt +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/HedgeTech.egg-info/top_level.txt +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/LICENSE +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/NOTICE +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/README.md +0 -0
- {hedgetech-0.2.3 → hedgetech-0.2.4}/setup.cfg +0 -0
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
# Imports #
|
|
3
3
|
# ========================================|======================================== #
|
|
4
4
|
|
|
5
|
-
from asyncio import
|
|
5
|
+
from asyncio import (
|
|
6
|
+
Event,
|
|
7
|
+
wait_for,
|
|
8
|
+
TimeoutError,
|
|
9
|
+
sleep,
|
|
10
|
+
)
|
|
6
11
|
from websockets.asyncio.client import connect
|
|
7
12
|
from json import loads
|
|
8
13
|
from HedgeTech.Auth import AuthAsyncClient
|
|
@@ -1461,7 +1466,7 @@ class DataEngine_TseIfb_AsyncClient:
|
|
|
1461
1466
|
... print(update["data"])
|
|
1462
1467
|
"""
|
|
1463
1468
|
|
|
1464
|
-
if event
|
|
1469
|
+
if not isinstance(event,Event):
|
|
1465
1470
|
event = Event()
|
|
1466
1471
|
event.set()
|
|
1467
1472
|
|
|
@@ -1473,12 +1478,16 @@ class DataEngine_TseIfb_AsyncClient:
|
|
|
1473
1478
|
),
|
|
1474
1479
|
additional_headers=self.__AuthAsyncClient.token
|
|
1475
1480
|
) as ws:
|
|
1476
|
-
|
|
1481
|
+
|
|
1477
1482
|
while event.is_set():
|
|
1478
1483
|
|
|
1479
|
-
try:
|
|
1480
|
-
|
|
1481
|
-
except :
|
|
1484
|
+
try : yield loads(await wait_for(ws.recv(), timeout=2))
|
|
1485
|
+
|
|
1486
|
+
except TimeoutError:
|
|
1487
|
+
await sleep(0)
|
|
1488
|
+
continue
|
|
1489
|
+
|
|
1490
|
+
except Exception:
|
|
1482
1491
|
await ws.close()
|
|
1483
1492
|
break
|
|
1484
1493
|
|
|
@@ -1566,10 +1575,10 @@ class DataEngine_TseIfb_AsyncClient:
|
|
|
1566
1575
|
... print(update["data"])
|
|
1567
1576
|
"""
|
|
1568
1577
|
|
|
1569
|
-
if event
|
|
1578
|
+
if not isinstance(event,Event):
|
|
1570
1579
|
event = Event()
|
|
1571
1580
|
event.set()
|
|
1572
|
-
|
|
1581
|
+
|
|
1573
1582
|
async with connect(
|
|
1574
1583
|
uri=(
|
|
1575
1584
|
f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/isin?"
|
|
@@ -1581,8 +1590,12 @@ class DataEngine_TseIfb_AsyncClient:
|
|
|
1581
1590
|
|
|
1582
1591
|
while event.is_set():
|
|
1583
1592
|
|
|
1584
|
-
try:
|
|
1585
|
-
|
|
1586
|
-
except :
|
|
1593
|
+
try: yield loads(await wait_for(ws.recv(), timeout=2))
|
|
1594
|
+
|
|
1595
|
+
except TimeoutError:
|
|
1596
|
+
await sleep(0)
|
|
1597
|
+
continue
|
|
1598
|
+
|
|
1599
|
+
except Exception:
|
|
1587
1600
|
await ws.close()
|
|
1588
1601
|
break
|
|
@@ -1425,10 +1425,10 @@ class DataEngine_TseIfb_SyncClient:
|
|
|
1425
1425
|
... print(update) # This will not run; method is not implemented
|
|
1426
1426
|
"""
|
|
1427
1427
|
|
|
1428
|
-
if event
|
|
1428
|
+
if not isinstance(event,Event):
|
|
1429
1429
|
event = Event()
|
|
1430
1430
|
event.set()
|
|
1431
|
-
|
|
1431
|
+
|
|
1432
1432
|
with connect(
|
|
1433
1433
|
uri=(
|
|
1434
1434
|
f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/name?"
|
|
@@ -1440,13 +1440,12 @@ class DataEngine_TseIfb_SyncClient:
|
|
|
1440
1440
|
|
|
1441
1441
|
while event.is_set():
|
|
1442
1442
|
|
|
1443
|
-
try :
|
|
1444
|
-
|
|
1445
|
-
except :
|
|
1443
|
+
try : yield loads(ws.recv(timeout=2))
|
|
1444
|
+
except TimeoutError : continue
|
|
1445
|
+
except Exception:
|
|
1446
1446
|
ws.close()
|
|
1447
1447
|
break
|
|
1448
1448
|
|
|
1449
|
-
|
|
1450
1449
|
# +--------------------------------------------------------------------------------------+ #
|
|
1451
1450
|
|
|
1452
1451
|
def websocket_by_isin(
|
|
@@ -1520,10 +1519,10 @@ class DataEngine_TseIfb_SyncClient:
|
|
|
1520
1519
|
... print(update) # This will not run; method is not implemented
|
|
1521
1520
|
"""
|
|
1522
1521
|
|
|
1523
|
-
if event
|
|
1522
|
+
if not isinstance(event,Event):
|
|
1524
1523
|
event = Event()
|
|
1525
1524
|
event.set()
|
|
1526
|
-
|
|
1525
|
+
|
|
1527
1526
|
with connect(
|
|
1528
1527
|
uri=(
|
|
1529
1528
|
f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/isin?"
|
|
@@ -1535,8 +1534,8 @@ class DataEngine_TseIfb_SyncClient:
|
|
|
1535
1534
|
|
|
1536
1535
|
while event.is_set():
|
|
1537
1536
|
|
|
1538
|
-
try :
|
|
1539
|
-
|
|
1540
|
-
except :
|
|
1537
|
+
try : yield loads(ws.recv(timeout=2))
|
|
1538
|
+
except TimeoutError : continue
|
|
1539
|
+
except Exception:
|
|
1541
1540
|
ws.close()
|
|
1542
1541
|
break
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HedgeTech
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HedgeTech
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "HedgeTech"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.4"
|
|
8
8
|
description = "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."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|