Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
only try to set fee when live trading, see #2358
Browse files Browse the repository at this point in the history
  • Loading branch information
askmike committed Jul 24, 2018
1 parent afefb14 commit dbd39ab
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions exchange/wrappers/binance.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,21 @@ const Trader = function(config) {
handleDrift: true,
});

// Note non standard func:
//
// On binance we might pay fees in BNB
// if we do we CANNOT calculate feePercent
// since we don't track BNB price (when we
// are not trading on a BNB market).
//
// Though we can deduce feePercent based
// on user fee tracked through `this.getFee`.
// Set default here, overwrite in getFee.
this.fee = 0.1;
// Set the proper fee asap.
this.getFee(_.noop);
if(config.key && config.secret) {
// Note non standard func:
//
// On binance we might pay fees in BNB
// if we do we CANNOT calculate feePercent
// since we don't track BNB price (when we
// are not trading on a BNB market).
//
// Though we can deduce feePercent based
// on user fee tracked through `this.getFee`.
// Set default here, overwrite in getFee.
this.fee = 0.1;
// Set the proper fee asap.
this.getFee(_.noop);
}
};

const recoverableErrors = [
Expand Down

0 comments on commit dbd39ab

Please sign in to comment.