| | |
| | | } |
| | | GateConfigDTO dto = persistenceService.load(apiKey); |
| | | if (dto == null) { |
| | | dto = new GateConfigDTO(); |
| | | return Result.fail("apiKey 错误,未找到该配置"); |
| | | } |
| | | dto.setApiKey(apiKey); |
| | | return Result.ok(dto); |
| | |
| | | public Result getStatus() { |
| | | GateGridTradeService service = clientManager.getGridTradeService(); |
| | | if (service == null) { |
| | | return Result.ok("STOPPED"); |
| | | return Result.ok("success", "STOPPED"); |
| | | } |
| | | return Result.ok(service.isStrategyActive() ? "ACTIVE" : "STOPPED"); |
| | | return Result.ok("success", service.isStrategyActive() ? "ACTIVE" : "STOPPED"); |
| | | } |
| | | |
| | | /** |