void Exchange_BTCChina::sell(QString symbol, double apiBtcToSell, double apiPriceToSell) { if(tickerOnly)return; CurrencyPairItem pairItem; pairItem=baseValues.currencyPairMap.value(symbol,pairItem); if(pairItem.symbol.isEmpty())return; QByteArray data=byteArrayFromDouble(apiPriceToSell,pairItem.priceDecimals,0)+","+byteArrayFromDouble(apiBtcToSell,baseValues.currentPair.currADecimals,0)+",\""+pairItem.currRequestPair+"\""; if(debugLevel)logThread->writeLog("Sell: "+data,2); sendToApi(307,"sellOrder2",true,true,data); }
void Exchange_BitCurex::sell(QString symbol, double apiBtcToSell, double apiPriceToSell) { if(tickerOnly)return; CurrencyPairItem pairItem; pairItem=baseValues.currencyPairMap.value(symbol,pairItem); if(pairItem.symbol.isEmpty())return; QByteArray hashData="limit=" +byteArrayFromDouble(apiPriceToSell,pairItem.priceDecimals,0)+"&market=" +baseValues.currentPair.currBStrLow.toLatin1()+"&nonce=" +QByteArray::number(++privateNonce)+"&offer_type=ask&volume=" +byteArrayFromDouble(apiBtcToSell,pairItem.currADecimals,0); QByteArray postData="{\"limit\":"+byteArrayFromDouble(apiPriceToSell,pairItem.priceDecimals,0)+",\"market\":\""+baseValues.currentPair.currBStrLow.toLatin1()+"\",\"nonce\":"+QByteArray::number(privateNonce) +",\"offer_type\":\"ask\",\"volume\":"+byteArrayFromDouble(apiBtcToSell,pairItem.currADecimals,0)+"}"; if(debugLevel)logThread->writeLog("Sell: "+hashData,2); sendToApi(307,"offer/"+baseValues.currentPair.currBStrLow.toLatin1()+'/',true,hashData,postData); }
void Exchange_BitMarket::sell(QString symbol, double apiBtcToSell, double apiPriceToSell) { if(tickerOnly)return; CurrencyPairItem pairItem; pairItem=baseValues.currencyPairMap.value(symbol,pairItem); if(pairItem.symbol.isEmpty())return; QByteArray data="trade&market="+symbol.toLatin1()+"&type=sell&amount="+byteArrayFromDouble(apiBtcToSell,pairItem.currADecimals,0)+"&rate="+byteArrayFromDouble(apiPriceToSell,pairItem.priceDecimals,0); if(debugLevel)logThread->writeLog("Sell: "+data,2); sendToApi(307,data,true,true); }