Skip to content

Back to the catalog

xiazhi88/Desic-Terminal
github.comrepo

xiazhi88/Desic-Terminal

Desic Terminal is an open-source (MIT) Windows/macOS desktop app for OKX USDT perpetuals trading that bundles an AI trading assistant, AI-gated automated trading, and Python strategy backtesting on a shared real-time state and audit trail. Its notable AI-architecture contribution is a layered permission model where code, not prompts, decides what the agent can do: an AI Sidecar exposes only a scoped, often read-only tool set (e.g. radar.* tools reading a local SQLite market snapshot), delegated sub-agents are always read-only, risk-increasing actions fail closed on uncertain results, and executions use idempotent keys reconciled against exchange state before any retry. It also supports delegating requests to local Codex CLI or Claude Code instead of a hosted model API key, and ships a separate companion MCP server ("Desic OKX Agent") for giving coding agents direct OKX market/account/trading tool access.

TL;DR Open-source AI-assisted OKX trading terminal whose real interest here is its fail-closed, read-only-by-default permission architecture for letting an LLM agent act on live trades.
Document

What it claims

Desic Terminal routes every model call through a fixed chain of code-enforced checks before anything reaches OKX: Sidecar tool visibility, Agent runtime policy, Rust account and environment binding, contract parameter validation, trade precheck, live-trading confirmation, idempotency control, then persisted audit. Automation has named modes. advisor is read-only. limited_auto can submit orders only within an authorised scope. A Python strategy that passes backtesting can be promoted into a live Profile. Trading scope is OKX USDT linear perpetuals only, demo and live. Spot, options, multiple exchanges, headless server deployment and mobile are not supported.

How it works

  • Runtime split. A Rust core handles market data sequencing, checksums, time sync and bounded micro-batching. The React UI receives only drawable snapshots; high-frequency ticker, order book and trade data is never written to React state tick by tick. SQLite holds history, orders, fills, reviews and audit. The AI Sidecar runs on a pinned Node runtime and talks to the model provider or local CLI. Alerts can go out to a Feishu bot.
  • Uncertain writes. "Uncertain" is a separate state from success or failure:
flowchart LR
  W[External write] --> T{Result known?}
  T -->|yes| A[Audit]
  T -->|timeout| R[Reconcile: exec key, client order ID, account, OKX query]
  R --> K{Resolved?}
  K -->|yes| A
  K -->|no| B[Block risk-increasing retry with new key]
  B -.->|risk-reducing path| C[Close/reduce stays available]
  • Market radar. It scans all live OKX USDT perpetuals, not just the watchlist. It prepares up to 400 days of UTC daily bars for every market, plus 90 days of hourly bars for the top 100 by turnover, in a background job that starts with the app. Scores combine relative strength, realised volatility, activity, trend stability and liquidity. It offers 1h/1d/7d rank changes, score-change attribution, and 1/5/20-day point-in-time validation. Stock perpetuals are labelled using the NASDAQ Trader Symbol Directory.
  • Model backends. It supports 10 model providers, a custom endpoint, or a locally logged-in Codex CLI or Claude Code.

How to use it

Use the prebuilt installers on GitHub Releases for Windows x64 and macOS (Apple Silicon or Intel). To build from source, you need Node.js, npm, Rust stable and the Tauri 2 platform dependencies:

npm install
npm run prepare:sidecar
npm run tauri dev

Minimum checks before committing:

npm run build
cargo check --manifest-path src-tauri/Cargo.toml --workspace
npm run test:ai-policy
npm run smoke:config-security

To package on Linux (Ubuntu 22.04+ x64), build locally:

npm run tauri build -- --bundles deb,appimage

The companion MCP server is a separate project and requires Node.js ≥ 22.12:

npm install --global desic-okx-agent
desic-okx setup

Public market data needs no account. To add credentials, run desic-okx account add in your own terminal, not in the agent chat.

Limits

  • Credentials. API keys are stored in plaintext in config/accounts.local.json, not encrypted; on macOS/Linux the file has mode 0600. Keys must not have withdrawal permission. Demo and live use separate credentials.
  • Unsigned builds. Installers have no Apple Developer ID or Windows Authenticode signature, so Gatekeeper and SmartScreen will warn on first launch. The in-app updater does verify signatures.
  • Linux. There is no official Linux release yet. Auto-update works only for AppImage; deb installs require manual download.
  • Radar scores set research order only. They are explicitly not signals or entry conditions, and the radar tools cannot change filters, alerts, strategies, accounts or orders.
  • Maturity. The project is under active development. The authors say to start in advisor mode on demo trading and raise permissions gradually based on run records and reconciliation. The software comes with no warranty and is for learning and research.
  • Licence and affiliations. The code is MIT, but the licence does not grant use of the name or logo. The README includes an OKX referral link offering 15% rebates.

Organisations named here

  • OKX
  • Nasdaq
  • Feishu
  • LINUX DO community
  • Apple
  • GitHub
  • NASDAQ Trader Symbol Directory

Technologies named here

  • Desic Terminal
  • Codex CLI
  • Claude Code
  • Desic OKX Agent
  • Tauri
  • React + TypeScript
  • SQLite
  • market-radar-research Skill
  • Feishu Bot
  • Rust
  • TypeScript
  • React
  • Node.js
  • npm
  • Model Context Protocol
  • Codex

Techniques named here

  • Market Radar research scoring
  • Mode/code-gated AI permissions
  • Uncertain-result reconciliation
  • Order execution pipeline
  • Sensitive field redaction
  • Bounded hot store with micro-batching