From c577bc0595f854552bf728f55fbd270962cb3d76 Mon Sep 17 00:00:00 2001 From: Max Mogilski Date: Mon, 16 Oct 2023 11:38:01 +0200 Subject: [PATCH] feat: add mock stock market api --- src/app/api/stockdaily/route.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/app/api/stockdaily/route.ts diff --git a/src/app/api/stockdaily/route.ts b/src/app/api/stockdaily/route.ts new file mode 100644 index 00000000..06d238b9 --- /dev/null +++ b/src/app/api/stockdaily/route.ts @@ -0,0 +1,33 @@ +import { NextResponse } from "next/server" + +const data = [ + { + id: "clmhu3hb76bli09vzjsm5ha3x", + name: "S&P 500", + change: "-2.1600", + }, + { + id: "clmhu869v6cqg09vzu72abtgy", + name: "Apple", + change: "+1.8600", + }, + { + id: "clmhu8gwj6cs009vz07dlwsnv", + name: "Amazon", + change: "-2.5400", + }, + { + id: "clmhu901k6csw09vzvd2wl6dv", + name: "Microsoft", + change: "-3.4300", + }, + { + id: "clmhu8qjmbc6q0aw2i7uk751h", + name: "Google", + change: "+1.6100", + }, +] + +export async function GET() { + return NextResponse.json({ data }, { status: 200 }) +}