From a9af2931e75433d2c0f97cb127d808882a0d2ce3 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sat, 9 Apr 2022 02:44:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dswagger=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Binance.TradeRobot.API.xml | 6 ++ .../Controllers/RobotController.cs | 1 + Binance.TradeRobot.API/Program.cs | 5 + .../Properties/launchSettings.json | 2 +- .../Binance.TradeRobot.Business.xml | 8 ++ .../Binance.TradeRobot.Model.xml | 95 +++++++++++++++---- 6 files changed, 96 insertions(+), 21 deletions(-) diff --git a/Binance.TradeRobot.API/Binance.TradeRobot.API.xml b/Binance.TradeRobot.API/Binance.TradeRobot.API.xml index 1144f50..8cb7238 100644 --- a/Binance.TradeRobot.API/Binance.TradeRobot.API.xml +++ b/Binance.TradeRobot.API/Binance.TradeRobot.API.xml @@ -43,6 +43,12 @@ + + + 获取动2.1机器人列表 + + + 用户登录 diff --git a/Binance.TradeRobot.API/Controllers/RobotController.cs b/Binance.TradeRobot.API/Controllers/RobotController.cs index ae9f540..8d38e25 100644 --- a/Binance.TradeRobot.API/Controllers/RobotController.cs +++ b/Binance.TradeRobot.API/Controllers/RobotController.cs @@ -31,6 +31,7 @@ namespace Binance.TradeRobot.API.Controllers /// 创建动2.1策略机器人 /// /// + [HttpPost] public void AddD21PolicyRobot([FromBody] AddD21PolicyRobotRequest addD21PolicyRobotRequest) { robotBusiness.AddD21PolicyRobot(addD21PolicyRobotRequest); diff --git a/Binance.TradeRobot.API/Program.cs b/Binance.TradeRobot.API/Program.cs index feb5d50..47375dd 100644 --- a/Binance.TradeRobot.API/Program.cs +++ b/Binance.TradeRobot.API/Program.cs @@ -18,6 +18,11 @@ namespace Binance.TradeRobot.API public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) + .ConfigureAppConfiguration(builder => + { + if (args != null && args.Length > 0) + builder.AddCommandLine(args); + }) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); diff --git a/Binance.TradeRobot.API/Properties/launchSettings.json b/Binance.TradeRobot.API/Properties/launchSettings.json index f88824f..d2922b4 100644 --- a/Binance.TradeRobot.API/Properties/launchSettings.json +++ b/Binance.TradeRobot.API/Properties/launchSettings.json @@ -21,7 +21,7 @@ "commandName": "Project", "launchBrowser": true, "launchUrl": "", - "applicationUrl": "https://localhost:5001;http://localhost:5000", + "applicationUrl": "http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/Binance.TradeRobot.Business/Binance.TradeRobot.Business.xml b/Binance.TradeRobot.Business/Binance.TradeRobot.Business.xml index b6095d5..1588b16 100644 --- a/Binance.TradeRobot.Business/Binance.TradeRobot.Business.xml +++ b/Binance.TradeRobot.Business/Binance.TradeRobot.Business.xml @@ -20,6 +20,14 @@ + + + 添加机器人和账户 + + + + 机器人Id + 添加金字塔策略机器人 diff --git a/Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml b/Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml index 1b4e917..826cb87 100644 --- a/Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml +++ b/Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml @@ -109,26 +109,6 @@ 信号周期 1m=0,3m=1,5m=2,15m=3,30m=4,1h=5,2h=6,4h=7,6h=8,8h=9,12h=10,1d=11,3d=12,1w=13,1M=14 - - - 业务类型 - - - - - 账号登录名 - - - - - 交易策略 - - - - - 交易所账号Id - - 交易所Id @@ -254,6 +234,71 @@ 运行时长(s) + + + 平仓次数 + + + + + 现货/杠杆持仓金额 + + + + + 现货/杠杆持仓数量 + + + + + 总收益 + + + + + 盈利次数 + + + + + 总借币金额 + + + + + 执行模式 + + + + + 是否开启增购 + + + + + 是否开启错误信号补救 + + + + + 最大追高比例 + + + + + 信号周期 + + + + + 仓位 + + + + + 止损比例 + + 平仓次数 @@ -284,6 +329,11 @@ 总借币金额 + + + 现货持仓均价 + + 投资本金 @@ -439,6 +489,11 @@ 逐仓杠杆USDT资产 + + + 运行时长(s) + + 资金变更用户名