Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Superceeded by

A Python TUI for using Komodo Platform's AtomicDEX from the command line

Note: Only tested in Ubuntu 18.04 so far.

pytomicDEX TUI


Python 3.6+


pip3 install requests json subprocess python-bitcoinlib

Recommended reading



This file needs to be customised with your own RPC password and wallet passphrase. If you run the TUI without an MM2.json file, a menu option to create one will be available.
The netid value is set to 9999 by default (used for public beta testing), but can be changed to a different value to allow for testing privately (e.g. between two nodes with a unique shared netid).

cp MM2_example.json MM2.json  
nano MM2.json

Update the rpc_password, passphrase, userhome and netid (optional) to custom values.
gui Leave this as the default value MM2GUI
netid Defines the network you will trade on. 7777 is being used for released GUI apps and is the most active.
To trade directly with someone on a private network, the seller and buyer can set this to a different custom value.
rpc_password Should be at least 12 alphanumeric characters.
This authenticates the user for communicating with the mm2 daemon.
passphrase This will be used to generate your wallet addresses.
Should be 12 words minimum, 24 words are recommended.
You can use Luke Child's to generate these words (preferably offline).
userhome Set this to the home folder of the user installing this repo.



Contains additional coin parameters to activate them with mm2, defines block explorers, binance trade parameters, and which coins you want to buy/sell using the bot. The default file is populated with 20 mm2 compatible coins, iuncluding those present in the mobile app.
NOTE: You will also need a copy of the coins file from

cd ~/pytomicDEX  

Each coin in needs values as per the examples below:
tag The ticker for the coin. Must be the same as the name value in coins value.
min_swap Should be higher than the fee value in the coins file, to ensure you are sending enough funds for a successful transaction.
api-id Used to get current pricing data from the CoinGecko API.
Should be the same as the id value for the coin from
NOTE: this feature is not yet fully implemented.
activate_with Defines whether to use a native coin daemon, or an Electrum (SPV) server.
NOTE: Native mode requires the local chain to be fully sync'd, the deamon running, and the private key for your addresses imported.
reserve_balance: number of coins to keep in MM2 wallet (excess will be sent your to Binance wallet)
premium: Value relative to Binance market rate to setprices as marketmaker. E.g. a value of 1.05 will set your sell price 5% above Binance market price.
minQty; maxQty; stepSize: Values as required for setting orders on Binance, available from
bot_sell; bot_buy: Set to True or False to indicate whether or not you want the bot to buy/sell the coin.
electrum Defines the server and port to use for interacting with mm2 in lite mode.
Electrum server details can be found at (for Komodo ecosystem coins), and online for external coins (check the coin's website, github or ask the coin community).
Note the different format that is used for ETH/ERC20 tokens in the examples below.
contract This value is only required for ETH/ERC20 tokens.
The contract is always 0x8500AFc0bc5214728082163326C2FF0C73f4a871, which handles atomic swap between ETH/ERC20 tokens and other blockchains.
ETH/ERC20 tokens can all use the same Electrum SPV servers as each other.
NOTE: Trading ETH/ERC20 coins requires a sufficient ETH balance in your mm2 ETH address to cover gas fees.

Native example (needs native daemon installed with a sync'd blockchain)
        "min_swap": 0.01,
        "api-id": "komodo",
        "bot_sell": True,
        "bot_buy": True
Electrum example
        "min_swap": 0.01,
        "api-id": "komodo",
        "electrum": [{"url":""},
        "bot_sell": True,
        "bot_buy": True
Electrum example for Etherum and ERC20 tokens
        "api-id": "ethereum",
        "min_swap": 0.01,
        "electrum": ["",
        "contract": "0x8500AFc0bc5214728082163326C2FF0C73f4a871",
        "bot_sell": True,
        "bot_buy": True


This file is needed to get prices from the Binance API, and could also be used to manage deposits and withdrawls between your MM2 wallet and Binance wallets (work in progress).



No description, website, or topics provided.







No releases published


No packages published