From 72df3c1d702baf749140cf6c2acc22007a445bd0 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Mon, 25 Mar 2019 16:26:01 +0100 Subject: [PATCH] Fix market.accounttrades #169 --- bitshares/price.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bitshares/price.py b/bitshares/price.py index 79931334..fa05d52b 100644 --- a/bitshares/price.py +++ b/bitshares/price.py @@ -237,7 +237,11 @@ def __init__(self, order, **kwargs): elif isinstance(order, dict): # filled orders from account history if "op" in order: - order = order["op"][1] + if isinstance(order["op"], (list, set)): + order = order["op"][1] + elif isinstance(order["op"], dict): + order = order["op"] + base_asset = kwargs.get("base_asset", order["receives"]["asset_id"]) Price.__init__(self, order, base_asset=base_asset)