Browse Source

Test

etomic
jl777 8 years ago
parent
commit
a91e728ac1
  1. 2
      .gitignore
  2. 3
      basilisk/jumblr.c
  3. 2
      basilisk/tradebots_liquidity.c

2
.gitignore

@ -232,3 +232,5 @@ iguana/DB/SWAPS/3078036996-3700749298
iguana/DB/SWAPS/1061498231-3266306388
iguana/DB/SWAPS/1060082251-3390546616
iguana/SVM/rawfeatures/BTCD_BTC

3
basilisk/jumblr.c

@ -754,7 +754,7 @@ void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coin)
jaddstr(vals,"source","KMD");
jaddstr(vals,"dest","BTC");
jaddnum(vals,"amount",JUMBLR_INCR);
jaddnum(vals,"minprice",1./kmdcoin->DEXinfo.btcprice*1.01);
jaddnum(vals,"minprice",kmdcoin->DEXinfo.btcprice);
jaddnum(vals,"usejumblr",1);
memset(hash.bytes,0,sizeof(hash));
kmdcoin->DEXinfo.DEXpending += btcavail;
@ -764,7 +764,6 @@ void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coin)
free(retstr);
}
free_json(vals);
// curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"InstantDEX\",\"method\":\"request\",\"vals\":{\"source\":\"KMD\",\"amount\":20,\"dest\":\"USD\",\"minprice\":0.08}}"
} //else printf("btcavail %.8f pending %.8f\n",btcavail,pending);
} //else printf("notlp.%d kmdprice %.8f\n",myinfo->IAMLP,kmdcoin->DEXinfo.btcprice);
}

2
basilisk/tradebots_liquidity.c

@ -932,7 +932,7 @@ void _default_liquidity_command(struct supernet_info *myinfo,char *base,bits256
li.ask = jdouble(vals,"ask");
if ( (li.minvol= jdouble(vals,"minvol")) <= 0. )
li.minvol = (strcmp("BTC",base) == 0) ? 0.0001 : 0.001;
if ( strcmp(li.base,"KMD") == 0 && strcmp(li.rel,"BTC") == 0 && li.minvol > 100. )
if ( strcmp(li.base,"KMD") == 0 && strcmp(li.rel,"BTC") == 0 && li.minvol >= 100. )
li.minvol = 100.;
if ( (li.maxvol= jdouble(vals,"maxvol")) < li.minvol )
li.maxvol = li.minvol;

Loading…
Cancel
Save