Skip to content

Commit

Permalink
more exchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
frosty00 committed Apr 9, 2021
1 parent ecf71ff commit fa0feff
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
12 changes: 6 additions & 6 deletions js/coingi.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ module.exports = class coingi extends Exchange {
const currencyId = this.safeString (balance['currency'], 'name');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'available');
const blocked = this.safeNumber (balance, 'blocked');
const inOrders = this.safeNumber (balance, 'inOrders');
const withdrawing = this.safeNumber (balance, 'withdrawing');
account['used'] = this.sum (blocked, inOrders, withdrawing);
account['free'] = this.safeString (balance, 'available');
const blocked = this.safeString (balance, 'blocked');
const inOrders = this.safeString (balance, 'inOrders');
const withdrawing = this.safeString (balance, 'withdrawing');
account['used'] = Precise.stringAdd (Precise.stringAdd (blocked, inOrders), withdrawing);
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchOrderBook (symbol, limit = 512, params = {}) {
Expand Down
8 changes: 4 additions & 4 deletions js/gopax.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,11 @@ module.exports = class gopax extends Exchange {
const balance = response[i];
const currencyId = this.safeString2 (balance, 'asset', 'isoAlpha3');
const code = this.safeCurrencyCode (currencyId);
const hold = this.safeNumber (balance, 'hold');
const pendingWithdrawal = this.safeNumber (balance, 'pendingWithdrawal');
const hold = this.safeString (balance, 'hold');
const pendingWithdrawal = this.safeString (balance, 'pendingWithdrawal');
const account = this.account ();
account['free'] = this.safeNumber (balance, 'avail');
account['used'] = this.sum (hold, pendingWithdrawal);
account['free'] = this.safeString (balance, 'avail');
account['used'] = Precise.stringAdd (hold, pendingWithdrawal);
result[code] = account;
}
return this.parseBalance (result);
Expand Down
4 changes: 2 additions & 2 deletions js/kraken.js
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,10 @@ module.exports = class kraken extends Exchange {
const currencyId = currencyIds[i];
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['total'] = this.safeNumber (balances, currencyId);
account['total'] = this.safeString (balances, currencyId);
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async createOrder (symbol, type, side, amount, price = undefined, params = {}) {
Expand Down
14 changes: 7 additions & 7 deletions js/kucoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1705,11 +1705,11 @@ module.exports = class kucoin extends Exchange {
const currencyId = this.safeString (data, 'currency');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeNumber (data, 'availableBalance');
account['total'] = this.safeNumber (data, 'accountEquity');
account['free'] = this.safeString (data, 'availableBalance');
account['total'] = this.safeString (data, 'accountEquity');
const result = { 'info': response };
result[code] = account;
return this.parseBalance (result);
return this.parseBalance (result, false);
} else {
const request = {
'type': type,
Expand All @@ -1734,13 +1734,13 @@ module.exports = class kucoin extends Exchange {
const currencyId = this.safeString (balance, 'currency');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['total'] = this.safeNumber (balance, 'balance');
account['free'] = this.safeNumber (balance, 'available');
account['used'] = this.safeNumber (balance, 'holds');
account['total'] = this.safeString (balance, 'balance');
account['free'] = this.safeString (balance, 'available');
account['used'] = this.safeString (balance, 'holds');
result[code] = account;
}
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}
}

Expand Down
4 changes: 2 additions & 2 deletions js/lakebtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ module.exports = class lakebtc extends Exchange {
const currencyId = currencyIds[i];
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['total'] = this.safeNumber (balances, currencyId);
account['total'] = this.safeString (balances, currencyId);
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchOrderBook (symbol, limit = undefined, params = {}) {
Expand Down
8 changes: 4 additions & 4 deletions js/southxchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ module.exports = class southxchange extends Exchange {
const balance = response[i];
const currencyId = this.safeString (balance, 'Currency');
const code = this.safeCurrencyCode (currencyId);
const deposited = this.safeNumber (balance, 'Deposited');
const unconfirmed = this.safeNumber (balance, 'Unconfirmed');
const deposited = this.safeString (balance, 'Deposited');
const unconfirmed = this.safeString (balance, 'Unconfirmed');
const account = this.account ();
account['free'] = this.safeNumber (balance, 'Available');
account['free'] = this.safeString (balance, 'Available');
account['total'] = this.sum (deposited, unconfirmed);
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchOrderBook (symbol, limit = undefined, params = {}) {
Expand Down

0 comments on commit fa0feff

Please sign in to comment.