public ApiUtil(string host, ushort port, bool ssl, IceClient client) { _host = host; _port = port; _client = client; _scheme = ssl ? "https" : "http"; }
public static void Main(string[] args) { var client = new IceClient("B3DA0C82906648FA9C2493D82A357C412AC6B5F7958948EBB1240E429EC75AD4", "32ECCDC8178B4CACB798388A501142F062588C55DD7047AEB79F798AD4C6EB92723FF91B552B494DA972D6F2F4316E30028F312C1A3A4F038147E375AC7C09FC"); var symbols = client.Public.GetSymbols(); var symbolPairs = client.Public.GetPairs(); var btcGto = symbolPairs.FirstOrDefault(pair => pair.Name == "BTC-GTO"); var openOrdersResult = client.Order.GetOpenOrders(); var orderResult = client.Order.CreateOrder(btcGto, OrderType.Buy, 1, 1); }
private void BtnRestartClient_Click(object sender, RoutedEventArgs e) { buttonRestartClient.IsEnabled = false; buttonStartClient.IsEnabled = false; buttonStopClient.IsEnabled = false; AddMessage("User Restart Client: " + clientArgs); Task.Run(delegate { iceClient.OnStatusChanged -= IceClient_OnStatusChanged; iceClient.OnExceptionOccured -= IceClient_OnExceptionOccured; iceClient.OnMethodInvoked -= IceClient_OnMethodInvoked; iceClient.Exit(); IceClient_OnStatusChanged(iceClient.Status); Thread.Sleep(clientRestartIntervalMS); iceClient = new IceClient(); iceClient.OnStatusChanged += IceClient_OnStatusChanged; iceClient.OnExceptionOccured += IceClient_OnExceptionOccured; iceClient.OnMethodInvoked += IceClient_OnMethodInvoked; Application.Current.Dispatcher.Invoke(delegate { buttonStopClient.IsEnabled = true; buttonRestartClient.IsEnabled = true; }); IceClient_OnStatusChanged(iceClient.Status); var acmHeartbeat = Bundle.ACMHeartbeatFlag.HeartbeatOff; var amiEnabled = false; App.Current.Dispatcher.Invoke(() => { Enum.TryParse("Heartbeat" + cbClientHeartbeat.Text, out acmHeartbeat); amiEnabled = checkBoxAsync.IsChecked.Value; }); Thread.Sleep(1); iceClient.SetContentSize(contentSizeMB); var hold = iceClient.Hold; Task.Run(() => { iceClient.Start(clientArgs, hold, amiEnabled, acmHeartbeat); }); }); }
public MainWindow() { InitializeComponent(); messages = new List <string>(); textBoxServerArgs.Text = "SimpleMessenger: default -h localhost -p 5050 -t 5000"; buttonStartServer.IsEnabled = true; buttonStopServer.IsEnabled = false; buttonRestartServer.IsEnabled = false; textBoxClientArgs.Text = "SimpleMessenger: default -h localhost -p 5050 -t 2000"; buttonStartClient.IsEnabled = true; buttonIdleClient.IsEnabled = false; buttonStopClient.IsEnabled = false; buttonRestartClient.IsEnabled = false; textBoxServerRestartInterval.Text = "1000"; textBoxClientRestartInterval.Text = "1000"; textBoxContentSize.Text = "2"; checkBoxAsync.IsChecked = false; buttonClearLogs.IsEnabled = false; buttonExportLogs.IsEnabled = false; textBoxContentSize.IsEnabled = false; iceServer = new IceServer(); iceClient = new IceClient(); iceServer.OnStatusChanged += IceServer_OnStatusChanged; iceServer.OnMethodInvoked += IceServer_OnMethodInvoked; iceServer.OnExceptionOccured += IceServer_OnExceptionOccured; iceClient.OnStatusChanged += IceClient_OnStatusChanged; iceClient.OnMethodInvoked += IceClient_OnMethodInvoked; iceClient.OnExceptionOccured += IceClient_OnExceptionOccured; IceServer_OnStatusChanged(iceServer.Status); IceClient_OnStatusChanged(iceClient.Status); if (App.IsNewInstance) { groupServer.Visibility = Visibility.Hidden; Title += " [Client ONLY]"; } }
internal WithdrawIceApi(IceClient client) { _client = client; }
internal OrderIceApi(IceClient client) { _client = client; }
internal PublicIceApi(IceClient client) { _client = client; }
internal DepositIceApi(IceClient client) { _client = client; }
internal AccountIceApi(IceClient client) { _client = client; }