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:
discountry
2026-01-10 12:44:52 +08:00
parent cb1cef6f1b
commit 598f2a0eb6
8 changed files with 611 additions and 4 deletions
+9
View File
@@ -16,6 +16,10 @@ STANDX_SYMBOL=BTC-USD
# STANDX_SESSION_ID=
# Optional: request signing key (ed25519 private key, hex or base64)
# STANDX_REQUEST_PRIVATE_KEY=
# Token expiry timestamp (Unix seconds). When expired: cancels all orders, stops new orders.
# If position exists, continues close/stop-loss logic. If no position/orders, enters silent mode.
# Example: STANDX_TOKEN_EXPIRY=1737092800
# STANDX_TOKEN_EXPIRY=
# Core trading symbol and sizing
TRADE_SYMBOL=BTCUSDT # Trading pair symbol
@@ -154,3 +158,8 @@ NADO_MIN_SIZE_POLICY=adjust
# NADO_ARCHIVE_URL=https://archive.prod.nado.xyz/v1
# NADO_TRIGGER_URL=https://trigger.prod.nado.xyz/v1
# NADO_DEBUG=false
# Telegram notification configuration
# TELEGRAM_BOT_TOKEN= # Telegram bot token from @BotFather
# TELEGRAM_CHAT_ID= # Chat ID to receive notifications
# TELEGRAM_ACCOUNT_LABEL= # Account label to distinguish multiple bot instances (e.g., "Account-A")