public void AddBA() { var ops = new UserAccountOperations(new DapperBankSystemConnectionStringProvider()); var id = Guid.Parse(Request.HttpContext.User.Claims.ToArray()[1].Value); var accountId = Guid.NewGuid(); var userAccount = ops.AddOne(id, accountId); }
private static async Task Main() { ServicePointManager.ServerCertificateValidationCallback = (s, certificate, chain, sslPolicyErrors) => true; var op = new UserAccountOperations(); //await op.NewOrder(new NewOrderRequest //{ // OrderId = "teste1", // Side = OrderSide.Buy, // Symbol = "ltcusdt", // Type = OrderType.Stop, // Date = DateTime.UtcNow, // StopPrice = 99, // Price = 100, // Quantity = 0.1m //}); //await op.CancelOrder(new CancelOrderRequest //{ // OrigOrderId = "teste1", // Symbol = "ltcusdt", // Date = DateTime.UtcNow //}); //await DepthSockets(); //var key = await op.CreateListenKey(); //await op.PingListenKey(key); var a = await op.AccountInfo(); }
public IEnumerable <string> GetBA() { var ops = new UserAccountOperations(new DapperBankSystemConnectionStringProvider()); var id = Guid.Parse(Request.HttpContext.User.Claims.ToArray()[1].Value); var userAccounts = ops.GetList(id); return(userAccounts.Select(i => i.AccountId.ToString())); }