Superior Trade Trading Terminal is an AI-powered trading terminal for Hyperliquid that lets users sketch their market analysis directly on charts. An AI agent interprets the drawings and chart context to produce structured trade setups complete with entry, stop, target, and invalidation levels. It then writes Freqtrade strategy code that must pass a deterministic safety validator with automatic repair loops before deployment. The terminal provides chart visualization using TradingView Advanced Charts (or a bundled Lightweight Charts preview), Hyperliquid and Lighter datafeeds, order-flow footprint overlays, liquidation heatmaps, and tier-ranked indicators. Strategies run as live Freqtrade bots via the Superior Trade API. Self-hosted deployment uses an embedded Postgres (PGlite) requiring no external database, runs on Node.js 20.9+ with Next.js 16, and starts on port 3200. Two API keys are required: Superior Trade API key and OpenRouter API key. The project is open-source under Apache-2.0 license.
Should you self-host Superior Trade Trading Terminal?
Superior Trade Trading Terminal scores 53/100 on selfhost.directory (how scoring works) and ranks #22 of 42 in Cryptocurrency. It has 1 003 GitHub stars.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is advanced: plan for several services and some ongoing maintenance. It is Apache-2.0-licensed and written mostly in Typescript.
Requires DATABASE_URL set to external Postgres (embedded not persistent on serverless); add authentication in front; schedule cron sweep
How to configure Superior Trade Trading Terminal
AGENT_MODEL─── Optional: models ──────────────────────────────────────────────────── Sensible defaults are compiled in; override to trade cost against quality.
─── Optional: models ──────────────────────────────────────────────────── Sensible defaults are compiled in; override to trade cost against quality.
CHARTING_LIBRARY_REPOWhere `npm run setup:charts` clones TradingView Advanced Charts from. Only needed if TradingView moves the repository — see docs/charting-library.md.
Where `npm run setup:charts` clones TradingView Advanced Charts from. Only needed if TradingView moves the repository — see docs/charting-library.md.
COINMARKETMAN_API_KEYHyperTracker key for liquidation heatmaps on coins the built-in collector does not cover. Unset simply hides the heatmap for those coins.
HyperTracker key for liquidation heatmaps on coins the built-in collector does not cover. Unset simply hides the heatmap for those coins.
COLLECTOR_COINSCoins the order-flow recorder tracks, comma-separated. Unset = a default set.
Coins the order-flow recorder tracks, comma-separated. Unset = a default set.
COMPACT_MODEL
CRON_SECRETShared secret for /api/cron/one-shot-sweep. Unset leaves the route open.
Shared secret for /api/cron/one-shot-sweep. Unset leaves the route open.
DATABASE_URL─── Optional: database ────────────────────────────────────────────────── Unset (the default) runs an embedded Postgres and stores it in ./.data/pglite — no server to install, no account to create. Point this at any Postgres URL to use one instead; a *.neon.tech host automatically uses Neon's HTTP driver.
─── Optional: database ────────────────────────────────────────────────── Unset (the default) runs an embedded Postgres and stores it in ./.data/pglite — no server to install, no account to create. Point this at any Postgres URL to use one instead; a *.neon.tech host automatically uses Neon's HTTP driver.
DATABASE_URL_UNPOOLEDDirect (unpooled) connection, used for migrations only. Neon exposes both a pooled and an unpooled URL and prefers the unpooled one for DDL; either name works. Ignored entirely by the embedded database.
Direct (unpooled) connection, used for migrations only. Neon exposes both a pooled and an unpooled URL and prefers the unpooled one for DDL; either name works. Ignored entirely by the embedded database.
DB_AUTO_MIGRATEApply migrations on boot even for a DATABASE_URL you supplied ("1" to opt in). The embedded database always migrates itself.
Apply migrations on boot even for a DATABASE_URL you supplied ("1" to opt in). The embedded database always migrates itself.
DETECT_MODEL
FALLBACK_MODELRetried automatically when AGENT_MODEL errors or rate-limits.
Retried automatically when AGENT_MODEL errors or rate-limits.
FREEZE_ALLEmergency stops for money movement. Set any to "1" to reject that category with a 503 until cleared. FREEZE_ALL trips every one at once.
Emergency stops for money movement. Set any to "1" to reject that category with a 503 until cleared. FREEZE_ALL trips every one at once.
FREEZE_DEPOSITS
FREEZE_TRADING
FREEZE_WITHDRAWALS
NEXT_PUBLIC_CONTEXT_WINDOW_TOKENSContext budget the chat compactor works to, in tokens. Lower it for a cheaper/smaller model, raise it for a larger one. Default suits ~200k models.
Context budget the chat compactor works to, in tokens. Lower it for a cheaper/smaller model, raise it for a larger one. Default suits ~200k models.
NEXT_PUBLIC_FEATURE_LIGHTER_EXCHANGEMulti-venue (Lighter) UI. Off by default; the UI is byte-identical when off.
Multi-venue (Lighter) UI. Off by default; the UI is byte-identical when off.
NEXT_PUBLIC_GA_IDGoogle Analytics 4 measurement ID (G-XXXXXXXXXX). Unset = GA disabled.
Google Analytics 4 measurement ID (G-XXXXXXXXXX). Unset = GA disabled.
NEXT_PUBLIC_HL_BUILDER_FEE=0.04Venue-level Hyperliquid builder fee shown in the pair picker ("0.04" or "0.04%").
Venue-level Hyperliquid builder fee shown in the pair picker ("0.04" or "0.04%").
NEXT_PUBLIC_SENTRY_DSNError monitoring (Sentry). Unset = disabled, and no source maps are uploaded.
Error monitoring (Sentry). Unset = disabled, and no source maps are uploaded.
NEXT_PUBLIC_SENTRY_ENVIRONMENT
NEXT_PUBLIC_SENTRY_REPLAY_ERROR_SAMPLE_RATE=1.0
NEXT_PUBLIC_SENTRY_REPLAY_SESSION_SAMPLE_RATE=0
NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE=0.1
NEXT_PUBLIC_SITE_URLPublic origin, used for canonical URLs, sitemap and share images.
Public origin, used for canonical URLs, sitemap and share images.
OPENROUTER_API_KEYOpenRouter key — powers the chat agent and setup detection. Create one at https://openrouter.ai/keys
OpenRouter key — powers the chat agent and setup detection. Create one at https://openrouter.ai/keys
PGLITE_PATHWhere the embedded database keeps its files.
Where the embedded database keeps its files.
POSTGRES_URL_NON_POOLING
POSTHOG_HOST
POSTHOG_KEYProduct analytics (PostHog). Unset = nothing is sent anywhere.
Product analytics (PostHog). Unset = nothing is sent anywhere.
SENTRY_DSN
SENTRY_ENVIRONMENT
SENTRY_ORG
SENTRY_PROJECT
SENTRY_TRACES_SAMPLE_RATE=0.1
SUPERIOR_TRADE_API_KEYSuperior Trade API key — executes backtests and runs live strategies. Create one at https://superior.trade (Account → API keys).
Superior Trade API key — executes backtests and runs live strategies. Create one at https://superior.trade (Account → API keys).
SUPERIOR_TRADE_API_URL=https://api.superior.trade─── Optional: everything else ─────────────────────────────────────────── Superior Trade API base. This is a hosted service — it is not part of this repository and there is nothing to run locally. Leave it alone unless you have been given a different environment to point at.
─── Optional: everything else ─────────────────────────────────────────── Superior Trade API base. This is a hosted service — it is not part of this repository and there is nothing to run locally. Leave it alone unless you have been given a different environment to point at.
0 comments