Skip to content

Commit 37dd88f

Browse files
authored
Update trade.py
fix: 1. update stp_type to stptype 2. when time in force is IOC, remove starttm
1 parent 32e55d1 commit 37dd88f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/kraken/spot/trade.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def create_order( # pylint: disable=too-many-branches,too-many-arguments # noqa
328328
if not truncate
329329
else self.truncate(amount=volume, amount_type="volume", pair=pair)
330330
),
331-
"stp_type": stptype,
331+
"stptype": stptype,
332332
"starttm": starttm,
333333
"validate": validate,
334334
"reduce_only": reduce_only,
@@ -347,6 +347,8 @@ def create_order( # pylint: disable=too-many-branches,too-many-arguments # noqa
347347
params["trigger"] = trigger
348348
if defined(timeinforce):
349349
params["timeinforce"] = timeinforce
350+
if timeinforce == 'IOC':
351+
params.pop("starttm", None)
350352
if defined(expiretm):
351353
params["expiretm"] = str(expiretm)
352354
if defined(price):

0 commit comments

Comments
 (0)