26 Commits
Author SHA1 Message Date
mtrshirazi21 4d775e9000 fix: add missing comma in OrderStatus Literal 2026-07-23 21:46:46 +03:30
mtrshirazi21 6c943a559c improve order edit state recovery after failed requests 2026-07-23 21:28:08 +03:30
mtrshirazi21 ed991a3035 Added support for PartiallyFilled order status 2026-07-22 23:50:03 +03:30
mtrshirazi21 52367d54e1 unify sync and async order management logic 2026-07-22 01:00:37 +03:30
mtrshirazi21 c8090ba334 update pyproject.toml 2026-07-22 00:09:06 +03:30
mtrshirazi21 854bee9f9e improve order edit recovery using status verification 2026-07-22 00:05:15 +03:30
mtrshirazi21 3a603db3cf add .vscode dir 2026-07-21 11:59:14 +03:30
mtrshirazi21 3906a203a6 edit version 2026-05-31 14:23:48 +03:30
mtrshirazi21 a49db4397c solve bug Generator 2026-05-31 14:23:37 +03:30
mtrshirazi21 3d947bc558 add in init files 2026-05-31 14:05:45 +03:30
mtrshirazi21 2af7dfd648 update class ime clients 2026-05-29 17:02:30 +03:30
mtrshirazi21 bde8c980ef set new beta version 2026-05-29 16:36:37 +03:30
mtrshirazi21 e63dcddbea define sync and async client in ime DE 2026-05-29 16:33:47 +03:30
mtrshirazi21 cedbd76d0e edit README and pyproject toml 2026-05-29 15:38:41 +03:30
mtrshirazi21 52be955e6e expose types 2026-05-25 19:30:05 +03:30
mtrshirazi21 ecc1070f1c defin websocket io types 2026-05-25 19:12:00 +03:30
mtrshirazi21 126eab66f7 edit io types 2026-05-25 19:11:10 +03:30
mtrshirazi21 8a5f3142ef edit io_types 2026-05-24 21:18:57 +03:30
mtrshirazi21 9cfd36a891 define io types 2026-05-24 21:18:41 +03:30
mtrshirazi21 034c9a50ea define DE IME 2026-05-24 19:27:24 +03:30
mtrshirazi21 17bea4f2a3 Modifications to the terms and conditions related to Internet force majeure during times of war. 2026-05-17 21:44:05 +03:30
mtrshirazi21 747b257432 update version 2026-02-17 17:46:56 +03:30
mtrshirazi21 e6bd5852c2 Refactor order class functions in sync and async versions for improved error handling 2026-02-17 17:46:15 +03:30
mtrshirazi21 88359c882f update version 2026-02-14 15:31:36 +03:30
mtrshirazi21 420ebda323 Add timeout for more control on Async ws 2026-02-14 15:31:08 +03:30
mtrshirazi21 83314e0074 Add timeout for more control on sync ws 2026-02-14 15:12:22 +03:30
15 changed files with 2452 additions and 217 deletions

No files matched your search

