mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +00:00
176 lines
8.4 KiB
Bash
176 lines
8.4 KiB
Bash
# UI language (zh | en)
|
|
LANG=zh
|
|
|
|
# Exchange selection
|
|
EXCHANGE=aster # Pick aster (default) or standx/grvt/lighter/backpack/paradex/nado
|
|
|
|
# Aster API credentials
|
|
ASTER_API_KEY=
|
|
ASTER_API_SECRET=
|
|
|
|
# StandX authentication (set when EXCHANGE=standx)
|
|
STANDX_TOKEN=
|
|
STANDX_SYMBOL=BTC-USD
|
|
# STANDX_BASE_URL=https://perps.standx.com
|
|
# STANDX_WS_URL=wss://perps.standx.com/ws-stream/v1
|
|
# STANDX_SESSION_ID=
|
|
# Optional: request signing key (ed25519 private key, supports hex or base58 format)
|
|
# STANDX_REQUEST_PRIVATE_KEY=
|
|
# Token expiry configuration (recommended method: creation date + validity days)
|
|
# Get these values when generating API token at https://standx.com/user/session
|
|
# STANDX_TOKEN_CREATE_DATE=2026-01-15 # Token creation date (YYYY-MM-DD format)
|
|
# STANDX_TOKEN_VALIDITY_DAYS=30 # Token validity period in days
|
|
# Legacy method: direct expiry timestamp (Unix seconds)
|
|
# STANDX_TOKEN_EXPIRY=1737092800
|
|
|
|
# Core trading symbol and sizing
|
|
TRADE_SYMBOL=BTCUSDT # Trading pair symbol
|
|
TRADE_AMOUNT=0.001 # Base order quantity (base asset, e.g. BTC)
|
|
|
|
# Swing Trading
|
|
SWING_DIRECTION=short # short | long | both
|
|
SWING_STOP_LOSS_PCT=0.05 # 0.05 = 5%
|
|
|
|
# Risk management (USD amounts unless noted)
|
|
LOSS_LIMIT=0.04 # Max loss per trade in USDT before forced close
|
|
TRAILING_PROFIT=0.2 # Trailing stop activation profit (USDT)
|
|
TRAILING_CALLBACK_RATE=0.2 # Trailing callback percent (e.g. 0.2 => 0.2%)
|
|
PROFIT_LOCK_TRIGGER_USD=0.08 # Start moving base stop once unrealized PnL > this (USDT)
|
|
PROFIT_LOCK_OFFSET_USD=0.04 # Base stop offset from entry after trigger (USDT)
|
|
BOLLINGER_LENGTH=20 # SMA window (minutes) used for Bollinger bandwidth
|
|
BOLLINGER_STD_MULTIPLIER=2 # Standard deviation multiplier for Bollinger bands
|
|
MIN_BOLLINGER_BANDWIDTH=0.001 # Require bandwidth >= this ratio before new entries
|
|
|
|
# Precision (per-symbol exchange filters)
|
|
PRICE_TICK=0.1 # Price tick size (e.g. BTCUSDT uses 0.1)
|
|
QTY_STEP=0.001 # Quantity step size (e.g. BTC min step 0.001)
|
|
|
|
# Engine cadence and UI
|
|
POLL_INTERVAL_MS=500 # Trend engine poll interval (ms)
|
|
MAX_LOG_ENTRIES=200 # Max log entries shown in dashboard
|
|
KLINE_INTERVAL=1m # Kline interval (e.g., 1m/3m/5m)
|
|
MAX_CLOSE_SLIPPAGE_PCT=0.05 # Max allowed deviation vs mark when closing (0.05 => 5%)
|
|
|
|
# Maker-only settings
|
|
MAKER_LOSS_LIMIT=0.05 # Maker loss cap (USDT). Defaults to LOSS_LIMIT if unset
|
|
MAKER_BID_OFFSET=0 # Bid quote offset from top bid (USDT)
|
|
MAKER_ASK_OFFSET=0 # Ask quote offset from top ask (USDT)
|
|
MAKER_REFRESH_INTERVAL_MS=500 # Maker refresh cadence (ms)
|
|
MAKER_MAX_CLOSE_SLIPPAGE_PCT=0.05 # Maker close slippage guard (fallbacks to MAX_CLOSE_SLIPPAGE_PCT)
|
|
MAKER_PRICE_TICK=0.1 # Maker price tick size (defaults to PRICE_TICK)
|
|
|
|
# Maker-points Binance depth imbalance monitor
|
|
MAKER_POINTS_BINANCE_DEPTH_WINDOW_BPS=3 # Binance depth monitor window around best bid/ask (bps)
|
|
MAKER_POINTS_BINANCE_DEPTH_IMBALANCE_RATIO=8 # Imbalance threshold ratio (e.g. 8 => one side >= 8x)
|
|
|
|
# Grid strategy defaults
|
|
GRID_LOWER_PRICE=25000 # Grid lower bound price (quote currency)
|
|
GRID_UPPER_PRICE=35000 # Grid upper bound price
|
|
GRID_LEVELS=10 # Number of grid levels between bounds (>=2)
|
|
GRID_ORDER_SIZE=0.001 # Quantity per grid order (base asset units)
|
|
GRID_MAX_POSITION_SIZE=0.01 # Max inventory the grid may hold (base units)
|
|
GRID_REFRESH_INTERVAL_MS=1000 # Grid evaluation cadence (ms)
|
|
GRID_MAX_LOG_ENTRIES=200 # Grid trade log length (defaults to MAX_LOG_ENTRIES when unset)
|
|
GRID_DIRECTION=both # Order direction: both | long | short
|
|
GRID_STOP_LOSS_PCT=0.01 # Stop loss trigger percentage beyond bounds (0.01 => 1%)
|
|
GRID_RESTART_TRIGGER_PCT=0.01 # Restart buffer percentage inside bounds
|
|
GRID_AUTO_RESTART_ENABLED=true # Automatically resume grid when price re-enters range
|
|
GRID_MAX_CLOSE_SLIPPAGE_PCT=0.05 # Close-order slippage guard relative to mark price
|
|
# GRID_PRICE_TICK=0.1 # Optional override for grid price tick (falls back to PRICE_TICK)
|
|
# GRID_QTY_STEP=0.001 # Optional override for grid quantity step (falls back to QTY_STEP)
|
|
|
|
# GRVT authentication (set when EXCHANGE=grvt)
|
|
GRVT_API_KEY=
|
|
GRVT_API_SECRET=
|
|
GRVT_SUB_ACCOUNT_ID=
|
|
GRVT_INSTRUMENT=BTC_USDT_Perp
|
|
GRVT_SYMBOL=BTCUSDT
|
|
GRVT_ENV=prod
|
|
|
|
# Optional advanced overrides
|
|
# GRVT_COOKIE="gravity=..." # Pre-provisioned session cookie (auto-refresh uses API key when absent)
|
|
# GRVT_ACCOUNT_ID= # Populated automatically after login
|
|
# GRVT_SIGNER_PATH=./grvt-signer.cjs # Custom signature provider module
|
|
|
|
# Lighter authentication (set when EXCHANGE=lighter)
|
|
LIGHTER_ACCOUNT_INDEX=
|
|
LIGHTER_API_PRIVATE_KEY= # 40-byte hex private key (e.g., 0x...)
|
|
LIGHTER_API_KEY_INDEX=0 # API key slot (default 0)
|
|
LIGHTER_SYMBOL=BTCUSDT # Trading pair (defaults to TRADE_SYMBOL when omitted)
|
|
LIGHTER_ENV=testnet # mainnet | testnet | staging | dev
|
|
# LIGHTER_BASE_URL=https://testnet.zklighter.elliot.ai
|
|
# LIGHTER_CHAIN_ID=300 # Override inferred chain id when needed
|
|
# LIGHTER_MARKET_ID=1 # Prefer explicit market id when symbols differ
|
|
# LIGHTER_PRICE_DECIMALS=3 # Manual override for price decimals (optional)
|
|
# LIGHTER_SIZE_DECIMALS=3 # Manual override for size decimals (optional)
|
|
|
|
# Backpack exchange configuration
|
|
# Fill these with your Backpack API credentials and preferences
|
|
|
|
BACKPACK_API_KEY=
|
|
BACKPACK_API_SECRET=
|
|
BACKPACK_PASSWORD=
|
|
BACKPACK_SUBACCOUNT=
|
|
|
|
# Use sandbox environment: "true" to enable, otherwise leave as false
|
|
BACKPACK_SANDBOX=false
|
|
|
|
# Default trading symbol (falls back to TRADE_SYMBOL or BTCUSDC)
|
|
BACKPACK_SYMBOL=BTC_USD_PERP
|
|
|
|
# Enable verbose adapter logging: set to "1" or "true"
|
|
BACKPACK_DEBUG=false
|
|
|
|
# Paradex exchange configuration
|
|
# Provide the EVM private key & wallet address for onboarded accounts.
|
|
# When EXCHANGE=paradex these values are used automatically.
|
|
|
|
PARADEX_SYMBOL=BTC-USD-PERP
|
|
PARADEX_PRIVATE_KEY=
|
|
PARADEX_WALLET_ADDRESS=
|
|
|
|
# Enable testnet endpoints by setting to "true"; defaults to false (mainnet).
|
|
# PARADEX_SANDBOX=false
|
|
|
|
# Force disabling ccxt.pro websocket usage by setting to "false" (pro is preferred when installed).
|
|
# PARADEX_USE_PRO=true
|
|
|
|
# Optional reconnect delay override (milliseconds, e.g., 2000). Leave blank for default.
|
|
# PARADEX_RECONNECT_DELAY_MS=
|
|
|
|
# Enable verbose adapter logging: set to "1" or "true"
|
|
# PARADEX_DEBUG=false
|
|
|
|
# Nado exchange configuration (Ink mainnet)
|
|
# Requires a linked signer private key + your original subaccount owner EVM address.
|
|
# When EXCHANGE=nado these values are used automatically.
|
|
|
|
NADO_ENV=inkMainnet # inkMainnet | inkTestnet
|
|
NADO_SYMBOL=BTC-PERP # Trading product symbol (e.g., BTC-PERP / ETH-PERP)
|
|
NADO_SIGNER_PRIVATE_KEY= # 32-byte 0x-prefixed private key (0x...)
|
|
NADO_SUBACCOUNT_OWNER= # EVM address of the subaccount owner (0x...)
|
|
NADO_SUBACCOUNT_NAME=default # Subaccount name (bytes12, default "default")
|
|
|
|
# Optional: market-order slippage buffer (used for IOC limit-as-market, e.g. 0.01 => 1%)
|
|
NADO_MARKET_SLIPPAGE_PCT=0.01
|
|
|
|
# Optional: stop trigger source for STOP_MARKET orders (oracle | last | mid)
|
|
NADO_STOP_TRIGGER_SOURCE=oracle
|
|
|
|
# Optional: how to handle orders smaller than Nado min_size (USDT0 notional)
|
|
# - adjust: round quantity up to the minimum allowed size (default)
|
|
# - reject: throw an error instead of auto-adjusting
|
|
NADO_MIN_SIZE_POLICY=adjust
|
|
|
|
# Optional endpoint overrides
|
|
# NADO_GATEWAY_WS_URL=wss://gateway.prod.nado.xyz/v1/ws
|
|
# NADO_SUBSCRIPTIONS_WS_URL=wss://gateway.prod.nado.xyz/v1/subscribe
|
|
# 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")
|