Written by ikomodomylo on April 30, 2020

AtomicDEX Orderbook Tutorial - Part 1

Welcome to the first easy to explore full stack atomic swap project available for public use! All source code is open source with documentation to satisfy most curious souls. This page will be updated from time to time as the Komodo atomicDEX API comes out of beta and into full release stage. For now, everything is pretty stable in the core with not many changes to external facing APIs. This docker image serves visitors of the orderbook public app. On 30th April 2020, the orderbook demo is running version 0.7.8 backend available from the docker hub.

Getting Started With Atomic Swaps Using Docker

Firstly you will need docker installed to download and run the container in a reliable runtime environment across different operating systems. This is the overwhelming strength of docker from a software redistribution point of view.

Step 1 Pull AtomicDEX API & Middleware Image

docker pull coingateways/atomicdexorderbook:0.7.8

Step 2 Start AtomicDEX API & Middleware

The container supports sending assistive messages to a telegram bot. From telegram you will want to chat with "BotFather" and create a new bot. If you haven't got one, here is the create a bot guide from telegram. The bot will send you your multi wallet passphrase. This is super helpful for recording some wallet passphrases during development. An option to pass in a passphrase from a system file is available, which we will run through in another tutorial.

With a telegram bot

docker run -i -t -p -e MMBOT_URL="http://localhost:7780"  -e BOT_TOKEN="XXXXXXXXXXXX" -e BOT_CHATID="XXXXXXX" -e BOT_USERNAME="XXXXX" -e ME_PUBLIC="true"  --name orderbook coingateways/atomicdexorderbook:0.7.8

Without a telegram bot

docker run -i -t -p -e MMBOT_URL="http://localhost:7780" -e ME_PUBLIC="true"  --name orderbook coingateways/atomicdexorderbook:0.7.8

Step 3 Get Responses From Orderbook Middleware

The middleware is a web server that sits between the atomicDEX API RPC interface, and your browser. Browse to http://localhost:7780/coinsenabled and you will get a JSON response like the image showing 64 wallet addresses for different coins supported out-of-the-box.

Step 4 Explore Exposed API Endpoints

Try getting the BTC wallet balance with http://localhost:7780/getBalance?coin=BTC

Other URL endpoints require POST method, which is done through a web form or with a developer tool like insomnia or postman. Documentation for the other endpoints is waiting to be published after atomicDEX is released, here is a preview at the beta orderbook site.

Next Steps With AtomicDEX Orderbook App

The options are to attach a front end to it, but one comes inside the docker container! We will stop and redeploy the container in another tutorial to enable the front end web application.

Back to Top
Experience Crypto
© 2021 komodefi.com. Powered by Komodefi