This project is a private, password-protected crypto assistant built around a manual Kraken workflow.
Its purpose is simple:
- show your Kraken balances, open orders, and latest activity in one place
- turn live balances into practical manual buy or sell suggestions
- help you understand those suggestions before you copy anything into Kraken
- keep trading support read-only and non-automated
The current product is an assistant, not a bot.
- no order placement
- no order cancellation
- no live auto-trading
- no Google Sheets in the active workflow
- AI is advisory only and does not override deterministic suggestions
The active navigation is:
AssistantSystem AutomationGlossary
What these tabs mean:
Assistant: the live product surface you use todaySystem Automation: placeholder area for later phasesGlossary: plain-language explanations of trading terms and order types
Legacy /api/bot/* routes still exist in the repository for compatibility, but they return 410 Gone in this manual-assistant phase.
The Assistant tab is designed around a practical review flow:
- See what is currently in your account.
- See which balances might be worth acting on.
- Open a Kraken-style copy form for those suggestions.
- Ask follow-up questions in
Explain & Ask.
The page is currently organized like this:
- top row:
BalancesSentiment
- below that:
Suggestions(full width)
- lower area:
Explain & AskAccountAdvanced StrategyDiagnostics
Shows:
- positive Kraken balances
- asset symbol
- available amount
- whether the last response came from cache or live fetch
- last checked time
Suggestions is the core workflow.
Each row starts from a live balance and turns it into a practical manual suggestion. That suggestion can be:
- a buy idea using a quote balance such as EUR, USD, or USDT
- a sell or protective exit idea using an asset you already hold
Front-of-table column order:
AssetAvailablePairActionStatusExplainKrakenSnapshot
Additional execution detail columns follow after that:
Primary OrderOrder QtyPriceTriggerEst. Total
Important distinction:
Available= what is currently in your Kraken accountOrder Qty= how much this specific suggestion would use
Suggestion actions:
Draft: pre-fills a question intoExplain & AskAsk: pre-fills and immediately sends that questionIgnore: suppresses notifications for that specific ready suggestionOpen: opens the matching Kraken market
Clicking a row opens a Kraken-style copy form modal.
Supported modal templates:
LimitTake ProfitTake Profit LimitIcebergTrailing StopTrailing Stop Limit
The modal is meant to make manual entry easier. It includes:
- Kraken-like layout
- direct link to the relevant Kraken market
- field-by-field copy buttons
- TP/SL state
- trailing mode where relevant
This is the AI support panel.
It can:
- answer freeform questions about the current state
- explain a suggestion in plain language
- show the exact snapshot payload sent to the AI route
It cannot:
- place orders
- cancel orders
- replace the deterministic logic used by the suggestion system
If OPENAI_API_KEY is not set, the app still works and falls back to a deterministic server-built response.
The Sentiment panel is a compact market context view.
It shows:
- current label (
Risk-off,Neutral,Risk-on) - score in percent
- score in basis points
- basket size
- reference source
- active thresholds
The Account panel contains:
Open OrdersLatest Activity
Both tables are collapsible.
Refresh Kraken forces a fresh authenticated Kraken read and bypasses the cached account response for that request.
This panel is collapsed by default.
It contains the settings that influence deterministic suggestions, such as:
- take profit
- stop loss
- hold time
- moving-average settings
- spread guardrails
- fee and slippage assumptions
- net-edge thresholds
It also includes Reset to safe defaults.
The Glossary tab explains the assistant in plain language.
It covers:
- spread
- mid
- fees
- slippage
- net edge
- MA(50)
- deviation vs MA
- signal
- viability
- TP / SL
- time stop
- notional
- quantity
- basis points
It also explains the Kraken-style order types used by the copy form.
Kraken is read-only in the current phase.
Used for:
- balances
- open orders
- latest activity
- ticker data
- OHLC candle data
- instrument metadata
Not used for:
- order placement
- cancel workflows
- unattended automation
When a suggestion becomes READY, the app can notify you in the browser after permission is granted.
Important behavior:
- notifications are only for
READYsuggestions - the same ready suggestion is not repeatedly spammed
Ignoresuppresses that specific ready suggestion
Ignored suggestions are persisted in two ways:
- primary local store:
data/ignored-ready-suggestions.md - browser fallback:
localStorage
This matters for deployment:
- on a normal writable local server, ignored suggestions can be written to the markdown file
- on read-only or ephemeral environments such as Vercel serverless storage, browser storage still keeps the suppression for that browser session/profile
The whole app is password protected.
Protection applies to:
- the page itself
- the Assistant UI
- the API routes used by the page
Current behavior:
- password comes from
APP_PASSWORD - successful login sets a long-lived HTTP-only cookie
- the session remains valid until the cookie is cleared or the password changes
- page access redirects to
/loginwhen unauthenticated - protected API calls return
401when unauthenticated
This is a shared app password, not a multi-user account system.
The app uses in-memory caching for read-heavy Kraken data.
Current practical behavior:
- authenticated account data is cached for about
60 seconds - market reads also use in-memory caching where appropriate
Refresh Krakenbypasses the account cache for the next read
Important caveat for Vercel:
- caches are instance-local
- they are not durable across deployments or serverless instances
That is acceptable for the current read-only assistant workflow.
Create .env.local for local development.
Minimum useful setup:
APP_PASSWORD=your-password
KRAKEN_API_KEY=
KRAKEN_API_SECRET=
KRAKEN_REST_BASE_URL=https://api.kraken.com
KRAKEN_WS_URL=wss://ws.kraken.com
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4.1-mini
BOT_TIMEZONE=Europe/AmsterdamNotes:
APP_PASSWORDis required- Kraken keys are optional if you only want public market data
- Kraken keys are required for balances, open orders, and latest activity
- OpenAI is optional
Install dependencies:
npm installStart the app:
npm run devThen open:
If APP_PASSWORD is set correctly, the app will show the login page first.
This app can be deployed on Vercel in its current manual-assistant form.
Recommended environment variables:
APP_PASSWORDKRAKEN_API_KEYKRAKEN_API_SECRETOPENAI_API_KEYif you want AI responses from OpenAI- optional Kraken/OpenAI overrides
Important deployment notes:
- the password gate is enforced both in middleware and server-side route/page checks
- the current read-only assistant workflow works on Vercel
- markdown persistence for ignored suggestions is not durable on Vercel serverless storage
- browser
localStoragestill preserves ignored suggestions for that browser - long-running automation or background bot runners are not a good fit for Vercel serverless hosting
This repository still contains older exchange/bot-oriented code and some legacy environment parsing.
That code is not the active product surface right now.
In particular:
- Google Sheets is not part of the current user workflow
- the automation area is intentionally a placeholder
/api/bot/*endpoints return410 Gone
Useful checks:
npm run lint
npm test
npm run build