dominiktraxl/pykrakenapi

Stop-loss-profit and stop-loss-profit-limit orders not able to execute

Closed this issue · 1 comments

Kraken's api documentation don't list 'stop-loss-profit' and 'stop-loss-profit-limit' orders as order options. But the pykrakenapi documentation lists those as valid orders.

When I use that order type, I get the error: pykrakenapi.pykrakenapi.KrakenAPIError: ['EGeneral:Invalid arguments:ordertype']

Here is my code:
order = k.add_standard_order(pair="BTCUSD", type="buy", ordertype="stop-loss-profit", volume="0.0001", price="40000", price2="45000", validate=True)

I wanted to execute an order that had both a stop loss and a take profit, which a 'stop-loss-profit' order should be able to do. Is there a workaround? Or maybe is there a way to fix this error?

Thanks for the information, the official API has been updated whereas pykrakenapi hasn't been yet. I just updated the "add_standard_order" method, so it's in line with the official API again. Let me know if there are any problems.