Collect weekly claims and precise commercial petroleum inventory changes with official schedule exceptions, distinct reporting periods, raw evidence, and revisions.
Extend explicit history backfills without changing their default source scope. Report archive gaps and reject mismatched weeks instead of filling current values into history.
Store account credentials encrypted and bind QR tasks to administrator sessions. Report calendar access as awaiting validation after login.
Prevent late polls and status responses from overwriting cancelled or newer operations, and clean up QR tasks when settings unmount. Cover authentication, cancellation races, and stale frontend responses.
Poll only visible news IDs and update ratings for matching revisions without replacing the feed, scrolling, or clearing pending-news notifications. Bind refresh results to the page and session, and cover stale responses and bounded ID queries.
Analyze news revisions with independent model settings, evidence-backed risk ratings, event grouping, and rolling market outlooks. Add a default homepage, archival history, pending-result refresh, and isolated regression coverage.
Keep analysis disabled until explicitly enabled. Require a separately authorized schema migration before deployment and preserve compatibility with the previous six-service instance.
Use a shared SVG combining an A mark with a market pulse line for the favicon, login page, and navigation. Preserve the existing theme and page layout.
Keep analysis and Skill detail responses bound to the selected request, reject stale publish confirmations, and clear failed position-history results with retry controls.
Reject removal of the current default provider with HTTP 409 and reflect that contract in the form. Track the OpenAPI page and API module by restricting the docs ignore rule to the repository root.
Validate the staged provider contract with four isolated tests. Reuse the matching candidate's frontend lint, type check, 26 test groups, and production build results.
Organize domain APIs and types under common/apis, shared components under named folders, and private workspace logic alongside each page.
Use Bearer sessions, explicit response envelopes, session-aware routing and streams, and configurable login captcha presentation for the deployed backend contract.
Preserve news, economic calendar, crawler, market, chat, Skills, settings, and demo trading workflows with responsive layouts and explicit configuration saves.
Validate with frontend lint, type checking, 22 test groups, production builds, and deployed desktop/mobile page checks.
Persist manual requests until exchange confirmation, preserve stop protection, and reconcile fills before settling plans. Tighten model stream, crawler, skill, research accounting, and frontend race handling, with regression coverage. Keep queued analyses pending until a fresh account snapshot is available.
The trader labels crypto news published after 2026-10-16 15:00 with
the configured model (category and BTC direction) and, four hours
later, backfills BTC/ETH 1m opens at publish, +5m, +1h and +4h from
the klines table. A drawer on the trading page shows the cumulative
returns of trading the labelled direction, after fees. Nothing is
traded; this only collects an out-of-sample record.
Move running, running_changed_at and capital_usdt from the account to
each trading symbol; the migration copies the account capital to every
symbol and leaves them all stopped. Each symbol is sized against its
own capital with a 3x notional cap, and the capitals together must not
exceed account equity. Scheduling, dry-run decisions and the executor
follow the per-symbol flag. The global start/stop button is replaced by
start/stop and capital controls on each symbol's plan card.
The API queues the request in Redis and the executor applies it on its
next pass, so it never races reconciliation. Both actions cancel every
open order on the symbol, including manual ones, and market-close any
position. Plans end as manual_close or manual_cancel without queueing
a new analysis. Closing also stops trading so the engine does not
reopen right away.
Render the prompt as Markdown with each inline JSON payload (prefetched
market data, recent decisions) turned into a formatted json block, and
split each tool call into separate argument and result blocks. Short
arrays and objects stay on one line so klines read one bar per line.
Sync account fills into a new trading_fills table every 60s and
reconstruct closed positions from them, so positions opened outside
the program are included and external closes get an exit price.
Positions link to plans by order id. The history drawer gains symbol,
close-date, outcome and source filters, a summary bar and pagination.
The detail is now a persistent side panel, so quick clicks can interleave
requests: only the latest request's result is applied, and a failed load
shows an error state with a retry button instead of spinning forever.
Also correct the position history comments: only plans from before plan
3.1 could hand their position over to a replacing plan.
New GET /api/trading/positions/history lists closed plans (entry filled,
position back to zero) newest first with before/limit paging. Each row
carries the filled quantity, volume-weighted entry and exit prices from
the plan's own fills, the close reason and the realized PnL, commission
and net from the plan result.
The positions panel gets a "历史仓位" button that opens a drawer with the
table, a "load earlier" button and links to each plan's analysis.
Positions, open orders, the symbol list and the plan card now show
amounts as USDT value (quantity x price) instead of coin quantity; the
coin quantity moves to a hover tooltip. Filled amounts use each order's
average fill price.
- News: show the list and the article detail side by side; the drawer
becomes a persistent detail panel with a revision picker and +/- line
counts.
- Crawler console: one card per source instead of tabs, plus a merged
live log panel filterable by source and level.
- Chat: segmented Chat / CONTEXT.md switch, message cards with times,
bordered tool-call rows and a context usage bar.
- Login, Skills and Settings move to the panel style; diff and highlight
colors follow the new palette. The market K-line area stays dark.
Follow the Stitch "Daylight" design: light canvas, white panels with
hairline borders, deep cyan primary, Inter for UI text and JetBrains Mono
for numbers (bundled via @fontsource-variable).
- Override Element Plus variables in one place and derive light/dark
shades with color-mix; pages use the UnoCSS Tailwind palette.
- Replace the sidebar with a horizontal top navigation bar.
- Rebuild the demo trading page: status panel with metric tiles,
positions table, and a three-column layout (symbols, plan card,
open orders and timeline); restyle the analysis drawer.
- Fix the stale risk wording in the trading capital dialog.
- Single palette (web/src/styles/palette.ts) taken from the Stitch
design, exposed as ap-* UnoCSS colors and --ap-* CSS variables and
used for Element Plus dark theme overrides, KLineChart and the news
iframe; zero radius, JetBrains Mono / Space Grotesk bundled locally
- New sidebar and header layout; trading page, plan card and analysis
drawer follow the design; other pages use the same panels
- Status API reports today's closed trades, wins and net PnL, shown as
today's PnL and win rate on the trading page
When the limit price sat near the far edge of the zone, the stop beyond
the far edge was well inside normal 5m noise (plan #34: 0.11%). The stop
is now the farther of far edge +/- 0.5 x ATR and entry +/- 1 x ATR.
- The model gives a zone and a limit price inside it (below the mark for
longs, above for shorts); the executor places the GTC limit order with
the reduce-only stop right away instead of waiting for a 5m
confirmation and entering at market, so entries pay maker fees
- Stop beyond the far edge of the zone by 0.5 x ATR14(5m), computed with
the quantity at submission and rejected above 1%
- Unfilled limits are cancelled at expiry; a rejected entry cancels the
plan instead of being retried every round
- The model now submits a pending setup (direction, zone, confirm price,
validity); the executor enters at market once a 5m close confirms a
dip into support or a rejection from resistance, and cancels the setup
when the zone breaks, the trigger is missed or the stop is too far
- Stop beyond the confirmation extreme by 0.5 x ATR14(5m), skipped above
1%; fixed take-profit ladders from the fill price (long 60/30/10 at
+0.5/0.75/1%, short 80/20 at -0.5/0.75%); 4h time stop
- While holding, the model may only keep or exit
- Drop the long-term angle from the program, API, tables and page
- Executor reconciles each symbol to its desired orders: journaled ap{id}
client ids, reduce-only quantity stop placed before entries, make-before-
break stop moves, breakeven after TP1, orphan cancel, -2021 market close
- Plan lifecycle: proposed plans are adopted only if the position is
unchanged; holding-mode plans may only tighten the stop
- Program rules: time stop, short-term invalidation close, long-term 4h
review, reevaluate conditions, takeover of unmanaged positions
- Trigger and routine analysis scheduling with a 10 min gap, daily cap and
bounded retries
- Plan endpoint and plan status, fills and countdowns on the trading page
The analyst prompts the model with trading rules, published skills,
account sizing inputs and prefetched market data, exposes read-only
tools plus submit_trade_plan, and validates and sizes the submitted plan
in pure functions covered by pytest. Manual analyses run as dry runs
while trading is stopped; the trading page shows the latest plan and an
analysis detail drawer.
Add trading_account.capital_usdt. Position sizing will use
min(capital, account equity); starting requires the capital to be set.
The trading page shows and edits it.
Add trading_symbols, trading_analyses, trading_orders and trading_events.
The new trader service publishes account, position and open-order
snapshots of the Binance demo account to Redis every 3s. The /trading
page shows engine status, start/stop, balances, positions, the symbol
list with angle selection, open orders and the event timeline.
Store demo API key/secret encrypted in a single-row trading_account table,
expose get/put/delete/test endpoints under /api/settings/exchange, and add
a settings card to enter and test the key. The client is hard-wired to
demo-fapi.binance.com.
- New chat tool get_derivatives: funding rate (next estimate and recent
settlements), premium, open interest change vs price, global and top
trader long/short ratios, taker buy/sell ratio from Binance public
endpoints. Each part fails independently.
- Strip whitespace from provider name and model; a leading space in the
model name made the upstream return 404.
- Retry connection failures and mid-stream disconnects (raw httpx /
httpx2 errors are not wrapped by the SDKs) up to 3 times while no
output has been emitted, and surface them as chat errors.
- Return 30 recent bars from get_klines instead of 60 to cut tokens.
- Providers get a default reasoning effort (low..max, empty = not sent);
chat can override it per message. OpenAI sends reasoning_effort,
Claude sends output_config.effort with adaptive thinking, and thinking
blocks are replayed during the tool loop.
- Show a thinking indicator while waiting for model output.
- Surface in-stream upstream errors (e.g. overloaded) instead of
breaking the SSE stream, and retry them up to 3 times when nothing
has been emitted yet.
- Model providers for OpenAI and Anthropic message formats (e.g. via
Sub2API), with API keys encrypted at rest and never returned
- Skills tree with markdown editing, priorities, drafts, publishing and
rollback; only published skills enter the chat prompt
- Chat page with tool calls over collected news and Binance USD-M
klines, a persisted CONTEXT.md, reset, and stop-generation support
- Chat may only create skill drafts and update CONTEXT.md; publishing,
deleting, moving and priority changes stay with the user
The news list API now takes page and limit and returns the total count
instead of a cursor, and the news page uses el-pagination with a
persisted page size.
Let the crawler console set a backfill target per source. Each scheduled
run pages backwards from a checkpoint for at most 20s so real-time
crawling is not blocked. The checkpoint is saved only after a successful
run and is also kept in process memory, because the next trigger may be
queued before the database write lands. cls_depth is excluded since its
list API cannot page into history.
- crawler manager: retry transient errors inside each loop, never let
log writes break supervision, run tasks in a TaskGroup so any escaped
error restarts the container instead of leaving a half-dead process
- market worker: tolerate symbols deleted mid-backfill, retry task
selection and symbol queries, run loops in a TaskGroup
- market WS: validate subscription messages and close the connection
when either the receive or forward side ends
- news pipeline: make first insert concurrency-safe with ON CONFLICT
- market API: only proxy ticker/1s klines for added symbols, map Binance
rate limits to 503 and upstream errors to 502 without blocking
- news API: escape LIKE wildcards in search, return 422 for bad cursors
- market page: cancel pending reconnect timer on unmount