Skip to content
Prev Previous commit
Next Next commit
Fix PythPriceAccount to_json.
  • Loading branch information
tnedev committed Feb 10, 2022
commit 10503f371f4538979326dfce641910d6f5936663
6 changes: 3 additions & 3 deletions pythclient/pythaccounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,16 +609,16 @@ def __str__(self) -> str:
def to_json(self):

return {
"product": self.product,
"product": self.product.to_json(),
"price_type": self.price_type.name,
"exponent": self.exponent,
"num_components": self.num_components,
"last_slot": self.last_slot,
"valid_slot": self.valid_slot,
"product_account_key": self.product_account_key,
"next_price_account_key": self.next_price_account_key,
"aggregate_price_info": self.aggregate_price_info,
"price_components": self.price_components,
"aggregate_price_info": self.aggregate_price_info.to_json(),
"price_components": [x.to_json() for x in self.price_components],
"derivations": [TwEmaType(x).name for x in list(self.derivations.keys())],
"min_publishers": self.min_publishers,
"aggregate_price": self.aggregate_price,
Expand Down