Added POST_ONLY_SLIDE order type.

This commit is contained in:
Geoff Taylor 2021-10-15 14:34:32 +01:00
parent 5200add28f
commit 6aa28b0897
1 changed files with 4 additions and 0 deletions

View File

@ -66,6 +66,7 @@ class OrderType(enum.Enum):
LIMIT = "LIMIT"
IOC = "IOC"
POST_ONLY = "POST_ONLY"
POST_ONLY_SLIDE = "POST_ONLY_SLIDE"
@staticmethod
def from_value(value: Decimal) -> "OrderType":
@ -83,6 +84,9 @@ class OrderType(enum.Enum):
return pyserum.enums.OrderType.IOC
elif self == OrderType.POST_ONLY:
return pyserum.enums.OrderType.POST_ONLY
elif self == OrderType.POST_ONLY_SLIDE:
# Best we can do in this situation
return pyserum.enums.OrderType.POST_ONLY
else:
return pyserum.enums.OrderType.LIMIT