6: Extend the JupiterPerpsAlarm with an ID column
This commit is contained in:
+4
-4
@@ -1,4 +1,4 @@
|
||||
# Asset Direction Target TRIGGER SEVERITY NOTE
|
||||
#############################################################
|
||||
SOL BELOW 170.0 ONETIME INFO "EMERGENCY: Risiko for Perps Solana long LIKVIDERING!"
|
||||
#SOL BELOW 71.4 ONETIME CRITICAL "CRITICAL: Risiko for Solana Raydium LÅN LIKVIDERING!"
|
||||
# ID Asset Direction Target TRIGGER SEVERITY NOTE
|
||||
################################################################################################################
|
||||
1 SOL BELOW 170.0 ONETIME INFO "EMERGENCY: Risiko for Perps Solana long LIKVIDERING!"
|
||||
2 SOL BELOW 71.4 ONETIME CRITICAL "CRITICAL: Risiko for Solana Raydium LÅN LIKVIDERING!"
|
||||
|
||||
@@ -43,6 +43,8 @@ public final class AlarmConfigurationParser {
|
||||
static PriceAlarmDefinition parseLine(String line) {
|
||||
Cursor cursor = new Cursor(line);
|
||||
|
||||
int id = Integer.parseInt(cursor.nextToken("id"));
|
||||
|
||||
JupiterPerpsAsset asset = JupiterPerpsAsset.valueOf(
|
||||
cursor.nextToken("asset").toUpperCase(Locale.ROOT)
|
||||
);
|
||||
@@ -71,6 +73,7 @@ public final class AlarmConfigurationParser {
|
||||
}
|
||||
|
||||
return new PriceAlarmDefinition(
|
||||
id,
|
||||
asset,
|
||||
direction,
|
||||
target,
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.math.BigDecimal;
|
||||
import java.util.Objects;
|
||||
|
||||
public record PriceAlarmDefinition(
|
||||
int id,
|
||||
JupiterPerpsAsset asset,
|
||||
PriceDirection direction,
|
||||
BigDecimal target,
|
||||
|
||||
@@ -87,6 +87,7 @@ public final class SelfTest {
|
||||
AlarmTrigger trigger
|
||||
) {
|
||||
return new PriceAlarmDefinition(
|
||||
123,
|
||||
JupiterPerpsAsset.SOL,
|
||||
direction,
|
||||
new BigDecimal(target),
|
||||
|
||||
Reference in New Issue
Block a user