Enable or Disable Coins
By default, BasicSwap only comes with Particl enabled, but you can easily enable other coins that you want to trade.
This guide will show you how to enable or disable coins on BasicSwap.
Attention
Currently, each coin you add has to be added one by one. Repeat the following step for each coin you want to enable.
Attention
Currently, adding a new coin to BasicSwap requires you to download its blockchain locally. We are working on adding more options, such as using light services and access gateways (i.e., web), which will be available at a later beta stage.
BasicSwap on Docker
If you’ve built BasicSwap using the Docker method, follow these steps to enable or disable coins your instance to the most up-to-date version.
Stop the docker image (this will shut down all BasicSwap processes).
docker-compose stop
If you haven’t set your COINDATA_PATH variable permanently in your .env file, you’ll need to export the variable first.
export COINDATA_PATH=/var/data/coinswaps
Enable coins by typing the following commands accompanied by the coin you want to enable after the –addcoin.
docker-compose run --rm swapclient basicswap-prepare --datadir=/coindata --addcoin=bitcoin
Note
You can copy an existing pruned datadir (excluding bitcoin.conf and any wallets) over to $COINDATA_PATH/bitcoin. Remove any existing wallets after copying over a pruned chain, or the Bitcoin daemon won’t start.
Stop BasicSwap completely.
docker-compose stop
Remove the coin’s record in the basicswap.json config file.
sudo nano /var/data/coinswaps/basicswap.json
In this example, here is the excerpt you would remove from basicswap.json if you wanted to remove Monero.
"monero": { "connection_type": "rpc", "manage_daemon": true, "manage_wallet_daemon": true, "rpcport": 29798, "zmqport": 30898, "walletrpcport": 29998, "rpchost": "127.0.0.1", "walletrpchost": "127.0.0.1", "walletrpcuser": "xmr_wallet_user", "walletrpcpassword": "xmr_wallet_pwd", "walletfile": "swap_wallet", "datadir": "/coindata/monero", "bindir": "/coindata/bin/monero", "restore_height": 2731435, "blocks_confirmed": 7, "walletsdir": "/coindata/monero" },
If you haven’t set your COINDATA_PATH variable permanently in your .env file, you’ll need to export the variable first.
export COINDATA_PATH=/var/data/coinswaps
Launch BasicSwap normally.
docker-compose up
BasicSwap Without Docker
If you’ve built BasicSwap without using the Docker method, follow these steps to add or remove coins to your BasicSwap instance.
Tip
For Linux users, adding or removing coins is simplified through community-developed scripts available here on Github.
Stop BasicSwap completely.
docker-compose stop
Enable coins by typing the following commands accompanied by the coin you want to enable after the –addcoin.
export SWAP_DATADIR=/Users/$USER/coinswaps basicswap-prepare --usebtcfastsync --datadir=/$SWAP_DATADIR --addcoin=bitcoin
Activate the change to your BasicSwap instance.
export SWAP_DATADIR=/Users/$USER/coinswaps . $SWAP_DATADIR/venv/bin/activate && python -V
Note
You can copy an existing pruned datadir (excluding bitcoin.conf and any wallets) over to $COINDATA_PATH/bitcoin. Remove any existing wallets after copying over a pruned chain, or the Bitcoin daemon won’t start.
Stop BasicSwap completely.
Remove the coin’s record in the basicswap.json config file.
sudo nano /Users/$USER/coinswaps/basicswap.json
In this example, here is the excerpt you would remove from basicswap.json if you wanted to remove Monero.
"monero": { "connection_type": "rpc", "manage_daemon": true, "manage_wallet_daemon": true, "rpcport": 29798, "zmqport": 30898, "walletrpcport": 29998, "rpchost": "127.0.0.1", "walletrpchost": "127.0.0.1", "walletrpcuser": "xmr_wallet_user", "walletrpcpassword": "xmr_wallet_pwd", "walletfile": "swap_wallet", "datadir": "/coindata/monero", "bindir": "/coindata/bin/monero", "restore_height": 2731435, "blocks_confirmed": 7, "walletsdir": "/coindata/monero" },
Once that is done, save the changes with CTRL + X, following by an ENTER.
Launch BasicSwap normally.
See also
BasicSwap Explained - BasicSwap Explained
BasicSwap Guides - Install BasicSwap
BasicSwap Guides - Update BasicSwap
BasicSwap Guides - Make an Offer
BasicSwap Guides - Take an Offer