090752f42c
1. evaluateOverallRule: 5m 전략 평가 시 1m 고정 시리즈 사용 버그 수정 - DSL에서 주 시간봉(TIMEFRAME 노드 candleType)을 추출하여 해당 시리즈 사용 - 없으면 1m 폴백 유지 2. buildConditionRule: kLength 등 지표 파라미터를 조건 노드 params에서 우선 읽도록 수정 - 조건 DSL의 params 필드가 있으면 전역 indicator settings보다 우선 적용 - 서버 DB에 indicator settings 없어도 전략 저장 당시 값 사용 가능 3. LiveConditionController: deviceId 헤더를 indicatorSettingsService에 전달 - x-device-id 헤더를 읽어 device 단위 지표 설정 조회 지원 Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.0 KiB
Java
33 lines
1.0 KiB
Java
package com.goldenchart.controller;
|
|
|
|
import com.goldenchart.dto.LiveConditionStatusDto;
|
|
import com.goldenchart.service.LiveConditionStatusService;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* 가상투자 — 실시간 조건 충족 현황 API.
|
|
*
|
|
* GET /api/strategy/live-conditions?market=KRW-BTC&strategyId=1
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/strategy/live-conditions")
|
|
@RequiredArgsConstructor
|
|
public class LiveConditionController {
|
|
|
|
private final LiveConditionStatusService service;
|
|
|
|
@GetMapping
|
|
public ResponseEntity<LiveConditionStatusDto> get(
|
|
@RequestParam String market,
|
|
@RequestParam long strategyId,
|
|
@RequestHeader Map<String, String> headers) {
|
|
long uid = TradingControllerSupport.requireRegisteredUser(headers);
|
|
String deviceId = headers.get("x-device-id");
|
|
return ResponseEntity.ok(service.evaluate(uid, deviceId, market, strategyId));
|
|
}
|
|
}
|