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 594a3a7 commit 6a18c1f
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 38 deletions.
6 changes: 3 additions & 3 deletions js/bl3p.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ module.exports = class bl3p extends Exchange {
const available = this.safeValue (wallet, 'available', {});
const balance = this.safeValue (wallet, 'balance', {});
const account = this.account ();
account['free'] = this.safeNumber (available, 'value');
account['total'] = this.safeNumber (balance, 'value');
account['free'] = this.safeString (available, 'value');
account['total'] = this.safeString (balance, 'value');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

parseBidAsk (bidask, priceKey = 0, amountKey = 1) {
Expand Down
4 changes: 2 additions & 2 deletions js/btcalpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ module.exports = class btcalpha extends Exchange {
const currencyId = this.safeString (balance, 'currency');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['used'] = this.safeNumber (balance, 'reserve');
account['total'] = this.safeNumber (balance, 'balance');
account['used'] = this.safeString (balance, 'reserve');
account['total'] = this.safeString (balance, 'balance');
result[code] = account;
}
return this.parseBalance (result);
Expand Down
6 changes: 3 additions & 3 deletions js/bw.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,11 @@ module.exports = class bw extends Exchange {
const currencyId = this.safeString (balance, 'currencyTypeId');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'amount');
account['used'] = this.safeNumber (balance, 'freeze');
account['free'] = this.safeString (balance, 'amount');
account['used'] = this.safeString (balance, 'freeze');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async createOrder (symbol, type, side, amount, price = undefined, params = {}) {
Expand Down
6 changes: 3 additions & 3 deletions js/bytetrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ module.exports = class bytetrade extends Exchange {
const currencyId = this.safeString (balance, 'code');
const code = this.safeCurrencyCode (currencyId, undefined);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'free');
account['used'] = this.safeNumber (balance, 'used');
account['free'] = this.safeString (balance, 'free');
account['used'] = this.safeString (balance, 'used');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchOrderBook (symbol, limit = undefined, params = {}) {
Expand Down
6 changes: 3 additions & 3 deletions js/cex.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,13 @@ module.exports = class cex extends Exchange {
const currencyId = currencyIds[i];
const balance = this.safeValue (balances, currencyId, {});
const account = this.account ();
account['free'] = this.safeNumber (balance, 'available');
account['free'] = this.safeString (balance, 'available');
// https://github.com/ccxt/ccxt/issues/5484
account['used'] = this.safeNumber (balance, 'orders', 0.0);
account['used'] = this.safeString (balance, 'orders', '0');
const code = this.safeCurrencyCode (currencyId);
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchOrderBook (symbol, limit = undefined, params = {}) {
Expand Down
6 changes: 3 additions & 3 deletions js/coinex.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,11 @@ module.exports = class coinex extends Exchange {
const code = this.safeCurrencyCode (currencyId);
const balance = this.safeValue (balances, currencyId, {});
const account = this.account ();
account['free'] = this.safeNumber (balance, 'available');
account['used'] = this.safeNumber (balance, 'frozen');
account['free'] = this.safeString (balance, 'available');
account['used'] = this.safeString (balance, 'frozen');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

parseOrderStatus (status) {
Expand Down
8 changes: 4 additions & 4 deletions js/coinmate.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ module.exports = class coinmate extends Exchange {
const code = this.safeCurrencyCode (currencyId);
const balance = this.safeValue (balances, currencyId);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'available');
account['used'] = this.safeNumber (balance, 'reserved');
account['total'] = this.safeNumber (balance, 'balance');
account['free'] = this.safeString (balance, 'available');
account['used'] = this.safeString (balance, 'reserved');
account['total'] = this.safeString (balance, 'balance');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchOrderBook (symbol, limit = undefined, params = {}) {
Expand Down
6 changes: 3 additions & 3 deletions js/coinone.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ module.exports = class coinone extends Exchange {
const balance = balances[currencyId];
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'avail');
account['total'] = this.safeNumber (balance, 'balance');
account['free'] = this.safeString (balance, 'avail');
account['total'] = this.safeString (balance, 'balance');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchOrderBook (symbol, limit = undefined, params = {}) {
Expand Down
6 changes: 3 additions & 3 deletions js/currencycom.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,11 @@ module.exports = class currencycom extends Exchange {
const currencyId = this.safeString (balance, 'asset');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'free');
account['used'] = this.safeNumber (balance, 'locked');
account['free'] = this.safeString (balance, 'free');
account['used'] = this.safeString (balance, 'locked');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchBalance (params = {}) {
Expand Down
6 changes: 3 additions & 3 deletions js/delta.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,11 +821,11 @@ module.exports = class delta extends Exchange {
const currency = this.safeValue (currenciesByNumericId, currencyId);
const code = (currency === undefined) ? currencyId : currency['code'];
const account = this.account ();
account['total'] = this.safeNumber (balance, 'balance');
account['free'] = this.safeNumber (balance, 'available_balance');
account['total'] = this.safeString (balance, 'balance');
account['free'] = this.safeString (balance, 'available_balance');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchPosition (symbol, params = undefined) {
Expand Down
8 changes: 4 additions & 4 deletions js/deribit.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,11 @@ module.exports = class deribit extends Exchange {
const currencyId = this.safeString (balance, 'currency');
const currencyCode = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'availableFunds');
account['used'] = this.safeNumber (balance, 'maintenanceMargin');
account['total'] = this.safeNumber (balance, 'equity');
account['free'] = this.safeString (balance, 'availableFunds');
account['used'] = this.safeString (balance, 'maintenanceMargin');
account['total'] = this.safeString (balance, 'equity');
result[currencyCode] = account;
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async createDepositAddress (code, params = {}) {
Expand Down
8 changes: 4 additions & 4 deletions js/digifinex.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,12 @@ module.exports = class digifinex extends Exchange {
const currencyId = this.safeString (balance, 'currency');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['used'] = this.safeNumber (balance, 'frozen');
account['free'] = this.safeNumber (balance, 'free');
account['total'] = this.safeNumber (balance, 'total');
account['used'] = this.safeString (balance, 'frozen');
account['free'] = this.safeString (balance, 'free');
account['total'] = this.safeString (balance, 'total');
result[code] = account;
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

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

0 comments on commit 6a18c1f

Please sign in to comment.