OpenTrade - Open Source Cryptocurrency Exchange

·

Introduction to OpenTrade

OpenTrade stands as one of the best open-source cryptocurrency exchanges available today. Designed for flexibility and security, it enables users to host their own trading platforms with ease. Below is a comprehensive guide to setting up and customizing your OpenTrade exchange.


Key Features of OpenTrade


Installation Guide

Follow these step-by-step instructions to deploy OpenTrade on your server.

Step 1: Set Up Your VPS

  1. Register on a VPS hosting provider (e.g., DigitalOcean).
  2. Create a Droplet with Ubuntu 16 x64, 1GB RAM, 1vCPU, and 25GB SSD.
  3. Access Droplet via SSH using the credentials provided in your email.

Step 2: Install Dependencies

Run the following commands in your terminal:

sudo apt-get update
sudo apt-get install build-essential libssl-dev curl -y
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
bash install_nvm.sh
sudo reboot
nvm install 12.6.0

Step 3: Clone OpenTrade Repository

git clone --recurse-submodules https://github.com/3s3s/opentrade.git
cd opentrade/accountsserver
git checkout master
cd ..
sudo npm install
sudo npm install -g forever

Configuration

Edit Private Constants

Navigate to ~/opentrade/server/modules/private_constants.js and update the following:

'use strict';
exports.recaptcha_priv_key = 'YOUR_GOOGLE_RECAPTCHA_PRIVATE_KEY';
exports.password_private_suffix = 'LONG_RANDOM_STRING1';
exports.SSL_KEY = '../ssl_certificates/privkey.pem';
exports.SSL_CERT = '../ssl_certificates/fullchain.pem';
exports.walletspassphrase = {
 'MC' : 'LONG_RANDOM_STRING2',
 'BTC' : 'LONG_RANDOM_STRING3',
 'DOGE' : 'LONG_RANDOM_STRING4'
};

👉 Highly engaging anchor text

Run the Exchange

cd ~/opentrade/databaseServer
sudo forever start main.js
cd ~/opentrade/accountsserver
git checkout master
sudo forever start main.js
cd ~/opentrade/server
sudo forever start main.js

Access your exchange via https://127.0.0.1 in your browser. The first registered user becomes the administrator.


Adding Trade Pairs

  1. Create Config File: For each coin, create a ~/.coin/coin.conf file. Example for Marycoin:

    rpcuser=long_random_string_one
    rpcpassword=long_random_string_two
    rpcport=12345
    rpcclienttimeout=10
    rpcallowip=127.0.0.1
    server=1
    daemon=1
    upnp=0
    rpcworkqueue=1000
    enableaccounts=1
    litemode=1
    staking=0
    addnode=1.2.3.4
    addnode=5.6.7.8
  2. Encrypt Wallet:

    ./marycoin-cli encryptwallet random_long_string_SAME_AS_IN_FILE_private_constants.js
  3. Add Coin to Exchange:

    • Log in as admin.
    • Navigate to Admin Area > Coins > Add Coin.
    • Fill in details and save.

Customization

Update Constants

Edit ~/opentrade/server/constants.js:

exports.NOREPLY_EMAIL = '[email protected]';
exports.SUPPORT_EMAIL = '[email protected]';
const DOMAIN = 'localhost';
exports.TRADE_MAIN_COIN = "Marycoin";
exports.TRADE_DEFAULT_PAIR = "Litecoin";
exports.share.TRADE_COMISSION = 0.001;
exports.share.DUST_VOLUME = 0.000001;
exports.recaptcha_pub_key = "6LeX5SQUAAAAAKTieM68Sz4MECO6kJXsSR7_sGP1";

Update Chart Settings

Modify ~/opentrade/static_pages/chart.html:

const PORT_SSL = 40443;
const MAIN_COIN = 'Marycoin';
const DEFAULT_PAIR = 'Litecoin';
const TRADE_COMISSION = 0.001;

👉 Highly engaging anchor text


FAQ

How do I reset the admin password?

The first registered user is automatically assigned as the admin. Use the "Forgot Password" feature if needed.

Can I add unsupported coins?

Coins without encryption support (e.g., ZerroCash) cannot be added due to security constraints.

How do I change the default trade pair?

Edit constants.js and chart.html to reflect your preferred default pair.


License

OpenTrade is licensed under the MIT License. For more details, visit https://opensource.org/licenses/MIT.

👉 Highly engaging anchor text