37 lines
1020 B
C#
37 lines
1020 B
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Qdp.Foundation.Implementations;
|
|
using YieldChain.Models;
|
|
using YLErp.Modules.SystemModule;
|
|
using YLErp.Modules.TradeRiskCalcModule;
|
|
|
|
namespace YLErp.Web.WebAPI.Controllers
|
|
{
|
|
public class TradeRiskController : BaseController
|
|
{
|
|
/// <summary>
|
|
/// 保存交易、暂时没有地方用到
|
|
/// </summary>
|
|
/// <param name="trade">交易信息</param>
|
|
/// <returns></returns>
|
|
[HttpPost("m/api/v1/realtimeRiskCalc")]
|
|
public JsonResult RealtimeRiskCalc(TradingRiskReqModel req)
|
|
{
|
|
if (req is null)
|
|
{
|
|
req = new TradingRiskReqModel();
|
|
}
|
|
|
|
if (string.IsNullOrWhiteSpace(req.VolType))
|
|
{
|
|
req.VolType = "对冲";
|
|
}
|
|
|
|
req.IncludeStock = true;
|
|
|
|
var result = new TradingRiskReqService(CurUser).GetResult(req);
|
|
return JsonSuccess(result);
|
|
}
|
|
}
|
|
}
|