feat: GridBot als zweite Paper-Engine — No-Stop-XRP-Grid live
processGridCycle (Paritätstest gegen runGridBacktest), GridEngine mit DB-Recovery (grid_state/grid_lots, bot_state id=2), bot-Spalte in paper_trades/equity_snapshots, /api/grid, Dashboard-Panel. Bewusster Paper-Probelauf trotz Gate-Fail (User-Entscheidung 2026-06-10). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
25
drizzle/0002_burly_joystick.sql
Normal file
25
drizzle/0002_burly_joystick.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
CREATE TABLE "grid_lots" (
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"pair" varchar(16) NOT NULL,
|
||||
"level_idx" integer NOT NULL,
|
||||
"qty" double precision NOT NULL,
|
||||
"entry_ts" timestamp with time zone NOT NULL,
|
||||
"entry_price" double precision NOT NULL,
|
||||
"entry_cost" double precision NOT NULL,
|
||||
"risk_amount" double precision NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "grid_state" (
|
||||
"pair" varchar(16) PRIMARY KEY NOT NULL,
|
||||
"center" double precision NOT NULL,
|
||||
"spacing" double precision NOT NULL,
|
||||
"lower_bound" double precision NOT NULL,
|
||||
"upper_bound" double precision NOT NULL,
|
||||
"budget_per_level" double precision NOT NULL,
|
||||
"activated_ts" timestamp with time zone NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "equity_snapshots" ADD COLUMN "bot" text DEFAULT 'trend' NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE "equity_snapshots" DROP CONSTRAINT "equity_snapshots_pkey";--> statement-breakpoint
|
||||
ALTER TABLE "equity_snapshots" ADD CONSTRAINT "equity_snapshots_bot_ts_pk" PRIMARY KEY("bot","ts");--> statement-breakpoint
|
||||
ALTER TABLE "paper_trades" ADD COLUMN "bot" text DEFAULT 'trend' NOT NULL;
|
||||
Reference in New Issue
Block a user