Skip to content

Commit

Permalink
Merge branch 'farukuzun-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed May 31, 2018
2 parents 2402eaa + 2ec41cd commit 7369188
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions js/btcturk.js
Expand Up @@ -50,31 +50,32 @@ module.exports = class btcturk extends Exchange {
},
},
'markets': {
'BTC/TRY': { 'id': 'BTCTRY', 'symbol': 'BTC/TRY', 'base': 'BTC', 'quote': 'TRY', 'maker': 0.002 * 1.18, 'taker': 0.0035 * 1.18 },
'ETH/TRY': { 'id': 'ETHTRY', 'symbol': 'ETH/TRY', 'base': 'ETH', 'quote': 'TRY', 'maker': 0.002 * 1.18, 'taker': 0.0035 * 1.18 },
'XRP/TRY': { 'id': 'XRPTRY', 'symbol': 'XRP/TRY', 'base': 'XRP', 'quote': 'TRY', 'maker': 0.002 * 1.18, 'taker': 0.0035 * 1.18 },
'ETH/BTC': { 'id': 'ETHBTC', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'maker': 0.002 * 1.18, 'taker': 0.0035 * 1.18 },
'BTC/TRY': { 'id': 'BTCTRY', 'symbol': 'BTC/TRY', 'base': 'BTC', 'quote': 'TRY', 'baseId': 'btc', 'quoteId': 'try', 'maker': 0.002 * 1.18, 'taker': 0.0035 * 1.18 },
'ETH/TRY': { 'id': 'ETHTRY', 'symbol': 'ETH/TRY', 'base': 'ETH', 'quote': 'TRY', 'baseId': 'eth', 'quoteId': 'try', 'maker': 0.002 * 1.18, 'taker': 0.0035 * 1.18 },
'XRP/TRY': { 'id': 'XRPTRY', 'symbol': 'XRP/TRY', 'base': 'XRP', 'quote': 'TRY', 'baseId': 'xrp', 'quoteId': 'try', 'maker': 0.002 * 1.18, 'taker': 0.0035 * 1.18 },
'ETH/BTC': { 'id': 'ETHBTC', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc', 'maker': 0.002 * 1.18, 'taker': 0.0035 * 1.18 },
},
});
}

async fetchBalance (params = {}) {
let response = await this.privateGetBalance ();
let result = { 'info': response };
let base = {
'free': response['bitcoin_available'],
'used': response['bitcoin_reserved'],
'total': response['bitcoin_balance'],
};
let quote = {
'free': response['money_available'],
'used': response['money_reserved'],
'total': response['money_balance'],
};
let symbol = this.symbols[0];
let market = this.markets[symbol];
result[market['base']] = base;
result[market['quote']] = quote;
let codes = Object.keys (this.currencies);
for (let i = 0; i < codes.length; i++) {
let code = codes[i];
let currency = this.currencies[code];
let account = this.account ();
let free = currency['id'] + '_available';
let total = currency['id'] + '_balance';
let used = currency['id'] + '_reserved';
if (free in response) {
account['free'] = this.safeFloat (response, free);
account['total'] = this.safeFloat (response, total);
account['used'] = this.safeFloat (response, used);
}
result[code] = account;
}
return this.parseBalance (result);
}

Expand Down

0 comments on commit 7369188

Please sign in to comment.