Rewrite trader service for V4 P0
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package com.quantai.trader.domain;
|
||||
|
||||
import com.quantai.trader.enums.TraderErrorCode;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class FeedbackValidator {
|
||||
public void validateP0(TraderAppFeedback feedback) {
|
||||
if (!feedback.feedbackSource().p0Allowed() || feedback.realFill()) {
|
||||
throw new TraderException(TraderErrorCode.TRADER_FEEDBACK_INVALID,
|
||||
"P0 rejects PAPER_APP/REAL_APP and any realFill feedback");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user