Skip to content

Commit

Permalink
Adding support for OrderType.MARKET.
Browse files Browse the repository at this point in the history
  • Loading branch information
darley-silva-funttastic committed Oct 19, 2023
1 parent c86f537 commit 475ce2c
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -82,13 +82,17 @@ def from_name(name: str):
def from_hummingbot(target: HummingBotOrderType):
if target == HummingBotOrderType.LIMIT:
return OrderType.LIMIT
if target == HummingBotOrderType.MARKET:
return OrderType.MARKET
else:
raise ValueError(f'Unrecognized order type "{target}".')

@staticmethod
def to_hummingbot(self):
if self == OrderType.LIMIT:
return HummingBotOrderType.LIMIT
if self == OrderType.MARKET:
return HummingBotOrderType.MARKET
else:
raise ValueError(f'Unrecognized order type "{self}".')

Expand Down

0 comments on commit 475ce2c

Please sign in to comment.