Scenario A private WebUI: self-hosted fleet console, live situation, and MM health #75
adamant-al
started this conversation in
MarketMaking.app
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context
This is a progress update on Scenario A of the private self-hosted WebUI: one operator console for a fleet of ADAMANT Market-Making Software instances. The product direction is in discussion #49. The matching bot contract is in discussion #48.
Rule for operators: the browser and the WebUI backend never talk to exchanges. Charts, the order book, balances, parameters, and commands all come from each bot’s
/api/v1. Exchange API keys stay on the bot.Scenario B (public subscription WebUI, outbound relay, license token) is not in this drop.
What you can run today
A local WebUI process (Vite UI + Fastify BFF) plus one or more bots with
private_webuiand a shared HMAC secret. You add each bot by URL. The WebUI stores the fleet registry; the bot does not. Operator accounts, 2FA, and roles live on the WebUI. The bot only verifies a JWT{ login, role }.Sign-in. Operator credentials live on the WebUI (email / ADM / ETH + mandatory 2FA). Each bot only checks the signed JWT — there is no login endpoint on the bot.
Fleet tabs and the market desk
Header tabs are one bot each. Status dots come from JWT
GET /api/v1/status(working/degraded/stopped), not from the public liveness probe. PublicGET /api/v1/healthstays{ status, transport }so a reachable bind address does not leak MM quality.On Market you get candles with bot orders overlaid, a live book with spread, 24h range/volume, pair inventory in coin and USD, and manual limit orders. Clicking the book fills side, price, and amount. Cancel sends
{ id, market, side }and drops the row when the exchange already treats the order as gone.Market. Candles, order book, USD inventory, and place-order for
PENGUIN/USDTon BiFinance — one tab in a multi-bot fleet.Parameters and Live situation
Parameters is the full
WebUiTradeParamsform: master MM switch plus groups that follow botcapabilities(missingtrade/mm_*.jsstays locked). Liquidity, price watching, ladders, volume trader, analog hints, and the rest edit throughPUT /paramsand live-update over Socket.IOparams:updated.Live situation is a 12-hour strip in this browser: inventory (base + quote USD) and open-order notional by purpose. Bars fill while the bot stays connected here. Yellow hour frames mean that hour was
degraded; grey means MM wasstopped. The frame hugs the bar, not the full chart height.On the bot, MM quality is sampled outside
trade/mm_*.js./start(or PUT MM on) stamps equalmm_generalInitTsandmm_generalRestartTs. A process reboot while MM is already on keeps init and bumps restart — so you can tell a clean start from a crash-restart.Parameters. Master MM switch, 12-hour Live situation (inventory and open orders $), liquidity, price watching, and ladders — groups lock when the module is not in this bot build.
Commands and the audit trail
Commands wraps the same handlers as messenger/CLI: fill, close, make-price, TWAP, transfer, withdraw, queries. Destructive POSTs ask for confirm. The right-hand console is the bot’s markdown feed (balances, cancels, epoch resets).
Events is the WebUI audit log in SQLite: who changed what (
admin@…vsbot), parameters vs commands, search/filter/JSON export.Commands. Fill / close / make-price forms plus the live console — same command set as ADAMANT Messenger and CLI, structured for a desk.
Events. Timestamped parameter toggles and command payloads, attributed to the operator or the bot.
Contract notes (for operators who run both sides)
GET /health{ status, transport }only. Still bound toprivate_webui_bind_host/ allowlistGET /statusmmActive,mmState, optional init/restart timestamps, grace, degraded reasonsGET/PUT /paramsPOST /commands/cancelside:buy/sellread-onlyJWT cannot write; tokens withoutrolekeep legacy full accessOlder bots without
/statusstill show up: the WebUI falls back to a fat/healthpayload.Tracking
WebUI (public):
Bot API (public):
Product repos (private / premium reference):
adamant-al/adamant-tradebot-webuiPR #6,adamant-al/adamant-tradebot-mePR #194. Target branch isdev.What is not in this drop
Feedback belongs here or on the issues above. If you already run Market-Making Software with
private_webui, this is the console that sits in front of a fleet.All reactions