Skip to content

Commit

Permalink
Merge branch 'kucoin-balance' of https://github.com/samgermain/ccxt i…
Browse files Browse the repository at this point in the history
…nto kucoin-balance
  • Loading branch information
samgermain committed Mar 16, 2022
2 parents 14a5ca8 + fc476ec commit 34e32a6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions js/kucoinfutures.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ module.exports = class kucoinfutures extends kucoin {
'version': 'v1',
'symbolSeparator': '-',
'defaultType': 'swap',
'defaultCode': 'USDT',
'code': 'USDT',
'marginTypes': {},
// endpoint versions
'versions': {
Expand All @@ -288,6 +288,10 @@ module.exports = class kucoinfutures extends kucoin {
'ERC20': 'eth',
'TRC20': 'trx',
},
// 'code': 'BTC',
// 'fetchBalance': {
// 'code': 'BTC',
// },
},
});
}
Expand Down Expand Up @@ -1252,8 +1256,10 @@ module.exports = class kucoinfutures extends kucoin {
async fetchBalance (params = {}) {
await this.loadMarkets ();
// only fetches one balance at a time
const defaultCode = this.safeString (this.options, 'defaultCode');
const code = this.safeString2 (params, 'code', 'currency', defaultCode);
let defaultCode = this.safeString (this.options, 'code');
const fetchBalanceOptions = this.safeValue (this.options, 'fetchBalance', {});
defaultCode = this.safeString (fetchBalanceOptions, 'code', defaultCode);
const code = this.safeString (params, 'code', defaultCode);
const currency = this.currency (code);
const request = {
'currency': currency['id'],
Expand Down

0 comments on commit 34e32a6

Please sign in to comment.