Skip to content

Commit

Permalink
feeCost abs
Browse files Browse the repository at this point in the history
  • Loading branch information
frosty00 committed Apr 12, 2021
1 parent 1fd6b19 commit 3cfca58
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/bitfinex2.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ module.exports = class bitfinex2 extends bitfinex {
}
const amount = this.parseNumber (amountString);
const price = this.parseNumber (priceString);
const cost = Precise.stringMul (priceString, amountString);
const cost = this.parseNumber (Precise.stringMul (priceString, amountString));
let orderId = undefined;
let takerOrMaker = undefined;
let type = undefined;
Expand All @@ -862,7 +862,9 @@ module.exports = class bitfinex2 extends bitfinex {
orderId = this.safeString (trade, 3);
const maker = this.safeInteger (trade, 8);
takerOrMaker = (maker === 1) ? 'maker' : 'taker';
const feeCost = this.safeNumber (trade, 9);
let feeCostString = this.safeString (trade, 9);
feeCostString = (feeCostString[0] === '-') ? feeCostString.slice (1) : feeCostString;
const feeCost = this.parseNumber (feeCostString);
const feeCurrencyId = this.safeString (trade, 10);
const feeCurrency = this.safeCurrencyCode (feeCurrencyId);
fee = {
Expand Down

0 comments on commit 3cfca58

Please sign in to comment.