Browse Source

Autoprice

etomic
jl777 7 years ago
parent
commit
8d54b52977
  1. 4
      iguana/exchanges/LP_utxo.c
  2. 43
      iguana/exchanges/prices/autoprice

4
iguana/exchanges/LP_utxo.c

@ -654,7 +654,7 @@ cJSON *LP_balances(char *coinaddr)
if ( coin->electrum != 0 && strcmp(address,coin->smartaddr) == 0 && strcmp(coin->symbol,"KMD") == 0 )
{
jaddnum(item,"zcredits",dstr(LP_myzcredits()));
jadd(item,"zdebits",LP_myzdebits());
//jadd(item,"zdebits",LP_myzdebits());
}
jaddi(array,item);
}
@ -676,7 +676,7 @@ cJSON *LP_balances(char *coinaddr)
if ( strcmp(coin->symbol,"KMD") == 0 )
{
jaddnum(item,"zcredits",dstr(LP_myzcredits()));
jadd(item,"zdebits",LP_myzdebits());
//jadd(item,"zdebits",LP_myzdebits());
}
jaddi(array,item);
}

43
iguana/exchanges/prices/autoprice

@ -0,0 +1,43 @@
#!/bin/bash
margin=0.02
source userpass
./auto_chipskmd
./auto_chipsbtc
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BTC\",\"rel\":\"KMD\",\"fixed\":0.00025,\"margin\":0.01}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"BTC\",\"fixed\":4000,\"margin\":0.01}"
#curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"MNZ\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"BTC\",\"factor\":15000,\"margin\":-0.2}"
source crypto
source trackbtc
source dex
source trackbtc
source jumblr
source trackbtc
source pangea
source trackbtc
source bots
source trackbtc
source bet
source trackbtc
source revs
source trackbtc
source mgw
source trackbtc
source revs
source trackbtc
sharkholdings="{\"coin\":\"iota\",\"balance\":4500000}, {\"coin\":\"bitcoin-cash\",\"balance\":1200}, {\"coin\":\"bitcoin\",\"balance\":27}"
curl --url "http://127.0.0.1:7783" --data "{\"base\":\"MSHARK\",\"rel\":\"KMD\",\"fundvalue_bid\":\"NAV_KMD\",\"fundvalue_ask\":\"assetNAV_KMD\",\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"address\":\"RTu3JZZKLJTcfNwBa19dWRagEfQq49STqC\",\"holdings\":[$sharkholdings],\"divisor\":1400000}"
curl --url "http://127.0.0.1:7783" --data "{\"base\":\"SUPERNET\",\"rel\":\"KMD\",\"fundvalue_bid\":\"NAV_KMD\",\"fundvalue_ask\":\"assetNAV_KMD\",\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"address\":\"RRyyejME7LRTuvdziWsXkAbSW1fdiohGwK\",\"holdings\":[{\"coin\":\"iota\",\"balance\":13000000}, {\"coin\":\"stratis\",\"balance\":1300000}, {\"coin\":\"zcash\",\"balance\":10000}, {\"coin\":\"syscoin\",\"balance\":20000000}, {\"coin\":\"waves\",\"balance\":700000}, {\"coin\":\"bitcoin\",\"balance\":625}, {\"coin\":\"bitcoin-cash\",\"balance\":1500}, {\"coin\":\"heat-ledger\",\"balance\":2323851 }, {\"coin\":\"decred\",\"balance\":20000}, {\"coin\":\"vericoin\",\"balance\":2199368 }, {\"coin\":\"byteball\",\"balance\":4238}, {\"coin\":\"iocoin\",\"balance\":150000}, {\"coin\":\"quantum-resistant-ledger\",\"balance\":375000}, {\"coin\":\"chips\",\"balance\":2577006 }, {\"coin\":\"hush\",\"balance\":100000 }, {\"coin\":\"mobilego\",\"balance\":100000 }],\"divisor\":816016}"
curl --url "http://127.0.0.1:7783" --data "{\"margin\":0.01,\"base\":\"HODL\",\"rel\":\"KMD\",\"fundvalue_bid\":\"assetNAV_KMD\",\"fundvalue_ask\":\"assetNAV_KMD\",\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"address\":\"RNcUaMUEFLxVwtTo7rgruhwYanGk1jTkeU\",\"holdings\":[{\"coin\":\"siacoin\",\"balance\":185000000,\"comment\":\"using siafunds equal to million siacoin\"}],\"divisor\":10000000}"
Loading…
Cancel
Save