Open skubarenko opened 6 years ago
I agree with returning a CurrencyBalance instance instead of a number for getBalance method. What about of getting balance of all currencies. We need to check this functionality in all exchanges before we start doing implementation.
As for now, the base exchange service has the
getBalance
method with the following signature:This method returns a number, though mostly exchanges (Binance, Bitfinex, KuCoin etc) return no just a number but an object which contains a whole balance of currency and a locked balance. So I suggest to change the signature of the getBalance method to:
where the CurrencyBalance is the following interface:
Also, I want to add overloads for the
getBalance
methodwhere AccountBalance is the following interface:
The instance of the
AccountBalance
interface:As a result, the
ExchangeService
interface will have these two overloads: