Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
This branch is 2453 commits ahead, 544 commits behind jl777:master.


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

downloads last commit
issues issues closed pulls pulls closed
build status release version chat on Discord follow on Twitter

What is the AtomicDEX-API?

The AtomicDEX API core is open-source atomic-swap software for seamless, decentralised, peer to peer trading between almost every blockchain asset in existence. This software works with propagation of orderbooks and swap states through the libp2p protocol and uses Hash Time Lock Contracts (HTLCs) for ensuring that the two parties in a swap either mutually complete a trade, or funds return to thier original owner.

There is no 3rd party intermediary, no proxy tokens, and at all times users remain in sole possession of their private keys.

A well documented API offers simple access to the underlying services using simple language agnostic JSON structured methods and parameters such that users can communicate with the core in a variety of methods such as curl in CLI, or fully functioning desktop and mobile applications like AtomicDEX Desktop.

For a curated list of AtomicDEX based projects and resources, check out Awesome AtomicDEX.


  • Perform blockchain transactions without a local native chain (e.g. via Electrum servers)
  • Query orderbooks for all pairs within the supported coins
  • Buy/sell from the orderbook, or create maker orders
  • Configure automated "makerbot" trading with periodic price updates and optional telegram alerts

System Requirements

  • 64-bit MacOS, Windows, or Linux operating system
  • 2GB of free RAM (or more)
  • User account with admin/root privileges

Building from source

Pre-built release binaries are available for OSX, Linux or Windows.

If you want to build from source, the following prerequisites are required:

  • Rustup
  • OS specific build tools (e.g. build-essential on Linux, XCode on OSX or MSVC on Win)
  • (Optional) OSX: install openssl, e.g. brew install openssl.
  • (Optional) OSX: run LIBRARY_PATH=/usr/local/opt/openssl/lib
  • (Optional) Linux: Install libudev-dev (dpkg) or libudev-devel (rpm) package.
  • Download or compile protoc 3.21.x+ and add it to your PATH env. It is also available via package managers depending on the OS.
  • Additional Rust Components
    rustup install nightly-2022-10-29
    rustup default nightly-2022-10-29
    rustup component add rustfmt-preview

To build, run cargo build (or cargo build -vv to get verbose build output).

For more detailed instructions, please refer to the Installation Guide.

Building WASM binary

Please refer to the WASM Build Guide.


Basic config is contained in two files, MM2.json and coins

The user configuration MM2.json file contains rpc credentials, your mnemonic seed phrase, a netid (7777 is the current main network) and some extra optional parameters.

For example:

  "gui": "core_readme",
  "netid": 7777,
  "rpc_password": "Ent3r_Un1Qu3_Pa$$w0rd",

The coins file contains information about the coins and tokens you want to trade. A regularly updated version is maintained in the Komodo Platform coins repository. Pull Requests to add any coins not yet included are welcome.

To facilitate interoperability with the mm2 service, there is the adex-cli command line utility. It provides a questionnaire initialization mode to set up the configuration and obtain the proper coin set through the internet. It can also be used to start or stop the service.


To launch the AtomicDEX API, run ./mm2 (or mm2.exe in Windows)

To activate a coin:

curl --url "" --data '{
	"coin": "KMD",
	"method": "electrum",
	"servers": [
		{"url": ""},
		{"url": ""},
		{"url": ""}
	"userpass": "$userpass"

To view the orderbook for a pair:

curl --url "" --data '{

To place a buy order:

curl --url "" --data '{
  "userpass": "$userpass",
  "method": "buy",
  "base": "KMD",
  "rel": "DOGE",
  "volume": "10",
  "price": "4"

Refer to the Komodo Developer Docs for details of additional RPC methods and parameters

Project structure

mm2src - Rust code, contains some parts ported from C as is (e.g. lp_ordermatch) to reach the most essential/error prone code. Some other modules/crates are reimplemented from scratch.

Additional docs for developers


This repository contains the work in progress code of the brand new AtomicDEX API core (mm2) built mainly on Rust.
The current state can be considered as a alpha version.

WARNING: Use with test coins only or with assets which value does not exceed an amount you are willing to lose. This is alpha stage software!

Help and troubleshooting

If you have any question/want to report a bug/suggest an improvement feel free to open an issue or join the Komodo Platform Discord dev-marketmaker channel.