hojas/bisq_arbitrage_notes/operation/Install bisq daemon and CLI.md
2023-12-09 19:27:21 +01:00

2.3 KiB

Installation of bisq daemon and CLI

Installing

Java

apt update  
apt install default-jdk  
java -version

Java must be installed.

Daemon and CLI

cd 
mkdir bisq
cd bisq
BISQ_VERSION="1.9.4"
wget "https://github.com/bisq-network/bisq/releases/download/v${BISQ_VERSION}/bisq-daemon-${BISQ_VERSION}.zip"
wget "https://github.com/bisq-network/bisq/releases/download/v${BISQ_VERSION}/bisq-cli-${BISQ_VERSION}.zip"
unzip bisq-daemon-${BISQ_VERSION}.zip
unzip bisq-cli-${BISQ_VERSION}.zip
rm bisq-daemon-${BISQ_VERSION}.zip
rm bisq-cli-${BISQ_VERSION}.zip
  1. Copy the pre-built bisq cli from github
  2. Copy the pre-built bisq daemon from github
  3. Unzip both
cd ~/bisq/bisq-daemon-1.9.4
java -jar daemon.jar --apiPassword=noesfacilvivirsinbisq
# Give it some time to start up
cd ~/bisq/bisq-cli-1.9.4
java -jar cli.jar --password=noesfacilvivirsinbisq getversion
  1. Run the bisq-daemon

  2. Make a test call from the CLI to test

    NOTE: the daemon consumes some RAM. Ensure that there is at least a 2Gb of RAM ready for the daemon to use, otherwise Java runs out of memory and behaves weird.

Payment Accounts

To copy over existing payment accounts from another instance, one has to copy the UserPayload file, located in $BISQ_DATA/btc_mainnet/db/UserPayload into the bisq daemon data folder.


A few CLI calls to practice:

  • Get BSQ balance
java -jar cli.jar --password=noesfacilvivirsinbisq getbalance --currency-code=BSQ
  • Get BTC balance
java -jar cli.jar --password=noesfacilvivirsinbisq getbalance --currency-code=BTC
  • Set a password on the wallet
java -jar cli.jar --password=noesfacilvivirsinbisq setwalletpassword --wallet-password="noesfacilvivirsinbisq"
  • Unlock the wallet for 60 seconds
java -jar cli.jar --password=noesfacilvivirsinbisq unlockwallet --wallet-password="noesfacilvivirsinbisq" --timeout=60
  • Get EUR/BTC price
java -jar cli.jar --password=noesfacilvivirsinbisq getbtcprice --currency-code=EUR
  • Get a funding address
java -jar cli.jar --password=noesfacilvivirsinbisq getfundingaddresses
  • Get offers for a certain market and direction
java -jar cli.jar --password=noesfacilvivirsinbisq getoffers --direction=BUY --currency-code=EUR
  • Stop the daemon
java -jar cli.jar --password=noesfacilvivirsinbisq stop