chore: Add security type to py reqs
Venue and sec name alone don't always identify a unique security.
This commit is contained in:
1 parent
1f67456cc5
commit
399f9e61e2
15 files changed
+88
-1
No files matched your search
@@ -381,7 +381,7 @@ class BybitExecutionGateway(ExecutionGateway):
|
||||
bts_id=bts_id,
|
||||
exch_id=exch_ord_id,
|
||||
exch_sec_id=req.exchange_security_id(),
|
||||
sec_type=SecurityType.FUTURE,
|
||||
sec_type=SecurityType.parse(req.security_type()),
|
||||
is_buy=req.is_buy(),
|
||||
order_type=OrderType.parse(req.order_type()),
|
||||
time_in_force=TimeInForce.parse(req.time_in_force()),
|
||||
|
||||
@@ -18,6 +18,7 @@ class ExecType(Enum):
|
||||
CANCELED = 5
|
||||
REJECTED = 6
|
||||
|
||||
|
||||
class OrderType(Enum):
|
||||
LIMIT = 1
|
||||
MARKET = 2
|
||||
@@ -37,7 +38,12 @@ class TimeInForce(Enum):
|
||||
def parse(s: str):
|
||||
return TimeInForce.__members__[s]
|
||||
|
||||
|
||||
class SecurityType(Enum):
|
||||
SPOT = 1
|
||||
FUTURE = 2
|
||||
OPTION = 3
|
||||
|
||||
@staticmethod
|
||||
def parse(s: str):
|
||||
return SecurityType.__members__[s]
|
||||
Reference in new issue
Block a user