diff --git a/dydx3/constants.py b/dydx3/constants.py index d90306e..c0672fd 100644 --- a/dydx3/constants.py +++ b/dydx3/constants.py @@ -22,8 +22,10 @@ ORDER_TYPE_LIMIT = 'LIMIT' ORDER_TYPE_MARKET = 'MARKET' ORDER_TYPE_STOP = 'STOP_LIMIT' +ORDER_TYPE_STOP_MARKET = 'STOP_MARKET' ORDER_TYPE_TRAILING_STOP = 'TRAILING_STOP' ORDER_TYPE_TAKE_PROFIT = 'TAKE_PROFIT' +ORDER_TYPE_TAKE_PROFIT_MARKET = 'TAKE_PROFIT_MARKET' # ------------ Order Side ------------ ORDER_SIDE_BUY = 'BUY' diff --git a/dydx3/modules/private.py b/dydx3/modules/private.py index e14092e..7433b18 100644 --- a/dydx3/modules/private.py +++ b/dydx3/modules/private.py @@ -459,6 +459,7 @@ def create_order( expiration=None, expiration_epoch_seconds=None, signature=None, + reduce_only=False, ): ''' Post an order @@ -486,11 +487,16 @@ def create_order( "STOP", "TRAILING_STOP", "TAKE_PROFIT", + "STOP_MARKET", + "TAKE_PROFIT_MARKET", ] :param post_only: required :type post_only: bool + :param reduce_only: optional + :type reduce_only: bool + :param size: required :type size: str @@ -578,6 +584,7 @@ def create_order( 'triggerPrice': trigger_price, 'trailingPercent': trailing_percent, 'postOnly': post_only, + 'reduceOnly': reduce_only, 'clientId': client_id, 'signature': order_signature, }