public async Task <ActionResult> Sell(Sell.Command model) { model.WithUserId(this.User.Identifier()); var r = await _mediator.Send(model); return(this.OkOrError(r)); }
public static Sell.Command CreateSellCommand() { var cmd = new Sell.Command { Ticker = Ticker, NumberOfContracts = 1, Premium = 10, StrikePrice = 20, OptionType = OptionType.PUT.ToString(), ExpirationDate = DateTimeOffset.UtcNow.AddDays(10), Filled = DateTimeOffset.UtcNow }; cmd.WithUserId(User.Id); return(cmd); }
public Task <object> Sell(Sell.Command cmd) { cmd.WithUserId(User.Identifier()); return(ExecTransaction(cmd)); }