File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 2020
2121from __future__ import annotations
2222
23+ import json
2324from typing import Self
2425
2526from kraken .base_api import FuturesClient , defined
@@ -239,7 +240,7 @@ def create_batch_order(
239240 }
240241 """
241242 batchorder : dict = {"batchOrder" : batchorder_list }
242- params = {"json" : f" { batchorder } " }
243+ params = {"json" : json . dumps ( batchorder ) }
243244 if processBefore :
244245 params ["processBefore" ] = processBefore
245246
Original file line number Diff line number Diff line change @@ -198,6 +198,16 @@ def test_create_batch_order(futures_demo_trade: Trade) -> None:
198198 "limitPrice" : 2.00 ,
199199 "stopPrice" : 3.00 ,
200200 },
201+ {
202+ "order" : "send" ,
203+ "order_tag" : "3" ,
204+ "orderType" : "post" ,
205+ "symbol" : "PI_XBTUSD" ,
206+ "side" : "buy" ,
207+ "size" : 5 ,
208+ "limitPrice" : 1.00 ,
209+ "reduceOnly" : True ,
210+ },
201211 ],
202212 processBefore = "3033-11-08T19:56:35.441899Z" ,
203213 ),
You can’t perform that action at this time.
0 commit comments