SPB Git forge

spb/market-atlas

Public
12commits 1branches 0releases
1.1 MBsize
maindefault branch
10 days agolast push
TypeScript 96.7% SQL 1.6% CSS 0.8% JavaScript 0.5%
1.1 KB · 20 lines tsx
Raw Blame History
1import type { Metadata } from "next";2import { LiveEvents } from "@/components/market/live-events";3import { Page, PageHeader } from "@/components/ui/section";4import { api } from "@/lib/api";5import type { MarketEvent } from "@/lib/types";67export const metadata: Metadata = { title: "Trading halts", description: "Trading halts and resumptions across US listed markets, from the Nasdaq Trader halts feed.", alternates: { canonical: "/halts" } };8export const dynamic = "force-dynamic";910export default async function HaltsPage() {11  const events = await api<MarketEvent[]>("/v1/events?type=TRADING_HALT,TRADING_RESUME&limit=200");12  const halts = events.filter((e) => e.type === "TRADING_HALT").length;13  return (14    <Page>15      <PageHeader kicker="Events" title="Trading halts" lead={`Halts and resumptions published by Nasdaq for all US listing markets (reason codes decoded: news pending, LULD volatility pause, SEC suspension…). ${halts} halt${halts === 1 ? "" : "s"} in the current window; new ones stream in live.`} />16      <LiveEvents initial={events} channel="events:type:TRADING_HALT" max={200} types={["TRADING_HALT", "TRADING_RESUME"]} />17    </Page>18  );19}20