Skip to content

Commit eac2ad4

Browse files
pi314xxeroc
authored andcommitted
Update objects.py
1 parent 3377d85 commit eac2ad4

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

bitsharesbase/objects.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,29 @@ def __init__(self, *args, **kwargs):
456456
else:
457457
raise ValueError("Unknown {}".format(self.__class__.name))
458458
super().__init__(data, id)
459+
460+
461+
class LimitOrderAutoAction(Static_variant):
462+
def __init__(self, o):
463+
class Create_take_profit_order_action(GrapheneObject):
464+
def __init__(self, *args, **kwargs):
465+
kwargs.update(args[0])
466+
super().__init__(
467+
OrderedDict(
468+
[
469+
("fee_asset_id", ObjectId(kwargs["fee_asset_id"], "asset")),
470+
("spread_percent", Uint16(kwargs["spread_percent"])),
471+
("size_percent", Uint16(kwargs["size_percent"])),
472+
("expiration_seconds", Uint32(kwargs["expiration_seconds"])),
473+
("repeat", Bool(kwargs["repeat"])),
474+
("extensions", Set([])),
475+
]
476+
)
477+
)
478+
479+
id = o[0]
480+
if id == 0:
481+
data = Create_take_profit_order_action(o[1])
482+
else:
483+
raise ValueError("Unknown {}".format(self.__class__.name))
484+
super().__init__(data, id)

0 commit comments

Comments
 (0)