mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 08:48:07 +00:00
Add token expiry and Telegram notification features
- 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.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user