TRADING SYSTEM · AUTOMATION · RISK ENGINEERING
03Autonomous Crypto Trader
A self-hosted system that continuously evaluates liquid crypto markets and can execute guarded Coinbase trades.

Business Problem
Crypto trades around the clock. A person cannot consistently monitor every asset, trend change, liquidity condition, spread, open position, and account-level loss limit without fatigue. Manual reaction also makes it easy for emotion to override a defined strategy.
Why I Built It
I built the trader to turn an always-on monitoring problem into a controlled decision process. The objective is not to claim guaranteed returns. It is to make every potential trade pass the same trend, liquidity, cost, and risk gates—and to make rejected trades explainable.
Solution
A Node.js trading engine scans a restricted asset universe, calculates momentum and trend features, applies spread/volume/profitability filters, enforces account and position limits, and reconciles local positions with Coinbase. PostgreSQL persists settings, positions, and trade history. Docker and DigitalOcean keep the engine running independently of a browser session, while the responsive dashboard provides visibility and manual controls.
Screenshots
The application in use.


Architecture
A simplified view of how information moves through the solution.
Why These Technologies?
Technology choices were made around operating constraints, maintainability, integration boundaries, and the people using the system.
Node.js / JavaScript
An event-driven runtime fits continuous API polling, asynchronous exchange calls, scheduled scans, and a shared language across the server and interface.
Coinbase Advanced Trade API
It provides authenticated account, order, and market access while keeping exchange custody and execution at a regulated integration boundary.
PostgreSQL
Durable relational state is necessary for positions, settings, reconciliation records, and trade history across process restarts.
Docker
Containerization keeps the runtime, dependencies, and restart behavior consistent between updates.
DigitalOcean
A persistent VPS supports a continuously running engine more naturally than request-based serverless functions.
Technical Highlights
Languages
JavaScript
Frameworks
Node.js
Databases
PostgreSQL
Cloud
DigitalOcean · Cloudflare
Machine Learning
Trend features
AI
Decision logic
APIs
Coinbase Advanced Trade
Deployment
Docker · Caddy
Challenges Solved
The hardest challenge was maintaining trustworthy state between the exchange and the local database. API failures, fees, partial changes, process restarts, and timing differences can make a local position disagree with the real account.
I added reconciliation gates, explicit live/paper controls, persistent server-side settings, reason-coded trade blockers, and account-level loss limits. When state is uncertain, the safer behavior is to block automation and surface the mismatch.
In financial automation, fail-safe behavior is a feature. Observability, reconciliation, and protective constraints are more important than maximizing the number of trades.
Engineering Spotlight
Concise implementation patterns that show the engineering beneath the interface.
javascriptFail-safe decision gate+
Representative implementation pattern · private source protected
A trade is an explicit result with reasons—not a loose boolean. The engine can show exactly which safety condition prevented execution.
function evaluateBuy(signal, account, settings) {
const blockers = [];
if (!signal.emaSlopeUp) blockers.push("EMA slope not upward");
if (signal.volumeUsd < settings.minVolumeUsd)
blockers.push("low volume");
if (signal.spreadPct > settings.maxSpreadPct)
blockers.push("spread too wide");
if (account.drawdownPct >= settings.maxAccountLossPct)
blockers.push("account loss limit reached");
if (account.openTrades >= settings.maxOpenTrades)
blockers.push("open trade limit reached");
return {
approved: blockers.length === 0,
blockers,
score: signal.momentumScore
};
}Business Impact
- Provides continuous market monitoring without requiring an open browser session.
- Applies the same momentum, liquidity, spread, and risk checks to every decision.
- Makes skipped trades understandable through visible blocker reasons.
- Centralizes positions, history, settings, and account-level risk controls.
- Reduces emotion-driven intervention by enforcing a repeatable process.
Source remains private to protect business logic, credentials, customer information, and proprietary workflows.