Skip to content

Repository files navigation

◈ Direct Terminal

A desktop crypto trading terminal that talks straight to the exchanges.

Multi-exchange market data, deep candle history, live order books, and one-click Hyperliquid perps, in a single fast native window.

Tauri 2 · React 19 · TypeScript · Vite 7 · lightweight-charts v5 · Rust


What it is

Direct Terminal is a native desktop app for watching and trading crypto. It connects to public exchange APIs with no backend of its own: candles, trades, and order books stream over WebSocket and are backfilled from each venue's REST history, so a market opens to a full chart instead of an empty one. When you want to act on what you see, it can open and close Hyperliquid perpetual positions from the same window, signing every order locally.

The interface, called Obsidian Instrument, is chart-first. A slim command spine on one edge summons slide-over panels (trade, order book, trades, indicators, drawing tools, position) over the chart, so the price stays the center of attention.

Features

Markets and data

  • Live candles and trades from Hyperliquid, Binance.US, Coinbase, and Kraken
  • Live order-book depth (bids, asks, spread, mid) where the venue supports it
  • Deep REST history with backward pagination, merged and de-duplicated into one continuous series
  • Twelve timeframes from 1 second to 1 day, filtered per venue by what it actually offers

Charting

  • Candlestick and volume rendering on lightweight-charts v5
  • Scroll-back that loads older candles as you pan, TradingView style
  • On-chart drawing tools: trend line, horizontal line, measure
  • Indicators, including Market Cipher B, in a pluggable registry

Trading (Hyperliquid)

  • One-click market open and close on perpetuals
  • Position sizing from margin, with live liquidation price and PnL readouts
  • Order signing runs in the Rust core; the agent key lives in your OS keychain, never in JavaScript or the repo
  • Testnet first, with risk guardrails enforced below the UI

Interface

  • Command spine and slide-over drawers over a full-bleed chart
  • Light and dark themes, fullscreen (press F), and an ambient background that reacts to position risk

Prerequisites

Direct Terminal is a Tauri app, so it needs both the web and Rust toolchains:

  • Node.js 20 or newer and pnpm 9
  • Rust (stable, via rustup)
  • Your platform's Tauri 2 system dependencies: Xcode Command Line Tools on macOS, WebKitGTK and build tools on Linux, WebView2 and the MSVC build tools on Windows

Run it

pnpm install
pnpm tauri dev

That builds the Rust core (the first run takes a few minutes) and opens the desktop window. Market data needs no API keys and no configuration.

To iterate on the frontend alone in a browser, run pnpm dev and open http://localhost:1420. A few venues are CORS-restricted outside the native shell; the full desktop app avoids that by fetching through Rust.

Command What it does
pnpm tauri dev Run the full desktop app
pnpm dev Run the web frontend only, with fast reload
pnpm test Run the unit tests (Vitest)
pnpm build Type-check and bundle the frontend
pnpm tauri build Package a distributable desktop binary

Project layout

src/
  domain/        market logic: providers, order books, candles, indicators, sizing (pure, unit-tested)
  hooks/         useMarketFeed (history + live engine), useOrderBook, useAgent
  components/    chart, drawers, trade controls, order book, position, top bar, spine
  ui/            theme, boot sequence, ambient background, preferences
src-tauri/
  src/trading/   Rust signing core: Hyperliquid client, keystore, guardrails, session

Everything under src/domain is plain, testable TypeScript with no React. Anything that touches money (order signing, key storage, risk guardrails) lives in src-tauri, in Rust.

How it works

Data moves in one direction, and the high-frequency live path is kept separate from the heavy history path so the chart stays smooth with thousands of candles:

selection / timeframe
  history:  provider.fetchCandlePage --(paginate backward)--> merge / dedupe / sort --> chart.setData
              scroll-back --- fetch older page --- prepend / dedupe --------------------^
  live:     websocket trades --> parse --> buffer --> rAF flush --> forming bar --> chart.update
  depth:    websocket order book --> normalize --> throttle(rAF) --> order-book panel
  trade:    UI --> Tauri command --> Rust signs with the keychain agent wallet --> Hyperliquid

Security

Trading is optional and stays off until you set it up. When you do:

  • The agent wallet is a signer only. Following Hyperliquid's approve-agent model, it can place orders but cannot withdraw funds.
  • Its private key is stored in your operating system's keychain through the keyring crate. It is never written to the repo, to disk in plaintext, or to the JavaScript layer.
  • Risk checks (sizing limits, position rules) run in the Rust core, below the UI, so the interface cannot bypass them.
  • The app defaults to Hyperliquid testnet. Point it at mainnet only when you mean to.

Never commit a private key. Nothing in this repository contains one.

Disclaimer

Direct Terminal can place real orders on real markets. It is provided as is, for research and personal use, with no warranty, and it is not financial advice. Test on testnet first, and trade at your own risk.

License

MIT. See LICENSE.

About

A liquid-glass desktop crypto terminal — deep multi-exchange candle history, infinite scroll-back, and a live order book. Tauri + React.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages