fix: Fire reject report if order ack has errors

Rejects are ONLY observable in the order ack, not the execution report
stream from which all other updates are observed. While the pybit sdk
does expose ack callbacks, it doesn't invoke them on rejects/errors.
This commit is contained in:
John Colvin committed 2025-06-20 16:37:47 +00:00
1 parent 02626ce35c
commit 27cbd51b1c
8 files changed
+231 -50

No files matched your search

@@ -17,3 +17,27 @@ class ExecType(Enum):
FILL = 4
CANCELED = 5
REJECTED = 6
class OrderType(Enum):
LIMIT = 1
MARKET = 2
ICEBERG = 3
SPREADER = 4
@staticmethod
def parse(s: str):
return OrderType.__members__[s]
class TimeInForce(Enum):
FOK = 1
GTC = 2
@staticmethod
def parse(s: str):
return TimeInForce.__members__[s]
class SecurityType(Enum):
SPOT = 1
FUTURE = 2
OPTION = 3