public void Test() { // CBitfinexRestConnectorV1 bfxRestConnector = new CBitfinexRestConnectorV1("62NvrsDVwXDryVsGRU9uVkeDpYNdsnvTHfFnUGVVEsP", // "oNl3hdW0dxGtwN9UDSNNzNk74rzqgequpOcLuwtmNYz"); // bfxRestConnector.GetSymbolDetails(); // bfxRestConnector.GetActiveOrders(); CBitfinexRestConnectorV2 bfxRestConn = new CBitfinexRestConnectorV2(this, "fVgyf0Rk4hDDDdXAzys7yN0vnGcRPUVYRTLoOxTyDIL", "MDqroztPvZzFIaKKspozdyeAD274OFAZnEZy2nv3eUE"); // bfxRestConn.GetOrderHistory(); bfxRestConn.GetTrades(); //bfxRestConnector.GetActiveOrders(); //bfxRestConnector.GetSymbolDetails(); }
public void ThreadBfxRestV2() { if (!_globalConfig.UseRealServer) { return; } Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-us"); _bfxRestConnectorV2 = new CBitfinexRestConnectorV2(this, _bfxAPIKey, _bfxAPISecret); WaitDataLoadedFromDB(); Instruments.WaitInstrumentsLoaded(); _ordersHistStor.LoadDataFromDB(); _tradeHistStorV2.LoadDataFromDB(); int parSleepTime = 2000; while (true) { try { //TODO save each response exec time ProcessRestV2Trades(); Thread.Sleep(parSleepTime); ProcessRestV2Orders(); Thread.Sleep(parSleepTime); } catch (Exception e) { Error("ThreadBfxRestV2", e); //2018-11-15 Thread.Sleep(parSleepTime); } } }