Skip to content

Commit

Permalink
Merge pull request #81 from TrooperCrypto/master
Browse files Browse the repository at this point in the history
fix sell and buy order splits
  • Loading branch information
0xtrooper authored May 21, 2022
2 parents 21d544c + 56dba8a commit 861070c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions marketmaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,8 @@ function indicateLiquidity (pairs = MM_CONFIG.pairs) {
// check if balance passes the min liquidity size - 10 USD
const usdBaseBalance = baseBalance * marketInfo.baseAsset.usdPrice;
const usdQuoteBalance = quoteBalance * marketInfo.quoteAsset.usdPrice;
if (usdBaseBalance < (10 * buySplits)) buySplits = Math.floor(usdBaseBalance / 10)
if (usdQuoteBalance < (10 * sellSplits)) sellSplits = Math.floor(usdQuoteBalance / 10)
if (usdQuoteBalance < (10 * buySplits)) buySplits = Math.floor(usdQuoteBalance / 10)
if (usdBaseBalance < (10 * sellSplits)) sellSplits = Math.floor(usdBaseBalance / 10)

const liquidity = [];
for (let i=1; i <= buySplits; i++) {
Expand Down

0 comments on commit 861070c

Please sign in to comment.