Add wallet manager to track wallet updates/snapshots

This commit is contained in:
Jacob Plaster
2018-11-28 13:28:28 +00:00
parent de750858f1
commit ee544fff31
4 changed files with 62 additions and 11 deletions

19
bfxapi/models/Wallet.py Normal file
View File

@@ -0,0 +1,19 @@
class Wallet:
def __init__(self, wType, currency, balance, unsettled_interest):
self.type = wType
self.currency = currency
self.balance = balance
self.unsettled_interest = unsettled_interest
self.key = "{}_{}".format(wType, currency)
def set_balance(self, data):
self.balance = data
def set_unsettled_interest(self, data):
self.unsettled_interest = data
def __str__(self):
return "Wallet <'{}_{}' balance='{}' unsettled='{}'>".format(
self.type, self.currency, self.balance, self.unsettled_interest)