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