Skip to content

Commit

Permalink
tradingFees
Browse files Browse the repository at this point in the history
  • Loading branch information
pcriadoperez committed Mar 10, 2022
1 parent 5e49319 commit 138a1b5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions js/bitflyer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ module.exports = class bitflyer extends Exchange {
'fetchPositions': true,
'fetchTicker': true,
'fetchTrades': true,
'fetchTradingFee': true,
'fetchTradingFees': true,
'fetchWithdrawals': true,
'withdraw': true,
},
Expand Down Expand Up @@ -416,6 +418,27 @@ module.exports = class bitflyer extends Exchange {
return this.parseTrades (response, market, since, limit);
}

async fetchTradingFee (symbol, params = {}) {
await this.loadMarkets ();
const market = this.market (symbol);
const request = {
'product_code': market['id'],
}
const response = await this.privateGetGettradingcommission (this.extend (request, params));
//
// {
// commission_rate: '0.0020'
// }
//
const fee = this.safeNumber (response, 'commission_rate');
return {
'info': response,
'symbol': symbol,
'maker': fee,
'taker': fee,
}
}

async createOrder (symbol, type, side, amount, price = undefined, params = {}) {
await this.loadMarkets ();
const request = {
Expand Down

0 comments on commit 138a1b5

Please sign in to comment.