Introduction

TraderK is an autonomous multi-strategy crypto trading bot running on Node.js. It trades BTC, ETH and SOL simultaneously using three complementary strategies, filtered by institutional-grade signals from real Kraken market data.

Paper Trading Only. All trades are executed against a simulated $10,000 balance using the Kraken CLI's built-in paper trading mode. No real money is ever at risk unless you explicitly enable live trading.

What it does

Every 5 seconds the bot polls live prices for all three assets. Every 60 seconds it fetches hourly OHLCV candles and the top-10 order book. From this data it calculates:

System Overview

Architecture

TraderK is a single Node.js process serving a WebSocket-connected dashboard. The bot runs an internal tick loop — no external schedulers required.

┌─────────────────────────────────────────────────────┐
│  TraderK Bot (Node.js · port 4001)                  │
│                                                     │
│  Fast tick (5s)  ─── kraken ticker  ──→ prices      │
│  Slow tick (60s) ─── kraken ohlc    ──→ RSI/ATR/VWAP│
│                  └── kraken orderbook ─→ OB imbal.  │
│                                                     │
│  Strategy engine ─── paper buy/sell ──→ Kraken CLI  │
│  Socket.io  ─────────────────────────→ Dashboard    │
│  Express routes ──────────────────────→ API + Auth  │
└─────────────────────────────────────────────────────┘

Assets traded

SymbolPairColor
BitcoinBTCUSDAmber
EthereumETHUSDBlue
SolanaSOLUSDViolet

Dashboard Guide

Visit /dashboard (requires login) to see the live trading dashboard.

Header

Portfolio hero cards

Six cards across the top show the portfolio P&L, live price for each asset with hourly RSI, trade counts, and open lot count.

Asset tabs (BTC / ETH / SOL)

Each tab shows an 8-column stat row, live price chart with VWAP line, RSI chart, grid level panel, and open positions table.

Stat cards

CardWhat it shows
RSI 1hHourly RSI(14) — green <30, red >70
Dip from Peak% below high-watermark — triggers at –1.5%
OB BidsOrder book bid %. Green ≥55% (buys allowed), red <45%
VWAP Dist.% above/below 24h VWAP. Green = below VWAP (value zone)

Dip-Buy Strategy

How it works

The bot tracks a high-watermark per asset — the highest price seen since the last buy. When price drops more than DIP_PCT below that watermark AND all filters pass, it places a $DIP_USD market buy.

After the buy, the watermark resets to the buy price, requiring a fresh DIP_PCT drop before the next buy on that asset.

Sell condition

Each dip lot has a fixed take-profit target of DIP_PROFIT above the fill price (or ATR × ATR_TP_MULT if larger). It sells automatically when price reaches this level.

Filters

RSI Reversal Strategy

How it works

Uses hourly RSI(14) computed from the Kraken OHLCV API — not the noisy 5-second tick RSI. When hourly RSI drops to or below RSI_BUY_LVL (30) AND order book confirms buy pressure, places a $RSI_USD buy.

Sell conditions

An RSI lot sells when either:

Note: A 5-minute cooldown (RSI_COOLDOWN) prevents multiple RSI buys on the same asset during a single oversold episode.

Grid Strategy

How it works

On first price observation, the bot builds a grid of GRID_N (5) buy levels spaced GRID_STEP (0.8%) apart below the current price. When price falls to a level it places a $GRID_USD ($50) buy. The take-profit is two levels above the buy price (1.6% gain).

Grid rebuild

The grid rebuilds when price rises more than 5% above the current center. Old grid lots already in the book remain active until they hit their targets.

VWAP Anchor

The 24-hour VWAP is calculated from the last 24 hourly candles using Kraken's per-candle VWAP (index 5 of the OHLCV array) weighted by volume:

VWAP = Σ(candle_vwap × volume) / Σ(volume)  [last 24 hourly candles]

The VWAP Dist. stat card shows how far the current price is above or below this level. Green = below VWAP (buying at better-than-average price).

Buying below VWAP is the institutional standard for "value entry". When price is significantly above VWAP, dip-buys are filtered out regardless of the dip percentage.

Order Book Imbalance

Every 60 seconds the bot fetches the top-10 bid and ask levels. It calculates:

imbalance = bid_volume / (bid_volume + ask_volume)

A value above OB_IMBALANCE_MIN (default 55%) means more buyers than sellers in the current order flow. Any buy signal is blocked when this threshold is not met.

ATR Volatility

ATR(14) is computed from hourly OHLCV candles using Wilder's smoothing. It represents the average price range over the last 14 hours and is used to set dynamic stop-loss and take-profit levels:

stop_loss   = max(SL_PCT,  ATR% × ATR_SL_MULT)
take_profit = max(default, ATR% × ATR_TP_MULT)

In high-volatility conditions, stops are wider (avoids premature stop-outs). In calm conditions, stops are tighter.

All Settings

All settings are editable live from the Dashboard → ⚙ Settings drawer. Changes take effect on the next trade decision and are persisted to settings.json.

Dip-Buy

SettingDefaultDescription
DIP_PCT1.5%Required % drop below watermark to trigger a buy
DIP_PROFIT2.0%Take-profit target above fill price (minimum)
DIP_USD$100Dollar amount per dip buy
MAX_DIP_LOTS3Maximum simultaneous dip lots per asset

RSI

SettingDefaultDescription
RSI_BUY_LVL30Hourly RSI level that triggers a buy (oversold)
RSI_SELL_LVL70Hourly RSI level that triggers a sell (overbought)
RSI_USD$150Dollar amount per RSI buy
RSI_COOLDOWN_MIN5 minMinimum time between RSI buys on the same asset
RSI_MIN_PROFIT0.5%Minimum profit before overbought-sell fires

Grid

SettingDefaultDescription
GRID_N5Number of grid buy levels
GRID_STEP0.8%Price gap between grid levels
GRID_USD$50Dollar amount per grid level

Filters

SettingDefaultDescription
OB_IMBALANCE_MIN55%Minimum bid% in top-10 order book to allow buys
VWAP_BAND2.0%Max % above 24h VWAP for dip-buy entry

Risk Management

SettingDefaultDescription
MAX_ASSET_USD$400Maximum total deployed per asset at any time
SL_PCT3.0%Base stop-loss floor (overridden by ATR when larger)
ATR_SL_MULT1.5×Stop-loss = hourly ATR × this multiplier
ATR_TP_MULT2.5×Take-profit = hourly ATR × this multiplier
SL_MIN_AGE30 minStop-loss only activates after holding this long (fixed)
Tip: Increase ATR_SL_MULT to 2.0 in high-volatility markets so normal swings don't trigger your stop. Decrease to 1.0 for tighter risk control.

API Endpoints

All API routes require an authenticated session (login first).

MethodPathDescription
GET/api/settingsReturns current strategy config as JSON
POST/api/settingsUpdate and persist strategy config (JSON body)
GET/api/profileReturns username and avatar status
POST/api/profile/usernameChange username
POST/api/profile/passwordChange password (requires current password)
POST/api/avatarUpload avatar image (multipart/form-data)
WS/socket.ioReal-time bot state updates (authenticated)

Security

Never enable Withdraw permission on your Kraken API key. The bot only requires Query Funds + Create & Modify Orders for live trading.