jl777
8 years ago
197 changed files with 19362 additions and 3004 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
@ -0,0 +1,495 @@ |
|||
/******************************************************************************
|
|||
* Copyright © 2014-2017 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
// included from basilisk.c
|
|||
// connect DEX to jumblr-core
|
|||
|
|||
/*
|
|||
z_exportkey "zaddr" |
|||
z_exportwallet "filename" |
|||
z_getoperationstatus (["operationid", ... ]) |
|||
z_gettotalbalance ( minconf ) |
|||
z_importkey "zkey" ( rescan ) |
|||
z_importwallet "filename" |
|||
z_listaddresses |
|||
z_sendmany "fromaddress" [{"address":... ,"amount":..., "memo":"<hex>"},...] ( minconf ) ( fee ) |
|||
*/ |
|||
|
|||
#define JUMBLR_INCR 99.65 |
|||
#define JUMBLR_TXFEE 0.01 |
|||
#define JUMBLR_ADDR "RGhxXpXSSBTBm9EvNsXnTQczthMCxHX91t" |
|||
#define JUMBLR_BTCADDR "18RmTJe9qMech8siuhYfMtHo8RtcN1obC6" |
|||
#define JUMBLR_FEE 0.001 |
|||
|
|||
int32_t jumblr_addresstype(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
if ( addr[0] == 'z' && addr[1] == 'c' && strlen(addr) >= 40 ) |
|||
return('z'); |
|||
else if ( strlen(addr) < 40 ) |
|||
return('t'); |
|||
else return(-1); |
|||
} |
|||
|
|||
struct jumblr_item *jumblr_opidfind(struct supernet_info *myinfo,char *opid) |
|||
{ |
|||
struct jumblr_item *ptr; |
|||
HASH_FIND(hh,myinfo->jumblrs,opid,(int32_t)strlen(opid),ptr); |
|||
return(ptr); |
|||
} |
|||
|
|||
struct jumblr_item *jumblr_opidadd(struct supernet_info *myinfo,struct iguana_info *coin,char *opid) |
|||
{ |
|||
struct jumblr_item *ptr; |
|||
if ( (ptr= jumblr_opidfind(myinfo,opid)) == 0 ) |
|||
{ |
|||
ptr = calloc(1,sizeof(*ptr)); |
|||
safecopy(ptr->opid,opid,sizeof(ptr->opid)); |
|||
HASH_ADD_KEYPTR(hh,myinfo->jumblrs,ptr->opid,(int32_t)strlen(ptr->opid),ptr); |
|||
if ( ptr != jumblr_opidfind(myinfo,opid) ) |
|||
printf("jumblr_opidadd.(%s) ERROR, couldnt find after add\n",opid); |
|||
} |
|||
return(ptr); |
|||
} |
|||
|
|||
char *jumblr_validateaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
char params[1024]; |
|||
if ( coin->FULLNODE < 0 ) |
|||
{ |
|||
sprintf(params,"[\"%s\"]",addr); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"validateaddress",params)); |
|||
} else return(_dex_validateaddress(myinfo,coin->symbol,addr)); |
|||
} |
|||
|
|||
int32_t jumblr_ismine(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
char params[1024],*retstr; cJSON *retjson,*obj; int32_t retval = -1; |
|||
sprintf(params,"[\"%s\"]",addr); |
|||
if ( (retstr= jumblr_validateaddress(myinfo,coin,addr)) != 0 ) |
|||
{ |
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
if ( (obj= jobj(retjson,"ismine")) != 0 && is_cJSON_True(obj) != 0 ) |
|||
retval = 1; |
|||
else retval = 0; |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
return(retval); |
|||
} |
|||
|
|||
char *jumblr_zgetnewaddress(struct supernet_info *myinfo,struct iguana_info *coin) |
|||
{ |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_getnewaddress","")); |
|||
} |
|||
|
|||
char *jumblr_zlistoperationids(struct supernet_info *myinfo,struct iguana_info *coin) |
|||
{ |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_listoperationids","")); |
|||
} |
|||
|
|||
char *jumblr_zgetoperationresult(struct supernet_info *myinfo,struct iguana_info *coin,char *opid) |
|||
{ |
|||
char params[1024]; |
|||
sprintf(params,"[[\"%s\"]]",opid); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_getoperationresult",params)); |
|||
} |
|||
|
|||
char *jumblr_zgetoperationstatus(struct supernet_info *myinfo,struct iguana_info *coin,char *opid) |
|||
{ |
|||
char params[1024]; |
|||
sprintf(params,"[[\"%s\"]]",opid); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_getoperationstatus",params)); |
|||
} |
|||
|
|||
char *jumblr_sendt_to_z(struct supernet_info *myinfo,struct iguana_info *coin,char *taddr,char *zaddr,double amount) |
|||
{ |
|||
char params[1024]; double fee = (amount-3*JUMBLR_TXFEE) * JUMBLR_FEE; |
|||
if ( jumblr_addresstype(myinfo,coin,zaddr) != 'z' || jumblr_addresstype(myinfo,coin,taddr) != 't' ) |
|||
return(clonestr("{\"error\":\"illegal address in t to z\"}")); |
|||
sprintf(params,"[\"%s\", [{\"address\":\"%s\",\"amount\":%.8f}, {\"address\":\"%s\",\"amount\":%.8f}], 1, %.8f]",taddr,zaddr,amount-fee-JUMBLR_TXFEE,JUMBLR_ADDR,fee,JUMBLR_TXFEE); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_sendmany",params)); |
|||
} |
|||
|
|||
char *jumblr_sendz_to_z(struct supernet_info *myinfo,struct iguana_info *coin,char *zaddrS,char *zaddrD,double amount) |
|||
{ |
|||
char params[1024]; double fee = (amount-2*JUMBLR_TXFEE) * JUMBLR_FEE; |
|||
if ( jumblr_addresstype(myinfo,coin,zaddrS) != 'z' || jumblr_addresstype(myinfo,coin,zaddrD) != 'z' ) |
|||
return(clonestr("{\"error\":\"illegal address in z to z\"}")); |
|||
sprintf(params,"[\"%s\", [{\"address\":\"%s\",\"amount\":%.8f}, {\"address\":\"%s\",\"amount\":%.8f}], 1, %.8f]",zaddrS,zaddrD,amount-fee-JUMBLR_TXFEE,JUMBLR_ADDR,fee,JUMBLR_TXFEE); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_sendmany",params)); |
|||
} |
|||
|
|||
char *jumblr_sendz_to_t(struct supernet_info *myinfo,struct iguana_info *coin,char *zaddr,char *taddr,double amount) |
|||
{ |
|||
char params[1024]; double fee = (amount-JUMBLR_TXFEE) * JUMBLR_FEE; |
|||
if ( jumblr_addresstype(myinfo,coin,zaddr) != 'z' || jumblr_addresstype(myinfo,coin,taddr) != 't' ) |
|||
return(clonestr("{\"error\":\"illegal address in z to t\"}")); |
|||
sprintf(params,"[\"%s\", [{\"address\":\"%s\",\"amount\":%.8f}, {\"address\":\"%s\",\"amount\":%.8f}], 1, %.8f]",zaddr,taddr,amount-fee-JUMBLR_TXFEE,JUMBLR_ADDR,fee,JUMBLR_TXFEE); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_sendmany",params)); |
|||
} |
|||
|
|||
char *jumblr_zlistreceivedbyaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
char params[1024]; |
|||
sprintf(params,"[\"%s\", 1]",addr); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_listreceivedbyaddress",params)); |
|||
} |
|||
|
|||
char *jumblr_getreceivedbyaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
char params[1024]; |
|||
sprintf(params,"[\"%s\", 1]",addr); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getreceivedbyaddress",params)); |
|||
} |
|||
|
|||
char *jumblr_importprivkey(struct supernet_info *myinfo,struct iguana_info *coin,char *wifstr) |
|||
{ |
|||
char params[1024]; |
|||
sprintf(params,"[\"%s\", \"\", false]",wifstr); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"importprivkey",params)); |
|||
} |
|||
|
|||
char *jumblr_zgetbalance(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
char params[1024]; |
|||
sprintf(params,"[\"%s\", 1]",addr); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"z_getbalance",params)); |
|||
} |
|||
|
|||
char *jumblr_listunspent(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
char params[1024]; |
|||
sprintf(params,"[1, 99999999, [\"%s\"]]",addr); |
|||
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"listunspent",params)); |
|||
} |
|||
|
|||
int64_t jumblr_receivedby(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
char *retstr; int64_t total = 0; |
|||
if ( (retstr= jumblr_getreceivedbyaddress(myinfo,coin,addr)) != 0 ) |
|||
{ |
|||
total = atof(retstr) * SATOSHIDEN; |
|||
free(retstr); |
|||
} |
|||
return(total); |
|||
} |
|||
|
|||
int64_t jumblr_balance(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) |
|||
{ |
|||
char *retstr; double val; cJSON *retjson; int32_t i,n; int64_t balance = 0; |
|||
if ( jumblr_addresstype(myinfo,coin,addr) == 't' ) |
|||
{ |
|||
if ( coin->FULLNODE < 0 && jumblr_ismine(myinfo,coin,addr) > 0 ) |
|||
{ |
|||
if ( (retstr= jumblr_listunspent(myinfo,coin,addr)) != 0 ) |
|||
{ |
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
if ( (n= cJSON_GetArraySize(retjson)) > 0 ) |
|||
for (i=0; i<n; i++) |
|||
balance += SATOSHIDEN * jdouble(jitem(retjson,i),"amount"); |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
else if ( (retstr= dex_getbalance(myinfo,coin,0,0,coin->symbol,addr)) != 0 ) |
|||
{ |
|||
//printf("retstr.(%s)\n",retstr);
|
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
balance = jdouble(retjson,"balance") * SATOSHIDEN; |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
else if ( (retstr= jumblr_zgetbalance(myinfo,coin,addr)) != 0 ) |
|||
{ |
|||
if ( (val= atof(retstr)) > SMALLVAL ) |
|||
balance = val * SATOSHIDEN; |
|||
free(retstr); |
|||
} |
|||
return(balance); |
|||
} |
|||
|
|||
int32_t jumblr_itemset(struct jumblr_item *ptr,cJSON *item,char *status) |
|||
{ |
|||
cJSON *params,*amounts,*dest; char *from,*addr; int32_t i,n; int64_t amount; |
|||
/*"params" : {
|
|||
"fromaddress" : "RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5", |
|||
"amounts" : [ |
|||
{ |
|||
"address" : "zc9s3UdkDFTnnwHrMCr1vYy2WmkjhmTxXNiqC42s7BjeKBVUwk766TTSsrRPKfnX31Bbu8wbrTqnjDqskYGwx48FZMPHvft", |
|||
"amount" : 3.00000000 |
|||
} |
|||
], |
|||
"minconf" : 1, |
|||
"fee" : 0.00010000 |
|||
}*/ |
|||
if ( (params= jobj(item,"params")) != 0 ) |
|||
{ |
|||
//printf("params.(%s)\n",jprint(params,0));
|
|||
if ( (from= jstr(params,"fromaddress")) != 0 ) |
|||
{ |
|||
safecopy(ptr->src,from,sizeof(ptr->src)); |
|||
} |
|||
if ( (amounts= jarray(&n,params,"amounts")) != 0 ) |
|||
{ |
|||
for (i=0; i<n; i++) |
|||
{ |
|||
dest = jitem(amounts,i); |
|||
//printf("%s ",jprint(dest,0));
|
|||
if ( (addr= jstr(dest,"address")) != 0 && (amount= jdouble(dest,"amount")*SATOSHIDEN) > 0 ) |
|||
{ |
|||
if ( strcmp(addr,JUMBLR_ADDR) == 0 ) |
|||
ptr->fee = amount; |
|||
else |
|||
{ |
|||
ptr->amount = amount; |
|||
safecopy(ptr->dest,addr,sizeof(ptr->dest)); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
ptr->txfee = jdouble(params,"fee") * SATOSHIDEN; |
|||
} |
|||
return(1); |
|||
} |
|||
|
|||
void jumblr_opidupdate(struct supernet_info *myinfo,struct iguana_info *coin,struct jumblr_item *ptr) |
|||
{ |
|||
char *retstr,*status,KMDjumblr[64],KMDdeposit[64],BTCaddr[64]; cJSON *retjson,*item; |
|||
if ( ptr->status == 0 ) |
|||
{ |
|||
if ( (retstr= jumblr_zgetoperationstatus(myinfo,coin,ptr->opid)) != 0 ) |
|||
{ |
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
if ( cJSON_GetArraySize(retjson) == 1 ) |
|||
{ |
|||
item = jitem(retjson,0); |
|||
//printf("%s\n",jprint(item,0));
|
|||
if ( (status= jstr(item,"status")) != 0 ) |
|||
{ |
|||
if ( strcmp(status,"success") == 0 ) |
|||
{ |
|||
ptr->status = jumblr_itemset(ptr,item,status); |
|||
jumblr_privkey(myinfo,BTCaddr,KMDdeposit,JUMBLR_DEPOSITPREFIX); |
|||
jumblr_privkey(myinfo,BTCaddr,KMDjumblr,""); |
|||
if ( (jumblr_addresstype(myinfo,coin,ptr->src) == 't' && jumblr_addresstype(myinfo,coin,ptr->src) == 'z' && strcmp(ptr->src,KMDdeposit) != 0) || (jumblr_addresstype(myinfo,coin,ptr->src) == 'z' && jumblr_addresstype(myinfo,coin,ptr->src) == 't' && strcmp(ptr->dest,KMDjumblr) != 0) ) |
|||
{ |
|||
printf("a non-jumblr t->z pruned\n"); |
|||
free(jumblr_zgetoperationresult(myinfo,coin,ptr->opid)); |
|||
ptr->status = -1; |
|||
} |
|||
|
|||
} |
|||
else if ( strcmp(status,"failed") == 0 ) |
|||
{ |
|||
printf("%s failed\n",ptr->opid); |
|||
free(jumblr_zgetoperationresult(myinfo,coin,ptr->opid)); |
|||
ptr->status = -1; |
|||
} |
|||
} |
|||
} |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
} |
|||
|
|||
void jumblr_prune(struct supernet_info *myinfo,struct iguana_info *coin,struct jumblr_item *ptr) |
|||
{ |
|||
struct jumblr_item *tmp; char oldsrc[128]; int32_t flag = 1; |
|||
printf("PRUNE %s\n",ptr->opid); |
|||
strcpy(oldsrc,ptr->src); |
|||
free(jumblr_zgetoperationresult(myinfo,coin,ptr->opid)); |
|||
while ( flag != 0 ) |
|||
{ |
|||
flag = 0; |
|||
HASH_ITER(hh,myinfo->jumblrs,ptr,tmp) |
|||
{ |
|||
if ( strcmp(oldsrc,ptr->dest) == 0 ) |
|||
{ |
|||
printf("prune %s (%s -> %s) matched oldsrc\n",ptr->opid,ptr->src,ptr->dest); |
|||
free(jumblr_zgetoperationresult(myinfo,coin,ptr->opid)); |
|||
strcpy(oldsrc,ptr->src); |
|||
flag = 1; |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
void jumblr_opidsupdate(struct supernet_info *myinfo,struct iguana_info *coin) |
|||
{ |
|||
char *retstr; cJSON *array; int32_t i,n; struct jumblr_item *ptr; |
|||
if ( (retstr= jumblr_zlistoperationids(myinfo,coin)) != 0 ) |
|||
{ |
|||
if ( (array= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
if ( (n= cJSON_GetArraySize(array)) > 0 ) |
|||
{ |
|||
for (i=0; i<n; i++) |
|||
{ |
|||
if ( (ptr= jumblr_opidadd(myinfo,coin,jstri(array,i))) != 0 ) |
|||
{ |
|||
if ( ptr->status == 0 ) |
|||
jumblr_opidupdate(myinfo,coin,ptr); |
|||
//printf("%d: %s -> %s %.8f\n",ptr->status,ptr->src,ptr->dest,dstr(ptr->amount));
|
|||
if ( jumblr_addresstype(myinfo,coin,ptr->src) == 'z' && jumblr_addresstype(myinfo,coin,ptr->dest) == 't' ) |
|||
jumblr_prune(myinfo,coin,ptr); |
|||
} |
|||
} |
|||
} |
|||
free_json(array); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
|
|||
bits256 jumblr_privkey(struct supernet_info *myinfo,char *BTCaddr,char *KMDaddr,char *prefix) |
|||
{ |
|||
bits256 privkey,pubkey; uint8_t pubkey33[33]; char passphrase[sizeof(myinfo->jumblr_passphrase) + 64]; |
|||
sprintf(passphrase,"%s%s",prefix,myinfo->jumblr_passphrase); |
|||
conv_NXTpassword(privkey.bytes,pubkey.bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase)); |
|||
bitcoin_pubkey33(myinfo->ctx,pubkey33,privkey); |
|||
bitcoin_address(BTCaddr,0,pubkey33,33); |
|||
bitcoin_address(KMDaddr,60,pubkey33,33); |
|||
return(privkey); |
|||
} |
|||
|
|||
void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coinkmd,char *BTCaddr,char *KMDaddr,bits256 privkey) |
|||
{ |
|||
static double kmdprice,pending; static uint32_t lasttime; |
|||
double btcavail=0,minbtc,avebid,aveask,highbid,lowask,CMC_average,USD_average,changes[3]; struct iguana_info *coinbtc; cJSON *vals; bits256 hash; char *retstr; |
|||
coinbtc = iguana_coinfind("BTC"); |
|||
if ( kmdprice == 0. || time(NULL) > lasttime+60 ) |
|||
{ |
|||
kmdprice = get_theoretical(&avebid,&aveask,&highbid,&lowask,&CMC_average,changes,"komodo","KMD","BTC",&USD_average); |
|||
lasttime = (uint32_t)time(NULL); |
|||
printf("KMD %.8f\n",kmdprice); |
|||
} |
|||
if ( kmdprice > SMALLVAL ) |
|||
{ |
|||
minbtc = (kmdprice * 1.1) * (JUMBLR_INCR + 3*(JUMBLR_INCR * JUMBLR_FEE + JUMBLR_TXFEE)); |
|||
if ( coinbtc != 0 && (btcavail= dstr(jumblr_balance(myinfo,coinbtc,BTCaddr))) > minbtc+pending ) |
|||
{ |
|||
printf("BTC deposits %.8f, min %.8f\n",btcavail,minbtc); |
|||
vals = cJSON_CreateObject(); |
|||
jaddstr(vals,"source","BTC"); |
|||
//hash = curve25519(privkey,curve25519_basepoint9());
|
|||
jaddstr(vals,"dest","KMD"); |
|||
jaddnum(vals,"amount",btcavail*.3); |
|||
jaddnum(vals,"minprice",kmdprice*.95); |
|||
jaddnum(vals,"usejumblr",1); |
|||
memset(hash.bytes,0,sizeof(hash)); |
|||
pending = btcavail; |
|||
if ( (retstr= InstantDEX_request(myinfo,coinbtc,0,0,hash,vals,"")) != 0 ) |
|||
{ |
|||
printf("request.(%s) -> (%s)\n",jprint(vals,0),retstr); |
|||
free(retstr); |
|||
} |
|||
// 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("null kmdprice %.8f\n",kmdprice); |
|||
} |
|||
|
|||
void jumblr_iteration(struct supernet_info *myinfo,struct iguana_info *coin,int32_t selector,int32_t modval) |
|||
{ |
|||
//static uint32_t lasttime;
|
|||
char BTCaddr[64],KMDaddr[64],*zaddr,*retstr; bits256 privkey; uint64_t amount=0,total=0; double fee; struct jumblr_item *ptr,*tmp; uint8_t r; |
|||
fee = JUMBLR_INCR * JUMBLR_FEE; |
|||
OS_randombytes(&r,sizeof(r)); |
|||
//r = 0;
|
|||
if ( strcmp(coin->symbol,"KMD") == 0 && coin->FULLNODE < 0 ) |
|||
{ |
|||
//printf("JUMBLR selector.%d modval.%d r.%d\n",selector,modval,r&7);
|
|||
switch ( selector ) |
|||
{ |
|||
case 0: // public -> z, need to importprivkey
|
|||
jumblr_privkey(myinfo,BTCaddr,KMDaddr,JUMBLR_DEPOSITPREFIX); |
|||
if ( (total= jumblr_balance(myinfo,coin,KMDaddr)) >= (JUMBLR_INCR + 3*(fee+JUMBLR_TXFEE))*SATOSHIDEN ) |
|||
{ |
|||
if ( (r & 1) == 0 ) |
|||
{ |
|||
if ( (zaddr= jumblr_zgetnewaddress(myinfo,coin)) != 0 ) |
|||
{ |
|||
if ( total >= SATOSHIDEN * ((JUMBLR_INCR + 3*fee)*100 + 3*JUMBLR_TXFEE) ) |
|||
amount = SATOSHIDEN * ((JUMBLR_INCR + 3*fee)*100 + 3*JUMBLR_TXFEE); |
|||
else if ( total >= SATOSHIDEN * ((JUMBLR_INCR + 3*fee)*10 + 3*JUMBLR_TXFEE) ) |
|||
amount = SATOSHIDEN * ((JUMBLR_INCR + 3*fee)*10 + 3*JUMBLR_TXFEE); |
|||
else amount = SATOSHIDEN * ((JUMBLR_INCR + 3*fee) + 3*JUMBLR_TXFEE); |
|||
if ( (retstr= jumblr_sendt_to_z(myinfo,coin,KMDaddr,zaddr,dstr(amount))) != 0 ) |
|||
{ |
|||
printf("sendt_to_z.(%s)\n",retstr); |
|||
free(retstr); |
|||
} |
|||
free(zaddr); |
|||
} else printf("no zaddr from jumblr_zgetnewaddress\n"); |
|||
} |
|||
} else printf("%s total %.8f vs %.8f\n",KMDaddr,dstr(total),(JUMBLR_INCR + 3*(fee+JUMBLR_TXFEE))); |
|||
break; |
|||
case 1: // z -> z
|
|||
jumblr_opidsupdate(myinfo,coin); |
|||
HASH_ITER(hh,myinfo->jumblrs,ptr,tmp) |
|||
{ |
|||
if ( jumblr_addresstype(myinfo,coin,ptr->src) == 't' && jumblr_addresstype(myinfo,coin,ptr->dest) == 'z' ) |
|||
{ |
|||
if ( (r & 1) == 0 && ptr->spent == 0 && (total= jumblr_balance(myinfo,coin,ptr->dest)) >= (fee + JUMBLR_FEE)*SATOSHIDEN ) |
|||
{ |
|||
if ( (zaddr= jumblr_zgetnewaddress(myinfo,coin)) != 0 ) |
|||
{ |
|||
if ( (retstr= jumblr_sendz_to_z(myinfo,coin,ptr->dest,zaddr,dstr(total))) != 0 ) |
|||
{ |
|||
printf("sendz_to_z.(%s)\n",retstr); |
|||
free(retstr); |
|||
} |
|||
ptr->spent = (uint32_t)time(NULL); |
|||
free(zaddr); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
break; |
|||
case 2: // z -> public
|
|||
jumblr_opidsupdate(myinfo,coin); |
|||
HASH_ITER(hh,myinfo->jumblrs,ptr,tmp) |
|||
{ |
|||
if ( jumblr_addresstype(myinfo,coin,ptr->src) == 'z' && jumblr_addresstype(myinfo,coin,ptr->dest) == 'z' ) |
|||
{ |
|||
if ( (r & 1) == 0 && ptr->spent == 0 && (total= jumblr_balance(myinfo,coin,ptr->dest)) >= (fee + JUMBLR_FEE)*SATOSHIDEN ) |
|||
{ |
|||
privkey = jumblr_privkey(myinfo,BTCaddr,KMDaddr,""); |
|||
if ( (retstr= jumblr_sendz_to_t(myinfo,coin,ptr->dest,KMDaddr,dstr(total))) != 0 ) |
|||
{ |
|||
printf("sendz_to_t.(%s)\n",retstr); |
|||
free(retstr); |
|||
} |
|||
ptr->spent = (uint32_t)time(NULL); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
@ -0,0 +1,90 @@ |
|||
/******************************************************************************
|
|||
* Copyright © 2014-2017 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
// included from basilisk.c
|
|||
|
|||
int32_t smartaddress_add(struct supernet_info *myinfo,bits256 privkey,char *BTCaddr,char *KMDaddr) |
|||
{ |
|||
struct smartaddress *ap; |
|||
int32_t i; |
|||
if ( myinfo->numsmartaddrs < sizeof(myinfo->smartaddrs)/sizeof(*myinfo->smartaddrs) ) |
|||
{ |
|||
for (i=0; i<myinfo->numsmartaddrs; i++) |
|||
if ( bits256_cmp(myinfo->smartaddrs[i].privkey,privkey) == 0 ) |
|||
return(-1); |
|||
ap = &myinfo->smartaddrs[myinfo->numsmartaddrs++]; |
|||
ap->privkey = privkey; |
|||
bitcoin_pubkey33(myinfo->ctx,ap->pubkey33,privkey); |
|||
calc_rmd160_sha256(ap->rmd160,ap->pubkey33,33); |
|||
ap->pubkey = curve25519(privkey,curve25519_basepoint9()); |
|||
char coinaddr[64]; uint8_t addrtype,rmd160[20]; |
|||
bitcoin_address(coinaddr,0,ap->pubkey33,33); |
|||
for (i=0; i<20; i++) |
|||
printf("%02x",ap->rmd160[i]); |
|||
bitcoin_addr2rmd160(&addrtype,rmd160,coinaddr); |
|||
printf(", "); |
|||
for (i=0; i<20; i++) |
|||
printf("%02x",rmd160[i]); |
|||
printf (" <- rmd160 for %d %s vs %s\n",myinfo->numsmartaddrs,coinaddr,BTCaddr); |
|||
return(myinfo->numsmartaddrs); |
|||
} |
|||
printf("too many smartaddresses %d vs %d\n",myinfo->numsmartaddrs,(int32_t)(sizeof(myinfo->smartaddrs)/sizeof(*myinfo->smartaddrs))); |
|||
return(-1); |
|||
} |
|||
|
|||
int32_t smartaddress(struct supernet_info *myinfo,bits256 *privkeyp,char *coinaddr) |
|||
{ |
|||
int32_t i; uint8_t addrtype,rmd160[20]; |
|||
memset(privkeyp,0,sizeof(*privkeyp)); |
|||
bitcoin_addr2rmd160(&addrtype,rmd160,coinaddr); |
|||
for (i=0; i<myinfo->numsmartaddrs; i++) |
|||
if ( memcmp(myinfo->smartaddrs[i].rmd160,rmd160,20) == 0 ) |
|||
{ |
|||
*privkeyp = myinfo->smartaddrs[i].privkey; |
|||
printf("MATCHED %s\n",coinaddr); |
|||
return(i); |
|||
} |
|||
for (i=0; i<20; i++) |
|||
printf("%02x",rmd160[i]); |
|||
printf(" <- rmd160 smartaddress cant find (%s) of %d\n",coinaddr,myinfo->numsmartaddrs); |
|||
return(-1); |
|||
} |
|||
|
|||
int32_t smartaddress_pubkey(struct supernet_info *myinfo,bits256 *privkeyp,bits256 pubkey) |
|||
{ |
|||
int32_t i; |
|||
memset(privkeyp,0,sizeof(*privkeyp)); |
|||
for (i=0; i<myinfo->numsmartaddrs; i++) |
|||
if ( bits256_cmp(myinfo->smartaddrs[i].pubkey,pubkey) == 0 ) |
|||
{ |
|||
*privkeyp = myinfo->smartaddrs[i].privkey; |
|||
return(i); |
|||
} |
|||
return(-1); |
|||
} |
|||
|
|||
int32_t smartaddress_pubkey33(struct supernet_info *myinfo,bits256 *privkeyp,uint8_t *pubkey33) |
|||
{ |
|||
int32_t i; |
|||
memset(privkeyp,0,sizeof(*privkeyp)); |
|||
for (i=0; i<myinfo->numsmartaddrs; i++) |
|||
if ( memcmp(myinfo->smartaddrs[i].pubkey33,pubkey33,33) == 0 ) |
|||
{ |
|||
*privkeyp = myinfo->smartaddrs[i].privkey; |
|||
return(i); |
|||
} |
|||
return(0); |
|||
} |
|||
|
@ -0,0 +1,108 @@ |
|||
/******************************************************************************
|
|||
* Copyright © 2014-2017 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
// included from basilisk.c
|
|||
|
|||
// "currency":{"value":%.8f, "pending":%.8f}
|
|||
|
|||
cJSON *tradebot_balancediff(cJSON *item,cJSON *anchoritem) // only item might be null
|
|||
{ |
|||
double current[2],past[2]; int32_t i; cJSON *diffitem = jduplicate(anchoritem); |
|||
memset(current,0,sizeof(current)); |
|||
memset(past,0,sizeof(past)); |
|||
if ( jobj(diffitem,"value") != 0 ) |
|||
jdelete(diffitem,"value"); |
|||
if ( jobj(diffitem,"pending") != 0 ) |
|||
jdelete(diffitem,"pending"); |
|||
for (i=0; i<2; i++) |
|||
{ |
|||
if ( current[i] != 0. || past[i] != 0. ) |
|||
jaddnum(diffitem,i == 0 ? "value" : "pending",current[i] - past[i]); |
|||
} |
|||
return(diffitem); |
|||
} |
|||
|
|||
cJSON *tradebot_balancesdiff(struct supernet_info *myinfo,cJSON *current,cJSON *anchor) |
|||
{ |
|||
cJSON *item,*anchoritem,*diffitem,*array; int32_t i,n; char *field; |
|||
if ( anchor == 0 ) |
|||
return(jduplicate(current)); |
|||
array = cJSON_CreateObject(); |
|||
n = cJSON_GetArraySize(current); |
|||
for (i=0; i<n; i++) |
|||
{ |
|||
item = jitem(current,i); |
|||
field = jfieldname(item); |
|||
if ( (anchoritem= jobj(anchor,field)) != 0 ) |
|||
diffitem = tradebot_balancediff(item,anchoritem); |
|||
else diffitem = jduplicate(item); |
|||
jadd(array,field,diffitem); |
|||
} |
|||
n = cJSON_GetArraySize(anchor); |
|||
for (i=0; i<n; i++) |
|||
{ |
|||
item = jitem(current,i); |
|||
field = jfieldname(item); |
|||
if ( jobj(array,field) == 0 ) |
|||
jadd(array,field,tradebot_balancediff(0,item)); |
|||
} |
|||
return(array); |
|||
} |
|||
|
|||
// get balances from all exchanges, wallets, pending
|
|||
double tradebot_balance(struct supernet_info *myinfo,char *base) |
|||
{ |
|||
cJSON *json; double value = 0.; int32_t i; struct iguana_info *coin = iguana_coinfind(base); |
|||
if ( coin != 0 && (json= iguana_getinfo(myinfo,coin)) != 0 ) |
|||
{ |
|||
value = jdouble(json,"balance"); |
|||
free_json(json); |
|||
} |
|||
for (i=0; i<myinfo->numexchanges; i++) |
|||
{ |
|||
value += 0;//InstantDEX_balance(myinfo,0,0,0,exchange,base);
|
|||
} |
|||
return(value); |
|||
} |
|||
|
|||
void tradebot_pendingadd(struct supernet_info *myinfo,cJSON *tradejson,char *base,double basevolume,char *rel,double relvolume) |
|||
{ |
|||
portable_mutex_lock(&myinfo->pending_mutex); |
|||
// add to myinfo->trades
|
|||
portable_mutex_unlock(&myinfo->pending_mutex); |
|||
} |
|||
|
|||
void tradebot_pendingremove(struct supernet_info *myinfo,char *base,double basevolume,char *rel,double relvolume) |
|||
{ |
|||
portable_mutex_lock(&myinfo->pending_mutex); |
|||
// remove from myinfo->trades
|
|||
portable_mutex_unlock(&myinfo->pending_mutex); |
|||
} |
|||
|
|||
double tradebot_pending(struct supernet_info *myinfo,char *base) |
|||
{ |
|||
double pending = 0.; struct pending_trade *tp,*tmp; |
|||
portable_mutex_lock(&myinfo->pending_mutex); |
|||
HASH_ITER(hh,myinfo->trades,tp,tmp) |
|||
{ |
|||
if ( strcmp(base,tp->base) == 0 ) |
|||
pending += tp->dir * tp->basevolume; |
|||
else if ( strcmp(base,tp->rel) == 0 ) |
|||
pending -= tp->dir * tp->relvolume; |
|||
} |
|||
portable_mutex_unlock(&myinfo->pending_mutex); |
|||
return(pending); |
|||
} |
|||
|
@ -1,52 +0,0 @@ |
|||
#!/bin/bash |
|||
set -x |
|||
source pubkey.txt |
|||
echo $pubkey |
|||
|
|||
|
|||
curl --url "http://127.0.0.1:7776" --data "{\"timeout\":60000,\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"REVS\",\"pubkey\":\"$pubkey\"}" |
|||
|
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SUPERNET\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DEX\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PANGEA\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JUMBLR\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BET\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CRYPTO\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HODL\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SHARK\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BOTS\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MGW\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}" |
|||
|
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JPY\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GBP\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"AUD\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CAD\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHF\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NZD\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CNY\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RUB\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MXN\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BRL\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"INR\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HKD\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"TRY\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ZAR\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PLN\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NOK\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SEK\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DKK\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CZK\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HUF\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ILS\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KRW\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MYR\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PHP\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RON\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SGD\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"THB\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BGN\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"IDR\",\"pubkey\":\"$pubkey\"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HRK\",\"pubkey\":\"$pubkey\"}" |
|||
|
@ -0,0 +1,722 @@ |
|||
/******************************************************************************
|
|||
* Copyright © 2014-2017 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
//
|
|||
// main.c
|
|||
// marketmaker
|
|||
//
|
|||
// Copyright © 2017 SuperNET. All rights reserved.
|
|||
//
|
|||
|
|||
#include <stdio.h> |
|||
#include <stdint.h> |
|||
#include "OS_portable.h" |
|||
#define MAX(a,b) ((a) > (b) ? (a) : (b)) |
|||
|
|||
struct mmpending_order |
|||
{ |
|||
double price,volume; |
|||
int32_t dir; |
|||
uint32_t pending,completed,canceled,cancelstarted,reported; |
|||
cJSON *errorjson; |
|||
char exchange[16],base[16],rel[16],orderid[64]; |
|||
} *Pending_orders; |
|||
int32_t Num_Pending; |
|||
|
|||
#define IGUANA_URL "http://127.0.0.1:7778"
|
|||
|
|||
char CURRENCIES[][8] = { "USD", "EUR", "JPY", "GBP", "AUD", "CAD", "CHF", "NZD", // major currencies
|
|||
"CNY", "RUB", "MXN", "BRL", "INR", "HKD", "TRY", "ZAR", "PLN", "NOK", "SEK", "DKK", "CZK", "HUF", "ILS", "KRW", "MYR", "PHP", "RON", "SGD", "THB", "BGN", "IDR", "HRK", // end of currencies
|
|||
}; |
|||
double PAXPRICES[sizeof(CURRENCIES)/sizeof(*CURRENCIES)]; |
|||
|
|||
char *DEX_amlp(char *blocktrail) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"tradebot\",\"method\":\"amlp\",\"blocktrail\":\"%s\"}",blocktrail); |
|||
return(bitcoind_RPC(0,"tradebot",url,0,"amlp",postdata)); |
|||
} |
|||
|
|||
char *DEX_openorders(char *exchange) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"openorders\",\"exchange\":\"%s\"}",exchange); |
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,"openorders",postdata)); |
|||
} |
|||
|
|||
char *DEX_tradehistory(char *exchange) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"tradehistory\",\"exchange\":\"%s\"}",exchange); |
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,"tradehistory",postdata)); |
|||
} |
|||
|
|||
char *DEX_orderstatus(char *exchange,char *orderid) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"orderstatus\",\"exchange\":\"%s\",\"orderid\":\"%s\"}",exchange,orderid); |
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,"orderstatus",postdata)); |
|||
} |
|||
|
|||
char *DEX_cancelorder(char *exchange,char *orderid) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"cancelorder\",\"exchange\":\"%s\",\"orderid\":\"%s\"}",exchange,orderid); |
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,"cancelorder",postdata)); |
|||
} |
|||
|
|||
char *DEX_balance(char *exchange,char *base,char *coinaddr) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
if ( strcmp(exchange,"DEX") == 0 ) |
|||
{ |
|||
sprintf(postdata,"{\"agent\":\"dex\",\"method\":\"getbalance\",\"address\":\"%s\",\"symbol\":\"%s\"}",coinaddr,base); |
|||
return(bitcoind_RPC(0,"dex",url,0,"getbalance",postdata)); |
|||
} |
|||
else |
|||
{ |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"balance\",\"exchange\":\"%s\",\"base\":\"%s\"}",exchange,base); |
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,"balance",postdata)); |
|||
} |
|||
} |
|||
|
|||
char *DEX_apikeypair(char *exchange,char *apikey,char *apisecret) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"apikeypair\",\"exchange\":\"%s\",\"apikey\":\"%s\",\"apisecret\":\"%s\"}",exchange,apikey,apisecret); |
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,"apikeypair",postdata)); |
|||
} |
|||
|
|||
char *DEX_setuserid(char *exchange,char *userid,char *tradepassword) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"setuserid\",\"exchange\":\"%s\",\"userid\":\"%s\",\"tradepassword\":\"%s\"}",exchange,userid,tradepassword); |
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,"setuserid",postdata)); |
|||
} |
|||
|
|||
char *DEX_trade(char *exchange,char *base,char *rel,int32_t dir,double price,double volume) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"%s\",\"exchange\":\"%s\",\"base\":\"%s\",\"rel\":\"%s\",\"price\":%.8f,\"volume\":%.8f,\"dotrade\":1}",dir>0?"buy":"sell",exchange,base,rel,price,volume); |
|||
//printf("DEX_trade.(%s)\n",postdata);
|
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,dir>0?"buy":"sell",postdata)); |
|||
} |
|||
|
|||
char *DEX_withdraw(char *exchange,char *base,char *destaddr,double amount) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"InstantDEX\",\"method\":\"withdraw\",\"exchange\":\"%s\",\"destaddr\":\"%s\",\"amount\":%.8f}",exchange,destaddr,amount); |
|||
return(bitcoind_RPC(0,"InstantDEX",url,0,"withdraw",postdata)); |
|||
} |
|||
|
|||
char *iguana_walletpassphrase(char *passphrase,int32_t timeout) |
|||
{ |
|||
char url[512],postdata[1024]; |
|||
sprintf(url,"%s/coin=KMD&agent=bitcoinrpc&method=walletpassphrase?",IGUANA_URL); |
|||
sprintf(postdata,"[\"%s\", %d]",passphrase,timeout); |
|||
return(bitcoind_RPC(0,"",url,0,"walletpassphrase",postdata)); |
|||
} |
|||
|
|||
double bittrex_balance(char *base,char *coinaddr) |
|||
{ |
|||
char *retstr; cJSON *retjson; double balance = 0.; |
|||
if ( (retstr= DEX_balance("bittrex",base,coinaddr)) != 0 ) |
|||
{ |
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
balance = jdouble(retjson,"balance"); |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
return(balance); |
|||
} |
|||
|
|||
double dex_balance(char *base,char *coinaddr) |
|||
{ |
|||
char *retstr; cJSON *retjson; double balance = 0.; |
|||
if ( (retstr= DEX_balance("DEX",base,coinaddr)) != 0 ) |
|||
{ |
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
balance = jdouble(retjson,"balance"); |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
return(balance); |
|||
} |
|||
|
|||
int32_t komodo_baseid(char *base) |
|||
{ |
|||
int32_t i; |
|||
for (i=0; i<sizeof(CURRENCIES)/sizeof(*CURRENCIES); i++) |
|||
if ( strcmp(base,CURRENCIES[i]) == 0 ) |
|||
return(i); |
|||
return(-1); |
|||
} |
|||
|
|||
cJSON *yahoo_allcurrencies() |
|||
{ |
|||
char *retstr; cJSON *retjson = 0; |
|||
if ( (retstr= issue_curl("http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json")) != 0 ) |
|||
{ |
|||
retjson = cJSON_Parse(retstr); |
|||
free(retstr); |
|||
} |
|||
return(retjson); |
|||
} |
|||
|
|||
void _marketmaker_fiatupdate(int32_t baseid,double price) |
|||
{ |
|||
PAXPRICES[baseid] = price * PAXPRICES[0]; |
|||
printf("%.6f %s per USD, %.8f %s per KMD\n",price,CURRENCIES[baseid],PAXPRICES[baseid],CURRENCIES[baseid]); |
|||
} |
|||
|
|||
uint32_t marketmaker_fiatupdate(cJSON *fiatjson) |
|||
{ |
|||
int32_t i,n,baseid; cJSON *item,*array; double price; char *name; uint64_t mask = 0; |
|||
fiatjson = jobj(fiatjson,"list"); |
|||
if ( fiatjson != 0 && (array= jarray(&n,fiatjson,"resources")) > 0 ) |
|||
{ |
|||
for (i=0; i<n; i++) |
|||
{ |
|||
/*
|
|||
"resource" : { |
|||
"classname" : "Quote", |
|||
"fields" : { |
|||
"name" : "USD/BRX", |
|||
"price" : "3.063200", |
|||
"symbol" : "BRX=X", |
|||
"ts" : "1487866204", |
|||
"type" : "currency", |
|||
"utctime" : "2017-02-23T16:10:04+0000", |
|||
"volume" : "0" |
|||
} |
|||
*/ |
|||
item = jitem(array,i); |
|||
if ( (item= jobj(item,"resource")) != 0 ) |
|||
item = jobj(item,"fields"); |
|||
if ( item != 0 ) |
|||
{ |
|||
price = jdouble(item,"price"); |
|||
if ( price > SMALLVAL && (name= jstr(item,"name")) != 0 && strncmp(name,"USD/",4) == 0 ) |
|||
{ |
|||
if ( (baseid= komodo_baseid(name+4)) >= 0 && baseid < 32 ) |
|||
{ |
|||
if ( ((1LL << baseid) & mask) == 0 ) |
|||
{ |
|||
_marketmaker_fiatupdate(baseid,price); |
|||
mask |= (1LL << baseid); |
|||
} else if ( fabs(price*PAXPRICES[0] - PAXPRICES[baseid]) > SMALLVAL ) |
|||
printf("DUPLICATE PRICE? %s %.8f vs %.8f\n",name+4,price*PAXPRICES[0],PAXPRICES[baseid]); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
printf("pax mask.%x\n",(uint32_t)mask); |
|||
return((uint32_t)mask); |
|||
} |
|||
|
|||
void marketmaker_cancel(struct mmpending_order *ptr) |
|||
{ |
|||
char *retstr; cJSON *retjson; |
|||
if ( ptr->pending != 0 && ptr->cancelstarted == 0 ) |
|||
{ |
|||
ptr->cancelstarted = (uint32_t)time(NULL); |
|||
if ( (retstr= DEX_cancelorder(ptr->exchange,ptr->orderid)) != 0 ) |
|||
{ |
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
printf("cancel %s (%s/%s) %.8f vol %.8f dir.%d -> (%s)\n",ptr->exchange,ptr->base,ptr->rel,ptr->price,ptr->volume,ptr->dir,jprint(retjson,0)); |
|||
free_json(retjson); |
|||
ptr->pending = 0; |
|||
ptr->canceled = (uint32_t)time(NULL); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
} |
|||
|
|||
void marketmaker_queue(char *exchange,char *base,char *rel,int32_t dir,double price,double volume,cJSON *retjson) |
|||
{ |
|||
struct mmpending_order *ptr; char *orderid; |
|||
//DEX_trade.({"success":true,"message":"","result":{"uuid":"d5faa9e4-660d-436f-a257-2c6a40442d8c"},"tag":"11271578410079391025"}
|
|||
if ( is_cJSON_True(jobj(retjson,"success")) != 0 && jobj(retjson,"result") != 0 ) |
|||
retjson = jobj(retjson,"result"); |
|||
printf("QUEUE.%s %s/%s dir.%d %.8f %.6f (%s)\n",exchange,base,rel,dir,price,volume,jprint(retjson,0)); |
|||
Pending_orders = realloc(Pending_orders,(1 + Num_Pending) * sizeof(*Pending_orders)); |
|||
ptr = &Pending_orders[Num_Pending++]; |
|||
memset(ptr,0,sizeof(*ptr)); |
|||
ptr->price = price; |
|||
ptr->volume = volume; |
|||
ptr->dir = dir; |
|||
ptr->pending = (uint32_t)time(NULL); |
|||
strcpy(ptr->exchange,exchange); |
|||
strcpy(ptr->base,base); |
|||
strcpy(ptr->rel,rel); |
|||
if ( (orderid= jstr(retjson,"OrderUuid")) != 0 || (orderid= jstr(retjson,"uuid")) != 0 ) |
|||
strcpy(ptr->orderid,orderid); |
|||
else strcpy(ptr->orderid,"0"); |
|||
} |
|||
|
|||
void marketmaker_pendingupdate(char *exchange,char *base,char *rel) |
|||
{ |
|||
char *retstr; cJSON *retjson,*obj; int32_t i; struct mmpending_order *ptr; |
|||
for (i=0; i<Num_Pending; i++) |
|||
{ |
|||
ptr = &Pending_orders[i]; |
|||
if ( strcmp(exchange,ptr->exchange) != 0 || strcmp(base,ptr->base) != 0 || strcmp(rel,ptr->rel) != 0 ) |
|||
continue; |
|||
if ( ptr->completed == 0 && (retstr= DEX_orderstatus(exchange,ptr->orderid)) != 0 ) |
|||
{ |
|||
//printf("%s status.(%s)\n",ptr->orderid,retstr);
|
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
obj = jobj(retjson,"result"); |
|||
if ( is_cJSON_Array(obj) != 0 ) |
|||
obj = jitem(retjson,0); |
|||
if ( jdouble(obj,"QuantityRemaining") == 0. || is_cJSON_True(jobj(obj,"IsOpen")) == 0 ) |
|||
{ |
|||
//{"Uuid":null,"OrderUuid":"e7b0789c-0c4e-413b-a768-3d5734d9cbe5","Exchange":"BTC-KMD","OrderType":"LIMIT_SELL","Quantity":877.77700000,"QuantityRemaining":462.50512234,"Limit":0.00011770,"CommissionPaid":0.00012219,"Price":0.04887750,"PricePerUnit":0.00011769,"Opened":"2017-02-20T13:16:22.29","Closed":null,"CancelInitiated":false,"ImmediateOrCancel":false,"IsConditional":false,"Condition":"NONE","ConditionTarget":null} printf("uuid.(%s) finished.(%s)\n",ptr->orderid,jprint(retjson,0));
|
|||
ptr->completed = (uint32_t)time(NULL); |
|||
ptr->pending = 0; |
|||
} |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
} |
|||
|
|||
void marketmaker_pendinginit(char *exchange,char *base,char *rel) |
|||
{ |
|||
char *retstr,*orderid; cJSON *retjson,*array,*item; int32_t i,j,n,dir; struct mmpending_order *ptr; |
|||
if ( (retstr= DEX_openorders(exchange)) != 0 ) |
|||
{ |
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
//printf("%s\n",jprint(retjson,0));
|
|||
if ( is_cJSON_True(jobj(retjson,"success")) != 0 && (array= jarray(&n,retjson,"result")) != 0 ) |
|||
{ |
|||
for (i=0; i<n; i++) |
|||
{ |
|||
item = jitem(array,i); |
|||
//printf("(%s)\n",jprint(item,0));
|
|||
//{"success":true,"message":"","result":[{"Uuid":null,"OrderUuid":"81ad3e37-65d4-4fee-9c29-03b050f5192b","Exchange":"BTC-KMD","OrderType":"LIMIT_BUY","Quantity":885.19934578,"QuantityRemaining":885.19934578,"Limit":0.00011184,"CommissionPaid":0,"Price":0,"PricePerUnit":null,"Opened":"2017-02-19T19:14:02.94","Closed":null,"CancelInitiated":false,"ImmediateOrCancel":false,"IsConditional":false,"Condition":"NONE","ConditionTarget":null}],"tag":"10056789044100011414"}
|
|||
if ( (orderid= jstr(item,"OrderUuid")) != 0 && is_cJSON_Null(jobj(item,"Closed")) != 0 && is_cJSON_False(jobj(item,"CancelInitiated")) != 0 ) |
|||
{ |
|||
for (j=0; j<Num_Pending; j++) |
|||
{ |
|||
ptr = &Pending_orders[j]; |
|||
if ( strcmp(exchange,ptr->exchange) != 0 || strcmp(base,ptr->base) != 0 || strcmp(rel,ptr->rel) != 0 ) |
|||
continue; |
|||
if ( strcmp(ptr->orderid,orderid) == 0 ) |
|||
{ |
|||
ptr->pending = (uint32_t)time(NULL); |
|||
ptr->completed = 0; |
|||
printf("%s pending\n",orderid); |
|||
break; |
|||
} |
|||
} |
|||
if ( j == Num_Pending ) |
|||
{ |
|||
if ( jstr(item,"OrderType") != 0 ) |
|||
{ |
|||
if ( strcmp(jstr(item,"OrderType"),"LIMIT_BUY") == 0 ) |
|||
dir = 1; |
|||
else if ( strcmp(jstr(item,"OrderType"),"LIMIT_SELL") == 0 ) |
|||
dir = -1; |
|||
else dir = 0; |
|||
if ( dir != 0 ) |
|||
marketmaker_queue(exchange,base,rel,dir,jdouble(item,"Limit"),jdouble(item,"QuantityRemaining"),item); |
|||
else printf("no dir (%s) (%s)\n",jprint(item,0),jstr(item,"OrderType")); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
|
|||
double marketmaker_filled(char *exchange,char *base,char *rel,double *buyvolp,double *sellvolp,double *pendingbidsp,double *pendingasksp) |
|||
{ |
|||
double pricesum = 0.,volsum = 0.; struct mmpending_order *ptr; int32_t i; |
|||
*pendingbidsp = *pendingasksp = 0.; |
|||
for (i=0; i<Num_Pending; i++) |
|||
{ |
|||
ptr = &Pending_orders[i]; |
|||
if ( strcmp(exchange,ptr->exchange) != 0 || strcmp(base,ptr->base) != 0 || strcmp(rel,ptr->rel) != 0 ) |
|||
continue; |
|||
if ( ptr->completed != 0 ) |
|||
{ |
|||
if ( ptr->reported == 0 ) |
|||
{ |
|||
if ( ptr->dir > 0 ) |
|||
(*buyvolp) += ptr->volume; |
|||
else if ( ptr->dir < 0 ) |
|||
(*sellvolp) += ptr->volume; |
|||
pricesum += ptr->volume * ptr->price; |
|||
volsum += ptr->volume; |
|||
ptr->reported = (uint32_t)time(NULL); |
|||
printf("REPORT dir.%d vol %.8f\n",ptr->dir,ptr->volume); |
|||
} |
|||
} |
|||
else if ( ptr->pending != 0 ) // alternative is error or cancelled
|
|||
{ |
|||
if ( ptr->dir > 0 ) |
|||
(*pendingbidsp) += ptr->volume; |
|||
else if ( ptr->dir < 0 ) |
|||
(*pendingasksp) += ptr->volume; |
|||
} |
|||
} |
|||
if ( volsum != 0. ) |
|||
pricesum /= volsum; |
|||
return(pricesum); |
|||
} |
|||
|
|||
int32_t marketmaker_prune(char *exchange,char *base,char *rel,int32_t polarity,double bid,double ask,double separation) |
|||
{ |
|||
int32_t i,n = 0; struct mmpending_order *ptr; |
|||
for (i=0; i<Num_Pending; i++) |
|||
{ |
|||
ptr = &Pending_orders[i]; |
|||
if ( strcmp(exchange,ptr->exchange) != 0 || strcmp(base,ptr->base) != 0 || strcmp(rel,ptr->rel) != 0 ) |
|||
continue; |
|||
if ( ptr->pending != 0 && ptr->cancelstarted == 0 ) |
|||
{ |
|||
if ( polarity != 0 ) |
|||
{ |
|||
if ( ((ptr->dir*polarity > 0 && ptr->price < bid-separation) || (ptr->dir*polarity < 0 && ptr->price > ask+separation)) ) |
|||
{ |
|||
printf("polarity.%d dir.%d price.%f bid.%f ask.%f\n",polarity,ptr->dir,ptr->price,bid,ask); |
|||
marketmaker_cancel(ptr), n++; |
|||
} |
|||
} |
|||
/*else
|
|||
{,*prunebid=0,*pruneask=0; double lowbid=0.,highask=0. |
|||
if ( ptr->dir > 0 && (lowbid == 0. || ptr->price < lowbid) ) |
|||
{ |
|||
lowbid = ptr->price; |
|||
prunebid = ptr; |
|||
} |
|||
else if ( ptr->dir < 0 && (highask == 0. || ptr->price > highask) ) |
|||
{ |
|||
highask = ptr->price; |
|||
pruneask = ptr; |
|||
} |
|||
}*/ |
|||
} |
|||
} |
|||
/*if ( polarity == 0 )
|
|||
{ |
|||
if ( prunebid != 0 && fabs(prunebid->price - bid) > separation ) |
|||
marketmaker_cancel(prunebid), n++; |
|||
if ( pruneask != 0 && fabs(pruneask->price - ask) > separation ) |
|||
marketmaker_cancel(pruneask), n++; |
|||
}*/ |
|||
return(n); |
|||
} |
|||
|
|||
void marketmaker_volumeset(double *bidincrp,double *askincrp,double incr,double buyvol,double pendingbids,double sellvol,double pendingasks,double maxexposure) |
|||
{ |
|||
*bidincrp = *askincrp = incr; |
|||
//if ( pendingbids >= pendingasks+maxexposure )
|
|||
// *bidincrp = 0.;
|
|||
//else if ( pendingasks >= pendingbids+maxexposure )
|
|||
// *askincrp = 0.;
|
|||
if ( *bidincrp > 0. && pendingbids + *bidincrp > maxexposure ) |
|||
*bidincrp = (maxexposure - *bidincrp); |
|||
if ( *askincrp > 0. && pendingasks + *askincrp > maxexposure ) |
|||
*askincrp = (maxexposure - *askincrp); |
|||
if ( *bidincrp < 0. ) |
|||
*bidincrp = 0.; |
|||
if ( *askincrp < 0. ) |
|||
*askincrp = 0.; |
|||
} |
|||
|
|||
int32_t marketmaker_spread(char *exchange,char *base,char *rel,double bid,double bidvol,double ask,double askvol,double separation) |
|||
{ |
|||
int32_t nearflags[2],i,n = 0; struct mmpending_order *ptr; cJSON *retjson,*vals; char *retstr,postdata[1024],url[128]; double vol,spread_ratio; |
|||
memset(nearflags,0,sizeof(nearflags)); |
|||
if ( strcmp("DEX",exchange) != 0 ) |
|||
{ |
|||
for (i=0; i<Num_Pending; i++) |
|||
{ |
|||
ptr = &Pending_orders[i]; |
|||
if ( strcmp(exchange,ptr->exchange) != 0 || strcmp(base,ptr->base) != 0 || strcmp(rel,ptr->rel) != 0 ) |
|||
continue; |
|||
if ( ptr->pending != 0 && ptr->cancelstarted == 0 ) |
|||
{ |
|||
if ( bid > SMALLVAL && bidvol > SMALLVAL && ptr->dir > 0 && fabs(bid - ptr->price) < separation ) |
|||
nearflags[0]++; |
|||
if ( ask > SMALLVAL && askvol > SMALLVAL && ptr->dir < 0 && fabs(ask - ptr->price) < separation ) |
|||
nearflags[1]++; |
|||
} |
|||
} |
|||
} |
|||
//printf("spread.%s (%.8f %.6f) (%.8f %.6f)\n",exchange,bid,bidvol,ask,askvol);
|
|||
if ( bid > SMALLVAL && bidvol > SMALLVAL && nearflags[0] == 0 ) |
|||
{ |
|||
if ( strcmp("DEX",exchange) == 0 && strcmp(base,"KMD") == 0 && strcmp(rel,"BTC") == 0 ) |
|||
{ |
|||
if ( ask > SMALLVAL && askvol > SMALLVAL ) |
|||
{ |
|||
/*li.profit = jdouble(vals,"profit");
|
|||
li.refprice = jdouble(vals,"refprice"); |
|||
li.bid = jdouble(vals,"bid"); |
|||
li.ask = jdouble(vals,"ask"); |
|||
if ( (li.minvol= jdouble(vals,"minvol")) <= 0. ) |
|||
li.minvol = (strcmp("BTC",base) == 0) ? 0.0001 : 0.001; |
|||
if ( (li.maxvol= jdouble(vals,"maxvol")) < li.minvol ) |
|||
li.maxvol = li.minvol;*/ |
|||
//curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"MVP\",\"vals\":{\"rel\":\"USD\",\"bid\":0.09,\"ask\":0.11,\"maxvol\":100}}"
|
|||
vals = cJSON_CreateObject(); |
|||
jaddstr(vals,"rel","BTC"); |
|||
jaddnum(vals,"bid",bid); |
|||
jaddnum(vals,"ask",ask); |
|||
vol = bidvol > askvol ? askvol : bidvol; |
|||
jaddnum(vals,"maxvol",vol); |
|||
jaddnum(vals,"minvol",vol*0.1 > 100 ? 100 : vol * 0.1); |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"%s\",\"vals\":%s}",base,jprint(vals,1)); |
|||
printf("(%s)\n",postdata); |
|||
if ( (retstr= bitcoind_RPC(0,"tradebot",url,0,"liqudity",postdata)) != 0 ) |
|||
{ |
|||
//printf("(%s) -> (%s)\n",postdata,retstr);
|
|||
free(retstr); |
|||
} |
|||
spread_ratio = .5 * ((ask - bid) / (bid + ask)); |
|||
for (i=0; i<sizeof(CURRENCIES)/sizeof(*CURRENCIES); i++) |
|||
{ |
|||
if ( PAXPRICES[i] > SMALLVAL ) |
|||
{ |
|||
vals = cJSON_CreateObject(); |
|||
jaddstr(vals,"rel",CURRENCIES[i]); |
|||
jaddnum(vals,"bid",PAXPRICES[i] * (1. - spread_ratio)); |
|||
jaddnum(vals,"ask",PAXPRICES[i] * (1. + spread_ratio)); |
|||
jaddnum(vals,"maxvol",vol * PAXPRICES[i]); |
|||
jaddnum(vals,"minvol",MAX(1,(int32_t)(vol * 0.01 * PAXPRICES[i]))); |
|||
sprintf(url,"%s/?",IGUANA_URL); |
|||
sprintf(postdata,"{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"%s\",\"vals\":%s}","KMD",jprint(vals,1)); |
|||
if ( (retstr= bitcoind_RPC(0,"tradebot",url,0,"liqudity",postdata)) != 0 ) |
|||
{ |
|||
//printf("(%s) -> (%s)\n",postdata,retstr);
|
|||
free(retstr); |
|||
} |
|||
} |
|||
break; |
|||
} |
|||
} else printf("unsupported ask only for DEX %s/%s\n",base,rel); |
|||
} |
|||
else if ( (retstr= DEX_trade(exchange,base,rel,1,bid,bidvol)) != 0 ) |
|||
{ |
|||
//printf("DEX_trade.(%s)\n",retstr);
|
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
marketmaker_queue(exchange,base,rel,1,bid,bidvol,retjson); |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
if ( ask > SMALLVAL && askvol > SMALLVAL && nearflags[1] == 0 && strcmp("DEX",exchange) != 0 ) |
|||
{ |
|||
if ( (retstr= DEX_trade(exchange,base,rel,-1,ask,askvol)) != 0 ) |
|||
{ |
|||
//printf("DEX_trade.(%s)\n",retstr);
|
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
marketmaker_queue(exchange,base,rel,-1,ask,askvol,retjson); |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
return(n); |
|||
} |
|||
|
|||
void marketmaker(double minask,double maxbid,char *baseaddr,char *reladdr,double start_BASE,double start_REL,double profitmargin,double maxexposure,double ratioincr,char *exchange,char *name,char *base,char *rel) |
|||
{ |
|||
static uint32_t counter; |
|||
cJSON *fiatjson; double bid,ask,start_DEXbase,start_DEXrel,USD_average=0.,DEX_base = 0.,DEX_rel = 0.,balance_base=0.,balance_rel=0.,mmbid,mmask,usdprice=0.,CMC_average=0.,aveprice,incr,pendingbids,pendingasks,buyvol,sellvol,bidincr,askincr,filledprice,avebid=0.,aveask=0.,val,changes[3],highbid=0.,lowask=0.,theoretical = 0.; uint32_t lasttime = 0; |
|||
incr = maxexposure * ratioincr; |
|||
buyvol = sellvol = 0.; |
|||
start_DEXbase = dex_balance(base,baseaddr); |
|||
start_DEXrel = dex_balance(rel,reladdr); |
|||
while ( 1 ) |
|||
{ |
|||
if ( time(NULL) > lasttime+300 ) |
|||
{ |
|||
if ( (val= get_theoretical(&avebid,&aveask,&highbid,&lowask,&CMC_average,changes,name,base,rel,&USD_average)) != 0. ) |
|||
{ |
|||
if ( theoretical == 0. ) |
|||
{ |
|||
theoretical = val; |
|||
incr /= theoretical; |
|||
maxexposure /= theoretical; |
|||
if ( incr > 2 ) |
|||
{ |
|||
incr = (int32_t)incr; |
|||
incr += 0.777; |
|||
} |
|||
} else theoretical = (theoretical + val) * 0.5; |
|||
if ( (counter++ % 12) == 0 ) |
|||
{ |
|||
if ( USD_average > SMALLVAL && CMC_average > SMALLVAL && theoretical > SMALLVAL ) |
|||
{ |
|||
usdprice = USD_average * (theoretical / CMC_average); |
|||
printf("USD %.4f <- (%.6f * (%.8f / %.8f))\n",usdprice,USD_average,theoretical,CMC_average); |
|||
PAXPRICES[0] = usdprice; |
|||
if ( (fiatjson= yahoo_allcurrencies()) != 0 ) |
|||
{ |
|||
marketmaker_fiatupdate(fiatjson); |
|||
free_json(fiatjson); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if ( strcmp(exchange,"bittrex") == 0 ) |
|||
{ |
|||
balance_base = bittrex_balance(base,""); |
|||
balance_rel = bittrex_balance(rel,""); |
|||
DEX_base = dex_balance(base,baseaddr); |
|||
DEX_rel = dex_balance(rel,reladdr); |
|||
} else printf("add support for %s balance\n",exchange); |
|||
lasttime = (uint32_t)time(NULL); |
|||
} |
|||
marketmaker_pendingupdate(exchange,base,rel); |
|||
if ( theoretical > SMALLVAL && avebid > SMALLVAL && aveask > SMALLVAL ) |
|||
{ |
|||
aveprice = (avebid + aveask) * 0.5; |
|||
// if order is filled, theoretical <- filled (theoretical + price)/2
|
|||
if ( (filledprice= marketmaker_filled(exchange,base,rel,&buyvol,&sellvol,&pendingbids,&pendingasks)) != 0. ) |
|||
theoretical = (theoretical + filledprice) * 0.5; |
|||
buyvol = sellvol = 0; |
|||
if ( (balance_base + DEX_base) < (start_BASE + start_DEXbase) ) |
|||
sellvol += ((start_BASE + start_DEXbase) - (balance_base + DEX_base)); |
|||
else buyvol += ((balance_base + DEX_base) - (start_BASE + start_DEXbase)); |
|||
if ( (balance_rel + DEX_rel) < (start_REL + start_DEXrel) ) |
|||
buyvol += ((start_REL + start_DEXrel) - (balance_rel + DEX_rel)) / theoretical; |
|||
else sellvol += ((balance_rel + DEX_rel) - (start_REL + start_DEXrel)) / theoretical; |
|||
mmbid = theoretical - theoretical*profitmargin; |
|||
mmask = theoretical + theoretical*profitmargin; |
|||
// if any existing order exceeds double margin distance, cancel
|
|||
marketmaker_prune(exchange,base,rel,1,mmbid - theoretical*profitmargin,mmask + theoretical*profitmargin,0.); |
|||
// if new prices crosses existing order, cancel old order first
|
|||
marketmaker_prune(exchange,base,rel,-1,mmbid,mmask,0.); |
|||
printf("(%.8f %.8f) ",mmbid,mmask); |
|||
if ( (1) ) |
|||
{ |
|||
if ( mmbid >= lowask || (maxbid > SMALLVAL && mmbid > maxbid) ) //mmbid < highbid ||
|
|||
mmbid = 0.; |
|||
if ( mmask <= highbid || (minask > SMALLVAL && mmask < minask) ) // mmask > lowask ||
|
|||
mmask = 0.; |
|||
} |
|||
marketmaker_volumeset(&bidincr,&askincr,incr,buyvol,pendingbids,sellvol,pendingasks,maxexposure); |
|||
printf("AVE.(%.8f %.8f) hbla %.8f %.8f bid %.8f ask %.8f theory %.8f buys.(%.6f %.6f) sells.(%.6f %.6f) incr.(%.6f %.6f) balances.(%.8f + %.8f, %.8f + %.8f) test %f\n",avebid,aveask,highbid,lowask,mmbid,mmask,theoretical,buyvol,pendingbids,sellvol,pendingasks,bidincr,askincr,balance_base,DEX_base,balance_rel,DEX_rel,(aveask - avebid)/aveprice); |
|||
if ( (aveask - avebid)/aveprice > 4*profitmargin ) |
|||
bid = highbid * (1 - 4*profitmargin), ask = lowask * (1 + 4*profitmargin); |
|||
else bid = avebid - profitmargin*aveprice, ask = avebid + profitmargin*aveprice; |
|||
marketmaker_spread("DEX",base,rel,bid,incr,ask,incr,profitmargin*aveprice*0.5); |
|||
if ( (pendingbids + buyvol) > (pendingasks + sellvol) ) |
|||
{ |
|||
bidincr *= (double)(pendingasks + sellvol) / ((pendingbids + buyvol) + (pendingasks + sellvol)); |
|||
if ( bidincr < 0.1*incr ) |
|||
bidincr = 0.1*incr; |
|||
if ( bidincr > 1. ) |
|||
bidincr = (int32_t)bidincr + 0.777; |
|||
} |
|||
if ( (pendingbids + buyvol) < (pendingasks + sellvol) ) |
|||
{ |
|||
askincr *= (double)(pendingbids + buyvol) / ((pendingbids + buyvol) + (pendingasks + sellvol)); |
|||
if ( askincr < 0.1*incr ) |
|||
askincr = 0.1*incr; |
|||
if ( askincr > 1. ) |
|||
askincr = (int32_t)askincr + 0.777; |
|||
} |
|||
//printf("mmbid %.8f %.6f, mmask %.8f %.6f\n",mmbid,bidincr,mmask,askincr);
|
|||
//marketmaker_spread(exchange,base,rel,mmbid,bidincr,mmask,askincr,profitmargin*aveprice*0.5);
|
|||
sleep(6000); |
|||
} |
|||
} |
|||
} |
|||
|
|||
int main(int argc, const char * argv[]) |
|||
{ |
|||
char *base,*rel,*name,*exchange,*apikey,*apisecret,*blocktrail; |
|||
double profitmargin,maxexposure,incrratio,start_rel,start_base,minask,maxbid; |
|||
cJSON *retjson,*addrjson; char *retstr,*baseaddr,*reladdr,*passphrase; |
|||
if ( argc > 1 && (retjson= cJSON_Parse(argv[1])) != 0 ) |
|||
{ |
|||
minask = jdouble(retjson,"minask"); |
|||
maxbid = jdouble(retjson,"maxbid"); |
|||
profitmargin = jdouble(retjson,"profitmargin"); |
|||
maxexposure = jdouble(retjson,"maxexposure"); |
|||
incrratio = jdouble(retjson,"lotratio"); |
|||
start_base = jdouble(retjson,"start_base"); |
|||
start_rel = jdouble(retjson,"start_rel"); |
|||
passphrase = jstr(retjson,"passphrase"); |
|||
apikey = jstr(retjson,"apikey"); |
|||
apisecret = jstr(retjson,"apisecret"); |
|||
base = jstr(retjson,"base"); |
|||
name = jstr(retjson,"name"); |
|||
rel = jstr(retjson,"rel"); |
|||
blocktrail = jstr(retjson,"blocktrail"); |
|||
exchange = jstr(retjson,"exchange"); |
|||
if ( profitmargin < 0. || maxexposure <= 0. || incrratio <= 0. || apikey == 0 || apisecret == 0 || base == 0 || name == 0 || rel == 0 || exchange == 0 || blocktrail == 0 ) |
|||
{ |
|||
printf("illegal parameter (%s)\n",jprint(retjson,0)); |
|||
exit(-1); |
|||
} |
|||
if ( (retstr= iguana_walletpassphrase(passphrase,999999)) != 0 ) |
|||
{ |
|||
printf("%s\n",DEX_apikeypair(exchange,apikey,apisecret)); |
|||
printf("%s %s\n",base,DEX_balance(exchange,base,"")); |
|||
printf("%s %s\n",rel,DEX_balance(exchange,rel,"")); |
|||
marketmaker_pendinginit(exchange,base,rel); |
|||
if ( (addrjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
baseaddr = jstr(addrjson,base); |
|||
reladdr = jstr(addrjson,rel); |
|||
if ( baseaddr != 0 && reladdr != 0 ) |
|||
{ |
|||
printf("%s\n",DEX_amlp(blocktrail)); |
|||
printf("%s.%s %s\n",base,baseaddr,DEX_balance("DEX",base,baseaddr)); |
|||
printf("%s.%s %s\n",rel,reladdr,DEX_balance("DEX",rel,reladdr)); |
|||
// initialize state using DEX_pendingorders, etc.
|
|||
marketmaker(minask,maxbid,baseaddr,reladdr,start_base,start_rel,profitmargin,maxexposure,incrratio,exchange,name,base,rel); |
|||
} |
|||
free_json(addrjson); |
|||
} else printf("ERROR parsing.(%s)\n",retstr); |
|||
free(retstr); |
|||
} |
|||
free_json(retjson); |
|||
} |
|||
return 0; |
|||
} |
@ -0,0 +1,778 @@ |
|||
/******************************************************************************
|
|||
* Copyright © 2014-2017 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
#ifndef INCLUDE_KMDLOOKUP_H |
|||
#define INCLUDE_KMDLOOKUP_H |
|||
|
|||
#define KMD_EXPLORER_LAG 3 |
|||
|
|||
struct kmd_voutinfo |
|||
{ |
|||
bits256 spendtxid; |
|||
uint64_t amount; |
|||
uint16_t spendvini; |
|||
uint8_t type_rmd160[21], pad; |
|||
} PACKED; |
|||
|
|||
struct kmd_transaction |
|||
{ |
|||
bits256 txid; int32_t height,numvouts,numvins; uint32_t timestamp; |
|||
struct kmd_voutinfo vouts[]; |
|||
} PACKED; |
|||
|
|||
struct kmd_transactionhh |
|||
{ |
|||
UT_hash_handle hh; |
|||
struct kmd_transaction *tx; |
|||
long fpos; |
|||
int32_t numvouts,numvins; |
|||
struct kmd_transactionhh *ptrs[]; |
|||
}; |
|||
|
|||
struct kmd_addresshh |
|||
{ |
|||
UT_hash_handle hh; |
|||
struct kmd_transactionhh *prev,*lastprev; |
|||
uint8_t type_rmd160[21], pad; |
|||
}; |
|||
|
|||
struct kmd_addresshh *_kmd_address(struct iguana_info *coin,uint8_t type_rmd160[21]) |
|||
{ |
|||
struct kmd_addresshh *addr; |
|||
portable_mutex_lock(&coin->kmdmutex); |
|||
HASH_FIND(hh,coin->kmd_addresses,type_rmd160,21,addr); |
|||
portable_mutex_unlock(&coin->kmdmutex); |
|||
if ( addr != 0 && 0 ) |
|||
{ |
|||
char coinaddr[64]; |
|||
bitcoin_address(coinaddr,type_rmd160[0],&type_rmd160[1],20); |
|||
printf("%s found (%s) %02x\n",coin->symbol,coinaddr,type_rmd160[0]); |
|||
} |
|||
return(addr); |
|||
} |
|||
|
|||
struct kmd_addresshh *_kmd_addressadd(struct iguana_info *coin,uint8_t type_rmd160[21]) |
|||
{ |
|||
struct kmd_addresshh *addr; |
|||
addr = calloc(1,sizeof(*addr)); |
|||
memcpy(addr->type_rmd160,type_rmd160,21); |
|||
if ( 0 ) |
|||
{ |
|||
char coinaddr[64]; |
|||
bitcoin_address(coinaddr,type_rmd160[0],&type_rmd160[1],20); |
|||
printf("%s NEW ADDRESS.(%s) %02x\n",coin->symbol,coinaddr,type_rmd160[0]); |
|||
} |
|||
portable_mutex_lock(&coin->kmdmutex); |
|||
HASH_ADD_KEYPTR(hh,coin->kmd_addresses,addr->type_rmd160,21,addr); |
|||
portable_mutex_unlock(&coin->kmdmutex); |
|||
return(addr); |
|||
} |
|||
|
|||
struct kmd_addresshh *kmd_address(struct iguana_info *coin,char *coinaddr) |
|||
{ |
|||
uint8_t type_rmd160[21]; |
|||
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],coinaddr); |
|||
return(_kmd_address(coin,type_rmd160)); |
|||
} |
|||
|
|||
struct kmd_transactionhh *kmd_transaction(struct iguana_info *coin,bits256 txid) |
|||
{ |
|||
struct kmd_transactionhh *tx; |
|||
portable_mutex_lock(&coin->kmdmutex); |
|||
HASH_FIND(hh,coin->kmd_transactions,txid.bytes,sizeof(txid),tx); |
|||
portable_mutex_unlock(&coin->kmdmutex); |
|||
return(tx); |
|||
} |
|||
|
|||
int32_t kmd_transactionvin(struct iguana_info *coin,bits256 spendtxid,int32_t vini,bits256 txid,int32_t vout) |
|||
{ |
|||
struct kmd_transactionhh *ptr,*spendptr=0; |
|||
if ( bits256_nonz(txid) == 0 || vout < 0 ) |
|||
return(0); // coinbase must be
|
|||
if ( (ptr= kmd_transaction(coin,txid)) != 0 && vout < ptr->numvouts && (spendptr= kmd_transaction(coin,spendtxid)) != 0 ) |
|||
{ |
|||
ptr->ptrs[(vout<<1) + 1] = spendptr; |
|||
if ( bits256_cmp(ptr->tx->vouts[vout].spendtxid,spendtxid) != 0 || ptr->tx->vouts[vout].spendvini != vini ) |
|||
{ |
|||
if ( bits256_nonz(ptr->tx->vouts[vout].spendtxid) != 0 ) |
|||
printf("ht.%d vout.%d overwriting nonz spend\n",ptr->tx->height,vout); |
|||
//uint8_t type_rmd160[21]; char str[65];
|
|||
//bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],"RR5yAkzaxJeCVTwvpgCGsNcSPAZjeq3av4");
|
|||
//if ( memcmp(type_rmd160,ptr->tx->vouts[vout].type_rmd160,21) == 0 )
|
|||
// printf("RR5yAkzaxJeCVTwvpgCGsNcSPAZjeq3av4 %p vout.%d spend %.8f by %s/%d %p\n",ptr,vout,dstr(ptr->tx->vouts[vout].amount),bits256_str(str,spendtxid),vini,spendptr);
|
|||
ptr->tx->vouts[vout].spendtxid = spendtxid; |
|||
ptr->tx->vouts[vout].spendvini = vini; |
|||
} |
|||
return(0); |
|||
} |
|||
char str[65]; printf("%s.vin error %s vout.%d of %d vs ptr %p [%d] spent.%p\n",coin->symbol,bits256_str(str,txid),vout,ptr!=0?ptr->numvouts:-1,ptr,ptr!=0?ptr->numvouts:-1,spendptr); |
|||
return(-1); |
|||
} |
|||
|
|||
void kmd_transactionvout(struct iguana_info *coin,struct kmd_transactionhh *ptr,int32_t vout,uint64_t amount,uint8_t type_rmd160[21],bits256 spendtxid,int32_t spendvini) |
|||
{ |
|||
struct kmd_addresshh *addr; struct kmd_transaction *tx = 0; |
|||
if ( 0 ) |
|||
{ |
|||
char coinaddr[64],str[65]; |
|||
bitcoin_address(coinaddr,type_rmd160[0],&type_rmd160[1],20); |
|||
if ( strcmp(coinaddr,"RCsKEQ3r5Xxw4ZtK4CH9VzvfGpTFMdPpsh") == 0 ) |
|||
printf("%s ht.%d %s VOUT %d %.8f\n",coinaddr,ptr->tx->height,bits256_str(str,ptr->tx->txid),vout,dstr(amount)); |
|||
} |
|||
if ( vout < ptr->numvouts && (tx= ptr->tx) != 0 ) |
|||
{ |
|||
tx->vouts[vout].spendtxid = spendtxid; |
|||
tx->vouts[vout].spendvini = spendvini; |
|||
tx->vouts[vout].amount = amount; |
|||
memcpy(tx->vouts[vout].type_rmd160,type_rmd160,21); |
|||
if ( (addr= _kmd_address(coin,type_rmd160)) == 0 ) |
|||
addr = _kmd_addressadd(coin,type_rmd160); |
|||
if ( addr != 0 ) |
|||
{ |
|||
if ( addr->prev != ptr ) |
|||
{ |
|||
ptr->ptrs[vout << 1] = addr->prev; |
|||
addr->lastprev = addr->prev; |
|||
addr->prev = ptr; |
|||
} |
|||
else |
|||
{ |
|||
//printf("tricky case same address in different vouts, make sure backlink is right\n");
|
|||
ptr->ptrs[vout<<1] = addr->lastprev; |
|||
} |
|||
} else printf("kmd_transactionvout unexpected null addr\n"); |
|||
} else printf("vout.%d wont fit into numvouts.[%d] or null tx.%p\n",vout,ptr->numvouts,tx); |
|||
} |
|||
|
|||
struct kmd_transactionhh *kmd_transactionadd(struct iguana_info *coin,struct kmd_transaction *tx,int32_t numvouts,int32_t numvins) |
|||
{ |
|||
struct kmd_transactionhh *ptr; //char str[65];
|
|||
if ( (ptr= kmd_transaction(coin,tx->txid)) == 0 ) |
|||
{ |
|||
ptr = calloc(1,sizeof(*ptr) + (sizeof(*ptr->ptrs)*numvouts*2)); |
|||
ptr->numvouts = numvouts; |
|||
ptr->numvins = numvins; |
|||
ptr->tx = tx; |
|||
portable_mutex_lock(&coin->kmdmutex); |
|||
//char str[65]; printf("%s ht.%d u.%u NEW TXID.(%s) vouts.[%d]\n",coin->symbol,tx->height,tx->timestamp,bits256_str(str,tx->txid),numvouts);
|
|||
HASH_ADD_KEYPTR(hh,coin->kmd_transactions,tx->txid.bytes,sizeof(tx->txid),ptr); |
|||
portable_mutex_unlock(&coin->kmdmutex); |
|||
} // else printf("warning adding already existing txid %s\n",bits256_str(str,tx->txid));
|
|||
return(ptr); |
|||
} |
|||
|
|||
struct kmd_transaction *kmd_transactionalloc(bits256 txid,int32_t height,uint32_t timestamp,int32_t numvouts,int32_t numvins) |
|||
{ |
|||
struct kmd_transaction *tx; |
|||
tx = calloc(1,sizeof(*tx) + sizeof(struct kmd_voutinfo)*numvouts); |
|||
tx->numvouts = numvouts; |
|||
tx->numvins = numvins; |
|||
tx->txid = txid; |
|||
tx->height = height; |
|||
tx->timestamp = timestamp; |
|||
return(tx); |
|||
} |
|||
|
|||
void kmd_flushfiles(struct iguana_info *coin) |
|||
{ |
|||
if ( coin->kmd_txidfp != 0 ) |
|||
fflush(coin->kmd_txidfp); |
|||
if ( coin->kmd_spendfp != 0 ) |
|||
fflush(coin->kmd_spendfp); |
|||
} |
|||
|
|||
FILE *kmd_txidinit(struct iguana_info *coin) |
|||
{ |
|||
int32_t i; FILE *fp; char fname[1024]; struct kmd_transactionhh *ptr; struct kmd_transaction T,*tx; struct kmd_voutinfo V; long lastpos=0; |
|||
sprintf(fname,"%s/TRANSACTIONS/%s",GLOBAL_DBDIR,coin->symbol); |
|||
if ( (fp= fopen(fname,"rb+")) != 0 ) |
|||
{ |
|||
while ( fread(&T,1,sizeof(T),fp) == sizeof(T) ) |
|||
{ |
|||
if ( (tx= kmd_transactionalloc(T.txid,T.height,T.timestamp,T.numvouts,T.numvins)) != 0 ) |
|||
{ |
|||
//char str[65]; printf("INIT %s.[%d] vins.[%d] ht.%d %u\n",bits256_str(str,T.txid),T.numvouts,T.numvins,T.height,T.timestamp);
|
|||
if ( (ptr= kmd_transactionadd(coin,tx,T.numvouts,T.numvins)) != 0 ) |
|||
{ |
|||
if ( ptr != kmd_transaction(coin,tx->txid) ) |
|||
printf("%s ERROR: %p != %p for ht.%d\n",coin->symbol,ptr,kmd_transaction(coin,tx->txid),tx->height); |
|||
ptr->fpos = lastpos; |
|||
ptr->numvins = T.numvins; |
|||
ptr->numvouts = T.numvouts; |
|||
for (i=0; i<T.numvouts; i++) |
|||
{ |
|||
if ( fread(&V,1,sizeof(V),fp) == sizeof(V) ) |
|||
{ |
|||
kmd_transactionvout(coin,ptr,i,V.amount,V.type_rmd160,V.spendtxid,V.spendvini); |
|||
} |
|||
else |
|||
{ |
|||
printf("%s error loading vout.%d ht.%d\n",coin->symbol,i,T.height); |
|||
break; |
|||
} |
|||
} |
|||
if ( i == T.numvouts ) |
|||
{ |
|||
lastpos = ftell(fp); |
|||
if ( T.height > coin->kmd_height ) |
|||
coin->kmd_height = T.height; |
|||
} else break; |
|||
} |
|||
} else break; |
|||
} |
|||
printf("%s finished txidinit fpos %ld vs lastpos %ld\n",coin->symbol,ftell(fp),lastpos); |
|||
fseek(fp,lastpos,SEEK_SET); |
|||
} else fp = fopen(fname,"wb+"); |
|||
return(fp); |
|||
} |
|||
|
|||
FILE *kmd_spendinit(struct iguana_info *coin) |
|||
{ |
|||
int32_t i,numvins,spentvout; FILE *fp; char fname[1024],str[65]; bits256 txid,spenttxid; struct kmd_transactionhh *ptr,*tmp; struct kmd_voutinfo *vptr; long lastpos=0; |
|||
sprintf(fname,"%s/TRANSACTIONS/%s.spends",GLOBAL_DBDIR,coin->symbol); |
|||
if ( (fp= fopen(fname,"rb+")) != 0 ) |
|||
{ |
|||
while ( fread(&txid,1,sizeof(txid),fp) == sizeof(txid) ) |
|||
{ |
|||
if ( fread(&numvins,1,sizeof(numvins),fp) == sizeof(numvins) ) |
|||
{ |
|||
for (i=0; i<numvins; i++) |
|||
{ |
|||
if ( fread(&spenttxid,1,sizeof(spenttxid),fp) == sizeof(spenttxid) && |
|||
fread(&spentvout,1,sizeof(spentvout),fp) == sizeof(spentvout) ) |
|||
{ |
|||
if ( kmd_transactionvin(coin,txid,i,spenttxid,spentvout) < 0 ) |
|||
{ |
|||
printf("%s error adding spend %s %d of %d\n",coin->symbol,bits256_str(str,txid),i,numvins); |
|||
//break;
|
|||
} |
|||
} else break; |
|||
} |
|||
if ( i == numvins ) |
|||
lastpos = ftell(fp); |
|||
else break; |
|||
} else break; |
|||
} |
|||
printf("%s finished spendinit fpos %ld vs lastpos %ld\n",coin->symbol,ftell(fp),lastpos); |
|||
fseek(fp,lastpos,SEEK_SET); |
|||
HASH_ITER(hh,coin->kmd_transactions,ptr,tmp) |
|||
{ |
|||
//printf("scan for spends ht.%d\n",ptr->tx->height);
|
|||
for (i=0; i<ptr->numvouts; i++) |
|||
{ |
|||
vptr = &ptr->tx->vouts[i]; |
|||
if ( vptr->spendvini >= 0 && bits256_nonz(vptr->spendtxid) != 0 ) |
|||
{ |
|||
if ( ptr->ptrs[(i<<1) + 1] != kmd_transaction(coin,vptr->spendtxid) ) |
|||
{ |
|||
printf("%s mismatch %s spend.%d %p %p\n",coin->symbol,bits256_str(str,vptr->spendtxid),i,ptr->ptrs[(i<<1) + 1],kmd_transaction(coin,vptr->spendtxid)); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} else fp = fopen(fname,"wb+"); |
|||
return(fp); |
|||
} |
|||
|
|||
cJSON *kmd_transactionjson(int32_t height,struct kmd_transactionhh *ptr,char *typestr) |
|||
{ |
|||
int32_t i; char coinaddr[64]; cJSON *item,*array,*obj = cJSON_CreateObject(); |
|||
array = cJSON_CreateArray(); |
|||
jaddstr(obj,"type",typestr); |
|||
jaddbits256(obj,"txid",ptr->tx->txid); |
|||
jaddnum(obj,"height",ptr->tx->height); |
|||
jaddnum(obj,"timestamp",ptr->tx->timestamp); |
|||
for (i=0; i<ptr->numvouts; i++) |
|||
{ |
|||
item = cJSON_CreateObject(); |
|||
bitcoin_address(coinaddr,ptr->tx->vouts[i].type_rmd160[0],&ptr->tx->vouts[i].type_rmd160[1],20); |
|||
jaddnum(item,coinaddr,dstr(ptr->tx->vouts[i].amount)); |
|||
jaddi(array,item); |
|||
} |
|||
jadd(obj,"vouts",array); |
|||
return(obj); |
|||
} |
|||
|
|||
cJSON *kmd_unspentjson(struct supernet_info *myinfo,struct iguana_info *coin,int32_t height,struct kmd_transaction *tx,int32_t vout,int32_t is_listunspent) |
|||
{ |
|||
char *script; cJSON *sobj,*txout,*item = cJSON_CreateObject(); |
|||
jaddstr(item,"type","received"); |
|||
jaddnum(item,"height",tx->height); |
|||
jaddnum(item,"timestamp",tx->timestamp); |
|||
jaddbits256(item,"txid",tx->txid); |
|||
jaddnum(item,"vout",vout); |
|||
jaddnum(item,"amount",dstr(tx->vouts[vout].amount)); |
|||
if ( strcmp(coin->symbol,"KMD") == 0 ) |
|||
jaddnum(item,"interest",dstr(_iguana_interest((uint32_t)time(NULL),coin->longestchain,tx->timestamp,tx->vouts[vout].amount))); |
|||
if ( is_listunspent != 0 ) |
|||
{ |
|||
//char str[65]; printf("get spendscriptstr for %s/v%d\n",bits256_str(str,tx->txid),vout);
|
|||
if ( (txout= dpow_gettxout(myinfo,coin,tx->txid,vout)) != 0 ) |
|||
{ |
|||
//printf("got.(%s)\n",jprint(txout,0));
|
|||
if ( (sobj= jobj(txout,"scriptPubKey")) != 0 && (script= jstr(sobj,"hex")) != 0 ) |
|||
jaddstr(item,"scriptPubKey",script); |
|||
free_json(txout); |
|||
} |
|||
} |
|||
return(item); |
|||
} |
|||
|
|||
cJSON *kmd_spentjson(int32_t height,struct kmd_transaction *tx,int32_t vout,struct kmd_transactionhh *spent) |
|||
{ |
|||
cJSON *item = cJSON_CreateObject(); |
|||
jaddstr(item,"type","sent"); |
|||
jaddnum(item,"confirmations",height - tx->height); |
|||
jaddnum(item,"height",tx->height); |
|||
jaddnum(item,"timestamp",tx->timestamp); |
|||
jaddbits256(item,"txid",tx->txid); |
|||
jaddnum(item,"vout",vout); |
|||
jaddnum(item,"amount",dstr(tx->vouts[vout].amount)); |
|||
jaddbits256(item,"spendtxid",tx->vouts[vout].spendtxid); |
|||
jaddnum(item,"vin",tx->vouts[vout].spendvini); |
|||
if ( spent != 0 ) |
|||
{ |
|||
jadd(item,"paid",kmd_transactionjson(height,spent,"paid")); |
|||
} |
|||
return(item); |
|||
} |
|||
|
|||
int32_t kmd_height(struct iguana_info *coin) |
|||
{ |
|||
char params[64],*curlstr; cJSON *curljson; int32_t height = 0; |
|||
strcpy(params,"[]"); |
|||
if ( (curlstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getinfo",params)) != 0 ) |
|||
{ |
|||
if ( (curljson= cJSON_Parse(curlstr)) != 0 ) |
|||
{ |
|||
height = juint(curljson,"blocks"); |
|||
//printf("kmd_height.%d (%s)\n",height,jprint(curljson,0));
|
|||
free_json(curljson); |
|||
} |
|||
free(curlstr); |
|||
} |
|||
return(height); |
|||
} |
|||
|
|||
cJSON *kmd_gettxin(struct iguana_info *coin,bits256 txid,int32_t vout) |
|||
{ |
|||
struct kmd_transactionhh *ptr,*spendptr; struct kmd_transaction *tx; cJSON *retjson; |
|||
if ( (ptr= kmd_transaction(coin,txid)) != 0 && (tx= ptr->tx) != 0 ) |
|||
{ |
|||
if ( vout >= ptr->numvouts ) |
|||
return(cJSON_Parse("{\"error\":\"vout too big\"}")); |
|||
if ( (spendptr= ptr->ptrs[(vout << 1) + 1]) != 0 ) |
|||
{ |
|||
retjson = cJSON_CreateObject(); |
|||
jaddstr(retjson,"result","success"); |
|||
jaddstr(retjson,"status","spent"); |
|||
jaddnum(retjson,"height",tx->height); |
|||
jaddnum(retjson,"timestamp",tx->timestamp); |
|||
jaddbits256(retjson,"txid",txid); |
|||
jaddnum(retjson,"vout",vout); |
|||
jaddnum(retjson,"value",dstr(tx->vouts[vout].amount)); |
|||
jaddbits256(retjson,"spendtxid",tx->vouts[vout].spendtxid); |
|||
jaddnum(retjson,"vin",tx->vouts[vout].spendvini); |
|||
} else return(cJSON_Parse("{\"result\":\"success\",\"status\":\"unspent\"}")); |
|||
} |
|||
return(cJSON_Parse("{\"error\":\"txid not found\"}")); |
|||
} |
|||
|
|||
cJSON *kmd_listaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr,int32_t mode,cJSON *array) |
|||
{ |
|||
struct kmd_addresshh *addr; struct kmd_transactionhh *ptr=0,*spent,*prev=0; uint8_t type_rmd160[21]; int32_t i; char *retstr; cJSON *retjson; |
|||
if ( array == 0 ) |
|||
array = cJSON_CreateArray(); |
|||
//printf("%s listaddress.(%s)\n",coin->symbol,coinaddr);
|
|||
if ( (retstr= bitcoinrpc_validateaddress(myinfo,coin,0,0,coinaddr)) != 0 ) |
|||
{ |
|||
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
if ( jobj(retjson,"error") != 0 && is_cJSON_False(jobj(retjson,"error")) == 0 ) |
|||
{ |
|||
printf("%s\n",retstr); |
|||
free(retstr); |
|||
return(retjson); |
|||
} |
|||
free_json(retjson); |
|||
} |
|||
free(retstr); |
|||
} |
|||
/*if ( time(NULL) > coin->kmd_lasttime+30 )
|
|||
{ |
|||
coin->kmd_lasttime = (uint32_t)time(NULL); |
|||
if ( (height= kmd_height(coin)) > coin->kmd_height+KMD_EXPLORER_LAG*2 ) |
|||
{ |
|||
printf("height.%d > kmd_height.%d\n",height,coin->kmd_height); |
|||
return(cJSON_Parse("[]")); |
|||
} |
|||
}*/ |
|||
if ( strcmp("1111111111111111111114oLvT2",coinaddr) == 0 ) // null rmd160 from coinbase
|
|||
return(cJSON_Parse("[]")); |
|||
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],coinaddr); |
|||
if ( (addr= _kmd_address(coin,type_rmd160)) != 0 && (ptr= addr->prev) != 0 && ptr->tx != 0 ) |
|||
{ |
|||
while ( ptr != 0 ) |
|||
{ |
|||
prev = 0; |
|||
for (i=0; i<ptr->numvouts; i++) |
|||
{ |
|||
if ( memcmp(ptr->tx->vouts[i].type_rmd160,type_rmd160,21) == 0 ) |
|||
{ |
|||
spent = ptr->ptrs[(i<<1) + 1]; |
|||
//if ( strcmp("RFpYbieWuKm2ZsTaKeWkrrEdeSkVzhqX8x",coinaddr) == 0 )
|
|||
// printf("mode.%d [%d] %s ht.%d amount %.8f spent.%p\n",mode,coin->kmd_height,coinaddr,ptr->tx->height,dstr(ptr->tx->vouts[i].amount),spent);
|
|||
if ( (mode == 0 && spent == 0) || (mode == 1 && spent != 0) || mode == 2 ) |
|||
{ |
|||
//if ( fulltx == 0 )
|
|||
{ |
|||
if ( mode == 0 ) |
|||
jaddi(array,kmd_unspentjson(myinfo,coin,coin->kmd_height,ptr->tx,i,1)); |
|||
else if ( mode == 1 ) |
|||
jaddi(array,kmd_spentjson(coin->kmd_height,ptr->tx,i,spent)); |
|||
else if ( mode == 2 ) |
|||
{ |
|||
if ( spent != 0 ) |
|||
jaddi(array,kmd_spentjson(coin->kmd_height,ptr->tx,i,spent)); |
|||
else jaddi(array,kmd_unspentjson(myinfo,coin,coin->kmd_height,ptr->tx,i,0)); |
|||
} |
|||
} |
|||
/*else if ( flag == 0 )
|
|||
{ |
|||
if ( mode == 0 ) |
|||
jaddi(array,kmd_transactionjson(coin->kmd_height,ptr,"received")); |
|||
else if ( mode == 1 ) |
|||
{ |
|||
jaddi(array,kmd_transactionjson(coin->kmd_height,ptr,"received")); |
|||
jaddi(array,kmd_transactionjson(coin->kmd_height,spent,"sent")); |
|||
} |
|||
else if ( mode == 2 ) |
|||
{ |
|||
if ( spent != 0 ) |
|||
jaddi(array,kmd_transactionjson(coin->kmd_height,ptr,"spent")); |
|||
else jaddi(array,kmd_transactionjson(coin->kmd_height,ptr,"received")); |
|||
} |
|||
flag = 1; |
|||
}*/ |
|||
} |
|||
if ( ptr->ptrs[i<<1] != 0 ) |
|||
{ |
|||
if ( prev == 0 ) |
|||
prev = ptr->ptrs[i<<1]; |
|||
else if ( prev != ptr->ptrs[i<<1] ) |
|||
printf("%s ht.%d prev.%p != %p\n",coinaddr,ptr->tx->height,prev,ptr->ptrs[i<<1]); |
|||
} |
|||
} |
|||
} |
|||
ptr = prev; |
|||
} |
|||
} //else printf("no valid entry for (%s) %p %p\n",coinaddr,addr,ptr);
|
|||
return(array); |
|||
} |
|||
|
|||
cJSON *kmd_listunspent(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr) |
|||
{ |
|||
cJSON *retjson; |
|||
retjson = kmd_listaddress(myinfo,coin,coinaddr,0,0); |
|||
//printf("KMD utxos.(%s)\n",jprint(retjson,0));
|
|||
return(retjson); |
|||
} |
|||
|
|||
cJSON *kmd_listspent(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr) |
|||
{ |
|||
return(kmd_listaddress(myinfo,coin,coinaddr,1,0)); |
|||
} |
|||
|
|||
cJSON *kmd_listtransactions(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr,int32_t count,int32_t skip) |
|||
{ |
|||
cJSON *array = cJSON_CreateArray(); |
|||
//if ( (height= kmd_height(coin)) > coin->kmd_height+KMD_EXPLORER_LAG )
|
|||
// return(cJSON_Parse("[]"));
|
|||
if ( count == 0 ) |
|||
count = 100; |
|||
array = kmd_listaddress(myinfo,coin,coinaddr,0,0); |
|||
array = kmd_listaddress(myinfo,coin,coinaddr,1,array); |
|||
return(array); |
|||
} |
|||
|
|||
int64_t _kmd_getbalance(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr,uint64_t *receivedp,uint64_t *sentp,uint64_t *interestp) |
|||
{ |
|||
int32_t iter,i,n; cJSON *array,*item; uint64_t value; |
|||
for (iter=1; iter<=2; iter++) |
|||
{ |
|||
if ( (array= kmd_listaddress(myinfo,coin,coinaddr,iter,0)) != 0 ) |
|||
{ |
|||
if ( (n= cJSON_GetArraySize(array)) > 0 ) |
|||
{ |
|||
for (i=0; i<n; i++) |
|||
{ |
|||
item = jitem(array,i); |
|||
if ( (value= jdouble(item,"amount")*SATOSHIDEN) != 0 || (value= jdouble(item,"value")*SATOSHIDEN) != 0 ) |
|||
{ |
|||
if ( iter == 2 ) |
|||
{ |
|||
*receivedp += value; |
|||
*interestp += jdouble(item,"interest") * SATOSHIDEN; |
|||
} else *sentp += value; |
|||
} |
|||
} |
|||
} |
|||
free_json(array); |
|||
} |
|||
} |
|||
return(*receivedp - *sentp); |
|||
} |
|||
|
|||
cJSON *kmd_getbalance(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr) |
|||
{ |
|||
cJSON *retjson; double netbalance=0.,fbalance; uint64_t interest,i,s,r,sent=0,received=0; int64_t balance=0; struct kmd_addresshh *addr,*tmp; char address[64]; int32_t height = coin->kmd_height+1; |
|||
retjson = cJSON_CreateObject(); |
|||
fbalance = 0.; |
|||
interest = 0; |
|||
if ( strcmp(coinaddr,"*") == 0 ) |
|||
{ |
|||
HASH_ITER(hh,coin->kmd_addresses,addr,tmp) |
|||
{ |
|||
bitcoin_address(address,addr->type_rmd160[0],&addr->type_rmd160[1],20); |
|||
s = r = i = 0; |
|||
balance += _kmd_getbalance(myinfo,coin,address,&r,&s,&i); |
|||
netbalance += dstr(r); |
|||
netbalance -= dstr(s); |
|||
if ( (r - s) > 100000*SATOSHIDEN ) |
|||
printf("{\"address\":\"%s\",\"received\":%.8f,\"sent\":%.8f,\"balance\":%.8f,\"supply\":%.8f,\"supplyf\":%.8f,\"interest\":%.8f}\n",address,dstr(r),dstr(s),dstr(r)-dstr(s),dstr(balance),netbalance,dstr(interest)); |
|||
received += r; |
|||
sent += s; |
|||
interest += i; |
|||
} |
|||
if ( strcmp("KMD",coin->symbol) == 0 ) |
|||
jaddnum(retjson,"interestpaid",dstr(balance) - 100000000 - (height*3)); |
|||
} |
|||
else |
|||
{ |
|||
balance = _kmd_getbalance(myinfo,coin,coinaddr,&received,&sent,&interest); |
|||
netbalance = dstr(balance); |
|||
} |
|||
jaddstr(retjson,"result","success"); |
|||
jaddnum(retjson,"received",dstr(received)); |
|||
jaddnum(retjson,"sent",dstr(sent)); |
|||
//if ( fabs(netbalance*SATOSHIDEN - balance) > 1 )
|
|||
jaddnum(retjson,"balancef",netbalance+1./(SATOSHIDEN*2)-SMALLVAL); |
|||
//else
|
|||
jaddnum(retjson,"balance",dstr(balance)); |
|||
jaddnum(retjson,"interest",dstr(interest)); |
|||
jaddnum(retjson,"height",height); |
|||
if ( strcmp("KMD",coin->symbol) == 0 ) |
|||
jaddnum(retjson,"mined",height*3); |
|||
return(retjson); |
|||
} |
|||
|
|||
char *kmd_bitcoinblockhashstr(char *coinstr,char *serverport,char *userpass,int32_t height) |
|||
{ |
|||
char numstr[128],*blockhashstr=0; bits256 hash2; struct iguana_info *coin; |
|||
sprintf(numstr,"%d",height); |
|||
if ( (blockhashstr= bitcoind_passthru(coinstr,serverport,userpass,"getblockhash",numstr)) == 0 ) |
|||
return(0); |
|||
hash2 = bits256_conv(blockhashstr); |
|||
if ( blockhashstr == 0 || blockhashstr[0] == 0 || bits256_nonz(hash2) == 0 ) |
|||
{ |
|||
printf("%s couldnt get blockhash for %u, probably curl is disabled %p\n",coinstr,height,blockhashstr); |
|||
if ( blockhashstr != 0 ) |
|||
free(blockhashstr); |
|||
if ( height == 0 ) |
|||
{ |
|||
if ( (coin= iguana_coinfind(coinstr)) != 0 ) |
|||
{ |
|||
bits256_str(numstr,*(bits256 *)coin->chain->genesis_hashdata); |
|||
return(clonestr(numstr)); |
|||
} |
|||
} |
|||
return(0); |
|||
} |
|||
return(blockhashstr); |
|||
} |
|||
|
|||
cJSON *kmd_blockjson(int32_t *heightp,char *coinstr,char *serverport,char *userpass,char *blockhashstr,int32_t height) |
|||
{ |
|||
cJSON *json = 0; int32_t flag = 0; char buf[1024],*blocktxt = 0; |
|||
if ( blockhashstr == 0 ) |
|||
blockhashstr = kmd_bitcoinblockhashstr(coinstr,serverport,userpass,height), flag = 1; |
|||
if ( blockhashstr != 0 ) |
|||
{ |
|||
sprintf(buf,"\"%s\"",blockhashstr); |
|||
blocktxt = bitcoind_passthru(coinstr,serverport,userpass,"getblock",buf); |
|||
//printf("get_blockjson.(%d %s) %s\n",height,blockhashstr,blocktxt);
|
|||
if ( blocktxt != 0 && blocktxt[0] != 0 && (json= cJSON_Parse(blocktxt)) != 0 && heightp != 0 ) |
|||
if ( (*heightp= juint(json,"height")) != height ) |
|||
*heightp = -1; |
|||
if ( flag != 0 && blockhashstr != 0 ) |
|||
free(blockhashstr); |
|||
if ( blocktxt != 0 ) |
|||
free(blocktxt); |
|||
} |
|||
return(json); |
|||
} |
|||
|
|||
int32_t _kmd_bitcoinscan(struct iguana_info *coin) |
|||
{ |
|||
int32_t h,num=0,loadheight,lag,i,n,j,iter,numtxids,numvins,numvouts,flag=0,height=-1; cJSON *txjson,*vouts,*vins,*blockjson,*txids,*vout,*vin,*sobj,*addresses; bits256 zero,txid; char *curlstr,params[128],str[65]; struct kmd_transactionhh *ptr; struct kmd_transaction *tx; uint8_t type_rmd160[21]; |
|||
if ( coin->kmd_didinit == 0 ) |
|||
{ |
|||
if ( (coin->kmd_txidfp= kmd_txidinit(coin)) == 0 ) |
|||
printf("error initializing %s.kmd txid\n",coin->symbol); |
|||
else if ( (coin->kmd_spendfp= kmd_spendinit(coin)) == 0 ) |
|||
printf("error initializing %s.kmd spend\n",coin->symbol); |
|||
coin->kmd_didinit = 1; |
|||
} |
|||
height = kmd_height(coin); |
|||
loadheight = coin->kmd_height+1; |
|||
lag = (strcmp(coin->symbol,"KMD") == 0 ? KMD_EXPLORER_LAG : 1); |
|||
while ( loadheight < height-lag ) |
|||
{ |
|||
flag = 0; |
|||
if ( (loadheight % 10000) == 0 ) |
|||
printf("loading %s ht.%d vs height.%d - lag.%d kmdheight.%d\n",coin->symbol,loadheight,height,lag,coin->kmd_height);//,jprint(kmd_getbalance(coin,"*"),1));
|
|||
if ( (blockjson= kmd_blockjson(&h,coin->symbol,coin->chain->serverport,coin->chain->userpass,0,loadheight)) != 0 ) |
|||
{ |
|||
if ( (txids= jarray(&numtxids,blockjson,"tx")) != 0 ) |
|||
{ |
|||
for (iter=0; iter<2; iter++) |
|||
for (i=0; i<numtxids; i++) |
|||
{ |
|||
memset(&zero,0,sizeof(zero)); |
|||
txid = jbits256(jitem(txids,i),0); |
|||
if ( iter == 0 && kmd_transaction(coin,txid) != 0 ) |
|||
{ |
|||
//printf("already have txid.%s\n",bits256_str(str,txid));
|
|||
continue; |
|||
} |
|||
sprintf(params,"[\"%s\", 1]",bits256_str(str,txid)); |
|||
if ( (curlstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getrawtransaction",params)) != 0 ) |
|||
{ |
|||
if ( (txjson= cJSON_Parse(curlstr)) != 0 ) |
|||
{ |
|||
if ( bits256_cmp(txid,jbits256(txjson,"txid")) != 0 ) |
|||
{ |
|||
printf("txid mismatch error ht.%d i.%d\n",loadheight,i); |
|||
continue; |
|||
} |
|||
vouts = jarray(&numvouts,txjson,"vout"); |
|||
vins = jarray(&numvins,txjson,"vin"); |
|||
tx = 0; |
|||
ptr = 0; |
|||
if ( iter == 0 ) |
|||
{ |
|||
if ( (tx= kmd_transactionalloc(txid,loadheight,jint(txjson,"blocktime"),numvouts,numvins)) != 0 ) |
|||
ptr = kmd_transactionadd(coin,tx,numvouts,numvins); |
|||
else printf("error init tx ptr.%p tx.%p\n",ptr,tx); |
|||
} |
|||
else |
|||
{ |
|||
if ( (ptr= kmd_transaction(coin,txid)) != 0 ) |
|||
tx = ptr->tx; |
|||
} |
|||
if ( ptr != 0 && tx != 0 ) |
|||
{ |
|||
if ( iter == 0 ) |
|||
{ |
|||
sobj = addresses = 0; |
|||
for (j=0; j<numvouts; j++) |
|||
{ |
|||
vout = jitem(vouts,j); |
|||
if ( (sobj= jobj(vout,"scriptPubKey")) != 0 && (addresses= jarray(&n,sobj,"addresses")) != 0 ) |
|||
{ |
|||
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],jstri(addresses,0)); |
|||
kmd_transactionvout(coin,ptr,j,jdouble(vout,"value")*SATOSHIDEN,type_rmd160,zero,-1); |
|||
//fprintf(stderr,"%.8f ",jdouble(vout,"value"));
|
|||
} // else printf("missing sobj.%p or addresses.%p (%s)\n",sobj,addresses,jprint(vout,0)); //likely OP_RETURN
|
|||
sobj = addresses = 0; |
|||
} |
|||
//fprintf(stderr,"numvouts.%d ht.%d %s\n",numvouts,height,coin->symbol);
|
|||
if ( coin->kmd_txidfp != 0 ) |
|||
{ |
|||
ptr->fpos = ftell(coin->kmd_txidfp); |
|||
fwrite(tx,1,sizeof(*tx) + tx->numvouts*sizeof(*tx->vouts),coin->kmd_txidfp); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
if ( coin->kmd_spendfp != 0 ) |
|||
{ |
|||
fwrite(&txid,1,sizeof(txid),coin->kmd_spendfp); |
|||
fwrite(&numvins,1,sizeof(numvins),coin->kmd_spendfp); |
|||
} |
|||
for (j=0; j<numvins; j++) |
|||
{ |
|||
bits256 spenttxid; int32_t spentvout; |
|||
vin = jitem(vins,j); |
|||
spenttxid = jbits256(vin,"txid"); |
|||
spentvout = jint(vin,"vout"); |
|||
//if ( bits256_nonz(spenttxid) == 0 || spentvout < 0 )
|
|||
// printf("null spenttxid ht.%d j.%d spentvout.%d\n",loadheight,j,spentvout);
|
|||
if ( kmd_transactionvin(coin,txid,j,spenttxid,spentvout) < 0 ) |
|||
{ |
|||
printf("error i.%d of numvins.%d (%s)\n",j,numvins,jprint(vin,0)); |
|||
flag++; |
|||
} |
|||
if ( coin->kmd_spendfp != 0 ) |
|||
{ |
|||
fwrite(&spenttxid,1,sizeof(spenttxid),coin->kmd_spendfp); |
|||
fwrite(&spentvout,1,sizeof(spentvout),coin->kmd_spendfp); |
|||
} |
|||
} |
|||
} |
|||
} else printf("incomplete at ht.%d i.%d %p %p\n",loadheight,i,ptr,tx); |
|||
free_json(txjson); |
|||
} else printf("parseerror.(%s)\n",curlstr); |
|||
free(curlstr); |
|||
} |
|||
} |
|||
num++; |
|||
kmd_flushfiles(coin); |
|||
} |
|||
free_json(blockjson); |
|||
} |
|||
if ( flag != 0 || num > 500 ) |
|||
break; |
|||
coin->kmd_height = loadheight++; |
|||
} |
|||
return(num); |
|||
} |
|||
|
|||
void kmd_bitcoinscan() |
|||
{ |
|||
char *retstr; cJSON *array; int32_t i,n; struct iguana_info *coin; // scan allcoins also
|
|||
if ( (retstr= dpow_notarychains(0,0,0,0)) != 0 ) |
|||
{ |
|||
if ( (array= cJSON_Parse(retstr)) != 0 ) |
|||
{ |
|||
if ( (n= cJSON_GetArraySize(array)) > 0 ) |
|||
{ |
|||
for (i=0; i<n; i++) |
|||
{ |
|||
if ( (coin= iguana_coinfind(jstri(array,i))) != 0 && strcmp(coin->symbol,"BTC") != 0 ) |
|||
{ |
|||
//if ( strcmp("KMD",coin->symbol) == 0 )
|
|||
_kmd_bitcoinscan(coin); |
|||
usleep(250000); |
|||
} |
|||
} |
|||
} |
|||
free_json(array); |
|||
} |
|||
free(retstr); |
|||
} |
|||
} |
|||
|
|||
#endif |
@ -0,0 +1 @@ |
|||
gcc -o marketmaker -I../crypto777 exchanges/mm.c ../crypto777/cJSON.c ../agents/libcrypto777.a -lcurl -lpthread -lm |
@ -0,0 +1,2 @@ |
|||
#!/bin/bash |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"InstantDEX\",\"method\":\"init\"}" |
@ -0,0 +1,164 @@ |
|||
# RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d KMD 6266.43352646 |
|||
./komodo-cli sendtoaddress RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d 6266.43352646 |
|||
sleep 3 |
|||
echo "6266.43352646 <- expected amount RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d" |
|||
|
|||
# R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6 KMD 1203.04246569 |
|||
./komodo-cli sendtoaddress R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6 1203.04246569 |
|||
sleep 3 |
|||
echo "1203.04246569 <- expected amount R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6" |
|||
|
|||
# RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j KMD 9683.15249375 |
|||
./komodo-cli sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 9683.15249375 |
|||
sleep 3 |
|||
echo "9683.15249375 <- expected amount RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j" |
|||
|
|||
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 306877.42641191 |
|||
./komodo-cli sendtoaddress RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT 306877.42641191 |
|||
sleep 3 |
|||
echo "306877.42641191 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT" |
|||
|
|||
# RQantoJxT8szwfAqUM3enLPe85YiQtwndH KMD 150.23706901 |
|||
./komodo-cli sendtoaddress RQantoJxT8szwfAqUM3enLPe85YiQtwndH 150.23706901 |
|||
sleep 3 |
|||
echo "150.23706901 <- expected amount RQantoJxT8szwfAqUM3enLPe85YiQtwndH" |
|||
|
|||
# RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY KMD 1985.04626121 |
|||
./komodo-cli sendtoaddress RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY 1985.04626121 |
|||
sleep 3 |
|||
echo "1985.04626121 <- expected amount RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY" |
|||
|
|||
# RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE KMD 1664.32251109 |
|||
./komodo-cli sendtoaddress RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE 1664.32251109 |
|||
sleep 3 |
|||
echo "1664.32251109 <- expected amount RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE" |
|||
|
|||
# RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 KMD 5.99800973 |
|||
./komodo-cli sendtoaddress RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 5.99800973 |
|||
sleep 3 |
|||
echo "5.99800973 <- expected amount RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3" |
|||
|
|||
# RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc KMD 9671.53271075 |
|||
./komodo-cli sendtoaddress RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc 9671.53271075 |
|||
sleep 3 |
|||
echo "9671.53271075 <- expected amount RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc" |
|||
|
|||
# RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm KMD 40223.19497203, REVS 101.00000000 |
|||
# RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm KMD 40223.19497203 |
|||
./komodo-cli sendtoaddress RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm 40223.19497203 |
|||
sleep 3 |
|||
echo "40223.19497203 <- expected amount RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm" |
|||
|
|||
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 72698.53877152 |
|||
./komodo-cli sendtoaddress RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB 72698.53877152 |
|||
sleep 3 |
|||
echo "72698.53877152 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB" |
|||
|
|||
# RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe KMD 9683.15249375 |
|||
./komodo-cli sendtoaddress RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe 9683.15249375 |
|||
sleep 3 |
|||
echo "9683.15249375 <- expected amount RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe" |
|||
|
|||
# RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB KMD 3532.13792522 |
|||
./komodo-cli sendtoaddress RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB 3532.13792522 |
|||
sleep 3 |
|||
echo "3532.13792522 <- expected amount RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB" |
|||
|
|||
# RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ KMD 309.69366537 |
|||
./komodo-cli sendtoaddress RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ 309.69366537 |
|||
sleep 3 |
|||
echo "309.69366537 <- expected amount RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ" |
|||
|
|||
# RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z KMD 3873.26099750 |
|||
./komodo-cli sendtoaddress RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z 3873.26099750 |
|||
sleep 3 |
|||
echo "3873.26099750 <- expected amount RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z" |
|||
|
|||
# RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut KMD 62053.93460050 |
|||
./komodo-cli sendtoaddress RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut 62053.93460050 |
|||
sleep 3 |
|||
echo "62053.93460050 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut" |
|||
|
|||
# REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs KMD 6506.14889316 |
|||
./komodo-cli sendtoaddress REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs 6506.14889316 |
|||
sleep 3 |
|||
echo "6506.14889316 <- expected amount REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs" |
|||
|
|||
# RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL KMD 812.78437655 |
|||
./komodo-cli sendtoaddress RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL 812.78437655 |
|||
sleep 3 |
|||
echo "812.78437655 <- expected amount RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL" |
|||
|
|||
# R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8 KMD 1452.47287406 |
|||
./komodo-cli sendtoaddress R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8 1452.47287406 |
|||
sleep 3 |
|||
echo "1452.47287406 <- expected amount R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8" |
|||
|
|||
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 867.82549038 |
|||
./komodo-cli sendtoaddress RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A 867.82549038 |
|||
sleep 3 |
|||
echo "867.82549038 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A" |
|||
|
|||
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289 |
|||
./komodo-cli sendtoaddress RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv 693.08132289 |
|||
sleep 3 |
|||
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv" |
|||
|
|||
# RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm KMD 8521.17419450 |
|||
./komodo-cli sendtoaddress RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm 8521.17419450 |
|||
sleep 3 |
|||
echo "8521.17419450 <- expected amount RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm" |
|||
|
|||
# RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM KMD 5328.53865807 |
|||
./komodo-cli sendtoaddress RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM 5328.53865807 |
|||
sleep 3 |
|||
echo "5328.53865807 <- expected amount RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM" |
|||
|
|||
# RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1 KMD 29049.45748125 |
|||
./komodo-cli sendtoaddress RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1 29049.45748125 |
|||
sleep 3 |
|||
echo "29049.45748125 <- expected amount RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1" |
|||
|
|||
# RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot KMD 4840.60793162 |
|||
./komodo-cli sendtoaddress RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot 4840.60793162 |
|||
sleep 3 |
|||
echo "4840.60793162 <- expected amount RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot" |
|||
|
|||
# RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct KMD 2420.78812342 |
|||
./komodo-cli sendtoaddress RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct 2420.78812342 |
|||
sleep 3 |
|||
echo "2420.78812342 <- expected amount RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct" |
|||
|
|||
# RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC KMD 137.73071692, REVS 2.73426759 |
|||
# RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC KMD 137.73071692 |
|||
./komodo-cli sendtoaddress RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC 137.73071692 |
|||
sleep 3 |
|||
echo "137.73071692 <- expected amount RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC" |
|||
|
|||
# RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM KMD 9737.34607711 |
|||
./komodo-cli sendtoaddress RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM 9737.34607711 |
|||
sleep 3 |
|||
echo "9737.34607711 <- expected amount RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM" |
|||
|
|||
# RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga KMD 1903.31162313 |
|||
./komodo-cli sendtoaddress RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga 1903.31162313 |
|||
sleep 3 |
|||
echo "1903.31162313 <- expected amount RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga" |
|||
|
|||
# RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h KMD 99.84182062 |
|||
./komodo-cli sendtoaddress RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h 99.84182062 |
|||
sleep 3 |
|||
echo "99.84182062 <- expected amount RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h" |
|||
|
|||
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 1167.24851677 |
|||
./komodo-cli sendtoaddress RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF 1167.24851677 |
|||
sleep 3 |
|||
echo "1167.24851677 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF" |
|||
|
|||
# RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD KMD 15095.38306803 |
|||
./komodo-cli sendtoaddress RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD 15095.38306803 |
|||
sleep 3 |
|||
echo "15095.38306803 <- expected amount RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD" |
|||
|
|||
|
|||
# total KMD 618514.84605397 REVS 0.00000000 |
@ -0,0 +1,161 @@ |
|||
# RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d KMD 6266.43352646 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d\",\"symbol\":\"KMD\"}" # 6266.43352646 |
|||
sleep 3 |
|||
echo "6266.43352646 <- expected amount RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d" |
|||
|
|||
# R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6 KMD 1203.04246569 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6\",\"symbol\":\"KMD\"}" # 1203.04246569 |
|||
sleep 3 |
|||
echo "1203.04246569 <- expected amount R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6" |
|||
|
|||
# RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j KMD 9683.15249375 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j\",\"symbol\":\"KMD\"}" # 9683.15249375 |
|||
sleep 3 |
|||
echo "9683.15249375 <- expected amount RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j" |
|||
|
|||
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 306877.42641191 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT\",\"symbol\":\"KMD\"}" # 306877.42641191 |
|||
sleep 3 |
|||
echo "306877.42641191 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT" |
|||
|
|||
# RQantoJxT8szwfAqUM3enLPe85YiQtwndH KMD 150.23706901 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQantoJxT8szwfAqUM3enLPe85YiQtwndH\",\"symbol\":\"KMD\"}" # 150.23706901 |
|||
sleep 3 |
|||
echo "150.23706901 <- expected amount RQantoJxT8szwfAqUM3enLPe85YiQtwndH" |
|||
|
|||
# RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY KMD 1985.04626121 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY\",\"symbol\":\"KMD\"}" # 1985.04626121 |
|||
sleep 3 |
|||
echo "1985.04626121 <- expected amount RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY" |
|||
|
|||
# RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE KMD 1664.32251109 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE\",\"symbol\":\"KMD\"}" # 1664.32251109 |
|||
sleep 3 |
|||
echo "1664.32251109 <- expected amount RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE" |
|||
|
|||
# RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 KMD 5.99800973 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3\",\"symbol\":\"KMD\"}" # 5.99800973 |
|||
sleep 3 |
|||
echo "5.99800973 <- expected amount RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3" |
|||
|
|||
# RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc KMD 9671.53271075 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc\",\"symbol\":\"KMD\"}" # 9671.53271075 |
|||
sleep 3 |
|||
echo "9671.53271075 <- expected amount RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc" |
|||
|
|||
# RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm KMD 40223.19497203, REVS 101.00000000 |
|||
# RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm KMD 40223.19497203 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm\",\"symbol\":\"KMD\"}" # 40223.19497203 |
|||
sleep 3 |
|||
echo "40223.19497203 <- expected amount RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm" |
|||
|
|||
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 72698.53877152 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB\",\"symbol\":\"KMD\"}" # 72698.53877152 |
|||
sleep 3 |
|||
echo "72698.53877152 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB" |
|||
|
|||
# RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe KMD 9683.15249375 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe\",\"symbol\":\"KMD\"}" # 9683.15249375 |
|||
sleep 3 |
|||
echo "9683.15249375 <- expected amount RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe" |
|||
|
|||
# RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB KMD 3532.13792522 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB\",\"symbol\":\"KMD\"}" # 3532.13792522 |
|||
sleep 3 |
|||
echo "3532.13792522 <- expected amount RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB" |
|||
|
|||
# RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ KMD 309.69366537 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ\",\"symbol\":\"KMD\"}" # 309.69366537 |
|||
sleep 3 |
|||
echo "309.69366537 <- expected amount RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ" |
|||
|
|||
# RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z KMD 3873.26099750 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z\",\"symbol\":\"KMD\"}" # 3873.26099750 |
|||
sleep 3 |
|||
echo "3873.26099750 <- expected amount RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z" |
|||
|
|||
# RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut KMD 62053.93460050 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut\",\"symbol\":\"KMD\"}" # 62053.93460050 |
|||
sleep 3 |
|||
echo "62053.93460050 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut" |
|||
|
|||
# REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs KMD 6506.14889316 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs\",\"symbol\":\"KMD\"}" # 6506.14889316 |
|||
sleep 3 |
|||
echo "6506.14889316 <- expected amount REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs" |
|||
|
|||
# RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL KMD 812.78437655 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL\",\"symbol\":\"KMD\"}" # 812.78437655 |
|||
sleep 3 |
|||
echo "812.78437655 <- expected amount RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL" |
|||
|
|||
# R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8 KMD 1452.47287406 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8\",\"symbol\":\"KMD\"}" # 1452.47287406 |
|||
sleep 3 |
|||
echo "1452.47287406 <- expected amount R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8" |
|||
|
|||
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 867.82549038 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A\",\"symbol\":\"KMD\"}" # 867.82549038 |
|||
sleep 3 |
|||
echo "867.82549038 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A" |
|||
|
|||
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}" # 693.08132289 |
|||
sleep 3 |
|||
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv" |
|||
|
|||
# RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm KMD 8521.17419450 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm\",\"symbol\":\"KMD\"}" # 8521.17419450 |
|||
sleep 3 |
|||
echo "8521.17419450 <- expected amount RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm" |
|||
|
|||
# RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM KMD 5328.53865807 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM\",\"symbol\":\"KMD\"}" # 5328.53865807 |
|||
sleep 3 |
|||
echo "5328.53865807 <- expected amount RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM" |
|||
|
|||
# RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1 KMD 29049.45748125 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1\",\"symbol\":\"KMD\"}" # 29049.45748125 |
|||
sleep 3 |
|||
echo "29049.45748125 <- expected amount RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1" |
|||
|
|||
# RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot KMD 4840.60793162 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot\",\"symbol\":\"KMD\"}" # 4840.60793162 |
|||
sleep 3 |
|||
echo "4840.60793162 <- expected amount RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot" |
|||
|
|||
# RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct KMD 2420.78812342 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct\",\"symbol\":\"KMD\"}" # 2420.78812342 |
|||
sleep 3 |
|||
echo "2420.78812342 <- expected amount RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct" |
|||
|
|||
# RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC KMD 137.73071692, REVS 2.73426759 |
|||
# RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC KMD 137.73071692 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC\",\"symbol\":\"KMD\"}" # 137.73071692 |
|||
sleep 3 |
|||
echo "137.73071692 <- expected amount RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC" |
|||
|
|||
# RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM KMD 9737.34607711 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM\",\"symbol\":\"KMD\"}" # 9737.34607711 |
|||
sleep 3 |
|||
echo "9737.34607711 <- expected amount RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM" |
|||
|
|||
# RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga KMD 1903.31162313 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga\",\"symbol\":\"KMD\"}" # 1903.31162313 |
|||
sleep 3 |
|||
echo "1903.31162313 <- expected amount RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga" |
|||
|
|||
# RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h KMD 99.84182062 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h\",\"symbol\":\"KMD\"}" # 99.84182062 |
|||
sleep 3 |
|||
echo "99.84182062 <- expected amount RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h" |
|||
|
|||
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 1167.24851677 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF\",\"symbol\":\"KMD\"}" # 1167.24851677 |
|||
sleep 3 |
|||
echo "1167.24851677 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF" |
|||
|
|||
# RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD KMD 15095.38306803 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD\",\"symbol\":\"KMD\"}" # 15095.38306803 |
|||
sleep 3 |
|||
echo "15095.38306803 <- expected amount RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD" |
@ -0,0 +1,129 @@ |
|||
# RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d KMD 6266.43352646 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d\",\"symbol\":\"KMD\"}" |
|||
echo "6266.43352646 <- expected amount RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d" |
|||
|
|||
# R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6 KMD 1203.04246569 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6\",\"symbol\":\"KMD\"}" |
|||
echo "1203.04246569 <- expected amount R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6" |
|||
|
|||
# RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j KMD 9683.15249375 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j\",\"symbol\":\"KMD\"}" |
|||
echo "9683.15249375 <- expected amount RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j" |
|||
|
|||
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 306877.42641191 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT\",\"symbol\":\"KMD\"}" |
|||
echo "306877.42641191 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT" |
|||
|
|||
# RQantoJxT8szwfAqUM3enLPe85YiQtwndH KMD 150.23706901 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQantoJxT8szwfAqUM3enLPe85YiQtwndH\",\"symbol\":\"KMD\"}" |
|||
echo "150.23706901 <- expected amount RQantoJxT8szwfAqUM3enLPe85YiQtwndH" |
|||
|
|||
# RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY KMD 1985.04626121 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY\",\"symbol\":\"KMD\"}" |
|||
echo "1985.04626121 <- expected amount RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY" |
|||
|
|||
# RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE KMD 1664.32251109 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE\",\"symbol\":\"KMD\"}" |
|||
echo "1664.32251109 <- expected amount RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE" |
|||
|
|||
# RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 KMD 5.99800973 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3\",\"symbol\":\"KMD\"}" |
|||
echo "5.99800973 <- expected amount RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3" |
|||
|
|||
# RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc KMD 9671.53271075 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc\",\"symbol\":\"KMD\"}" |
|||
echo "9671.53271075 <- expected amount RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc" |
|||
|
|||
# RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm KMD 40223.19497203, REVS 101.00000000 |
|||
# RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm KMD 40223.19497203 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm\",\"symbol\":\"KMD\"}" |
|||
echo "40223.19497203 <- expected amount RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm" |
|||
|
|||
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 72698.53877152 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB\",\"symbol\":\"KMD\"}" |
|||
echo "72698.53877152 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB" |
|||
|
|||
# RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe KMD 9683.15249375 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe\",\"symbol\":\"KMD\"}" |
|||
echo "9683.15249375 <- expected amount RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe" |
|||
|
|||
# RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB KMD 3532.13792522 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB\",\"symbol\":\"KMD\"}" |
|||
echo "3532.13792522 <- expected amount RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB" |
|||
|
|||
# RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ KMD 309.69366537 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ\",\"symbol\":\"KMD\"}" |
|||
echo "309.69366537 <- expected amount RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ" |
|||
|
|||
# RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z KMD 3873.26099750 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z\",\"symbol\":\"KMD\"}" |
|||
echo "3873.26099750 <- expected amount RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z" |
|||
|
|||
# RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut KMD 62053.93460050 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut\",\"symbol\":\"KMD\"}" |
|||
echo "62053.93460050 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut" |
|||
|
|||
# REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs KMD 6506.14889316 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs\",\"symbol\":\"KMD\"}" |
|||
echo "6506.14889316 <- expected amount REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs" |
|||
|
|||
# RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL KMD 812.78437655 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL\",\"symbol\":\"KMD\"}" |
|||
echo "812.78437655 <- expected amount RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL" |
|||
|
|||
# R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8 KMD 1452.47287406 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8\",\"symbol\":\"KMD\"}" |
|||
echo "1452.47287406 <- expected amount R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8" |
|||
|
|||
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 867.82549038 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A\",\"symbol\":\"KMD\"}" |
|||
echo "867.82549038 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A" |
|||
|
|||
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}" |
|||
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv" |
|||
|
|||
# RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm KMD 8521.17419450 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm\",\"symbol\":\"KMD\"}" |
|||
echo "8521.17419450 <- expected amount RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm" |
|||
|
|||
# RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM KMD 5328.53865807 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM\",\"symbol\":\"KMD\"}" |
|||
echo "5328.53865807 <- expected amount RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM" |
|||
|
|||
# RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1 KMD 29049.45748125 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1\",\"symbol\":\"KMD\"}" |
|||
echo "29049.45748125 <- expected amount RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1" |
|||
|
|||
# RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot KMD 4840.60793162 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot\",\"symbol\":\"KMD\"}" |
|||
echo "4840.60793162 <- expected amount RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot" |
|||
|
|||
# RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct KMD 2420.78812342 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct\",\"symbol\":\"KMD\"}" |
|||
echo "2420.78812342 <- expected amount RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct" |
|||
|
|||
# RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC KMD 137.73071692, REVS 2.73426759 |
|||
# RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC KMD 137.73071692 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC\",\"symbol\":\"KMD\"}" |
|||
echo "137.73071692 <- expected amount RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC" |
|||
|
|||
# RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM KMD 9737.34607711 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM\",\"symbol\":\"KMD\"}" |
|||
echo "9737.34607711 <- expected amount RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM" |
|||
|
|||
# RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga KMD 1903.31162313 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga\",\"symbol\":\"KMD\"}" |
|||
echo "1903.31162313 <- expected amount RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga" |
|||
|
|||
# RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h KMD 99.84182062 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h\",\"symbol\":\"KMD\"}" |
|||
echo "99.84182062 <- expected amount RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h" |
|||
|
|||
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 1167.24851677 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF\",\"symbol\":\"KMD\"}" |
|||
echo "1167.24851677 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF" |
|||
|
|||
# RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD KMD 15095.38306803 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD\",\"symbol\":\"KMD\"}" |
|||
echo "15095.38306803 <- expected amount RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD" |
@ -0,0 +1,64 @@ |
|||
8b0336f166b8b6348c7af6b382ba5d5f4aa6e266922b19725e79290ee9839bf2 |
|||
6266.43352646 <- expected amount RQC6A3SKtLb2zmqDDwFvRH6Zz4mZufmp3d |
|||
f88163328ebfd735ffe40077fadb0fb8b79020943a8e5822b47fba735a4a20a2 |
|||
1203.04246569 <- expected amount R9SpRcd2KRD45B7SqzuUFhNnsnx7YqgkN6 |
|||
af967b9d98defc983047da835bd783fe66b527292052acf56197456344431826 |
|||
9683.15249375 <- expected amount RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j |
|||
fedd862fdf4749676410a4b7babf3139c6cf624fd8f6c9620fd95256a7300600 |
|||
306877.42641191 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT |
|||
97cae9d83eadecc26cacd272880bd5120bb66aa3df3a65f37d53793c9c1d3154 |
|||
150.23706901 <- expected amount RQantoJxT8szwfAqUM3enLPe85YiQtwndH |
|||
d641a19ecb1f4d0e5938a18e794ab3b3931f12669e952b40ccadad71c29b7f09 |
|||
1985.04626121 <- expected amount RLvvwtBUupmGDy81CJNp6RxKbxxbuu3jRY |
|||
f14d32323d2f001a2bf6ca8b88c3a15252a71d80174d6390c61902d06d5f4b84 |
|||
1664.32251109 <- expected amount RFdRKqe82MmvSxZQjgtLfzdf8mNHztKpPE |
|||
fcda442735f5627876d069940adc2448f3ba60024a214f48cbbc88123167961d |
|||
5.99800973 <- expected amount RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 |
|||
f13e4009f2c3fa3c4f97a0798f1bf1e3df0a4f8470613a125683bd052b1d94ae |
|||
9671.53271075 <- expected amount RNYMy1joru9gFitzokTSi5qFFc5nS4iFxc |
|||
edb2103b5a7577241d8d3cc7564426b6230ed9ed6a26b0a43cc8ec09d5a76bf3 |
|||
40223.19497203 <- expected amount RF4jZsF5BUckQqX5hsS68kjQMYSba8Fypm |
|||
8cdc1454b6f872eac3d95c95295816678f1bcb759bc8a7134399951c2b4d0a2f |
|||
72698.53877152 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB |
|||
70ea0803296924e353f9c21a3a24b9167868b84219610f6b0e5544622ade573d |
|||
9683.15249375 <- expected amount RVzFdNGRn8Ekr4XaeDSfE9fjqvKdcVicJe |
|||
df969fd9a0676e0a51c132432fd67fc1dba5e3fa6049bc1c81a0f3d2d32f1bf6 |
|||
3532.13792522 <- expected amount RTbTzn7FGJWwrH1E3fMwuZPs3YVH1MvVoB |
|||
1b06ade94bbc568b7fd6d9a5eb786aa05df77956c4dc3012fff2225dc3338b3c |
|||
309.69366537 <- expected amount RDdUQ5t6SYYGZUdAxBk5i7QdTWvzAshxNZ |
|||
6356a4dd940d6e859b58fe866eacd8ff58f2d68ae46eec4376e722a26a7fa542 |
|||
3873.26099750 <- expected amount RYYgc5UD7X18E6CrDXCs1cts5WDwaWhm1Z |
|||
dea38f0d030f416d7030c8531b23fedd559410f82f23d4927e62ec3b987406fe |
|||
62053.93460050 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut |
|||
f0c32f919b860494e924953cbb8c18b7ebc48579eca47ca1f42212afa8471b89 |
|||
6506.14889316 <- expected amount REKnBAyZMnhKzRozzcuv6fKRtoBsKTFYjs |
|||
ce24b5ff26df4d10e2a34dfaa00949e6eab54c921d5be815c39b0dec50a7aac1 |
|||
812.78437655 <- expected amount RY422uSvkAoZy81uGot5PmXuMrtChhJ3uL |
|||
d301f1d220d66363aa9c8a4ce2ae3ff24b7b554577e862a8f4a0fa3650c87591 |
|||
1452.47287406 <- expected amount R9o3CQms16CLu63j9WdqsaWB3XsssRXEq8 |
|||
50b56b7eaa17403473c107706ca4f7d15dc43907e643ff70b9613476e9a88a1a |
|||
867.82549038 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A |
|||
48de26c072cc1792774528721c912b9c88245ecad1e8cc8c0e18d9b030dc483e |
|||
693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv |
|||
4faf242258a3b3a78f2e4d4217370c5bc1bd836990e4889f74c040cad2aaabfb |
|||
8521.17419450 <- expected amount RCfBinKfJ1wGSxXLPNTmC9bohFRoofUiVm |
|||
00f9410471f1953fa2379f9add97d377c0618ed03a489fbff2c2b4d2a41e59c3 |
|||
5328.53865807 <- expected amount RNEZRHeWE3KgSTUr3qvH7RNvM2JWZZkygM |
|||
8cf3efea2f6972a7e04b6d75478e54e6667fe8f88effc8a20b38f9dbbc9b03e7 |
|||
29049.45748125 <- expected amount RH7tsX9PaKECxSEALpu5EWdmEKikY7R2n1 |
|||
12f13b23bfbb519a7e2c18c7d4826ab702eee8769f4f27914e9d3b6c13b7c315 |
|||
4840.60793162 <- expected amount RYHxrTNpqrAHRbULboJVYHWqmnmVhzzrot |
|||
62315b5822e8b04541cbb0db97dcd65b93ab3b95c6ef5d6aebf3a8efa4ea55d1 |
|||
2420.78812342 <- expected amount RLCEGw7zmAhZQYtP23Z2TD45gAT9ZuZKct |
|||
3c45078d8bf67b966d4dd73a12a9963ae0638fae5af4f2a49de6f54bf507d9de |
|||
137.73071692 <- expected amount RGQmMzmUfa6R5dZvvL5wvy2vxPLEcgkkyC |
|||
5e4daa037126cd384ec76452baa4a8388c468fd6e81d1f72b249b8de922fd403 |
|||
9737.34607711 <- expected amount RRdDD2YoR5cfwktePGGFT5cEyRcWkEjzvM |
|||
5ab178d63a2d12f5d8c906e9de598708284d0d9e13da61dd5658dc5f5040755b |
|||
1903.31162313 <- expected amount RKbb9NGB3pU2BaByoDwyZDH74E7koR2Lga |
|||
8ba4ff8dcfda0490c7927afb042768de0ea8d9f8eea89112430bc8363c736703 |
|||
99.84182062 <- expected amount RQsSsmpzFagxRaYk6cTMpNHa4eYLihKn8h |
|||
7d9c76b94c599a9cb2a0aa5301d722186fc130ac883929ef6952d9cf95e2fbd0 |
|||
1167.24851677 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF |
|||
7e291c577c4695ae3a6363ff9091d3e1f2d61d3038e324c0222677ec8cf27aee |
|||
15095.38306803 <- expected amount RHKuiEoakr9yeWQT9UZzCrqPgR8MPBaGvD |
@ -0,0 +1,191 @@ |
|||
sleep 99999 |
|||
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295 |
|||
./komodo-cli sendtoaddress RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A 42.40642295 |
|||
sleep 3 |
|||
echo "42.40642295 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A" |
|||
|
|||
# RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v KMD 1248.93505747 |
|||
./komodo-cli sendtoaddress RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v 1248.93505747 |
|||
sleep 3 |
|||
echo "1248.93505747 <- expected amount RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v" |
|||
|
|||
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2684.14739323 |
|||
./komodo-cli sendtoaddress RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ 2684.14739323 |
|||
sleep 3 |
|||
echo "2684.14739323 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ" |
|||
|
|||
# RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A KMD 19366.30498750 |
|||
./komodo-cli sendtoaddress RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A 19366.30498750 |
|||
sleep 3 |
|||
echo "19366.30498750 <- expected amount RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A" |
|||
|
|||
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 209558.53271075 |
|||
./komodo-cli sendtoaddress RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB 209558.53271075 |
|||
sleep 3 |
|||
echo "209558.53271075 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB" |
|||
|
|||
# RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY KMD 32675.00548454 |
|||
./komodo-cli sendtoaddress RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY 32675.00548454 |
|||
sleep 3 |
|||
echo "32675.00548454 <- expected amount RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY" |
|||
|
|||
# RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK KMD 15037.55193116 |
|||
./komodo-cli sendtoaddress RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK 15037.55193116 |
|||
sleep 3 |
|||
echo "15037.55193116 <- expected amount RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK" |
|||
|
|||
# RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn KMD 1022.54090334 |
|||
./komodo-cli sendtoaddress RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn 1022.54090334 |
|||
sleep 3 |
|||
echo "1022.54090334 <- expected amount RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn" |
|||
|
|||
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 172688.45447080 |
|||
./komodo-cli sendtoaddress RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT 172688.45447080 |
|||
sleep 3 |
|||
echo "172688.45447080 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT" |
|||
|
|||
# RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC KMD 35255.61377633 |
|||
./komodo-cli sendtoaddress RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC 35255.61377633 |
|||
sleep 3 |
|||
echo "35255.61377633 <- expected amount RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC" |
|||
|
|||
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 4509.36353351 |
|||
./komodo-cli sendtoaddress RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 4509.36353351 |
|||
sleep 3 |
|||
echo "4509.36353351 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8" |
|||
|
|||
# RCSH7RtDM51e346niSiUk9HiYDrDiqcyev KMD 8622.26398257 |
|||
./komodo-cli sendtoaddress RCSH7RtDM51e346niSiUk9HiYDrDiqcyev 8622.26398257 |
|||
sleep 3 |
|||
echo "8622.26398257 <- expected amount RCSH7RtDM51e346niSiUk9HiYDrDiqcyev" |
|||
|
|||
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401, REVS 37.80134078 |
|||
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401 |
|||
./komodo-cli sendtoaddress RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc 1904.65394401 |
|||
sleep 3 |
|||
echo "1904.65394401 <- expected amount RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc" |
|||
|
|||
# RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog KMD 1894.96063707 |
|||
./komodo-cli sendtoaddress RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog 1894.96063707 |
|||
sleep 3 |
|||
echo "1894.96063707 <- expected amount RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog" |
|||
|
|||
# RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ KMD 55379.83556127 |
|||
./komodo-cli sendtoaddress RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ 55379.83556127 |
|||
sleep 3 |
|||
echo "55379.83556127 <- expected amount RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ" |
|||
|
|||
# RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX KMD 109.47952512 |
|||
./komodo-cli sendtoaddress RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX 109.47952512 |
|||
sleep 3 |
|||
echo "109.47952512 <- expected amount RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX" |
|||
|
|||
# RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J KMD 2903.00911762 |
|||
./komodo-cli sendtoaddress RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J 2903.00911762 |
|||
sleep 3 |
|||
echo "2903.00911762 <- expected amount RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J" |
|||
|
|||
# RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 KMD 8344.85486318 |
|||
./komodo-cli sendtoaddress RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 8344.85486318 |
|||
sleep 3 |
|||
echo "8344.85486318 <- expected amount RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47" |
|||
|
|||
# RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3 KMD 9295.82639400 |
|||
./komodo-cli sendtoaddress RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3 9295.82639400 |
|||
sleep 3 |
|||
echo "9295.82639400 <- expected amount RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3" |
|||
|
|||
# RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz KMD 5784.90308850 |
|||
./komodo-cli sendtoaddress RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz 5784.90308850 |
|||
sleep 3 |
|||
echo "5784.90308850 <- expected amount RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz" |
|||
|
|||
# RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2 KMD 4345.79883919 |
|||
./komodo-cli sendtoaddress RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2 4345.79883919 |
|||
sleep 3 |
|||
echo "4345.79883919 <- expected amount RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2" |
|||
|
|||
# RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut KMD 5743.12343812 |
|||
./komodo-cli sendtoaddress RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut 5743.12343812 |
|||
sleep 3 |
|||
echo "5743.12343812 <- expected amount RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut" |
|||
|
|||
# RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD KMD 9680.24754799 |
|||
./komodo-cli sendtoaddress RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD 9680.24754799 |
|||
sleep 3 |
|||
echo "9680.24754799 <- expected amount RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD" |
|||
|
|||
# RBboFD6fhYF11C883DxvLx5dDmbbs73XC3 KMD 1819.54181879 |
|||
./komodo-cli sendtoaddress RBboFD6fhYF11C883DxvLx5dDmbbs73XC3 1819.54181879 |
|||
sleep 3 |
|||
echo "1819.54181879 <- expected amount RBboFD6fhYF11C883DxvLx5dDmbbs73XC3" |
|||
|
|||
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282, REVS 0.91962079 |
|||
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282 |
|||
./komodo-cli sendtoaddress RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 863.61179282 |
|||
sleep 3 |
|||
echo "863.61179282 <- expected amount RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5" |
|||
|
|||
# RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 KMD 0.00050130 |
|||
./komodo-cli sendtoaddress RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 0.00050130 |
|||
sleep 3 |
|||
echo "0.00050130 <- expected amount RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9" |
|||
|
|||
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289 |
|||
./komodo-cli sendtoaddress RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv 693.08132289 |
|||
sleep 3 |
|||
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv" |
|||
|
|||
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759, REVS 319.20361833 |
|||
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759 |
|||
./komodo-cli sendtoaddress RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr 16087.76566759 |
|||
sleep 3 |
|||
echo "16087.76566759 <- expected amount RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr" |
|||
|
|||
# R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5 KMD 5577.49583640 |
|||
./komodo-cli sendtoaddress R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5 5577.49583640 |
|||
sleep 3 |
|||
echo "5577.49583640 <- expected amount R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5" |
|||
|
|||
# RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw KMD 774.65219950 |
|||
./komodo-cli sendtoaddress RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw 774.65219950 |
|||
sleep 3 |
|||
echo "774.65219950 <- expected amount RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw" |
|||
|
|||
# RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2 KMD 13362.75044137 |
|||
./komodo-cli sendtoaddress RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2 13362.75044137 |
|||
sleep 3 |
|||
echo "13362.75044137 <- expected amount RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2" |
|||
|
|||
# RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ KMD 8569.02441659 |
|||
./komodo-cli sendtoaddress RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ 8569.02441659 |
|||
sleep 3 |
|||
echo "8569.02441659 <- expected amount RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ" |
|||
|
|||
# RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt KMD 9683.15249375 |
|||
./komodo-cli sendtoaddress RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt 9683.15249375 |
|||
sleep 3 |
|||
echo "9683.15249375 <- expected amount RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt" |
|||
|
|||
# RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS KMD 7916.77211172 |
|||
./komodo-cli sendtoaddress RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS 7916.77211172 |
|||
sleep 3 |
|||
echo "7916.77211172 <- expected amount RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS" |
|||
|
|||
# RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR KMD 722.28571081 |
|||
./komodo-cli sendtoaddress RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR 722.28571081 |
|||
sleep 3 |
|||
echo "722.28571081 <- expected amount RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR" |
|||
|
|||
# RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1 KMD 709.73247788 |
|||
./komodo-cli sendtoaddress RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1 709.73247788 |
|||
sleep 3 |
|||
echo "709.73247788 <- expected amount RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1" |
|||
|
|||
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 419.36278156 |
|||
./komodo-cli sendtoaddress RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF 419.36278156 |
|||
sleep 3 |
|||
echo "419.36278156 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF" |
|||
|
|||
|
|||
# total KMD 675297.04318319 REVS 0.00000000 |
@ -0,0 +1,188 @@ |
|||
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A\",\"symbol\":\"KMD\"}" # 42.40642295 |
|||
sleep 3 |
|||
echo "42.40642295 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A" |
|||
|
|||
# RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v KMD 1248.93505747 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v\",\"symbol\":\"KMD\"}" # 1248.93505747 |
|||
sleep 3 |
|||
echo "1248.93505747 <- expected amount RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v" |
|||
|
|||
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2684.14739323 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ\",\"symbol\":\"KMD\"}" # 2684.14739323 |
|||
sleep 3 |
|||
echo "2684.14739323 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ" |
|||
|
|||
# RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A KMD 19366.30498750 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A\",\"symbol\":\"KMD\"}" # 19366.30498750 |
|||
sleep 3 |
|||
echo "19366.30498750 <- expected amount RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A" |
|||
|
|||
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 209558.53271075 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB\",\"symbol\":\"KMD\"}" # 209558.53271075 |
|||
sleep 3 |
|||
echo "209558.53271075 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB" |
|||
|
|||
# RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY KMD 32675.00548454 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY\",\"symbol\":\"KMD\"}" # 32675.00548454 |
|||
sleep 3 |
|||
echo "32675.00548454 <- expected amount RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY" |
|||
|
|||
# RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK KMD 15037.55193116 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK\",\"symbol\":\"KMD\"}" # 15037.55193116 |
|||
sleep 3 |
|||
echo "15037.55193116 <- expected amount RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK" |
|||
|
|||
# RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn KMD 1022.54090334 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn\",\"symbol\":\"KMD\"}" # 1022.54090334 |
|||
sleep 3 |
|||
echo "1022.54090334 <- expected amount RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn" |
|||
|
|||
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 172688.45447080 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT\",\"symbol\":\"KMD\"}" # 172688.45447080 |
|||
sleep 3 |
|||
echo "172688.45447080 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT" |
|||
|
|||
# RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC KMD 35255.61377633 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC\",\"symbol\":\"KMD\"}" # 35255.61377633 |
|||
sleep 3 |
|||
echo "35255.61377633 <- expected amount RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC" |
|||
|
|||
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 4509.36353351 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8\",\"symbol\":\"KMD\"}" # 4509.36353351 |
|||
sleep 3 |
|||
echo "4509.36353351 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8" |
|||
|
|||
# RCSH7RtDM51e346niSiUk9HiYDrDiqcyev KMD 8622.26398257 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCSH7RtDM51e346niSiUk9HiYDrDiqcyev\",\"symbol\":\"KMD\"}" # 8622.26398257 |
|||
sleep 3 |
|||
echo "8622.26398257 <- expected amount RCSH7RtDM51e346niSiUk9HiYDrDiqcyev" |
|||
|
|||
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401, REVS 37.80134078 |
|||
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc\",\"symbol\":\"KMD\"}" # 1904.65394401 |
|||
sleep 3 |
|||
echo "1904.65394401 <- expected amount RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc" |
|||
|
|||
# RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog KMD 1894.96063707 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog\",\"symbol\":\"KMD\"}" # 1894.96063707 |
|||
sleep 3 |
|||
echo "1894.96063707 <- expected amount RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog" |
|||
|
|||
# RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ KMD 55379.83556127 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ\",\"symbol\":\"KMD\"}" # 55379.83556127 |
|||
sleep 3 |
|||
echo "55379.83556127 <- expected amount RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ" |
|||
|
|||
# RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX KMD 109.47952512 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX\",\"symbol\":\"KMD\"}" # 109.47952512 |
|||
sleep 3 |
|||
echo "109.47952512 <- expected amount RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX" |
|||
|
|||
# RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J KMD 2903.00911762 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J\",\"symbol\":\"KMD\"}" # 2903.00911762 |
|||
sleep 3 |
|||
echo "2903.00911762 <- expected amount RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J" |
|||
|
|||
# RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 KMD 8344.85486318 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47\",\"symbol\":\"KMD\"}" # 8344.85486318 |
|||
sleep 3 |
|||
echo "8344.85486318 <- expected amount RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47" |
|||
|
|||
# RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3 KMD 9295.82639400 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3\",\"symbol\":\"KMD\"}" # 9295.82639400 |
|||
sleep 3 |
|||
echo "9295.82639400 <- expected amount RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3" |
|||
|
|||
# RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz KMD 5784.90308850 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz\",\"symbol\":\"KMD\"}" # 5784.90308850 |
|||
sleep 3 |
|||
echo "5784.90308850 <- expected amount RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz" |
|||
|
|||
# RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2 KMD 4345.79883919 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2\",\"symbol\":\"KMD\"}" # 4345.79883919 |
|||
sleep 3 |
|||
echo "4345.79883919 <- expected amount RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2" |
|||
|
|||
# RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut KMD 5743.12343812 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut\",\"symbol\":\"KMD\"}" # 5743.12343812 |
|||
sleep 3 |
|||
echo "5743.12343812 <- expected amount RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut" |
|||
|
|||
# RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD KMD 9680.24754799 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD\",\"symbol\":\"KMD\"}" # 9680.24754799 |
|||
sleep 3 |
|||
echo "9680.24754799 <- expected amount RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD" |
|||
|
|||
# RBboFD6fhYF11C883DxvLx5dDmbbs73XC3 KMD 1819.54181879 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RBboFD6fhYF11C883DxvLx5dDmbbs73XC3\",\"symbol\":\"KMD\"}" # 1819.54181879 |
|||
sleep 3 |
|||
echo "1819.54181879 <- expected amount RBboFD6fhYF11C883DxvLx5dDmbbs73XC3" |
|||
|
|||
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282, REVS 0.91962079 |
|||
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5\",\"symbol\":\"KMD\"}" # 863.61179282 |
|||
sleep 3 |
|||
echo "863.61179282 <- expected amount RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5" |
|||
|
|||
# RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 KMD 0.00050130 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9\",\"symbol\":\"KMD\"}" # 0.00050130 |
|||
sleep 3 |
|||
echo "0.00050130 <- expected amount RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9" |
|||
|
|||
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}" # 693.08132289 |
|||
sleep 3 |
|||
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv" |
|||
|
|||
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759, REVS 319.20361833 |
|||
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr\",\"symbol\":\"KMD\"}" # 16087.76566759 |
|||
sleep 3 |
|||
echo "16087.76566759 <- expected amount RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr" |
|||
|
|||
# R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5 KMD 5577.49583640 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5\",\"symbol\":\"KMD\"}" # 5577.49583640 |
|||
sleep 3 |
|||
echo "5577.49583640 <- expected amount R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5" |
|||
|
|||
# RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw KMD 774.65219950 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw\",\"symbol\":\"KMD\"}" # 774.65219950 |
|||
sleep 3 |
|||
echo "774.65219950 <- expected amount RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw" |
|||
|
|||
# RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2 KMD 13362.75044137 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2\",\"symbol\":\"KMD\"}" # 13362.75044137 |
|||
sleep 3 |
|||
echo "13362.75044137 <- expected amount RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2" |
|||
|
|||
# RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ KMD 8569.02441659 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ\",\"symbol\":\"KMD\"}" # 8569.02441659 |
|||
sleep 3 |
|||
echo "8569.02441659 <- expected amount RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ" |
|||
|
|||
# RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt KMD 9683.15249375 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt\",\"symbol\":\"KMD\"}" # 9683.15249375 |
|||
sleep 3 |
|||
echo "9683.15249375 <- expected amount RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt" |
|||
|
|||
# RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS KMD 7916.77211172 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS\",\"symbol\":\"KMD\"}" # 7916.77211172 |
|||
sleep 3 |
|||
echo "7916.77211172 <- expected amount RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS" |
|||
|
|||
# RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR KMD 722.28571081 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR\",\"symbol\":\"KMD\"}" # 722.28571081 |
|||
sleep 3 |
|||
echo "722.28571081 <- expected amount RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR" |
|||
|
|||
# RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1 KMD 709.73247788 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1\",\"symbol\":\"KMD\"}" # 709.73247788 |
|||
sleep 3 |
|||
echo "709.73247788 <- expected amount RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1" |
|||
|
|||
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 419.36278156 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF\",\"symbol\":\"KMD\"}" # 419.36278156 |
|||
sleep 3 |
|||
echo "419.36278156 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF" |
|||
|
@ -0,0 +1,151 @@ |
|||
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A\",\"symbol\":\"KMD\"}" |
|||
echo "42.40642295 <- expected amount RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A" |
|||
|
|||
# RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v KMD 1248.93505747 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v\",\"symbol\":\"KMD\"}" |
|||
echo "1248.93505747 <- expected amount RMnuGgpEzWcxYi861E7BjGMURCFX2Szj2v" |
|||
|
|||
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2684.14739323 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ\",\"symbol\":\"KMD\"}" |
|||
echo "2684.14739323 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ" |
|||
|
|||
# RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A KMD 19366.30498750 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A\",\"symbol\":\"KMD\"}" |
|||
echo "19366.30498750 <- expected amount RTUWRmRe543k8vrwuRXQ7BkFhkK4i2dq5A" |
|||
|
|||
# RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB KMD 209558.53271075 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB\",\"symbol\":\"KMD\"}" |
|||
echo "209558.53271075 <- expected amount RPqAFgwnB1hjae6Ar4Kms973uS93HbDkoB" |
|||
|
|||
# RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY KMD 32675.00548454 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY\",\"symbol\":\"KMD\"}" |
|||
echo "32675.00548454 <- expected amount RNW6Kkcdktbeemd2n8NVPCfgnRirzWoiZY" |
|||
|
|||
# RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK KMD 15037.55193116 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK\",\"symbol\":\"KMD\"}" |
|||
echo "15037.55193116 <- expected amount RNUw6ePdaQ4mXSo9koqGtMDzEC43gCvDrK" |
|||
|
|||
# RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn KMD 1022.54090334 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn\",\"symbol\":\"KMD\"}" |
|||
echo "1022.54090334 <- expected amount RLu6gRHKwXjvv64QZGiLT7uHEVRrH9mHDn" |
|||
|
|||
# RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT KMD 172688.45447080 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT\",\"symbol\":\"KMD\"}" |
|||
echo "172688.45447080 <- expected amount RTJXwRhuAH9iyztyuRuGC8G7DamTgSMGvT" |
|||
|
|||
# RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC KMD 35255.61377633 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC\",\"symbol\":\"KMD\"}" |
|||
echo "35255.61377633 <- expected amount RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC" |
|||
|
|||
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 4509.36353351 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8\",\"symbol\":\"KMD\"}" |
|||
echo "4509.36353351 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8" |
|||
|
|||
# RCSH7RtDM51e346niSiUk9HiYDrDiqcyev KMD 8622.26398257 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCSH7RtDM51e346niSiUk9HiYDrDiqcyev\",\"symbol\":\"KMD\"}" |
|||
echo "8622.26398257 <- expected amount RCSH7RtDM51e346niSiUk9HiYDrDiqcyev" |
|||
|
|||
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401, REVS 37.80134078 |
|||
# RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc KMD 1904.65394401 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc\",\"symbol\":\"KMD\"}" |
|||
echo "1904.65394401 <- expected amount RBYMsuS89HQKxNCZB3xb1UxRyfLMLvrbmc" |
|||
|
|||
# RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog KMD 1894.96063707 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog\",\"symbol\":\"KMD\"}" |
|||
echo "1894.96063707 <- expected amount RUr4x8gjCU9EmbLWpYBdsJDyt1oye52iog" |
|||
|
|||
# RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ KMD 55379.83556127 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ\",\"symbol\":\"KMD\"}" |
|||
echo "55379.83556127 <- expected amount RBW6wjWoEsu22APzSfJemWi96bQZFJvEGZ" |
|||
|
|||
# RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX KMD 109.47952512 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX\",\"symbol\":\"KMD\"}" |
|||
echo "109.47952512 <- expected amount RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX" |
|||
|
|||
# RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J KMD 2903.00911762 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J\",\"symbol\":\"KMD\"}" |
|||
echo "2903.00911762 <- expected amount RXs11ZkaMLV9ZVAJ93LNjF4TRri2QBHn4J" |
|||
|
|||
# RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 KMD 8344.85486318 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47\",\"symbol\":\"KMD\"}" |
|||
echo "8344.85486318 <- expected amount RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47" |
|||
|
|||
# RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3 KMD 9295.82639400 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3\",\"symbol\":\"KMD\"}" |
|||
echo "9295.82639400 <- expected amount RQM36oUWQFipUvhPnyoNr8f8CgmJ6W6HR3" |
|||
|
|||
# RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz KMD 5784.90308850 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz\",\"symbol\":\"KMD\"}" |
|||
echo "5784.90308850 <- expected amount RLyaf3XgjHruSeJd4oj83E8btck7kYPmVz" |
|||
|
|||
# RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2 KMD 4345.79883919 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2\",\"symbol\":\"KMD\"}" |
|||
echo "4345.79883919 <- expected amount RFkDDs1eZCQmAKknvyrP5XbpyeaihFaFL2" |
|||
|
|||
# RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut KMD 5743.12343812 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut\",\"symbol\":\"KMD\"}" |
|||
echo "5743.12343812 <- expected amount RQgfzPR4zeCyLWaddHysGEVzoKLZa5E4Ut" |
|||
|
|||
# RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD KMD 9680.24754799 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD\",\"symbol\":\"KMD\"}" |
|||
echo "9680.24754799 <- expected amount RTSn55yrw2xUWM8bxVcG84ga84dofPfsuD" |
|||
|
|||
# RBboFD6fhYF11C883DxvLx5dDmbbs73XC3 KMD 1819.54181879 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBboFD6fhYF11C883DxvLx5dDmbbs73XC3\",\"symbol\":\"KMD\"}" |
|||
echo "1819.54181879 <- expected amount RBboFD6fhYF11C883DxvLx5dDmbbs73XC3" |
|||
|
|||
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282, REVS 0.91962079 |
|||
# RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5 KMD 863.61179282 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5\",\"symbol\":\"KMD\"}" |
|||
echo "863.61179282 <- expected amount RCKVUKnC3pjVkjnDfnBj1Eu68yc8ELdMC5" |
|||
|
|||
# RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9 KMD 0.00050130 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9\",\"symbol\":\"KMD\"}" |
|||
echo "0.00050130 <- expected amount RU3EDov1PTPAY8WhG5eGUANp2rvtki1yc9" |
|||
|
|||
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}" |
|||
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv" |
|||
|
|||
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759, REVS 319.20361833 |
|||
# RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr KMD 16087.76566759 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr\",\"symbol\":\"KMD\"}" |
|||
echo "16087.76566759 <- expected amount RUrV1qvjBapCDGQnwpdhyneGhX1wiHZwVr" |
|||
|
|||
# R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5 KMD 5577.49583640 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5\",\"symbol\":\"KMD\"}" |
|||
echo "5577.49583640 <- expected amount R9V8qEoa5zjgoJ2kDARXTyhjjvkzcTANC5" |
|||
|
|||
# RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw KMD 774.65219950 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw\",\"symbol\":\"KMD\"}" |
|||
echo "774.65219950 <- expected amount RJJdqon3kYcXtyiTujiHBxAMj9QXrgfUbw" |
|||
|
|||
# RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2 KMD 13362.75044137 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2\",\"symbol\":\"KMD\"}" |
|||
echo "13362.75044137 <- expected amount RNqJvqLSS9zpCJYFv8gDPgeUBx72Hk4as2" |
|||
|
|||
# RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ KMD 8569.02441659 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ\",\"symbol\":\"KMD\"}" |
|||
echo "8569.02441659 <- expected amount RH8i5cGy1QMK2sTehLEAqjX2Ph8FJ94LWJ" |
|||
|
|||
# RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt KMD 9683.15249375 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt\",\"symbol\":\"KMD\"}" |
|||
echo "9683.15249375 <- expected amount RCEXKrX2kkQQrFu6arLBLNYYZFtdgHwATt" |
|||
|
|||
# RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS KMD 7916.77211172 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS\",\"symbol\":\"KMD\"}" |
|||
echo "7916.77211172 <- expected amount RE3f1f5XQsntqQkwpVZwyzr1YbupdPbjiS" |
|||
|
|||
# RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR KMD 722.28571081 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR\",\"symbol\":\"KMD\"}" |
|||
echo "722.28571081 <- expected amount RWoKDt8BzEQc3WtYUpXmCxRwB1Tg3AWcPR" |
|||
|
|||
# RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1 KMD 709.73247788 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1\",\"symbol\":\"KMD\"}" |
|||
echo "709.73247788 <- expected amount RNwfApozgMUmKvJCdrJWQZZCw3hEUWaNk1" |
|||
|
|||
# RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF KMD 419.36278156 |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF\",\"symbol\":\"KMD\"}" |
|||
echo "419.36278156 <- expected amount RKQPNcePppEkV4CMXZrwqEMAvRHbruKVdF" |
|||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue