Skip to content

feat(miniapp): tick charts for a closed trade and a live open position - #1009

Merged
kirillDevPro merged 4 commits into
mainfrom
feat/miniapp-tick-charts
Oct 16, 2026
Merged

kirillDevPro merged 4 commits into
mainfrom
feat/miniapp-tick-charts

Conversation

@kirillDevPro

Copy link
Copy Markdown
Collaborator

What & why

The Telegram Mini App had no charts. A closed trade or an open position now opens a sheet with a tick chart: every exchange print is a dot coloured by side and sized by quantity, with a thin price line, entry/exit markers, Buy/Take/Stop levels and a volume band.

  • Closed trade: served from the recorded tape / existing trade-replay paths; ranges «Сделка / ±30 с / ±5 мин», pan, zoom, crosshair; honest states for no tape, an unpublished exchange day (with the expected time), a source still catching up (retries quietly), and a real failure.
  • Live position: bounded ticks from the core ring or the station recorder; opens at a 10% price window with the order lines drawn before the first tick; live PnL and distance to take/stop.
  • Rows open the sheet on tap (a small chart glyph next to the coin) instead of a text link beside Cancel/Panic Sell, which keep a dead zone around them. Core names are shown in full and wrap.
  • Station trade rows carry no displayed id, so the route accepts the row's own id; every rejected Mini App request and every chart request logs one data-free line.
  • Both endpoints are HMAC-verified and capped. Strings in all 7 Mini App languages.

Checked on a live station (dev build) by the owner.

How to verify

cargo test -p moon-core -p moon-tg -p moon-station, cargo test -p moon-ui-gpui --test theme_contract.

Each exchange trade is a dot sized by quantity, with entry, exit, take and
stop levels and a volume band. The closed-trade sheet reads the recorded
tape; the live sheet streams bounded ticks from the core's ring or the
station recorder. Both endpoints are HMAC-verified and capped.
…rom Panic Sell

A fresh trade whose source is still catching up, rate limited or not
connected showed a load error; it now shows a retrying state, an
unpublished exchange day shows when the file is due, and recorded tape is
served as soon as it covers the hold. The live sheet waits for the first
print. Each chart request logs one line with its outcome and timing.
Rows open the chart on tap instead of a text link beside the order
buttons, which keep a dead zone around them.
…indow, show core names in full

Station trade rows carry no displayed id, so the chart route rejected every
closed-trade request before the handler; it now accepts the row's own id and
logs each rejected Mini App request. The live sheet opens at a 10% price
window with the order lines drawn before the first tick, and core names wrap
in full instead of being cut from the start.
@kirillDevPro
kirillDevPro merged commit f39fabc into main Oct 16, 2026
10 checks passed
@kirillDevPro
kirillDevPro deleted the feat/miniapp-tick-charts branch October 16, 2026 16:05
kirillDevPro added a commit that referenced this pull request Oct 18, 2026
What was stale: the locale "files by area" list named core_settings, which
is no file (its keys live in shell.en.yml; the Core settings window reads
core_expert), and left out assets, trade_window, station and the telegram
files. The feature map had no entry for features merged since the doc was
last touched: where a coin is blacklisted (#972), a Binance spot core's
dust to BNB (#1006), Telegram reports by exchanges, cores or core groups
(#1032), and the Mini App's live coin chart and closed-trade / open-position
tick charts (#1009, #1016).

What the code does now: checked against locales/en/, dust_target in
panels/assets/dust.rs (Binance spot only), ReportView in
config/telegram_menu.rs and the commits' own descriptions.

Reviewer: Codex, no disputed claims.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant