You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jl777 2b43118a7a Adjustment 6 years ago
..
DB Test 7 years ago
SVM Test 8 years ago
confs Test 8 years ago
etomicswap Add debug build for linux platform with additional output. 6 years ago
genesis Test 8 years ago
prices Adjustment 6 years ago
tmp Test 8 years ago
CMakeLists.txt Add debug build for linux platform with additional output. 6 years ago
DEXstats.h 2017 -> 2018 in copyright notice 7 years ago
LP_NXT.c 2017 -> 2018 in copyright notice 7 years ago
LP_RTmetrics.c 2017 -> 2018 in copyright notice 7 years ago
LP_bitcoin.c Merge with DeckerSU/marketmaker-patch 6 years ago
LP_cache.c 2017 -> 2018 in copyright notice 7 years ago
LP_coins.c Remove uint16_t port = according to Decker guide. 6 years ago
LP_commands.c Cache electrum tx history only when it's enabled explicitly in argjson. 6 years ago
LP_etomic.c Allow sending dexfee to old address for a while. 6 years ago
LP_etomic.h #213 Add tx history cache for ETH/ERC20 (getting from Etherscan). 6 years ago
LP_forwarding.c 2017 -> 2018 in copyright notice 7 years ago
LP_include.h Allow sending dexfee to old address for a while. 6 years ago
LP_instantdex.c -print 6 years ago
LP_messages.c 2017 -> 2018 in copyright notice 7 years ago
LP_mmjson.c Add debug build for linux platform with additional output. 6 years ago
LP_mpnet.c Print from_mpnet, 7 years ago
LP_nativeDEX.c Add debug build for linux platform with additional output. 6 years ago
LP_network.c G.netid remove dependency 7 years ago
LP_ordermatch.c 10 minutes between gtc retry 6 years ago
LP_peers.c 2017 -> 2018 in copyright notice 7 years ago
LP_portfolio.c Merge branch 'dev' of https://github.com/jl777/SuperNET into etomic 7 years ago
LP_prices.c Separate my prices into bob and Alice 7 years ago
LP_privkey.c Allow single numerical digit wif 6 years ago
LP_remember.c #104 Add txChain field to tradestatus. 7 years ago
LP_rpc.c Fix warning 6 years ago
LP_scan.c Fix 7 years ago
LP_secp.c add Commercium (CMM) 7 years ago
LP_signatures.c Use compareAddresses instead of string comparison on quoteparse. 7 years ago
LP_socket.c Cache electrum tx history only when it's enabled explicitly in argjson. 6 years ago
LP_statemachine.c New options hooks 7 years ago
LP_stats.c 2017 -> 2018 in copyright notice 7 years ago
LP_swap.c Remove 13 second sleep for 0conf 6 years ago
LP_tradebots.c New options hooks 7 years ago
LP_transaction.c Passphrase and hexstr for opreturn 6 years ago
LP_utxo.c Test 6 years ago
Makefile Test 7 years ago
PAX.c test 8 years ago
README.md Randval -> passphrase 8 years ago
assetchains.old Test 7 years ago
auto_chipsbtc Update prices 7 years ago
auto_chipskmd Update prices 7 years ago
auto_grskmd Test 7 years ago
auto_usd auto_usd script 7 years ago
autoprice Update balances 6 years ago
balance Test 7 years ago
balance_loop #!/bin/bash 7 years ago
balances Balances 7 years ago
barterDEX.c Test 7 years ago
baserelswaps Test 7 years ago
beertest Resolve conflicts 7 years ago
bestfit #!/bin/bash 7 years ago
bet Update 7 years ago
bitcoin.c First approach to make iguana work with 2 bytes prefix coins, like HUSH 6 years ago
bitcoin.h First approach to make iguana work with 2 bytes prefix coins, like HUSH 6 years ago
bitfinex.c test 8 years ago
bitstamp.c test 8 years ago
bittrex.c Test 8 years ago
bot_buy Initial tradebots 7 years ago
bot_list Initial tradebots 7 years ago
bot_pause Initial tradebots 7 years ago
bot_resume Initial tradebots 7 years ago
bot_sell Initial tradebots 7 years ago
bot_settings Test 7 years ago
bot_status Initial tradebots 7 years ago
bot_statuslist bot_statuslist 7 years ago
bot_stop Initial tradebots 7 years ago
bots Test 7 years ago
btc38.c test 8 years ago
btce.c test 8 years ago
buy #!/bin/bash 7 years ago
calcaddress Calcaddress 7 years ago
cancel Cancel demo script 7 years ago
cancelorder #!/bin/bash 7 years ago
checkbalance.c exchanges API 9 years ago
claim Zeroconf -> instantdex 7 years ago
client Fix typo 7 years ago
client_osx #!/bin/bash 7 years ago
client_static client static script added for linux 7 years ago
coinbase.c test 8 years ago
coins Update coins 6 years ago
coins.json Remove PIVX till they fix watch only 7 years ago
coinswaps Test 7 years ago
convaddress Convaddress 7 years ago
crypto Update 7 years ago
debug #!/bin/bash 7 years ago
deletemessages #!/bin/bash 7 years ago
deposit1 Zeroconf -> instantdex 7 years ago
deposit10 Zeroconf -> instantdex 7 years ago
dex Test 7 years ago
disable #!/bin/bash 7 years ago
dividends #!/bin/bash 7 years ago
dontrun_unless_you_have_very_reliable_network There is no need to use ./run to be bob 7 years ago
dump Fomo and dump scripts 7 years ago
dynamictrust Dynamic trust 7 years ago
electrum #!/bin/bash 7 years ago
electrum.chips #!/bin/bash 7 years ago
electrum.chips2 #!/bin/bash 7 years ago
electrum.kmd #!/bin/bash 7 years ago
electrum.kmd2 #!/bin/bash 7 years ago
electrum.kmd3 #!/bin/bash 7 years ago
electrums #!/bin/bash 7 years ago
enable Pub33-> pub64 7 years ago
exchange_supports.h test 8 years ago
exchange_undefs.h test 8 years ago
fasttest Test 7 years ago
fomo Fomo and dump scripts 7 years ago
fundLP ETOMIC/BEER market 7 years ago
fundvalue Update balances 6 years ago
fxcm.c Xcode 8 8 years ago
gen64addrs gen64addrs script 7 years ago
get_supernet prices 7 years ago
getcoin #!/bin/bash 7 years ago
getcoins #!/bin/bash 7 years ago
getendpoint Initial events test 7 years ago
getfee Getfee 7 years ago
getmessages #!/bin/bash 7 years ago
getpeers #!/bin/bash 7 years ago
getpeersIP Fix getpeersIP 7 years ago
getprices #!/bin/bash 7 years ago
getrawtransaction Getrawtransaction 7 years ago
getutxos #!/bin/bash 7 years ago
goal #!/bin/bash 7 years ago
goals #!/bin/bash 7 years ago
guistats Test 7 years ago
help #!/bin/bash 7 years ago
hodl Test 7 years ago
huobi.c test 8 years ago
instaforex.c test 8 years ago
install removed `run` so `install` should work 7 years ago
inuse Inuse api 7 years ago
inv #!/bin/bash 7 years ago
invreset Test 7 years ago
jpg Fix jpg 7 years ago
jumblr Update 7 years ago
jumblr.c test 8 years ago
kickstart Kickstart script 7 years ago
lakebtc.c test 8 years ago
listtransactions Listtransactions 7 years ago
listunspent Test 7 years ago
loop #!/bin/bash 7 years ago
m_js Test 7 years ago
message #!/bin/bash 7 years ago
millis Mills 7 years ago
mm 17740.c Before new mm 7 years ago
mm.c Merge branch 'dev' of https://github.com/jl777/SuperNET into etomic 7 years ago
mm2.md Bullets seems to look nicer after all 6 years ago
mnzservers Test 7 years ago
movecoinbases Movecoinbases 7 years ago
mshark Update balances 6 years ago
myprice #!/bin/bash 7 years ago
myprices #!/bin/bash 7 years ago
nodeinstall Test 7 years ago
notarizations Test 7 years ago
numutxos #!/bin/bash 7 years ago
nxtae.c Test 8 years ago
okcoin.c test 8 years ago
opreturn Fix syntax 7 years ago
opreturndecrypt Opreturndecrypt stub 7 years ago
orderbook Test 7 years ago
ordermatch #!/bin/bash 7 years ago
pangea Update 7 years ago
parselog Test 7 years ago
passphrase Randval -> passphrase 8 years ago
pendings Test 7 years ago
pendingswaps Pending swaps 7 years ago
poloniex.c test 8 years ago
portfolio #!/bin/bash 7 years ago
pricearray #!/bin/bash 7 years ago
processfiles Test 7 years ago
profile Test 7 years ago
pub #!/bin/bash 7 years ago
pubkeystats Test 7 years ago
quadriga.c test 8 years ago
recentswaps Recent swaps 7 years ago
reset_mutex reset_mutex 7 years ago
revs Update 7 years ago
secretaddresses #!/bin/bash 7 years ago
sell Fix sell 7 years ago
sendrawtransaction Test 7 years ago
setconfirms Test 7 years ago
setpassphrase Fix setpassphrase 7 years ago
setprice #!/bin/bash 7 years ago
snapshot #!/bin/bash 7 years ago
snapshot_balance #!/bin/bash 7 years ago
snapshot_loop #!/bin/bash 7 years ago
splitfunds Splitfunds -> 0.0001 7 years ago
stats.c Add extern 7 years ago
statsdisp Test 7 years ago
status Trigger redeems and reclaims based on only time 7 years ago
stop Recent swaps 7 years ago
supernet Adjustment 6 years ago
swapstatus #!/bin/bash 7 years ago
ticker Ticker 7 years ago
timelock Timelock 7 years ago
to_etomic Test 7 years ago
to_zcash Test 7 years ago
trackbtc Test 7 years ago
trade #!/bin/bash 7 years ago
tradesarray Test 7 years ago
truefx.c test 8 years ago
trust Test 7 years ago
trusted Trusted 7 years ago
txblast Updated txblast script 7 years ago
unconf.c test 8 years ago
unlockedspend Timelock/unlockspend 7 years ago
updateprices Test 7 years ago
userpass test 7 years ago
withdraw added broadcast:1 parameter 7 years ago

