public override async Task RunSample() { if (await IqClientApi.ConnectAsync()) { // open order EurUsd in smallest period (1min) var exp = DateTime.Now.AddMinutes(1); var buyResult = await IqClientApi.BuyAsync(ActivePair.EURUSD, 1, OrderDirection.Call, exp); } }
public override async Task RunSample() { if (await IqClientApi.ConnectAsync()) { var result = await IqClientApi.BuyAsync(ActivePair.EURUSD_OTC, 1, OrderDirection.Call, DateTimeOffset.MinValue); Console.WriteLine($"PositionId = {result.PositionId}"); } }
public override async Task RunSample() { if (await IqClientApi.ConnectAsync()) { while (true) { await Task.Delay(5000); var result = await IqClientApi.BuyAsync(ActivePair.EURUSD_OTC, 1, OrderDirection.Call, DateTimeOffset.Now); Console.WriteLine($"PositionId = {result.PositionId}"); } } }