HedgeTech 0.3.1b2__tar.gz → 0.3.1b4__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.
Files changed (35) hide show
  1. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/EmsEngine/__tse_ifb/__AsyncClient.py +11 -9
  2. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/EmsEngine/__tse_ifb/__SyncClient.py +11 -9
  3. hedgetech-0.3.1b4/HedgeTech/EmsEngine/__tse_ifb/__io_types/__response.py +79 -0
  4. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech.egg-info/PKG-INFO +1 -1
  5. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/PKG-INFO +1 -1
  6. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/pyproject.toml +1 -1
  7. hedgetech-0.3.1b2/HedgeTech/EmsEngine/__tse_ifb/__io_types/__response.py +0 -29
  8. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/Auth/__AuthAsyncClient.py +0 -0
  9. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/Auth/__AuthSyncClient.py +0 -0
  10. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/Auth/__init__.py +0 -0
  11. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/Auth/__utils/__RetriableAsyncClient.py +0 -0
  12. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/Auth/__utils/__RetriableSyncClient.py +0 -0
  13. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/Auth/__utils/__init__.py +0 -0
  14. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__ime/__AsyncClient.py +0 -0
  15. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__ime/__SyncClient.py +0 -0
  16. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__ime/__init__.py +0 -0
  17. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__ime/__io_types/__init__.py +0 -0
  18. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__ime/__io_types/__response.py +0 -0
  19. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__init__.py +0 -0
  20. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__tse_ifb/__AsyncClient.py +0 -0
  21. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__tse_ifb/__SyncClient.py +0 -0
  22. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__tse_ifb/__init__.py +0 -0
  23. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__tse_ifb/__io_types/__init__.py +0 -0
  24. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/DataEngine/__tse_ifb/__io_types/__response.py +0 -0
  25. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/EmsEngine/__init__.py +0 -0
  26. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/EmsEngine/__tse_ifb/__init__.py +0 -0
  27. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech/EmsEngine/__tse_ifb/__io_types/__init__.py +0 -0
  28. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech.egg-info/SOURCES.txt +0 -0
  29. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech.egg-info/dependency_links.txt +0 -0
  30. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech.egg-info/requires.txt +0 -0
  31. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/HedgeTech.egg-info/top_level.txt +0 -0
  32. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/LICENSE +0 -0
  33. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/NOTICE +0 -0
  34. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/README.md +0 -0
  35. {hedgetech-0.3.1b2 → hedgetech-0.3.1b4}/setup.cfg +0 -0
@@ -70,7 +70,9 @@ class Order:
70
70
  True if the order has been deleted.
71
71
  OrderId : HexUUID | None
72
72
  Unique identifier of the order after submission.
73
-
73
+ OrderStatus : 'Unknown' | 'InQueue' | 'PartiallyFilled' | 'Cancelled' | 'Broken' | 'Settled'
74
+ Current lifecycle status of the order. The value is 'Unknown' until a status is received from the server.
75
+
74
76
  Methods
75
77
  -------
76
78
  send()
@@ -94,12 +96,13 @@ class Order:
94
96
  self.Volume : int = Volume
95
97
  self.is_deleted : bool = False
96
98
  self.OrderStatus : Literal[
97
- None,
98
- 'InQueue' ,
99
+ 'Unknown'
100
+ 'InQueue',
101
+ 'PartiallyFilled',
99
102
  'Cancelled',
100
103
  'Broken',
101
104
  'Settled',
102
- ]
105
+ ] = 'Unknown'
103
106
 
104
107
  self.OrderId : HexUUID | None = None
105
108
 
@@ -215,7 +218,6 @@ class Order:
215
218
  self.ValidityDate = ValidityDate
216
219
  self.Price = Edit_response['Data']['order_price']
217
220
  self.Volume = Edit_response['Data']['order_volume']
218
- self.OrderStatus = 'InQueue'
219
221
  return None
220
222
 
221
223
  case _ :
@@ -223,7 +225,7 @@ class Order:
223
225
  status_respnse = await self.Status()
224
226
 
