void Exchange_BTCChina::clearVariables()
{
	cancelingOrderIDs.clear();
	Exchange::clearVariables();
	secondPart=0;
	apiDownCounter=0;
    historyLastDate.clear();
	lastHistory.clear();
	lastOrders.clear();
	historyLastTradesRequest="historydata?market="+baseValues.currentPair.currRequestPair;
	reloadDepth();
	lastInfoReceived=false;
	lastFetchTid.clear();
}
Пример #2
0
void Exchange_BitCurex::clearVariables()
{
    isFirstAccInfo=false;
	Exchange::clearVariables();
	lastOpenedOrders=-1;
	apiDownCounter=0;
	lastHistory.clear();
	lastOrders.clear();
	reloadDepth();
    lastFetchTid=0;
    startTradesDate=QDateTime::currentDateTime().toTime_t()-600;
    lastTradesDate=0;
    lastHistoryId=0;
}
void Exchange_Bitstamp::clearVariables()
{
	isFirstTicker=true;
	cancelingOrderIDs.clear();
	Exchange::clearVariables();
	secondPart=0;
	apiDownCounter=0;
	lastHistory.clear();
	lastOrders.clear();
	reloadDepth();
	lastInfoReceived=false;
	lastBidAskTimestamp=0;
	lastTradesDate=QDateTime::currentDateTime().addSecs(-600).toTime_t();
}
void Exchange_BitCurex::clearVariables()
{
	isFirstTicker=true;
    isFirstAccInfo=false;
	Exchange::clearVariables();
	lastOpenedOrders=-1;
	apiDownCounter=0;
	lastHistory.clear();
	lastOrders.clear();
	reloadDepth();
    lastFetchTid=0;
    startTradesDate=TimeSync::getTimeT()-600;
    lastTradesDate=0;
    lastHistoryId=0;
}
void Exchange_BitMarket::clearVariables()
{
	isFirstTicker=true;
    cancelingOrderIDs.clear();
	Exchange::clearVariables();
	lastOpenedOrders=-1;
	apiDownCounter=0;
    lastHistoryId=0;
	lastHistory.clear();
	lastOrders.clear();
	reloadDepth();
    lastFetchTid=TimeSync::getTimeT()-600;
	lastFetchTid=-lastFetchTid;
    lastTickerDate=0;
    lastTradesTid.clear();
}
Пример #6
0
void Exchange_Cryptsy::clearVariables()
{
	isFirstTicker=true;
	isFirstAccInfo=true;
	lastTickerHigh=0.0;
	lastTickerLow=0.0;
	lastTickerSell=0.0;
	lastTickerBuy=0.0;
	lastTickerVolume=0.0;
	lastBtcBalance=0.0;
	lastUsdBalance=0.0;
	lastVolume=0.0;
	lastFee=0.0;
	secondPart=0;
	apiDownCounter=0;
	lastHistory.clear();
	lastOrders.clear();
	reloadDepth();
	lastInfoReceived=false;
	tickerLastDate=0;
	lastTradesDate=QDateTime::currentDateTime().addSecs(-600).toTime_t();
	lastTradesDate*=1000000;
	lastTradesDateCache=QByteArray::number(lastTradesDate);
}
void Exchange_Bitfinex::clearVariables()
{
	historyLastTimestamp="0";
	isFirstAccInfo=true;
	lastTickerHigh=0.0;
	lastTickerLow=0.0;
	lastTickerSell=0.0;
	lastTickerBuy=0.0;
	lastTickerVolume=0.0;
	lastBtcBalance=0.0;
	lastUsdBalance=0.0;
	lastVolume=0.0;
	lastFee=0.0;
	secondPart=0;
	apiDownCounter=0;
	lastHistory.clear();
	lastOrders.clear();
	reloadDepth();
	lastInfoReceived=false;
	tickerLastDate=0;
	lastTradesDate=0;
	lastTradesDateCache="0";
	lastHistoryId=0;
}
Пример #8
0
        connect(this,SIGNAL(orderBookChanged(QString, QList<OrderItem> *)),mainClass,SLOT(orderBookChanged(QString, QList<OrderItem> *)));
		connect(this,SIGNAL(historyChanged(QList<HistoryItem>*)),mainClass,SLOT(historyChanged(QList<HistoryItem>*)));
        connect(this,SIGNAL(orderCanceled(QString, QByteArray)),mainClass,SLOT(orderCanceled(QString, QByteArray)));
		connect(this,SIGNAL(ordersIsEmpty()),mainClass,SLOT(ordersIsEmpty()));
	}

	connect(this,SIGNAL(depthRequested()),mainClass,SLOT(depthRequested()));
	connect(this,SIGNAL(depthRequestReceived()),mainClass,SLOT(depthRequestReceived()));
    connect(this,SIGNAL(depthSubmitOrders(QString, QList<DepthItem> *, QList<DepthItem> *)),mainClass,SLOT(depthSubmitOrders(QString, QList<DepthItem> *, QList<DepthItem> *)));
    connect(this,SIGNAL(depthFirstOrder(QString, double,double,bool)),mainClass,SLOT(depthFirstOrder(QString, double,double,bool)));
	connect(this,SIGNAL(showErrorMessage(QString)),mainClass,SLOT(showErrorMessage(QString)));

    connect(this,SIGNAL(availableAmountChanged(QString, double)),mainClass,SLOT(availableAmountChanged(QString, double)));
	connect(mainClass,SIGNAL(clearValues()),this,SLOT(clearValues()));
	connect(mainClass,SIGNAL(reloadDepth()),this,SLOT(reloadDepth()));

    connect(this,SIGNAL(accVolumeChanged(double)),mainClass->ui.accountVolume,SLOT(setValue(double)));
    connect(this,SIGNAL(accFeeChanged(QString, double)),mainClass,SLOT(accFeeChanged(QString,double)));
    connect(this,SIGNAL(accBtcBalanceChanged(QString, double)),mainClass,SLOT(accBtcBalanceChanged(QString, double)));
    connect(this,SIGNAL(accUsdBalanceChanged(QString, double)),mainClass,SLOT(accUsdBalanceChanged(QString, double)));

    connect(this,SIGNAL(loginChanged(QString)),mainClass,SLOT(loginChanged(QString)));

    connect(this,SIGNAL(addLastTrades(QString, QList<TradesItem> *)),mainClass,SLOT(addLastTrades(QString, QList<TradesItem> *)));

	start();
}

void Exchange::setApiKeySecret(QByteArray key, QByteArray secret)
{