goldenChat base source add
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.goldenchart.trading;
|
||||
|
||||
/**
|
||||
* 자동매매 실행 대상: 모의 / 실거래 / 병행.
|
||||
*/
|
||||
public enum TradingMode {
|
||||
PAPER,
|
||||
LIVE,
|
||||
BOTH;
|
||||
|
||||
public static TradingMode fromString(String raw) {
|
||||
if (raw == null || raw.isBlank()) return PAPER;
|
||||
try {
|
||||
return valueOf(raw.trim().toUpperCase());
|
||||
} catch (IllegalArgumentException e) {
|
||||
return PAPER;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean usePaper() {
|
||||
return this == PAPER || this == BOTH;
|
||||
}
|
||||
|
||||
public boolean useLive() {
|
||||
return this == LIVE || this == BOTH;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user