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 39a359c998 Test 7 years ago
..
DEXstats.h Test 7 years ago
LP_bitcoin.c Test 7 years ago
LP_coins.c Test 7 years ago
LP_commands.c Tests 7 years ago
LP_forwarding.c Test 7 years ago
LP_include.h Cached tx for spend checks 7 years ago
LP_nativeDEX.c Test 7 years ago
LP_network.c Test 7 years ago
LP_ordermatch.c Test 7 years ago
LP_peers.c Test 7 years ago
LP_prices.c Test 7 years ago
LP_remember.c Test 7 years ago
LP_rpc.c Test 7 years ago
LP_scan.c Test 7 years ago
LP_secp.c Test 8 years ago
LP_statemachine.c Cached tx for spend checks 7 years ago
LP_swap.c Test 7 years ago
LP_transaction.c Cached tx for spend checks 7 years ago
LP_utxos.c Cached tx for spend checks 7 years ago
PAX.c test 8 years ago
README.md Test 7 years ago
autotrade Test 7 years ago
bitcoin.c Test 7 years ago
bitcoin.h test 8 years ago
bitfinex.c test 8 years ago
bitstamp.c test 8 years ago
bittrex.c Test 8 years ago
btc38.c test 8 years ago
btce.c test 8 years ago
checkbalance.c exchanges API 9 years ago
client Test 7 years ago
client_osx Test 7 years ago
coinbase.c test 8 years ago
coins Pax coins 7 years ago
disable Test 7 years ago
enable Test 7 years ago
exchange_supports.h test 8 years ago
exchange_undefs.h test 8 years ago
forward Test 7 years ago
fxcm.c Xcode 8 8 years ago
getcoins Test 7 years ago
getpeers Test 7 years ago
getpeersIP Test 7 years ago
getprices Test 7 years ago
getutxos Test 7 years ago
help Test 7 years ago
huobi.c test 8 years ago
instaforex.c test 8 years ago
install Test 7 years ago
inv Test 7 years ago
jumblr.c test 8 years ago
lakebtc.c test 8 years ago
lookup Test 7 years ago
loop Test 7 years ago
mm.c Test 7 years ago
myprice Test 7 years ago
myprices Test 7 years ago
nxtae.c Test 7 years ago
okcoin.c test 8 years ago
orderbook Test 7 years ago
poloniex.c test 8 years ago
pub Test 7 years ago
quadriga.c test 8 years ago
randval Test 7 years ago
registerall Test 7 years ago
run Test 7 years ago
run_osx Test 7 years ago
setprice Test 7 years ago
stats.c Test 7 years ago
status Test 7 years ago
swapstatus Test 7 years ago
truefx.c test 8 years ago
unconf.c test 8 years ago
userpass Test 7 years ago
utxos Test 7 years ago

README.md

You need to build iguana onetime from ~/SuperNET/iguana:

./m_LP

Then launch it to run in background ../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.

From ~/SuperNET/iguana/exchanges:

./install

From ~/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. Of course, if a new update to a script is made and you dont run install again then you wont have the latest versions. 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. The userpass variable is linked to each passphrase and that is defined in the randval file. Put your passphrase in that file. You can find templates for these two files in the iguana/exchanges dir.

Next step is to actually start the marketmaker from ~/SuperNET/iguana/dexscripts. Use ./run for LP node and ./client for client mode

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.

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

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 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. After this, it should appear in the inventory. After you setprice, then it will appear in orderbooks with that coin in either the base or rel.