Skip to content

Commit

Permalink
fixed get_symbol_price_ticker missing response parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
chairz committed Apr 16, 2021
1 parent d1e99a6 commit 7521fa8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions binance_d/model/symbolprice.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ class SymbolPrice:
def __init__(self):
self.symbol = ""
self.price = 0.0
self.time = 0
self.ps = ""

@staticmethod
def json_parse(json_data):
result = SymbolPrice()
result.symbol = json_data.get_string("symbol")
result.ps = json_data.get_string("ps")
result.price = json_data.get_float("price")
result.time = json_data.get_int("time")
return result
2 changes: 2 additions & 0 deletions binance_f/model/symbolprice.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ class SymbolPrice:
def __init__(self):
self.symbol = ""
self.price = 0.0
self.time = 0

@staticmethod
def json_parse(json_data):
result = SymbolPrice()
result.symbol = json_data.get_string("symbol")
result.price = json_data.get_float("price")
result.time = json_data.get_int("time")
return result

0 comments on commit 7521fa8

Please sign in to comment.