diff --git a/cbpro/authenticated_client.py b/cbpro/authenticated_client.py index f330377f..fbd2d836 100644 --- a/cbpro/authenticated_client.py +++ b/cbpro/authenticated_client.py @@ -419,7 +419,8 @@ def place_market_order(self, product_id, side, size=None, funds=None, return self.place_order(**params) - def place_stop_order(self, product_id, stop_type, price, size=None, funds=None, + def place_stop_order(self, product_id, stop_type, price, limit_price=None, + size=None, funds=None, client_oid=None, stp=None, overdraft_enabled=None, @@ -432,6 +433,7 @@ def place_stop_order(self, product_id, stop_type, price, size=None, funds=None, loss: Triggers when the last trade price changes to a value at or below the stop_price. entry: Triggers when the last trade price changes to a value at or above the stop_price price (Decimal): Desired price at which the stop order triggers. + limit_price (Decimal): Limit price when stop order is triggered (defaults to stop price) size (Optional[Decimal]): Desired amount in crypto. Specify this or `funds`. funds (Optional[Decimal]): Desired amount of quote currency to use. @@ -460,7 +462,7 @@ def place_stop_order(self, product_id, stop_type, price, size=None, funds=None, params = {'product_id': product_id, 'side': side, - 'price': price, + 'price': price if limit_price is None else limit_price, 'order_type': None, 'stop': stop_type, 'stop_price': price,