ERC dEX Automation Toolkit
Last updated 2 years ago by lukeautry .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @ercdex/mm 
SYNC missed versions from official npm registry.
Deprecation Notice: 

The previous Electron based Automation Toolkit is no longer supported. We apologize for any inconvenience.


The ERC dEX Automation Toolkit allows traders to create custom trading strategies that will be executed autonomously. Using the dashboard (or a scripting language of your choice, described below), the user creates Markets (e.g. ZRX/WETH), then adds Bands to that market that specify desired price spreads. When a Market is active, Bands will deploy and cancel ERC dEX Orders in accordance with the user defined strategy.


  • Node.js 8+ should be installed
  • Yarn: yarn global add @ercdex/mm
  • NPM: npm install @ercdex/mm -g


Importing Private Key

` ercdex-mm import

Options: --passphrase, -p Passphrase to protect private key [required] --privateKey, -k Wallet private key [required] --out, -o Full path (including file name) to output key store JSON [default: "./store.json"] `

Start Dashboard

ercdex-mm start

Start the bot

  --network, -n     ERC dEX Network
   [choices: "app.ercdex.com", "kovan.ercdex.com", "staging.ercdex.com",
   "kovan-staging.ercdex.com", "localhost:8443"] [default: "app.ercdex.com"]
  --passphrase, -p  Passphrase                                        [required]
  --workDir, -w     Working directory (where persistent data/configuration files
                    are stored)                                   [default: "."]
  --storePath, -s   Location of key store file         [default: "./store.json"]


A Market describes a persistent configuration that facilates the buying and selling of a token pair. An example of a market is "ZRX/WETH", which means that ZRX is being bought and sold in exchange for WETH. A market is created with parameters that describe the range and amount of assets that are available for trading. At a high level, a Market is responsible for maintaining a trader's overall desired position in the market as prices change.

A Band belongs to a Market - a Market can have multiple bands. A band specifies a price spread and some constraints on how much of an asset should be traded within that band. Bands are responsible for deploying Orders, and a Band can contain multiple Orders at a given time.

An Order represents a signed and deployed ERC dEX order. Orders can move between bands in response to price action. If an Order moves out of the specified price range of any band, it may be canceled.

Architecture and Design Considerations

Automated trading for decentralized platforms presents unique challenges not seen in traditional, centralized changes. Trading tools for decentralized applications have to be designed in a way that acknowledges these challenges and optimizes around them. Below, we'll describe some of the challenges of decentralized platforms and how we handle those issues with the toolkit.

Signing Requirements

Unlike centralized exchanges, which expose simple, centralized endpoints for order creation and cancelation, decentralized exchanges depend on off-chain signing and sending transactions to the Ethereum blockchain as the primary way to authorize actions. As a result, any decentralized trading system requires a local wallet implementation that supports signing. The toolkit includes a minimal light client, enabling 'headless' operation.




When you first begin, you'll need to create a new market.

Create Market

  • Label: Unique Identifier of the Market
  • Token Pair: Assets being traded
  • Parameters
    • Initial Amount: This is the initial amount available for trading. Orders will be allocated to match this amount or the available token balance, whichever is higher.
    • Minimum Amount: This is the minimum amount of an asset that should be reserved. If the asset amount dips below this amount, the market will be paused and will require intervention from a market operator.
    • Minimum Ether Amount: This is the minimum amount of Ether that should be contained in the account at any time. If the available about dips below this amount, the market will be paused and will require intervention from a market operator.


By default, a market will have no bands; the first step in actually deploying a market is to create bands that specify desirable positions.

Create Bands

  • Spread BPS: The spread is defined as the different between the market price on a side (buy or sell) and the midpoint price or market price. 1 bp (basis point) = .1% = .0001
  • Tolerance BPS: The tolerance specifies how far in BPS the market price can move before an order is considered out of band
  • Weight Weight represents how much a band consumes of the Total Market Commitment (TMC).
  • Minimum Weight Minimum weight commitment for a particular band; if deployed orders are filled below this amount, additional orders will be created to keep the band fully committed
  • Duration Expiration period of deployed orders in seconds. Limited to 300-1200 seconds (5-20 minutes).


By default, a market is in the "stopped" state, meaning that orders are not being deployed. To begin order deployment and automated position maintenance, click the "Start" button. Verify that the orders have been created by viewing the market in ERC dEX or by viewing band logs.

To stop a market, click the "Stop Market" button.

Markets can be deleted with the "Delete" button; the Market must be stopped before deletion is possible.


Windows users may run into various issues around node-gyp, Python (if Python is not installed), and more. Install MS build tools to fix these issues:

npm install --global --production windows-build-tools


(Yarn users) yarn config set msvs_version 2015 --global (NPM users) npm config set msvs_version 2015 --global

Current Tags

  • 1.0.19                                ...           latest (2 years ago)

19 Versions

  • 1.0.19                                ...           2 years ago
  • 1.0.18                                ...           2 years ago
  • 1.0.17                                ...           2 years ago
  • 1.0.16                                ...           2 years ago
  • 1.0.15                                ...           2 years ago
  • 1.0.14                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.12                                ...           2 years ago
  • 1.0.11                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 20
Last Day 0
Last Week 19
Last Month 1
Dependencies (16)
Dev Dependencies (52)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |