From 8d54b52977887e165c2a709177541689d14450c6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 13 Dec 2017 12:06:19 +0400 Subject: [PATCH] Autoprice --- iguana/exchanges/LP_utxo.c | 4 +-- iguana/exchanges/prices/autoprice | 43 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100755 iguana/exchanges/prices/autoprice diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index 5291b6d15..675acc57c 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/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); } diff --git a/iguana/exchanges/prices/autoprice b/iguana/exchanges/prices/autoprice new file mode 100755 index 000000000..a86dcb934 --- /dev/null +++ b/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}"