Browse Source

Test

etomic
jl777 7 years ago
parent
commit
734e8c8a8f
  1. 10
      iguana/exchanges/LP_prices.c
  2. 2
      iguana/exchanges/supernet

10
iguana/exchanges/LP_prices.c

@ -1159,7 +1159,7 @@ cJSON *LP_fundvalue(cJSON *argjson)
{
newitem = cJSON_CreateObject();
jaddstr(newitem,"coin",symbol);
jaddnum(newitem,"balance",dstr(balance));
jaddnum(newitem,"balance",balance);
if ( (coin= LP_coinfind(symbol)) != 0 && (KMDvalue= LP_KMDvalue(coin,SATOSHIDEN * balance)) > 0 )
{
jaddnum(newitem,"KMD",dstr(KMDvalue));
@ -1180,11 +1180,13 @@ cJSON *LP_fundvalue(cJSON *argjson)
jadd(retjson,"holdings",array);
if ( btcsum != 0 )
{
btcprice = LP_CMCbtcprice("komodo");
fundvalue += (btcprice * btcsum) * SATOSHIDEN;
if ( (btcprice= LP_CMCbtcprice("komodo")) > SMALLVAL )
{
fundvalue += (btcsum / btcprice) * SATOSHIDEN;
jaddnum(retjson,"KMD_BTC",btcprice);
jaddnum(retjson,"btcsum",btcsum);
jaddnum(retjson,"btcvalue",btcsum * btcprice);
jaddnum(retjson,"btcvalue",btcsum / btcprice);
}
}
jaddnum(retjson,"fundvalue",dstr(fundvalue));
if ( (divisor= jdouble(argjson,"divisor")) != 0 )

2
iguana/exchanges/supernet

@ -2,3 +2,5 @@
source userpass
# this will only work for watchonly addresses that have been rescanned and with active coins
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"balances\",\"address\":\"RRyyejME7LRTuvdziWsXkAbSW1fdiohGwK\"}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"fundvalue\",\"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\":650000}"

Loading…
Cancel
Save