To use Sigwo Technologies Waves DEX via CLI and Python:
For Ubuntu Linux:
Install pip (
sudo apt-get install pip)
Install PyWaves (
pip install pywaves)
Type in
nano dex.py and paste in:
import pywaves as pw
pw.setNode("http://waves.sigwo.tech","mainnet")
pw.setMatcher("http://dex.sigwo.tech")
myAddress = pw.Address(privateKey="YOUR ADDRESS PRIVATE KEY")
BTC = pw.Asset('8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')
MER = pw.Asset('HzfaJp8YQWLvQG4FkUxq2Q7iYWMYQ2k8UF89vVJAjWPj')
MER_WAVES = pw.AssetPair(MER, pw.WAVES)
MER_BTC = pw.AssetPair(MER, BTC)
myOrder = myAddress.sell(assetPair = MER_WAVES, amount = 2000, price = 1, maxLifetime=86400)
Change the
amount and
price to your suiting, remembering this is priced in WAVES per MERCURY. You may also change the
assetPair to
MER_BTC to price in BTC.
Save and close this file.
Then you can run
python dex.pyTo lease my node your Waves so you don't have to run a full node to receive rewards:
For Ubuntu Linux:
Install pip (
sudo apt-get install pip)
Install PyWaves (
pip install pywaves)
Type in
nano lease.py and paste in:
import pywaves as pw
pw.setNode(node = 'http://waves.sigwo.tech', chain = 'mainnet')
myAddress = pw.Address(privateKey = 'YOUR ADDRESS PRIVATE KEY')
minerAddress = pw.Address('3PPKDQ3G67gekeobR8MENopXytEf6M8WXhs')
# lease 1000 Waves to minerAddress, change to your suiting
leaseId = myAddress.lease(minerAddress, 100000000000)
Change the
100000000000 to how many Waves you want to lease out.
Save and close this file.
Then you can run
python lease.pyTo cancel the lease:
For Ubuntu Linux:
Install pip (
sudo apt-get install pip)
Install PyWaves (
pip install pywaves)
Type in
nano stopLease.py and paste in:
import pywaves as pw
pw.setNode(node = 'http://waves.sigwo.tech', chain = 'mainnet')
myAddress = pw.Address(privateKey = 'YOUR ADDRESS PRIVATE KEY')
minerAddress = pw.Address('3PPKDQ3G67gekeobR8MENopXytEf6M8WXhs')
leaseId = myAddress.lease(minerAddress, 100000000000)
myAddress.leaseCancel(leaseId)
Then you can run
python stopLease.py to stop leasing your Waves