|
|
@ -591,8 +591,8 @@ Value paxprice(const Array& params, bool fHelp) |
|
|
|
if ( params.size() == 2 ) |
|
|
|
height = chainActive.Tip()->nHeight; |
|
|
|
else height = atoi(params[2].get_str().c_str()); |
|
|
|
if ( params.size() == 3 || (basevolume= COIN * atof(params[3].get_str().c_str())) == 0 ) |
|
|
|
basevolume = 1000; |
|
|
|
//if ( params.size() == 3 || (basevolume= COIN * atof(params[3].get_str().c_str())) == 0 )
|
|
|
|
basevolume = 1; |
|
|
|
relvolume = komodo_paxprice(&seed,height,(char *)base.c_str(),(char *)rel.c_str(),basevolume); |
|
|
|
ret.push_back(Pair("base", base)); |
|
|
|
ret.push_back(Pair("rel", rel)); |
|
|
@ -611,8 +611,8 @@ Value paxprice(const Array& params, bool fHelp) |
|
|
|
{ |
|
|
|
ret.push_back(Pair("price",((double)relvolume / (double)basevolume))); |
|
|
|
ret.push_back(Pair("invprice",((double)basevolume / (double)relvolume))); |
|
|
|
ret.push_back(Pair("basevolume",ValueFromAmount((COIN/1000) * basevolume))); |
|
|
|
ret.push_back(Pair("relvolume",ValueFromAmount((COIN/1000) * relvolume))); |
|
|
|
ret.push_back(Pair("basevolume",ValueFromAmount(basevolume))); |
|
|
|
ret.push_back(Pair("relvolume",ValueFromAmount(relvolume))); |
|
|
|
} else ret.push_back(Pair("error", "overflow or error in one or more of parameters")); |
|
|
|
} |
|
|
|
return ret; |
|
|
|