mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 17:28:08 +00:00
- Introduced `STANDX_TOKEN_EXPIRY` configuration to manage token expiration, including handling logic for active, expired, and silent states. - Implemented Telegram notifications for key events such as order filled, position opened/closed, stop loss triggered, and token expiration. - Updated Maker Points engine to integrate token expiry checks and notification sending, enhancing user awareness of trading conditions. - Enhanced documentation to include details on configuring token expiry and Telegram notifications for improved user guidance.
23 lines
616 B
TypeScript
23 lines
616 B
TypeScript
export type NotificationLevel = "info" | "warn" | "error" | "success";
|
|
|
|
export interface TradeNotification {
|
|
type: "order_filled" | "position_opened" | "position_closed" | "stop_loss" | "token_expired" | "custom";
|
|
level: NotificationLevel;
|
|
symbol: string;
|
|
title: string;
|
|
message: string;
|
|
accountLabel?: string;
|
|
details?: Record<string, string | number | boolean | null>;
|
|
timestamp?: number;
|
|
}
|
|
|
|
export interface NotificationSender {
|
|
send(notification: TradeNotification): Promise<void>;
|
|
isEnabled(): boolean;
|
|
}
|
|
|
|
export interface NotificationConfig {
|
|
enabled: boolean;
|
|
accountLabel?: string;
|
|
}
|