17 Commits
12 changed files with 2158 additions and 56 deletions

No files matched your search

+3 -1
View File
@@ -208,4 +208,6 @@ __marimo__/
*.env*
*.ipynb
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 (
DataEngine_TseIfb_SyncClient,
DataEngine_TseIfb_AsyncClient
)
from .__ime import (
DataEngine_Ime_SyncClient,
DataEngine_Ime_AsyncClient
)
@@ -9,6 +9,7 @@ from typing import (
Dict,
Optional,
TypedDict,
Literal,
)
# ========================================|======================================== #
@@ -37,7 +38,15 @@ class WebsocketBase_symbolIsin(TypedDict):
>>> message["symbolIsin"]
'IR0001234567'
"""
channel: str
channel: Literal[
"best-limit",
"order-book",
"ohlcv-last-1m",
"aggregate",
"institutional-vs-individual",
"contract-info",
"fund-info",
]
symbolIsin: str
timestamp: str
@@ -64,7 +73,15 @@ class WebsocketBase_symbolName(TypedDict):
>>> message["symbolName"]
'ETF001'
"""
channel: str
channel: Literal[
"best-limit",
"order-book",
"ohlcv-last-1m",
"aggregate",
"institutional-vs-individual",
"contract-info",
"fund-info",
]
symbolName: str
timestamp: str
@@ -734,7 +751,6 @@ class Instruments(TypedDict):
# +--------------------------------------------------------------------------------------+ #
class BestLimitItem(TypedDict):
"""
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_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):
"""
Response structure for best limit orders from a REST API call.
@@ -810,7 +793,18 @@ class BestLimitResponse(TypedDict):
Example:
>>> 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": {
... "State": True,
... "ServerTimeStamp": 1700350200.0,
@@ -825,7 +819,13 @@ class BestLimitResponse(TypedDict):
>>> response["Status"]["State"]
True
"""
Data: BestLimit
Data: Dict[
str,
Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem
]
]
Status: Status
@@ -867,7 +867,10 @@ class BestLimit_WS_symbolIsin(WebsocketBase_symbolIsin):
>>> ws_data["data"]["1"]["sell_price"]
12100
"""
data: Dict[str, BestLimitItem]
data: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
class BestLimit_WS_symbolName(WebsocketBase_symbolName):
@@ -908,7 +911,10 @@ class BestLimit_WS_symbolName(WebsocketBase_symbolName):
>>> ws_data["data"]["2"]["buy_price"]
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"]
12500.0
"""
BestLimit: Dict[str, BestLimitItem]
BestLimit: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
Aggregate: Aggregate
institutional_vs_individual: institutional_vs_individual
FundInfo: FundInfo
@@ -1649,7 +1658,10 @@ class OverviewTreasuryBonds(TreasuryBonds):
FundInfo (FundInfo)
ContractInfo (ContractInfo)
"""
BestLimit: Dict[str, BestLimitItem]
BestLimit: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
Aggregate: Aggregate
institutional_vs_individual: institutional_vs_individual
FundInfo: FundInfo
@@ -1670,7 +1682,10 @@ class OverviewStockOptions(StockOptions):
FundInfo (FundInfo)
ContractInfo (ContractInfo)
"""
BestLimit: Dict[str, BestLimitItem]
BestLimit: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
Aggregate: Aggregate
institutional_vs_individual: institutional_vs_individual
FundInfo: FundInfo
@@ -1691,7 +1706,10 @@ class OverviewStockFuturess(StockFutures):
FundInfo (FundInfo)
ContractInfo (ContractInfo)
"""
BestLimit: Dict[str, BestLimitItem]
BestLimit: Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem,
]
Aggregate: Aggregate
institutional_vs_individual: institutional_vs_individual
FundInfo: FundInfo
@@ -1728,7 +1746,8 @@ class OverviewResponse:
True
"""
Data : Dict[
str,Optional[
str,
Optional[
Union[
OverviewSecuritiesAndFunds,
OverviewTreasuryBonds,
+35 -3
View File
@@ -93,6 +93,13 @@ class Order:
self.Price : int = Price
self.Volume : int = Volume
self.is_deleted : bool = False
self.OrderStatus : Literal[
None,
'InQueue' ,
'Cancelled',
'Broken',
'Settled',
]
self.OrderId : HexUUID | None = None
@@ -208,11 +215,36 @@ class Order:
self.ValidityDate = ValidityDate
self.Price = Edit_response['Data']['order_price']
self.Volume = Edit_response['Data']['order_volume']
self.OrderStatus = 'InQueue'
return None
case _ : return None
case _ :
status_respnse = await self.Status()
if status_respnse and (
status_respnse['order_status'] == '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 = 'InQueue'
return None
elif status_respnse and status_respnse['order_status'] != 'InQueue' :
self.OrderStatus = status_respnse['order_status']
return None
else : return None
else : return None
except : return None
+34 -2
View File
@@ -92,6 +92,13 @@ class Order:
self.Price : int = Price
self.Volume : int = Volume
self.is_deleted : bool = False
self.OrderStatus : Literal[
None,
'InQueue' ,
'Cancelled',
'Broken',
'Settled',
]
self.OrderId : HexUUID | None = None
@@ -220,10 +227,35 @@ class Order:
self.ValidityDate = ValidityDate
self.Price = Edit_response['Data']['order_price']
self.Volume = Edit_response['Data']['order_volume']
self.OrderStatus = 'InQueue'
return None
case _ : return None
case _ :
status_respnse = self.Status()
if status_respnse and (
status_respnse['order_status'] == '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 = 'InQueue'
return None
elif status_respnse and status_respnse['order_status'] != 'InQueue' :
self.OrderStatus = status_respnse['order_status']
return None
else : return None
else : return None
+1 -1
View File
@@ -367,7 +367,7 @@ See LICENSE file.
## Support
GitHub Issues: https://github.com/HedgeTech-ir/HedgeTech/issues
GitHub Issues: https://gitea.hedgetech.ir/HedgeTech/HedgeTech/issues
Email: info@hedgetech.ir
+4 -4
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "HedgeTech"
version = "0.2.5"
version = "0.3.1b1"
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"
requires-python = ">=3.10"
@@ -33,7 +33,7 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
@@ -59,5 +59,5 @@ dependencies = [
[project.urls]
Homepage = "https://hedgetech.ir/landing/"
Documentation = "https://github.com/HedgeTech-ir/HedgeTech/blob/main/README.md"
Repository = "https://github.com/HedgeTech-ir/HedgeTech"
Documentation = "https://gitea.hedgetech.ir/HedgeTech/HedgeTech/src/branch/main/README.md"
Repository = "https://gitea.hedgetech.ir/HedgeTech/HedgeTech"