+3 -1
View File
@@ -208,4 +208,6 @@ __marimo__/
*.env* *.env*
*.ipynb *.ipynb
requirements.txt requirements.txt
*test*.py *test*.py
.vscode
+349
View File
@@ -0,0 +1,349 @@
# ========================================|======================================== #
# Imports #
# ========================================|======================================== #
from asyncio import (
Event,
wait_for,
TimeoutError,
sleep,
)
from websockets.asyncio.client import connect
from json import loads
from HedgeTech.Auth import AuthAsyncClient
from typing import (
Literal,
List,
AsyncGenerator,
)
from .__io_types import (
WebsocketBase_contractName,
WebsocketBase_contractId,
OverviewResponse,
Contracts,
ContractInfoResponse,
AllowedPriceRangeResponse,
AggregateResponse,
BestLimitResponse,
)
# ========================================|======================================== #
# Class Definitions #
# ========================================|======================================== #
class DataEngine_Ime_AsyncClient:
def __init__(
self,
AuthAsyncClient : AuthAsyncClient,
):
self.__AuthAsyncClient = AuthAsyncClient
# +--------------------------------------------------------------------------------------+ #
async def search_contracts(
self,
market : Literal[
"IMEDepositCertificate",
"IMEFutures",
"IMEOption",
],
Search_char : str,
)-> Contracts :
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/static/data/contract/search',
params={
'market' : market,
'Search_char' : Search_char
}
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def contracts_static_info_by_name(self,contract_names : List[str])-> Contracts:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/static/data/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def contracts_static_info_by_id(self,contract_ids : List[str | int])-> Contracts:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/static/data/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_overview_by_name(self,contract_names : List[str])-> OverviewResponse:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/overview/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_overview_by_id(self,contract_ids : List[str | int])-> OverviewResponse:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/overview/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_best_limit_by_name(self,contract_names : List[str])-> BestLimitResponse:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/best-limit/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_best_limit_by_id(self,contract_ids : List[str | int])-> BestLimitResponse:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/best-limit/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_aggregate_by_name(self,contract_names : List[str])-> AggregateResponse:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/aggregate/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_aggregate_by_id(self,contract_ids : List[str | int])-> AggregateResponse :
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/aggregate/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_contract_info_by_name(self,contract_names : List[str])-> ContractInfoResponse:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/contract-info/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_contract_info_by_id(self,contract_ids : List[str | int])-> ContractInfoResponse :
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/contract-info/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_allowed_price_range_by_name(self,contract_names : List[str])-> AllowedPriceRangeResponse:
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/allowed-price-range/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def live_allowed_price_range_by_id(self,contract_ids : List[str | int])-> AllowedPriceRangeResponse :
data = await self.__AuthAsyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/allowed-price-range/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
async def websocket_by_name(
self,
contract_names: List[str],
event: Event | None = None,
)-> AsyncGenerator[
WebsocketBase_contractName,
None
]:
if not isinstance(event,Event):
event = Event()
event.set()
async with connect(
uri=(
f"wss://core.hedgetech.ir/data-engine/ime/live/data/websocket/contract/name?"
+ "&".join(f"contract_name={s}" for s in contract_names)
),
additional_headers=self.__AuthAsyncClient.token
) as ws:
while event.is_set():
try : yield loads(await wait_for(ws.recv(), timeout=2))
except TimeoutError:
await sleep(0)
continue
except Exception:
await ws.close()
break
# +--------------------------------------------------------------------------------------+ #
async def websocket_by_id(
self,
contract_ids: List[str | int],
event: Event | None = None,
)-> AsyncGenerator[
WebsocketBase_contractId,
None
]:
if not isinstance(event,Event):
event = Event()
event.set()
async with connect(
uri=(
f"wss://core.hedgetech.ir/data-engine/ime/live/data/websocket/contract/id?"
+ "&".join(f"contract_id={s}" for s in contract_ids)
),
additional_headers=self.__AuthAsyncClient.token
) as ws:
while event.is_set():
try : yield loads(await wait_for(ws.recv(), timeout=2))
except TimeoutError:
await sleep(0)
continue
except Exception:
await ws.close()
break
+339
View File
@@ -0,0 +1,339 @@
# ========================================|======================================== #
# Imports #
# ========================================|======================================== #
from threading import Event
from websockets.sync.client import connect
from json import loads
from HedgeTech.Auth import AuthSyncClient
from typing import (
Literal,
List,
Generator,
)
from .__io_types import (
WebsocketBase_contractName,
WebsocketBase_contractId,
OverviewResponse,
Contracts,
ContractInfoResponse,
AllowedPriceRangeResponse,
AggregateResponse,
BestLimitResponse,
)
# ========================================|======================================== #
# Class Definitions #
# ========================================|======================================== #
class DataEngine_Ime_SyncClient:
def __init__(
self,
AuthSyncClient : AuthSyncClient,
):
self.__AuthSyncClient = AuthSyncClient
# +--------------------------------------------------------------------------------------+ #
def search_contracts(
self,
market : Literal[
"IMEDepositCertificate",
"IMEFutures",
"IMEOption",
],
Search_char : str,
)-> Contracts :
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/static/data/contract/search',
params={
'market' : market,
'Search_char' : Search_char
}
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def contracts_static_info_by_name(self,contract_names : List[str])-> Contracts:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/static/data/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def contracts_static_info_by_id(self,contract_ids : List[str | int])-> Contracts:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/static/data/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_overview_by_name(self,contract_names : List[str])-> OverviewResponse:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/overview/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_overview_by_id(self,contract_ids : List[str | int])-> OverviewResponse:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/overview/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_best_limit_by_name(self,contract_names : List[str])-> BestLimitResponse:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/best-limit/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_best_limit_by_id(self,contract_ids : List[str | int])-> BestLimitResponse:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/best-limit/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_aggregate_by_name(self,contract_names : List[str])-> AggregateResponse:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/aggregate/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_aggregate_by_id(self,contract_ids : List[str | int])-> AggregateResponse :
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/aggregate/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_contract_info_by_name(self,contract_names : List[str])-> ContractInfoResponse:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/contract-info/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_contract_info_by_id(self,contract_ids : List[str | int])-> ContractInfoResponse :
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/contract-info/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_allowed_price_range_by_name(self,contract_names : List[str])-> AllowedPriceRangeResponse:
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/allowed-price-range/contract/name',
params=[('contract_names', name) for name in contract_names]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def live_allowed_price_range_by_id(self,contract_ids : List[str | int])-> AllowedPriceRangeResponse :
data = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/data-engine/ime/live/data/allowed-price-range/contract/id',
params=[('contract_ids', id) for id in contract_ids]
)
if data.is_success :
return data.json()
else :
raise ValueError(data.json().get('detail'))
# +--------------------------------------------------------------------------------------+ #
def websocket_by_name(
self,
contract_names: List[str],
event: Event | None = None,
)-> Generator[
WebsocketBase_contractName,
None,
None
]:
if not isinstance(event,Event):
event = Event()
event.set()
with connect(
uri=(
f"wss://core.hedgetech.ir/data-engine/ime/live/data/websocket/contract/name?"
+ "&".join(f"contract_name={s}" for s in contract_names)
),
additional_headers=self.__AuthSyncClient.token
) as ws:
while event.is_set():
try : yield loads(ws.recv(timeout=2))
except TimeoutError : continue
except Exception:
ws.close()
break
# +--------------------------------------------------------------------------------------+ #
def websocket_by_id(
self,
contract_ids: List[str | int],
event: Event | None = None,
)-> Generator[
WebsocketBase_contractId,
None,
None
]:
if not isinstance(event,Event):
event = Event()
event.set()
with connect(
uri=(
f"wss://core.hedgetech.ir/data-engine/ime/live/data/websocket/contract/id?"
+ "&".join(f"contract_id={s}" for s in contract_ids)
),
additional_headers=self.__AuthSyncClient.token
) as ws:
while event.is_set():
try : yield loads(ws.recv(timeout=2))
except TimeoutError : continue
except Exception:
ws.close()
break
+2
View File
@@ -0,0 +1,2 @@
from .__AsyncClient import DataEngine_Ime_AsyncClient
from .__SyncClient import DataEngine_Ime_SyncClient
@@ -0,0 +1,12 @@
from .__response import(
WebsocketBase_contractName,
WebsocketBase_contractId,
OverviewResponse,
Contracts,
ContractInfoResponse,
AllowedPriceRangeResponse,
AggregateResponse,
BestLimitResponse,
)
File diff suppressed because it is too large. Load diff
+4
View File
@@ -1,4 +1,8 @@
from .__tse_ifb import ( from .__tse_ifb import (
DataEngine_TseIfb_SyncClient, DataEngine_TseIfb_SyncClient,
DataEngine_TseIfb_AsyncClient DataEngine_TseIfb_AsyncClient
)
from .__ime import (
DataEngine_Ime_SyncClient,
DataEngine_Ime_AsyncClient
) )
+24 -11
View File
@@ -2,7 +2,12 @@
# Imports # # Imports #
# ========================================|======================================== # # ========================================|======================================== #
from asyncio import Event from asyncio import (
Event,
wait_for,
TimeoutError,
sleep,
)
from websockets.asyncio.client import connect from websockets.asyncio.client import connect
from json import loads from json import loads
from HedgeTech.Auth import AuthAsyncClient from HedgeTech.Auth import AuthAsyncClient
@@ -1461,7 +1466,7 @@ class DataEngine_TseIfb_AsyncClient:
... print(update["data"]) ... print(update["data"])
""" """
if event is None : if not isinstance(event,Event):
event = Event() event = Event()
event.set() event.set()
@@ -1473,12 +1478,16 @@ class DataEngine_TseIfb_AsyncClient:
), ),
additional_headers=self.__AuthAsyncClient.token additional_headers=self.__AuthAsyncClient.token
) as ws: ) as ws:
while event.is_set(): while event.is_set():
try: try : yield loads(await wait_for(ws.recv(), timeout=2))
yield loads(await ws.recv())
except : except TimeoutError:
await sleep(0)
continue
except Exception:
await ws.close() await ws.close()
break break
@@ -1566,10 +1575,10 @@ class DataEngine_TseIfb_AsyncClient:
... print(update["data"]) ... print(update["data"])
""" """
if event is None : if not isinstance(event,Event):
event = Event() event = Event()
event.set() event.set()
async with connect( async with connect(
uri=( uri=(
f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/isin?" f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/isin?"
@@ -1581,8 +1590,12 @@ class DataEngine_TseIfb_AsyncClient:
while event.is_set(): while event.is_set():
try: try: yield loads(await wait_for(ws.recv(), timeout=2))
yield loads(await ws.recv())
except : except TimeoutError:
await sleep(0)
continue
except Exception:
await ws.close() await ws.close()
break break
+10 -11
View File
@@ -1425,10 +1425,10 @@ class DataEngine_TseIfb_SyncClient:
... print(update) # This will not run; method is not implemented ... print(update) # This will not run; method is not implemented
""" """
if event is None : if not isinstance(event,Event):
event = Event() event = Event()
event.set() event.set()
with connect( with connect(
uri=( uri=(
f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/name?" f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/name?"
@@ -1440,13 +1440,12 @@ class DataEngine_TseIfb_SyncClient:
while event.is_set(): while event.is_set():
try : try : yield loads(ws.recv(timeout=2))
yield loads(ws.recv()) except TimeoutError : continue
except : except Exception:
ws.close() ws.close()
break break
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
def websocket_by_isin( def websocket_by_isin(
@@ -1520,10 +1519,10 @@ class DataEngine_TseIfb_SyncClient:
... print(update) # This will not run; method is not implemented ... print(update) # This will not run; method is not implemented
""" """
if event is None : if not isinstance(event,Event):
event = Event() event = Event()
event.set() event.set()
with connect( with connect(
uri=( uri=(
f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/isin?" f"wss://core.hedgetech.ir/data-engine/tse-ifb/live/data/websocket/symbol/isin?"
@@ -1535,8 +1534,8 @@ class DataEngine_TseIfb_SyncClient:
while event.is_set(): while event.is_set():
try : try : yield loads(ws.recv(timeout=2))
yield loads(ws.recv()) except TimeoutError : continue
except : except Exception:
ws.close() ws.close()
break break
@@ -9,6 +9,7 @@ from typing import (
Dict, Dict,
Optional, Optional,
TypedDict, TypedDict,
Literal,
) )
# ========================================|======================================== # # ========================================|======================================== #
@@ -37,7 +38,15 @@ class WebsocketBase_symbolIsin(TypedDict):
>>> message["symbolIsin"] >>> message["symbolIsin"]
'IR0001234567' 'IR0001234567'
""" """
channel: str channel: Literal[
"best-limit",
"order-book",
"ohlcv-last-1m",
"aggregate",
"institutional-vs-individual",
"contract-info",
"fund-info",
]
symbolIsin: str symbolIsin: str
timestamp: str timestamp: str
@@ -64,7 +73,15 @@ class WebsocketBase_symbolName(TypedDict):
>>> message["symbolName"] >>> message["symbolName"]
'ETF001' 'ETF001'
""" """
channel: str channel: Literal[
"best-limit",
"order-book",
"ohlcv-last-1m",
"aggregate",
"institutional-vs-individual",
"contract-info",
"fund-info",
]
symbolName: str symbolName: str
timestamp: str timestamp: str
@@ -734,7 +751,6 @@ class Instruments(TypedDict):
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
class BestLimitItem(TypedDict): class BestLimitItem(TypedDict):
""" """
Represents the best limit order information at a given price level for a financial instrument. Represents the best limit order information at a given price level for a financial instrument.
@@ -766,39 +782,6 @@ class BestLimitItem(TypedDict):
sell_quantity: int sell_quantity: int
sell_price: int sell_price: int
class BestLimit(TypedDict):
"""
Represents the aggregated best limit orders for multiple instruments.
The structure is a nested dictionary where the first key is typically a symbol
identifier (ISIN or symbolName) and the second key represents the order level or priority.
Attributes:
items (Dict[str, Dict[str, BestLimitItem]]): Nested dictionary of BestLimitItem objects.
- Outer key: Instrument identifier (e.g., ISIN or symbolName)
- Inner key: Price level or order priority
- Value: BestLimitItem for that level
Example:
>>> best_limit: BestLimit = {
... "ETF001": {
... "1": {
... "buy_order_count": 5,
... "buy_quantity": 1000,
... "buy_price": 12000,
... "sell_order_count": 3,
... "sell_quantity": 800,
... "sell_price": 12100
... }
... }
... }
>>> best_limit["ETF001"]["1"]["sell_quantity"]
800
"""
items: Dict[str, Dict[str, BestLimitItem]]
class BestLimitResponse(TypedDict): class BestLimitResponse(TypedDict):
""" """
Response structure for best limit orders from a REST API call. Response structure for best limit orders from a REST API call.
@@ -810,7 +793,18 @@ class BestLimitResponse(TypedDict):
Example: Example:
>>> response: BestLimitResponse = { >>> response: BestLimitResponse = {
... "Data": best_limit, ... "Data": {
... "ETF001": {
... "1": {
... "buy_order_count": 5,
... "buy_quantity": 1000,
... "buy_price": 12000,
... "sell_order_count": 3,
... "sell_quantity": 800,
... "sell_price": 12100
... },
... },
... },
... "Status": { ... "Status": {
... "State": True, ... "State": True,
... "ServerTimeStamp": 1700350200.0, ... "ServerTimeStamp": 1700350200.0,
@@ -825,7 +819,13 @@ class BestLimitResponse(TypedDict):
>>> response["Status"]["State"] >>> response["Status"]["State"]
True True
""" """
Data: BestLimit Data: Dict[
str,
Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem
]
]
Status: Status Status: Status
@@ -867,7 +867,10 @@ class BestLimit_WS_symbolIsin(WebsocketBase_symbolIsin):
>>> ws_data["data"]["1"]["sell_price"] >>> ws_data["data"]["1"]["sell_price"]
12100 12100
""" """
data: Dict[str, BestLimitItem] data: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
class BestLimit_WS_symbolName(WebsocketBase_symbolName): class BestLimit_WS_symbolName(WebsocketBase_symbolName):
@@ -908,7 +911,10 @@ class BestLimit_WS_symbolName(WebsocketBase_symbolName):
>>> ws_data["data"]["2"]["buy_price"] >>> ws_data["data"]["2"]["buy_price"]
11950 11950
""" """
data: Dict[str, BestLimitItem] data: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
@@ -1628,7 +1634,10 @@ class OverviewSecuritiesAndFunds(SecuritiesAndFunds):
>>> overview["FundInfo"]["nav"] >>> overview["FundInfo"]["nav"]
12500.0 12500.0
""" """
BestLimit: Dict[str, BestLimitItem] BestLimit: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
Aggregate: Aggregate Aggregate: Aggregate
institutional_vs_individual: institutional_vs_individual institutional_vs_individual: institutional_vs_individual
FundInfo: FundInfo FundInfo: FundInfo
@@ -1649,7 +1658,10 @@ class OverviewTreasuryBonds(TreasuryBonds):
FundInfo (FundInfo) FundInfo (FundInfo)
ContractInfo (ContractInfo) ContractInfo (ContractInfo)
""" """
BestLimit: Dict[str, BestLimitItem] BestLimit: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
Aggregate: Aggregate Aggregate: Aggregate
institutional_vs_individual: institutional_vs_individual institutional_vs_individual: institutional_vs_individual
FundInfo: FundInfo FundInfo: FundInfo
@@ -1670,7 +1682,10 @@ class OverviewStockOptions(StockOptions):
FundInfo (FundInfo) FundInfo (FundInfo)
ContractInfo (ContractInfo) ContractInfo (ContractInfo)
""" """
BestLimit: Dict[str, BestLimitItem] BestLimit: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
Aggregate: Aggregate Aggregate: Aggregate
institutional_vs_individual: institutional_vs_individual institutional_vs_individual: institutional_vs_individual
FundInfo: FundInfo FundInfo: FundInfo
@@ -1691,7 +1706,10 @@ class OverviewStockFuturess(StockFutures):
FundInfo (FundInfo) FundInfo (FundInfo)
ContractInfo (ContractInfo) ContractInfo (ContractInfo)
""" """
BestLimit: Dict[str, BestLimitItem] BestLimit: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
Aggregate: Aggregate Aggregate: Aggregate
institutional_vs_individual: institutional_vs_individual institutional_vs_individual: institutional_vs_individual
FundInfo: FundInfo FundInfo: FundInfo
@@ -1728,7 +1746,8 @@ class OverviewResponse:
True True
""" """
Data : Dict[ Data : Dict[
str,Optional[ str,
Optional[
Union[ Union[
OverviewSecuritiesAndFunds, OverviewSecuritiesAndFunds,
OverviewTreasuryBonds, OverviewTreasuryBonds,
+142 -75
View File
@@ -70,7 +70,9 @@ class Order:
True if the order has been deleted. True if the order has been deleted.
OrderId : HexUUID | None OrderId : HexUUID | None
Unique identifier of the order after submission. Unique identifier of the order after submission.
OrderStatus : 'Unknown' | 'InQueue' | 'PartiallyFilled' | 'Cancelled' | 'Broken' | 'Settled'
Current lifecycle status of the order. The value is 'Unknown' until a status is received from the server.
Methods Methods
------- -------
send() send()
@@ -93,6 +95,14 @@ class Order:
self.Price : int = Price self.Price : int = Price
self.Volume : int = Volume self.Volume : int = Volume
self.is_deleted : bool = False self.is_deleted : bool = False
self.OrderStatus : Literal[
'Unknown',
'InQueue',
'PartiallyFilled',
'Cancelled',
'Broken',
'Settled',
] = 'Unknown'
self.OrderId : HexUUID | None = None self.OrderId : HexUUID | None = None
@@ -118,20 +128,24 @@ class Order:
'953097ac6ced45ca8ef205b76ca6faf2' '953097ac6ced45ca8ef205b76ca6faf2'
""" """
if self.OrderId is None : try :
SendOrder_Response = await self.__AuthASyncClient.httpx_Client.post(**self.__SendOrder_RequestInfo) if self.OrderId is None :
match SendOrder_Response.status_code : SendOrder_Response = await self.__AuthASyncClient.httpx_Client.post(**self.__SendOrder_RequestInfo)
case 200 : match SendOrder_Response.status_code :
self.OrderId = SendOrder_Response.json()['Data']['order_uuid'] case 200 :
return None
self.OrderId = SendOrder_Response.json()['Data']['order_uuid']
case _ : return None return None
else : return None case _ : return None
else : return None
except : return None
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
async def Edit( async def Edit(
@@ -177,38 +191,66 @@ class Order:
) )
""" """
if self.OrderId is not None: try :
if self.OrderId is not None:
Edit_response = await self.__AuthASyncClient.httpx_Client.patch(
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/edit',
data={
'order_uuid' : self.OrderId,
'Order_ValidityType' : Order_ValidityType,
'ValidityDate' : ValidityDate,
'Price' : Price,
'Volume' : Volume
}
)
match Edit_response.status_code:
case 200:
Edit_response = Edit_response.json()
self.OrderId = Edit_response['Data']['order_uuid']
self.ValidityType = Edit_response['Data']['order_validity_type']
self.ValidityDate = ValidityDate
self.Price = Edit_response['Data']['order_price']
self.Volume = Edit_response['Data']['order_volume']
return None
case _ :
status_respnse = await self.Status()
if status_respnse and (
status_respnse['order_status'] in ('PartiallyFilled' , 'InQueue')
and status_respnse['RemainedVolume'] + status_respnse['ExecutedVolume'] == Volume
and status_respnse['Price'] == Price
and status_respnse['ValidityDate'] == ValidityDate
and status_respnse['ValidityType'] == Order_ValidityType
):
self.ValidityType = status_respnse['ValidityType']
self.ValidityDate = status_respnse['ValidityDate']
self.Price = status_respnse['Price']
self.Volume = status_respnse['RemainedVolume'] + status_respnse['ExecutedVolume']
self.OrderStatus = status_respnse['order_status']
return None
elif status_respnse and status_respnse['order_status'] not in ('PartiallyFilled' , 'InQueue'):
self.OrderStatus = status_respnse['order_status']
return None
else : return None
else : return None
except : return None
Edit_response = await self.__AuthASyncClient.httpx_Client.patch(
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/edit',
data={
'order_uuid' : self.OrderId,
'Order_ValidityType' : Order_ValidityType,
'ValidityDate' : ValidityDate,
'Price' : Price,
'Volume' : Volume
}
)
match Edit_response.status_code:
case 200:
Edit_response = Edit_response.json()
self.OrderId = Edit_response['Data']['order_uuid']
self.ValidityType = Edit_response['Data']['order_validity_type']
self.ValidityDate = ValidityDate
self.Price = Edit_response['Data']['order_price']
self.Volume = Edit_response['Data']['order_volume']
return None
case _ : return None
else : return None
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
async def Status(self)-> OrderStatus | None: async def Status(self)-> OrderStatus | None:
@@ -221,7 +263,7 @@ class Order:
OrderStatus | None OrderStatus | None
A dictionary containing the current order status with the following keys: A dictionary containing the current order status with the following keys:
- order_uuid: HexUUID, unique identifier of the order. - order_uuid: HexUUID, unique identifier of the order.
- order_status: 'InQueue' | 'Cancelled' | 'Broken' | 'Settled' - order_status: 'InQueue' | 'PartiallyFilled' | 'Cancelled' | 'Broken' | 'Settled'
- Price: int, the order price. - Price: int, the order price.
- Volume: int, the original order volume. - Volume: int, the original order volume.
- RemainedVolume: int, volume remaining unexecuted. - RemainedVolume: int, volume remaining unexecuted.
@@ -246,24 +288,30 @@ class Order:
'ValidityDate': 0 'ValidityDate': 0
} }
""" """
try :
if self.OrderId is not None:
status_respnse = await self.__AuthASyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/status',
params={'order_uuid' : self.OrderId}
)
match status_respnse.status_code : if self.OrderId is not None:
case 200:
return status_respnse.json()['Data']
case _ : return None
else : return None
status_respnse = await self.__AuthASyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/status',
params={'order_uuid' : self.OrderId}
)
match status_respnse.status_code :
case 200:
status_respnse = status_respnse.json()['Data']
self.OrderStatus = status_respnse['order_status']
return status_respnse
case _ : return None
else : return None
except : return None
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
async def Delete(self)-> None: async def Delete(self)-> None:
@@ -283,26 +331,44 @@ class Order:
>>> print(order.is_deleted) >>> print(order.is_deleted)
True True
""" """
if self.OrderId is not None:
Delete_respnse = await self.__AuthASyncClient.httpx_Client.delete( try :
url= 'https://core.hedgetech.ir/ems-engine/tse-ifb/order/delete',
params={'order_uuid' : self.OrderId}
)
if self.OrderId is not None:
match Delete_respnse.status_code :
Delete_respnse = await self.__AuthASyncClient.httpx_Client.delete(
url= 'https://core.hedgetech.ir/ems-engine/tse-ifb/order/delete',
params={'order_uuid' : self.OrderId}
)
case 200:
self.is_deleted = True
return None
case _ : return None
else : return None
match Delete_respnse.status_code :
case 200:
self.is_deleted = True
self.OrderStatus = 'Cancelled'
return None
case _ :
status_respnse = await self.Status()
if status_respnse and status_respnse['order_status'] == 'Cancelled':
self.is_deleted = True
self.OrderStatus = 'Cancelled'
return None
elif status_respnse and status_respnse['order_status'] != 'Cancelled' :
self.OrderStatus = status_respnse['order_status']
return None
else : return None
else : return None
except : return None
# ================================================================================= # # ================================================================================= #
class EmsEngine_TseIfb_AsyncClient: class EmsEngine_TseIfb_AsyncClient:
@@ -369,6 +435,7 @@ class EmsEngine_TseIfb_AsyncClient:
OMS : Literal[ OMS : Literal[
'Omex | Parsian', 'Omex | Parsian',
'Sahra | Karamad', 'Sahra | Karamad',
'Sahra | NIBB',
] ]
)-> ImageFile: )-> ImageFile:
+136 -68
View File
@@ -73,6 +73,9 @@ class Order:
Volume : int Volume : int
Order volume. Order volume.
OrderStatus : 'Unknown' | 'InQueue' | 'PartiallyFilled' | 'Cancelled' | 'Broken' | 'Settled'
Current lifecycle status of the order. The value is 'Unknown' until a status is received from the server.
Examples Examples
-------- --------
@@ -92,10 +95,17 @@ class Order:
self.Price : int = Price self.Price : int = Price
self.Volume : int = Volume self.Volume : int = Volume
self.is_deleted : bool = False self.is_deleted : bool = False
self.OrderStatus : Literal[
'Unknown',
'InQueue',
'Cancelled',
'Broken',
'Settled',
'PartiallyFilled',
] = 'Unknown'
self.OrderId : HexUUID | None = None self.OrderId : HexUUID | None = None
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
def send(self)-> None: def send(self)-> None:
@@ -122,20 +132,24 @@ class Order:
'0xA23F...' '0xA23F...'
""" """
if self.OrderId is None : try :
SendOrder_Response = self.__AuthSyncClient.httpx_Client.post(**self.__SendOrder_RequestInfo)
match SendOrder_Response.status_code : if self.OrderId is None :
SendOrder_Response = self.__AuthSyncClient.httpx_Client.post(**self.__SendOrder_RequestInfo)
case 200 : match SendOrder_Response.status_code :
self.OrderId = SendOrder_Response.json()['Data']['order_uuid'] case 200 :
return None
self.OrderId = SendOrder_Response.json()['Data']['order_uuid']
case _ : return None return None
case _ : return None
else : return None
else : return None except : return None
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
@@ -189,37 +203,65 @@ class Order:
) )
""" """
if self.OrderId is not None: try :
Edit_response = self.__AuthSyncClient.httpx_Client.patch( if self.OrderId is not None:
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/edit',
data={
'order_uuid' : self.OrderId,
'Order_ValidityType' : Order_ValidityType,
'ValidityDate' : ValidityDate,
'Price' : Price,
'Volume' : Volume
}
)
Edit_response = self.__AuthSyncClient.httpx_Client.patch(
match Edit_response.status_code: url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/edit',
data={
'order_uuid' : self.OrderId,
'Order_ValidityType' : Order_ValidityType,
'ValidityDate' : ValidityDate,
'Price' : Price,
'Volume' : Volume
}
)
case 200:
match Edit_response.status_code:
Edit_response = Edit_response.json() case 200:
self.OrderId = Edit_response['Data']['order_uuid'] Edit_response = Edit_response.json()
self.ValidityType = Edit_response['Data']['order_validity_type']
self.ValidityDate = ValidityDate self.OrderId = Edit_response['Data']['order_uuid']
self.Price = Edit_response['Data']['order_price'] self.ValidityType = Edit_response['Data']['order_validity_type']
self.Volume = Edit_response['Data']['order_volume'] self.ValidityDate = ValidityDate
self.Price = Edit_response['Data']['order_price']
return None self.Volume = Edit_response['Data']['order_volume']
return None
case _ : return None
case _ :
else : return None
status_respnse = self.Status()
if status_respnse and (
status_respnse['order_status'] in ('PartiallyFilled' , 'InQueue')
and status_respnse['RemainedVolume'] + status_respnse['ExecutedVolume'] == Volume
and status_respnse['Price'] == Price
and status_respnse['ValidityDate'] == ValidityDate
and status_respnse['ValidityType'] == Order_ValidityType
):
self.ValidityType = status_respnse['ValidityType']
self.ValidityDate = status_respnse['ValidityDate']
self.Price = status_respnse['Price']
self.Volume = status_respnse['RemainedVolume'] + status_respnse['ExecutedVolume']
self.OrderStatus = status_respnse['order_status']
return None
elif status_respnse and status_respnse['order_status'] not in ('PartiallyFilled' , 'InQueue'):
self.OrderStatus = status_respnse['order_status']
return None
else : return None
else : return None
except : return None
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
@@ -241,7 +283,7 @@ class Order:
- order_uuid : HexUUID - order_uuid : HexUUID
Unique identifier of the order. Unique identifier of the order.
- order_status : Literal['InQueue', 'Cancelled', 'Broken', 'Settled'] - order_status : Literal['InQueue', 'PartiallyFilled, 'Cancelled', 'Broken', 'Settled']
Current lifecycle state of the order. Current lifecycle state of the order.
* InQueue : Order is waiting for execution. * InQueue : Order is waiting for execution.
@@ -310,22 +352,29 @@ class Order:
} }
""" """
if self.OrderId is not None: try :
status_respnse = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/status',
params={'order_uuid' : self.OrderId}
)
match status_respnse.status_code : if self.OrderId is not None:
status_respnse = self.__AuthSyncClient.httpx_Client.get(
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/status',
params={'order_uuid' : self.OrderId}
)
case 200: match status_respnse.status_code :
return status_respnse.json()['Data'] case 200:
status_respnse = status_respnse.json()['Data']
self.OrderStatus = status_respnse['order_status']
return status_respnse
case _ : return None
case _ : return None else : return None
else : return None except : return None
# +--------------------------------------------------------------------------------------+ # # +--------------------------------------------------------------------------------------+ #
@@ -351,24 +400,42 @@ class Order:
True True
""" """
if self.OrderId is not None: try :
Delete_respnse = self.__AuthSyncClient.httpx_Client.delete(
url= 'https://core.hedgetech.ir/ems-engine/tse-ifb/order/delete',
params={'order_uuid' : self.OrderId}
)
match Delete_respnse.status_code :
case 200:
self.is_deleted = True
return None
case _ : return None
else : return None if self.OrderId is not None:
Delete_respnse = self.__AuthSyncClient.httpx_Client.delete(
url= 'https://core.hedgetech.ir/ems-engine/tse-ifb/order/delete',
params={'order_uuid' : self.OrderId}
)
match Delete_respnse.status_code :
case 200:
self.is_deleted = True
self.OrderStatus = 'Cancelled'
return None
case _ :
status_respnse = self.Status()
if status_respnse and status_respnse['order_status'] == 'Cancelled':
self.is_deleted = True
self.OrderStatus = 'Cancelled'
return None
elif status_respnse and status_respnse['order_status'] != 'Cancelled' :
self.OrderStatus = status_respnse['order_status']
return None
else : return None
else : return None
except : return None
# ================================================================================= # # ================================================================================= #
@@ -401,6 +468,7 @@ class EmsEngine_TseIfb_SyncClient:
OMS : Literal[ OMS : Literal[
'Omex | Parsian', 'Omex | Parsian',
'Sahra | Karamad', 'Sahra | Karamad',
'Sahra | NIBB',
] ]
)-> ImageFile: )-> ImageFile:
@@ -18,8 +18,58 @@ HexUUID = NewType("HexUUID", str)
class OrderStatus(TypedDict): class OrderStatus(TypedDict):
"""
Represents the current status and execution details of an order.
Attributes
----------
order_uuid : HexUUID order_uuid : HexUUID
order_status : Literal['InQueue','Cancelled','Broken','Settled'] Unique identifier of the order.
order_status : Literal['InQueue', 'PartiallyFilled', 'Cancelled', 'Broken', 'Settled']
Current lifecycle status of the order.
Possible values:
- ``InQueue``: The order has been accepted and is waiting to be matched.
- ``PartiallyFilled``: Part of the order has been executed, while the remaining volume is still active.
- ``Cancelled``: The order has been cancelled and will no longer be executed.
- ``Broken``: The order has been rejected or terminated due to an error or exchange-side condition.
- ``Settled``: The order has been completely executed.
Price : int
Order price.
Volume : int
Total requested order volume.
RemainedVolume : int
Remaining volume that has not yet been executed.
ExecutedVolume : int
Total executed volume.
OrderSide : Literal['Buy', 'Sell']
Side of the order.
Possible values:
- ``Buy``: Buy order.
- ``Sell``: Sell order.
ValidityType : Literal['DAY', 'GTC', 'GTD']
Order validity policy.
Possible values:
- ``DAY``: Valid only for the current trading session.
- ``GTC`` (*Good Till Cancelled*): Remains active until cancelled.
- ``GTD`` (*Good Till Date*): Remains active until the specified expiration date.
ValidityDate : int
Expiration date of the order when ``ValidityType`` is ``GTD``.
The format depends on the trading engine.
"""
order_uuid : HexUUID
order_status : Literal['InQueue','PartiallyFilled','Cancelled','Broken','Settled']
Price : int Price : int
Volume : int Volume : int
RemainedVolume : int RemainedVolume : int
+1 -1
View File
@@ -367,7 +367,7 @@ See LICENSE file.
## Support ## Support
GitHub Issues: https://github.com/HedgeTech-ir/HedgeTech/issues GitHub Issues: https://gitea.hedgetech.ir/HedgeTech/HedgeTech/issues
Email: info@hedgetech.ir Email: info@hedgetech.ir
+4 -4
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "HedgeTech" name = "HedgeTech"
version = "0.2.3" version = "0.3.1b5"
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." 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."
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
@@ -33,7 +33,7 @@ classifiers = [
"License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent", "Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable", "Development Status :: 4 - Beta",
"Intended Audience :: Developers", "Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Financial and Insurance Industry",
@@ -59,5 +59,5 @@ dependencies = [
[project.urls] [project.urls]
Homepage = "https://hedgetech.ir/landing/" Homepage = "https://hedgetech.ir/landing/"
Documentation = "https://github.com/HedgeTech-ir/HedgeTech/blob/main/README.md" Documentation = "https://gitea.hedgetech.ir/HedgeTech/HedgeTech/src/branch/main/README.md"
Repository = "https://github.com/HedgeTech-ir/HedgeTech" Repository = "https://gitea.hedgetech.ir/HedgeTech/HedgeTech"