Browse Source

Test

etomic
jl777 8 years ago
parent
commit
813a404f5e
  1. 8
      iguana/exchanges/LP_ordermatch.c
  2. 1
      iguana/exchanges/install

8
iguana/exchanges/LP_ordermatch.c

@ -562,12 +562,16 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
char *LP_bestfit(char *rel,double relvolume)
{
struct LP_utxoinfo *autxo;
struct LP_utxoinfo *autxo; cJSON *retjson;
printf("LP_bestfit\n");
if ( relvolume <= 0. || LP_priceinfofind(rel) == 0 )
return(clonestr("{\"error\":\"invalid parameter\"}"));
printf("call LP_utxo_bestfit\n");
if ( (autxo= LP_utxo_bestfit(rel,SATOSHIDEN * relvolume)) == 0 )
return(clonestr("{\"error\":\"cant find utxo that is big enough\"}"));
return(jprint(LP_utxojson(autxo),1));
retjson = LP_utxojson(autxo);
printf("autxo.%p %p\n",autxo,retjson);
return(jprint(retjson,1));
}
char *LP_autotrade(void *ctx,char *myipaddr,int32_t mypubsock,double profitmargin,char *base,char *rel,double maxprice,double relvolume,int32_t timeout,int32_t duration)

1
iguana/exchanges/install

@ -1,4 +1,5 @@
cp bestfit orderbook autotrade client run_osx client_osx run coins disable enable forward myprice myprices getcoins getpeers getpeersIP getprices getutxos help inv lookup pub setprice status utxos ../dexscripts
cd ../dexscripts
echo now in dexscripts directory where you can make customized scripts that wont conflict with git pull
#cp ../exchanges/passphrase ../exchanges/userpass .
echo you will need to have a passphrase file with your passphrase and userpass file with userpass value in dexscripts dir

Loading…
Cancel
Save