HedgeTech 0.2.4__tar.gz → 0.2.5__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.4 → hedgetech-0.2.5}/HedgeTech/EmsEngine/__tse_ifb/__AsyncClient.py +80 -64
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/EmsEngine/__tse_ifb/__SyncClient.py +82 -65
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech.egg-info/PKG-INFO +1 -1
- {hedgetech-0.2.4 → hedgetech-0.2.5}/PKG-INFO +1 -1
- {hedgetech-0.2.4 → hedgetech-0.2.5}/pyproject.toml +1 -1
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/Auth/__AuthAsyncClient.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/Auth/__AuthSyncClient.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/Auth/__init__.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/Auth/__utils/__RetriableAsyncClient.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/Auth/__utils/__RetriableSyncClient.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/Auth/__utils/__init__.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/DataEngine/__init__.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/DataEngine/__tse_ifb/__AsyncClient.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/DataEngine/__tse_ifb/__SyncClient.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/DataEngine/__tse_ifb/__init__.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/DataEngine/__tse_ifb/__io_types/__init__.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/DataEngine/__tse_ifb/__io_types/__response.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/EmsEngine/__init__.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/EmsEngine/__tse_ifb/__init__.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/EmsEngine/__tse_ifb/__io_types/__init__.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech/EmsEngine/__tse_ifb/__io_types/__response.py +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech.egg-info/SOURCES.txt +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech.egg-info/dependency_links.txt +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech.egg-info/requires.txt +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/HedgeTech.egg-info/top_level.txt +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/LICENSE +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/NOTICE +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/README.md +0 -0
- {hedgetech-0.2.4 → hedgetech-0.2.5}/setup.cfg +0 -0
|
@@ -118,20 +118,24 @@ class Order:
|
|
|
118
118
|
'953097ac6ced45ca8ef205b76ca6faf2'
|
|
119
119
|
"""
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
try :
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
if self.OrderId is None :
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
SendOrder_Response = await self.__AuthASyncClient.httpx_Client.post(**self.__SendOrder_RequestInfo)
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
match SendOrder_Response.status_code :
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
case 200 :
|
|
130
|
+
|
|
131
|
+
self.OrderId = SendOrder_Response.json()['Data']['order_uuid']
|
|
132
|
+
return None
|
|
133
|
+
|
|
134
|
+
case _ : return None
|
|
135
|
+
|
|
136
|
+
else : return None
|
|
137
|
+
|
|
138
|
+
except : return None
|
|
135
139
|
|
|
136
140
|
# +--------------------------------------------------------------------------------------+ #
|
|
137
141
|
async def Edit(
|
|
@@ -177,38 +181,42 @@ class Order:
|
|
|
177
181
|
)
|
|
178
182
|
"""
|
|
179
183
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
Edit_response = await self.__AuthASyncClient.httpx_Client.patch(
|
|
183
|
-
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/edit',
|
|
184
|
-
data={
|
|
185
|
-
'order_uuid' : self.OrderId,
|
|
186
|
-
'Order_ValidityType' : Order_ValidityType,
|
|
187
|
-
'ValidityDate' : ValidityDate,
|
|
188
|
-
'Price' : Price,
|
|
189
|
-
'Volume' : Volume
|
|
190
|
-
}
|
|
191
|
-
)
|
|
184
|
+
try :
|
|
192
185
|
|
|
186
|
+
if self.OrderId is not None:
|
|
193
187
|
|
|
194
|
-
|
|
188
|
+
Edit_response = await self.__AuthASyncClient.httpx_Client.patch(
|
|
189
|
+
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/edit',
|
|
190
|
+
data={
|
|
191
|
+
'order_uuid' : self.OrderId,
|
|
192
|
+
'Order_ValidityType' : Order_ValidityType,
|
|
193
|
+
'ValidityDate' : ValidityDate,
|
|
194
|
+
'Price' : Price,
|
|
195
|
+
'Volume' : Volume
|
|
196
|
+
}
|
|
197
|
+
)
|
|
195
198
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
Edit_response = Edit_response.json()
|
|
199
|
+
|
|
200
|
+
match Edit_response.status_code:
|
|
199
201
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
case 200:
|
|
203
|
+
|
|
204
|
+
Edit_response = Edit_response.json()
|
|
205
|
+
|
|
206
|
+
self.OrderId = Edit_response['Data']['order_uuid']
|
|
207
|
+
self.ValidityType = Edit_response['Data']['order_validity_type']
|
|
208
|
+
self.ValidityDate = ValidityDate
|
|
209
|
+
self.Price = Edit_response['Data']['order_price']
|
|
210
|
+
self.Volume = Edit_response['Data']['order_volume']
|
|
211
|
+
|
|
212
|
+
return None
|
|
213
|
+
|
|
214
|
+
case _ : return None
|
|
205
215
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
case _ : return None
|
|
209
|
-
|
|
210
|
-
else : return None
|
|
216
|
+
else : return None
|
|
211
217
|
|
|
218
|
+
except : return None
|
|
219
|
+
|
|
212
220
|
# +--------------------------------------------------------------------------------------+ #
|
|
213
221
|
|
|
214
222
|
async def Status(self)-> OrderStatus | None:
|
|
@@ -246,24 +254,27 @@ class Order:
|
|
|
246
254
|
'ValidityDate': 0
|
|
247
255
|
}
|
|
248
256
|
"""
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
status_respnse = await self.__AuthASyncClient.httpx_Client.get(
|
|
253
|
-
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/status',
|
|
254
|
-
params={'order_uuid' : self.OrderId}
|
|
255
|
-
)
|
|
257
|
+
try :
|
|
258
|
+
|
|
259
|
+
if self.OrderId is not None:
|
|
256
260
|
|
|
257
|
-
|
|
261
|
+
status_respnse = await self.__AuthASyncClient.httpx_Client.get(
|
|
262
|
+
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/status',
|
|
263
|
+
params={'order_uuid' : self.OrderId}
|
|
264
|
+
)
|
|
258
265
|
|
|
259
|
-
|
|
266
|
+
match status_respnse.status_code :
|
|
260
267
|
|
|
261
|
-
|
|
268
|
+
case 200:
|
|
269
|
+
|
|
270
|
+
return status_respnse.json()['Data']
|
|
271
|
+
|
|
272
|
+
case _ : return None
|
|
262
273
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
else : return None
|
|
274
|
+
else : return None
|
|
266
275
|
|
|
276
|
+
except : return None
|
|
277
|
+
|
|
267
278
|
# +--------------------------------------------------------------------------------------+ #
|
|
268
279
|
|
|
269
280
|
async def Delete(self)-> None:
|
|
@@ -283,26 +294,30 @@ class Order:
|
|
|
283
294
|
>>> print(order.is_deleted)
|
|
284
295
|
True
|
|
285
296
|
"""
|
|
286
|
-
|
|
287
|
-
if self.OrderId is not None:
|
|
288
297
|
|
|
289
|
-
|
|
290
|
-
url= 'https://core.hedgetech.ir/ems-engine/tse-ifb/order/delete',
|
|
291
|
-
params={'order_uuid' : self.OrderId}
|
|
292
|
-
)
|
|
298
|
+
try :
|
|
293
299
|
|
|
294
|
-
|
|
295
|
-
|
|
300
|
+
if self.OrderId is not None:
|
|
301
|
+
|
|
302
|
+
Delete_respnse = await self.__AuthASyncClient.httpx_Client.delete(
|
|
303
|
+
url= 'https://core.hedgetech.ir/ems-engine/tse-ifb/order/delete',
|
|
304
|
+
params={'order_uuid' : self.OrderId}
|
|
305
|
+
)
|
|
296
306
|
|
|
297
|
-
|
|
307
|
+
|
|
308
|
+
match Delete_respnse.status_code :
|
|
298
309
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
310
|
+
case 200:
|
|
311
|
+
|
|
312
|
+
self.is_deleted = True
|
|
313
|
+
return None
|
|
314
|
+
|
|
315
|
+
case _ : return None
|
|
316
|
+
|
|
317
|
+
else : return None
|
|
305
318
|
|
|
319
|
+
except : return None
|
|
320
|
+
|
|
306
321
|
# ================================================================================= #
|
|
307
322
|
|
|
308
323
|
class EmsEngine_TseIfb_AsyncClient:
|
|
@@ -369,6 +384,7 @@ class EmsEngine_TseIfb_AsyncClient:
|
|
|
369
384
|
OMS : Literal[
|
|
370
385
|
'Omex | Parsian',
|
|
371
386
|
'Sahra | Karamad',
|
|
387
|
+
'Sahra | NIBB',
|
|
372
388
|
]
|
|
373
389
|
)-> ImageFile:
|
|
374
390
|
|
|
@@ -122,20 +122,24 @@ class Order:
|
|
|
122
122
|
'0xA23F...'
|
|
123
123
|
"""
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
try :
|
|
126
|
+
|
|
127
|
+
if self.OrderId is None :
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
SendOrder_Response = self.__AuthSyncClient.httpx_Client.post(**self.__SendOrder_RequestInfo)
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
self.OrderId = SendOrder_Response.json()['Data']['order_uuid']
|
|
134
|
-
return None
|
|
131
|
+
match SendOrder_Response.status_code :
|
|
135
132
|
|
|
136
|
-
|
|
133
|
+
case 200 :
|
|
134
|
+
|
|
135
|
+
self.OrderId = SendOrder_Response.json()['Data']['order_uuid']
|
|
136
|
+
return None
|
|
137
|
+
|
|
138
|
+
case _ : return None
|
|
139
|
+
|
|
140
|
+
else : return None
|
|
137
141
|
|
|
138
|
-
|
|
142
|
+
except : return None
|
|
139
143
|
|
|
140
144
|
# +--------------------------------------------------------------------------------------+ #
|
|
141
145
|
|
|
@@ -189,37 +193,41 @@ class Order:
|
|
|
189
193
|
)
|
|
190
194
|
"""
|
|
191
195
|
|
|
192
|
-
|
|
196
|
+
try :
|
|
193
197
|
|
|
194
|
-
|
|
195
|
-
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/edit',
|
|
196
|
-
data={
|
|
197
|
-
'order_uuid' : self.OrderId,
|
|
198
|
-
'Order_ValidityType' : Order_ValidityType,
|
|
199
|
-
'ValidityDate' : ValidityDate,
|
|
200
|
-
'Price' : Price,
|
|
201
|
-
'Volume' : Volume
|
|
202
|
-
}
|
|
203
|
-
)
|
|
198
|
+
if self.OrderId is not None:
|
|
204
199
|
|
|
205
|
-
|
|
206
|
-
|
|
200
|
+
Edit_response = self.__AuthSyncClient.httpx_Client.patch(
|
|
201
|
+
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/edit',
|
|
202
|
+
data={
|
|
203
|
+
'order_uuid' : self.OrderId,
|
|
204
|
+
'Order_ValidityType' : Order_ValidityType,
|
|
205
|
+
'ValidityDate' : ValidityDate,
|
|
206
|
+
'Price' : Price,
|
|
207
|
+
'Volume' : Volume
|
|
208
|
+
}
|
|
209
|
+
)
|
|
207
210
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
Edit_response = Edit_response.json()
|
|
211
|
-
|
|
212
|
-
self.OrderId = Edit_response['Data']['order_uuid']
|
|
213
|
-
self.ValidityType = Edit_response['Data']['order_validity_type']
|
|
214
|
-
self.ValidityDate = ValidityDate
|
|
215
|
-
self.Price = Edit_response['Data']['order_price']
|
|
216
|
-
self.Volume = Edit_response['Data']['order_volume']
|
|
211
|
+
|
|
212
|
+
match Edit_response.status_code:
|
|
217
213
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
214
|
+
case 200:
|
|
215
|
+
|
|
216
|
+
Edit_response = Edit_response.json()
|
|
217
|
+
|
|
218
|
+
self.OrderId = Edit_response['Data']['order_uuid']
|
|
219
|
+
self.ValidityType = Edit_response['Data']['order_validity_type']
|
|
220
|
+
self.ValidityDate = ValidityDate
|
|
221
|
+
self.Price = Edit_response['Data']['order_price']
|
|
222
|
+
self.Volume = Edit_response['Data']['order_volume']
|
|
223
|
+
|
|
224
|
+
return None
|
|
225
|
+
|
|
226
|
+
case _ : return None
|
|
227
|
+
|
|
228
|
+
else : return None
|
|
229
|
+
|
|
230
|
+
except : return None
|
|
223
231
|
|
|
224
232
|
# +--------------------------------------------------------------------------------------+ #
|
|
225
233
|
|
|
@@ -310,22 +318,26 @@ class Order:
|
|
|
310
318
|
}
|
|
311
319
|
"""
|
|
312
320
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
status_respnse = self.__AuthSyncClient.httpx_Client.get(
|
|
316
|
-
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/status',
|
|
317
|
-
params={'order_uuid' : self.OrderId}
|
|
318
|
-
)
|
|
321
|
+
try :
|
|
319
322
|
|
|
320
|
-
|
|
323
|
+
if self.OrderId is not None:
|
|
324
|
+
|
|
325
|
+
status_respnse = self.__AuthSyncClient.httpx_Client.get(
|
|
326
|
+
url='https://core.hedgetech.ir/ems-engine/tse-ifb/order/status',
|
|
327
|
+
params={'order_uuid' : self.OrderId}
|
|
328
|
+
)
|
|
321
329
|
|
|
322
|
-
|
|
330
|
+
match status_respnse.status_code :
|
|
323
331
|
|
|
324
|
-
|
|
332
|
+
case 200:
|
|
333
|
+
|
|
334
|
+
return status_respnse.json()['Data']
|
|
335
|
+
|
|
336
|
+
case _ : return None
|
|
325
337
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
338
|
+
else : return None
|
|
339
|
+
|
|
340
|
+
except : return None
|
|
329
341
|
|
|
330
342
|
# +--------------------------------------------------------------------------------------+ #
|
|
331
343
|
|
|
@@ -351,24 +363,28 @@ class Order:
|
|
|
351
363
|
True
|
|
352
364
|
"""
|
|
353
365
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
url= 'https://core.hedgetech.ir/ems-engine/tse-ifb/order/delete',
|
|
358
|
-
params={'order_uuid' : self.OrderId}
|
|
359
|
-
)
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
match Delete_respnse.status_code :
|
|
366
|
+
try :
|
|
367
|
+
|
|
368
|
+
if self.OrderId is not None:
|
|
363
369
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
self.
|
|
367
|
-
|
|
370
|
+
Delete_respnse = self.__AuthSyncClient.httpx_Client.delete(
|
|
371
|
+
url= 'https://core.hedgetech.ir/ems-engine/tse-ifb/order/delete',
|
|
372
|
+
params={'order_uuid' : self.OrderId}
|
|
373
|
+
)
|
|
368
374
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
375
|
+
|
|
376
|
+
match Delete_respnse.status_code :
|
|
377
|
+
|
|
378
|
+
case 200:
|
|
379
|
+
|
|
380
|
+
self.is_deleted = True
|
|
381
|
+
return None
|
|
382
|
+
|
|
383
|
+
case _ : return None
|
|
384
|
+
|
|
385
|
+
else : return None
|
|
386
|
+
|
|
387
|
+
except : return None
|
|
372
388
|
|
|
373
389
|
# ================================================================================= #
|
|
374
390
|
|
|
@@ -401,6 +417,7 @@ class EmsEngine_TseIfb_SyncClient:
|
|
|
401
417
|
OMS : Literal[
|
|
402
418
|
'Omex | Parsian',
|
|
403
419
|
'Sahra | Karamad',
|
|
420
|
+
'Sahra | NIBB',
|
|
404
421
|
]
|
|
405
422
|
)-> ImageFile:
|
|
406
423
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HedgeTech
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
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.5
|
|
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.5"
|
|
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
|