private void ListaTransakcji() { try { SyncAPIConnector connector = new SyncAPIConnector(serverData); Credentials credentials = new Credentials(userId, password, "", "pixelNet"); LoginResponse loginResponse = APICommandFactory.ExecuteLoginCommand(connector, credentials, true); TradesResponse tradesResponse = APICommandFactory.ExecuteTradesCommand(connector, true); listaTran.Items.Clear(); foreach (xAPI.Records.TradeRecord rec in tradesResponse.TradeRecords) { string rodz = ""; if (rec.Cmd == 1) { rodz = "Sell"; } else { rodz = "Buy"; } listaTran.Items.Add(new PozTran() { Nazwa = rec.Symbol, CenaZak = (double)rec.Open_price, Zysk = (double)rec.Profit, Rodzaj = rodz });; //if (rec.Profit > 30) TransakcjaStop(rec); LogoutResponse logoutResponse = APICommandFactory.ExecuteLogoutCommand(connector); } tradesResponse = null; } catch { } }