LongTrader Overview¶
A trading client for people who want to keep the execution layer in their own hands.
LongTrader splits into two halves.
The half you run is open source: the longtrader-worker strategy host, the longtrader-cli command line tool, and SDKs for Rust, Python, TypeScript and Go.
The half we run is not: venue adapters, order routing, risk and state.
Between them sits one public protobuf contract. It is versioned. Breaking changes get caught by CI, not by your strategy at three in the morning.
Why split it there¶
Anyone who has wired up exchange APIs directly knows where it hurts. Forty venues with forty temperaments: REST rate limits, dropped WebSocket feeds, partial fills, balance drift, and the most expensive question in the business — did my last order actually reach the matching engine?
LongTrader pushes all of that into the platform layer. What you face are two traits: TradingGateway and MarketDataSource.
The trade-off, stated plainly: your strategy runs on your machine, but the order leaves from our service. If that is unacceptable to you, do not use this. Write your own adapters, and stop complaining about them.
Three ways in, one contract¶
| Surface | Who it is for | What you actually do |
|---|---|---|
longtrader-cli |
People who want a command line for their accounts, and people wiring up an AI agent | Memorize one binary, let scripts do the rest |
longtrader-worker |
People who can code and want their own strategy logic | Implement two traits, or pick one of the 22 built-ins |
| LongTrader Terminal | People who want charts, order flow and manual execution | Open the desktop terminal and click |
The three are not exclusive. The CLI can start a strategy inside the worker, and the Terminal is the API server the CLI and the worker connect to.
How data flows¶
What you run (open source)
longtrader-worker strategy host: built-in strategies or your own code
longtrader-cli command line: accounts, orders, market data, streams
|
| ConnectRPC · application/proto · Bearer token
v
What the platform runs
longtrader-api the unified service endpoint
LongTrader Terminal desktop terminal + API server
|
v
CEX (Binance / OKX / Bybit / Hyperliquid …)
DEX (Uniswap / Curve / Raydium / Jupiter …)
The connection is outbound. Your machine dials out. Nothing dials in.
What it does not do¶
- It does not give you alpha. The strategy logic is yours. If it loses money, that is not the framework's fault.
- It does not custody your funds or your keys. The token is read from a file you control, never logged, and compared server-side in constant time.
- It is not a signal service and it is not copy trading. It is the layer between your decision and the venue, not the layer that makes the decision.
You get the traffic lights. The accelerator and the brake are still yours. If you crash, you crashed.
Next¶
- Architecture — four layers, the session state machine, ports and adapters
- Quick Start — first strategy on the wire in ten minutes
- Strategies — all 22 built-ins by category
- CLI Reference — 18 commands, global flags, timeframes and topics
- Why LongTrader — the line between a bot and a system
License¶
Apache-2.0.