225
227
  if status_respnse and (
226
- status_respnse['order_status'] == 'InQueue'
228
+ status_respnse['order_status'] in ('PartiallyFilled' , 'InQueue')
227
229
  and status_respnse['RemainedVolume'] + status_respnse['ExecutedVolume'] == Volume
228
230
  and status_respnse['Price'] == Price
229
231
  and status_respnse['ValidityDate'] == ValidityDate
@@ -234,10 +236,10 @@ class Order:
234
236
  self.ValidityDate = status_respnse['ValidityDate']
235
237
  self.Price = status_respnse['Price']
236
238
  self.Volume = status_respnse['RemainedVolume'] + status_respnse['ExecutedVolume']
237
- self.OrderStatus = 'InQueue'
239
+ self.OrderStatus = status_respnse['order_status']
238
240
  return None
239
241
 
240
- elif status_respnse and status_respnse['order_status'] != 'InQueue' :
242
+ elif status_respnse and status_respnse['order_status'] not in ('PartiallyFilled' , 'InQueue'):
241
243
 
242
244
  self.OrderStatus = status_respnse['order_status']
243
245
 
@@ -261,7 +263,7 @@ class Order:
261
263
  OrderStatus | None
262
264
  A dictionary containing the current order status with the following keys:
263
265
  - order_uuid: HexUUID, unique identifier of the order.
264
- - order_status: 'InQueue' | 'Cancelled' | 'Broken' | 'Settled'
266
+ - order_status: 'InQueue' | 'PartiallyFilled' | 'Cancelled' | 'Broken' | 'Settled'
265
267
  - Price: int, the order price.
266
268
  - Volume: int, the original order volume.
267
269
  - RemainedVolume: int, volume remaining unexecuted.
@@ -73,6 +73,9 @@ class Order:
73
73
 
74
74
  Volume : int
75
75
  Order volume.
76
+
77
+ OrderStatus : 'Unknown' | 'InQueue' | 'PartiallyFilled' | 'Cancelled' | 'Broken' | 'Settled'
78
+ Current lifecycle status of the order. The value is 'Unknown' until a status is received from the server.
76
79
 
77
80
  Examples
78
81
  --------
@@ -93,16 +96,16 @@ class Order:
93
96
  self.Volume : int = Volume
94
97
  self.is_deleted : bool = False
95
98
  self.OrderStatus : Literal[
96
- None,
97
- 'InQueue' ,
99
+ 'Unknown',
100
+ 'InQueue',
98
101
  'Cancelled',
99
102
  'Broken',
100
103
  'Settled',
101
- ]
104
+ 'PartiallyFilled',
105
+ ] = 'Unknown'
102
106
 
103
107
  self.OrderId : HexUUID | None = None
104
108
 
105
-
106
109
  # +--------------------------------------------------------------------------------------+ #
107
110
 
108
111
  def send(self)-> None:
@@ -227,7 +230,6 @@ class Order:
227
230
  self.ValidityDate = ValidityDate
228
231
  self.Price = Edit_response['Data']['order_price']
229
232
  self.Volume = Edit_response['Data']['order_volume']
230
- self.OrderStatus = 'InQueue'
231
233
  return None
232
234
 
233
235
  case _ :
@@ -235,7 +237,7 @@ class Order:
235
237
  status_respnse = self.Status()
236
238
 
237
239
  if status_respnse and (
238
- status_respnse['order_status'] == 'InQueue'
240
+ status_respnse['order_status'] in ('PartiallyFilled' , 'InQueue')
239
241
  and status_respnse['RemainedVolume'] + status_respnse['ExecutedVolume'] == Volume
240
242
  and status_respnse['Price'] == Price
241
243
  and status_respnse['ValidityDate'] == ValidityDate
@@ -246,10 +248,10 @@ class Order:
246
248
  self.ValidityDate = status_respnse['ValidityDate']
247
249
  self.Price = status_respnse['Price']
248
250
  self.Volume = status_respnse['RemainedVolume'] + status_respnse['ExecutedVolume']
249
- self.OrderStatus = 'InQueue'
251
+ self.OrderStatus = status_respnse['order_status']
250
252
  return None
251
253
 
252
- elif status_respnse and status_respnse['order_status'] != 'InQueue' :
254
+ elif status_respnse and status_respnse['order_status'] not in ('PartiallyFilled' , 'InQueue'):
253
255
 
254
256
  self.OrderStatus = status_respnse['order_status']
255
257
 
@@ -281,7 +283,7 @@ class Order:
281
283
  - order_uuid : HexUUID
282
284
  Unique identifier of the order.
283
285
 
284
- - order_status : Literal['InQueue', 'Cancelled', 'Broken', 'Settled']
286
+ - order_status : Literal['InQueue', 'PartiallyFilled, 'Cancelled', 'Broken', 'Settled']
285
287
  Current lifecycle state of the order.
286
288
 
287
289
  * InQueue : Order is waiting for execution.
@@ -0,0 +1,79 @@
1
+ # ========================================|======================================== #
2
+ # Imports #
3
+ # ========================================|======================================== #
4
+
5
+ from typing import (
6
+ NewType,
7
+ TypedDict,
8
+ Literal,
9
+ )
10
+
11
+ # ========================================|======================================== #
12
+ # Class Definitions #
13
+ # ========================================|======================================== #
14
+
15
+ HexUUID = NewType("HexUUID", str)
16
+
17
+ # +--------------------------------------------------------------------------------------+ #
18
+
19
+ class OrderStatus(TypedDict):
20
+
21
+ """
22
+ Represents the current status and execution details of an order.
23
+
24
+ Attributes
25
+ ----------
26
+ order_uuid : HexUUID
27
+ Unique identifier of the order.
28
+
29
+ order_status : Literal['InQueue', 'PartiallyFilled', 'Cancelled', 'Broken', 'Settled']
30
+ Current lifecycle status of the order.
31
+
32
+ Possible values:
33
+ - ``InQueue``: The order has been accepted and is waiting to be matched.
34
+ - ``PartiallyFilled``: Part of the order has been executed, while the remaining volume is still active.
35
+ - ``Cancelled``: The order has been cancelled and will no longer be executed.
36
+ - ``Broken``: The order has been rejected or terminated due to an error or exchange-side condition.
37
+ - ``Settled``: The order has been completely executed.
38
+
39
+ Price : int
40
+ Order price.
41
+
42
+ Volume : int
43
+ Total requested order volume.
44
+
45
+ RemainedVolume : int
46
+ Remaining volume that has not yet been executed.
47
+
48
+ ExecutedVolume : int
49
+ Total executed volume.
50
+
51
+ OrderSide : Literal['Buy', 'Sell']
52
+ Side of the order.
53
+
54
+ Possible values:
55
+ - ``Buy``: Buy order.
56
+ - ``Sell``: Sell order.
57
+
58
+ ValidityType : Literal['DAY', 'GTC', 'GTD']
59
+ Order validity policy.
60
+
61
+ Possible values:
62
+ - ``DAY``: Valid only for the current trading session.
63
+ - ``GTC`` (*Good Till Cancelled*): Remains active until cancelled.
64
+ - ``GTD`` (*Good Till Date*): Remains active until the specified expiration date.
65
+
66
+ ValidityDate : int
67
+ Expiration date of the order when ``ValidityType`` is ``GTD``.
68
+ The format depends on the trading engine.
69
+ """
70
+
71
+ order_uuid : HexUUID
72
+ order_status : Literal['InQueue','PartiallyFilled','Cancelled','Broken','Settled']
73
+ Price : int
74
+ Volume : int
75
+ RemainedVolume : int
76
+ ExecutedVolume : int
77
+ OrderSide : Literal['Buy','Sell']
78
+ ValidityType : Literal['DAY','GTC','GTD']
79
+ ValidityDate : int
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: HedgeTech
3
- Version: 0.3.1b2
3
+ Version: 0.3.1b4
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.3.1b2
3
+ Version: 0.3.1b4
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.3.1b2"
7
+ version = "0.3.1b4"
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"
@@ -1,29 +0,0 @@
1
- # ========================================|======================================== #
2
- # Imports #
3
- # ========================================|======================================== #
4
-
5
- from typing import (
6
- NewType,
7
- TypedDict,
8
- Literal,
9
- )
10
-
11
- # ========================================|======================================== #
12
- # Class Definitions #
13
- # ========================================|======================================== #
14
-
15
- HexUUID = NewType("HexUUID", str)
16
-
17
- # +--------------------------------------------------------------------------------------+ #
18
-
19
- class OrderStatus(TypedDict):
20
-
21
- order_uuid : HexUUID
22
- order_status : Literal['InQueue','Cancelled','Broken','Settled']
23
- Price : int
24
- Volume : int
25
- RemainedVolume : int
26
- ExecutedVolume : int
27
- OrderSide : Literal['Buy','Sell']
28
- ValidityType : Literal['DAY','GTC','GTD']
29
- ValidityDate : int
File without changes
File without changes
File without changes
File without changes