Skip to content

Commit

Permalink
feat: test markets for taker and maker fees
Browse files Browse the repository at this point in the history
  • Loading branch information
lead4good committed May 13, 2020
1 parent a99c32c commit f809d9e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.git
.dockerignore
Dockerfile
node_modules
*.swp
*.pyc
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ RUN sed -i 's/archive\.ubuntu\.com/us\.archive\.ubuntu\.com/' /etc/apt/sources.l
&& apt-get install -y --no-install-recommends python3 python3-pip \
&& pip3 install --upgrade setuptools \
&& pip3 install tox \
# Copy files to workdir to && install scripts against it (will be replaced with a live-mounted volume at startup)
&& mkdir -p /ccxt \
&& rm -rf /ccxt/node_modules \
# Installs as a local Node & Python module, so that `require ('ccxt')` and `import ccxt` should work after that
&& npm install \
&& ln -s /ccxt /usr/lib/node_modules/ \
Expand Down
17 changes: 16 additions & 1 deletion js/test/Exchange/test.market.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ const log = require ('ololog')
, chai = require ('chai')
, expect = chai.expect
, assert = chai.assert
, skippedExchanges = [
"_1btcxe", "acx", "bitfinex2", "bitmax", "bitmart",
"bitstamp", "crex24", "digifinex", "hollaex",
"hbtc", "idex", "independentreserve", "lykke",
]

/* ------------------------------------------------------------------------ */

Expand Down Expand Up @@ -56,4 +61,14 @@ module.exports = (exchange, market, method) => {

// log (market)

}
if (skippedExchanges.includes (exchange.id)) return
if (exchange.has['fetchFees'] || exchange.has['fetchTradingFees']) return

const formatFees = {
'maker': 0.0, // float, maker fee in pct or relative value
'taker': 0.0, // float, maker fee in pct or relative value
}

expect (market).to.deep.include.all.keys (formatFees)

}

0 comments on commit f809d9e

Please sign in to comment.