diff --git a/src/lib/components/Options/UnusualActivity.svelte b/src/lib/components/Options/UnusualActivity.svelte index 9e870a50..b9106224 100644 --- a/src/lib/components/Options/UnusualActivity.svelte +++ b/src/lib/components/Options/UnusualActivity.svelte @@ -84,9 +84,9 @@ } // Aggregate call size, put size, and premium - if (optionType === "Call") { + if (optionType === "Calls") { aggregatedData[date].callSize += size; - } else if (optionType === "Put") { + } else if (optionType === "Puts") { aggregatedData[date].putSize += size; } @@ -260,10 +260,10 @@ { key: "dte", label: "DTE", align: "right" }, { key: "optionType", label: "P/C", align: "right" }, { key: "unusualType", label: "Type", align: "right" }, + { key: "executionEst", label: "Exec", align: "right" }, { key: "sentiment", label: "Sent.", align: "right" }, { key: "size", label: "Size", align: "right" }, { key: "strike", label: "Strike", align: "right" }, - { key: "avgPrice", label: "Avg Price Paid", align: "right" }, { key: "price", label: "Spot", align: "right" }, { key: "premium", label: "Prem", align: "right" }, ]; @@ -272,11 +272,11 @@ date: { order: "none", type: "date" }, optionType: { order: "none", type: "string" }, unusualType: { order: "none", type: "string" }, + executionEst: { order: "none", type: "string" }, dte: { order: "none", type: "number" }, sentiment: { order: "none", type: "sentiment" }, size: { order: "none", type: "number" }, strike: { order: "none", type: "number" }, - avgPrice: { order: "none", type: "number" }, price: { order: "none", type: "number" }, premium: { order: "none", type: "number" }, }; @@ -326,6 +326,7 @@ return sortOrder === "asc" ? sentimentA - sentimentB : sentimentB - sentimentA; + case "number": default: valueA = parseFloat(a[key]); @@ -406,6 +407,13 @@ > {item?.unusualType} + + + {item?.executionEst} + + - {item?.avgPrice} - diff --git a/src/routes/etf/[tickerID]/options/unusual-activity/+page.server.ts b/src/routes/etf/[tickerID]/options/unusual-activity/+page.server.ts index 2125234f..1552c12d 100644 --- a/src/routes/etf/[tickerID]/options/unusual-activity/+page.server.ts +++ b/src/routes/etf/[tickerID]/options/unusual-activity/+page.server.ts @@ -22,7 +22,7 @@ export const load = async ({ locals, params }) => { }; const getHistoricalPrice = async () => { - const postData = { ticker: params.tickerID, timePeriod: "six-months" }; + const postData = { ticker: params.tickerID, timePeriod: "max" }; const response = await fetch(apiURL + "/historical-price", { method: "POST", headers: { diff --git a/src/routes/stocks/[tickerID]/options/unusual-activity/+page.server.ts b/src/routes/stocks/[tickerID]/options/unusual-activity/+page.server.ts index 2125234f..1552c12d 100644 --- a/src/routes/stocks/[tickerID]/options/unusual-activity/+page.server.ts +++ b/src/routes/stocks/[tickerID]/options/unusual-activity/+page.server.ts @@ -22,7 +22,7 @@ export const load = async ({ locals, params }) => { }; const getHistoricalPrice = async () => { - const postData = { ticker: params.tickerID, timePeriod: "six-months" }; + const postData = { ticker: params.tickerID, timePeriod: "max" }; const response = await fetch(apiURL + "/historical-price", { method: "POST", headers: {