README.md

Latest Readme is at http://pad.supernet.org/barterdex-readme

DEPENDENCIES First of all you are going to need to have the komodod daemon and the assetchains running. Install dependency packages: sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool libncurses5-dev unzip git python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libqt4-dev libqrencode-dev libdb++-dev ntp ntpdate vim software-properties-common curl libcurl4-gnutls-dev cmake clang Some Linux machines are now providing nanomsg package version 1.0. If it is available via package manager, you can install it from there. Else, you should use github repo of nanomsg and compile it yourself. For Ubuntu 14.04 you need to install it yourself cd /tmp wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz -O nanomsg-1.0.0.tar.gz tar -xzvf nanomsg-1.0.0.tar.gz cd nanomsg-1.0.0 mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr cmake --build . sudo cmake --build . --target install sudo ldconfig Or the following for 16.04 git clone https://github.com/nanomsg/nanomsg cd nanomsg cmake . make sudo make install sudo ldconfig COMPILE LP NODE To compile the BarterDEX you need to build iguana one time: cd ~ git clone https://github.com/jl777/SuperNET cd SuperNET/iguana git checkout dev ./m_LP IGUANA DAEMON STARTUP Then launch the iguana daemon by executing: ../agents/iguana & Now iguana should be running and providing port 7778 API: 127.0.0.1:7778 page in the browser will show the API testpage, but for marketmaker these functions are not used very much. it is port 7779 that is used and the marketmaker program is what provides those functions. BarterDEX EXCHANGE INSTALL cd ~/SuperNET/iguana/exchanges ./install Now, move to ~/SuperNET/iguana/dexscripts: cd ~/SuperNET/iguana/dexscripts Now in the ~/SuperNET/iguana/dexscripts directory you will have example scripts that you can change without new git updates overwriting them. These scripts will have example commands that you will need to customize to work with the coins you want to trade. Of course, if a new update to a script is made and you dont run install again then you wont have the latest versions. For example: if you want to enable the JUMBLR coin, you need to edit the enable file: nano ~SuperNET/iguana/dexscripts/enable copy the default command and paste it below but with the coin edited to JUMBLR in this case: curl --url "http://127.0.0.1:7779" --data "{"userpass":"$userpass","method":"enable","coin":"JUMBLR"}" The same will happen for any other script in the dexscripts directory. You will need to edit the scripts to include or exclude the coins you want to trade. IMPORTANT: All these scripts are expecting a userpass file, which contains the definition of the $userpass variable to authenticate API access. This avoids evil webpages that try to issue port 7779 calls to steal your money. At first you wont know the value of userpass. To find out, just run any API script. The first one will return all the required data, the "userpass" field is first and you can copy that value and put it into ~/SuperNET/iguana/dexscripts/userpass file. If you dont, all subsequent API calls will get authorization errors.The userpass variable is linked to each passphrase and that is defined in the passphrase file. Put your passphrase in that file. You can find templates for these two files in the iguana/exchanges dir. (you need to copy the edited version of these files to ~/SuperNET/iguana/dexscripts). cd ~/SuperNET/iguana/dexscripts ./enable (look for the userpass passphrase that will be generated and copy it) Now you have to paste the passphrase in both userpass and passphrase files: nano ./userpass nano ./passphrase ( paste the passphrase generated into the files where it says: “”) EXCHANGE CLIENT STARTUP Next step is to actually start the marketmaker from ~/SuperNET/iguana/dexscripts. cd ~/SuperNET/iguana/dexscripts ./client (for client mode) or ./run (for LPnode mode) Assuming you created the userpass file properly, you can now issue barterDEX api calls using all the scripts in the dexscripts dir. Please look at these scripts, they are simple curl invocations of a couple lines. Nothing scary and should be self explanatory. The help script displays all the api endpoints you should need. You can customize any of the dexscripts for your desired usage, make sure you edit them with the right coins, as if you issue a script for BTC it will do it for BTC instead of the coin you wanted. These scripts wont read your mind, they just do what is in them FUNDING SMARTADDRESS In order to start trading, you need to fund your smartaddress (as listed on the first API call return) from the getcoins API call. To see which is your smart address go to ~/SuperNET/iguana/dexscritps and execute: ./getcoins To make sure you have utxo pairs for both the bob and alice usage, it is best to send utxo in triplets of X, 1.2 X and 0.01 X. So if X is 10, send 10, 12, and 0.1 coins using sendtoaddress to your smartaddress. This means you will have to send 3 different transactions to the same address with 3 different quantities for example: If i want to fund my komodo smartaddress with 100 komodo i need to first send a tx with 100kmd then another tx with 120kmd and a third tx with only 10kmd After this, it should appear in the inventory. To see the inventory you need to execute: ./inv SETTING PRICE To set price you need to edit the ./setprice script in the dexscripts folder. This scripts contains a curl command that looks like this: curl --url "http://127.0.0.1:7779" --data "{"userpass":"$userpass","method":"setprice","base":"REVS","rel":"KMD","price":1.234}" In this command you should edit the coin (in this case is REVS) and then set the price per coin based in Komodo. In the command above we are setting a price of 1.23KMD per REVS. After you setprice (./setprice), then it will appear in orderbooks with that coin in either the base or rel.