diff --git a/src/main/java/com/deepchart/controller/IndexController.java b/src/main/java/com/deepchart/controller/IndexController.java index 72a573b..ce07f06 100644 --- a/src/main/java/com/deepchart/controller/IndexController.java +++ b/src/main/java/com/deepchart/controller/IndexController.java @@ -46,4 +46,33 @@ public class IndexController { String result = indexService.rsi(list); return Result.success("success", result); } + + + @PostMapping("/ma") + public Result ma(@RequestBody StockInfo stock) { + List list = indexService.getStockData(stock); + String result = indexService.ma(list); + return Result.success("success", result); + } + + @PostMapping("/cci") + public Result cci(@RequestBody StockInfo stock) { + List list = indexService.getStockData(stock); + String result = indexService.cci(list); + return Result.success("success", result); + } + + @PostMapping("/expma") + public Result expma(@RequestBody StockInfo stock) { + List list = indexService.getStockData(stock); + String result = indexService.expma(list); + return Result.success("success", result); + } + + @PostMapping("/wr") + public Result wr(@RequestBody StockInfo stock) { + List list = indexService.getStockData(stock); + String result = indexService.wr(list); + return Result.success("success", result); + } } diff --git a/src/main/java/com/deepchart/service/IndexService.java b/src/main/java/com/deepchart/service/IndexService.java index e38ab0b..8c5ebe2 100644 --- a/src/main/java/com/deepchart/service/IndexService.java +++ b/src/main/java/com/deepchart/service/IndexService.java @@ -15,4 +15,13 @@ public interface IndexService { String kd(List list); String rsi(List list); + + String ma(List list); + + String cci(List list); + + String expma(List list); + + String wr(List list); + }