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.
44 lines
652 B
Python
44 lines
652 B
Python
from enum import Enum
|
|
|
|
|
|
class OrderStatus(Enum):
|
|
NEW = 1
|
|
PENDING_NEW = 2
|
|
PARTIALLY_FILLED = 3
|
|
FILLED = 4
|
|
CANCELED = 5
|
|
REJECTED = 6
|
|
|
|
|
|
class ExecType(Enum):
|
|
NEW = 1
|
|
PENDING_NEW = 2
|
|
PARTIAL_FILL = 3
|
|
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
|