| | |
| | | return Result.ok(stationService.getEvents(apiKeyMd5)); |
| | | } |
| | | |
| | | @ApiOperation("查询每轮多/空止损次数") |
| | | @GetMapping("/round-stop-loss") |
| | | public Result roundStopLoss(@RequestParam String apiKeyMd5) { |
| | | return Result.ok(stationService.getRoundStopLossCount(apiKeyMd5)); |
| | | } |
| | | |
| | | @ApiOperation("查询策略实时状态") |
| | | @GetMapping("/strategy-status") |
| | | public Result strategyStatus(@RequestParam String apiKeyMd5) { |
| | |
| | | stationService.updateConfig(apiKeyMd5, params); |
| | | return Result.ok("参数已保存,请手动点击「启动」使新配置生效"); |
| | | } |
| | | |
| | | @ApiOperation("取消多仓止盈止损挂单") |
| | | @PostMapping("/cancel-long-tp-sl") |
| | | public Result cancelLongTpSl(@RequestParam String apiKeyMd5) { |
| | | stationService.cancelLongTpSl(apiKeyMd5); |
| | | return Result.ok("指令已发送"); |
| | | } |
| | | |
| | | @ApiOperation("取消空仓止盈止损挂单") |
| | | @PostMapping("/cancel-short-tp-sl") |
| | | public Result cancelShortTpSl(@RequestParam String apiKeyMd5) { |
| | | stationService.cancelShortTpSl(apiKeyMd5); |
| | | return Result.ok("指令已发送"); |
| | | } |
| | | |
| | | @ApiOperation("生成多仓止盈止损挂单") |
| | | @PostMapping("/rebuild-long-tp-sl") |
| | | public Result rebuildLongTpSl(@RequestParam String apiKeyMd5) { |
| | | stationService.rebuildLongTpSl(apiKeyMd5); |
| | | return Result.ok("指令已发送"); |
| | | } |
| | | |
| | | @ApiOperation("生成空仓止盈止损挂单") |
| | | @PostMapping("/rebuild-short-tp-sl") |
| | | public Result rebuildShortTpSl(@RequestParam String apiKeyMd5) { |
| | | stationService.rebuildShortTpSl(apiKeyMd5); |
| | | return Result.ok("指令已发送"); |
| | | } |
| | | |
| | | @ApiOperation("多单平仓") |
| | | @PostMapping("/close-long") |
| | | public Result closeLong(@RequestParam String apiKeyMd5) { |
| | | stationService.closeLong(apiKeyMd5); |
| | | return Result.ok("指令已发送"); |
| | | } |
| | | |
| | | @ApiOperation("空单平仓") |
| | | @PostMapping("/close-short") |
| | | public Result closeShort(@RequestParam String apiKeyMd5) { |
| | | stationService.closeShort(apiKeyMd5); |
| | | return Result.ok("指令已发送"); |
| | | } |
| | | } |