Skip to content

OpenTrade - Open Source Cryptocurrency Exchange For Ubuntu Linux

License

Notifications You must be signed in to change notification settings

LinuxDevSecOps/opentrade

 
 

Repository files navigation

OpenTrade is the best opensource cryptocurrency exchange!

Need Setup Help Contact with skype: helios-sw

Live version: https://trade.multicoins.org/

Step-by-step install instructions:

  1. Register on the VPS hosting like this https://m.do.co/c/1ece5d76d5cd
  2. Create "Droplet" Ubuntu 16 x64 / 2GB / 1vCPU / 50 GB SSD
  3. Log in to Droplet over SSH (You will receive a email with IP, username and password)

Run this terminal commands one by one:

sudo apt update && sudo apt-get upgrade --fix-missing 
sudo apt install software-properties-common
sudo apt install build-essential checkinstall
sudo apt install ubuntu-restricted-extras
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt update
sudo apt install y-ppa-manager
sudo locale-gen
sudo dpkg-reconfigure locales
sudo apt-add-repository ppa:git-core/ppa
sudo apt update
sudo apt install git
git config --global user.name "YouName"
git config --global user.email [email protected]
ssh-keygen -t rsa -b 4096 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

# Add your new SSH key to your GitHub account

sudo apt list --upgradable
sudo apt upgrade && sudo apt update
sudo apt-get -f install
sudo apt-get -s autoremove
sudo apt-get -y autoclean
sudo apt-get -y clean
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 8.0.0

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

Here is an example of the file ~/opentrade/server/modules/private_constants.js Edit with your configs.

'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'; //change to your ssl certificates private key
exports.SSL_CERT = '../ssl_certificates/fullchain.pem'; //change to your ssl certificates fullchain

exports.walletspassphrase = {
    'MC' : 'LONG_RANDOM_STRING2',
    'BTC' : 'LONG_RANDOM_STRING3',
    'DOGE' : 'LONG_RANDOM_STRING4'
};

You MUST change default value exports.password_private_suffix !

After, you can run exchange

cd ~/opentrade/databaseServer
[sudo] forever start main.js
cd ~/opentrade/accountsserver
[sudo] forever start main.js
cd  ~/opentrade/server

# sudo nano constants.js and edit exports.ACCOUNTS_SERVER = "YourServerIP";

[sudo] forever start main.js

In your browser address bar, type https://YourServerIP

You will see OpenTrade.

The first registered user will be exchange administrator.

Add trade pairs

For each coin you should create ~/.coin/coin.conf file

This is common example for ~/.marycoin/marycoin.conf

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

Also, you must encrypt your cryptocurrency wallet with this command.

./marycoin-cli encryptwallet random_long_string_SAME_AS_IN_FILE_private_constants.js

If coin have no "coin-cli" file then try something like "coind" instead

If coin is not supported by encryption (like ZerroCash and it forks) the coin can not be added to OpenTrade.

Add you coin details to OpenTrade

  1. Register on exchange. The first registered user will be exchange administrator.
  2. Go to "Admin Area" -> "Coins" -> "Add coin"
  3. Fill up all fields and click "Confirm"
  4. Fill "Minimal confirmations count" and "Minimal balance" and uncheck and check "Coin visible" button
  5. Click "Save"
  6. Check RPC command for the coin. If it worked then coin was added to the exchange!

All visible coins should be appear in the Wallet. You should create default coin pairs now.

File ~/opentrade/server/constants.js have settings that you can change

https://github.com/3s3s/opentrade/blob/master/server/constants.js

exports.NOREPLY_EMAIL = '[email protected]'; //change no-reply email
exports.SUPPORT_EMAIL = '[email protected]'; //change to your valid email for support requests
const DOMAIN = 'localhost'; //Change to your domain name

exports.TRADE_MAIN_COIN = "Marycoin"; //change Marycoin to your main coin pair
exports.TRADE_DEFAULT_PAIR = "Litecoin"; //change Litecoin to your default coin pair
exports.share.TRADE_COMISSION = 0.001; //change trade comission percent
exports.share.DUST_VOLUME = 0.000001; //change minimal order volume

exports.recaptcha_pub_key = "6LeX5SQUAAAAAKTieM68Sz4MECO6kJXsSR7_sGP1"; //change to your recaptcha public key

File ~/opentrade/static_pages/chart.html

const PORT_SSL = 40443; //change to your ssl port (usualy 443)
const MAIN_COIN = 'Marycoin'; //change Marycoin to your main coin pair same as in constants.js
const DEFAULT_PAIR = 'Litecoin'; //change Litecoin to your default coin pair same as in constants.js
      
const TRADE_COMISSION = 0.001;

After that, you coins should appear on the main page.

Donate If you find this script is useful then consider donate to author!

Bitcoin 36WA1WESULub6Q434bQcnmpnk62oLD7vuQ

Marycoin M9dKNcBYgrbbE2f4tz3ud32KLKj1i9FrmN

Dogecoin DCJRhs9Pjr2FBrrUbKvFeWcYC6ZaF2GTAx

Litecoin LTbDdTijroJEyXt27apQSnuMY4RoXyjdq2

Deploy:

Deploy with GCP

Deploy

License

OpenTrade is released under the terms of the MIT license. See LICENSE for more information or see https://opensource.org/licenses/MIT.

About

OpenTrade - Open Source Cryptocurrency Exchange For Ubuntu Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.1%
  • HTML 23.2%
  • CSS 1.7%