This commit is contained in:
MuslemRahimi 2025-03-11 13:25:24 +01:00
parent 3bc72a259a
commit 18c46c4a28
22 changed files with 217 additions and 238 deletions

View File

@ -783,7 +783,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<th class=" font-semibold text-sm text-start">Fiscal Year</th> <th class=" font-semibold text-sm text-start">Fiscal Year</th>
{#each xData as item} {#each xData as item}

View File

@ -340,7 +340,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<th class=" font-semibold text-start text-sm">Date</th> <th class=" font-semibold text-start text-sm">Date</th>
<th class=" font-semibold text-end text-sm">Total Volume</th> <th class=" font-semibold text-end text-sm">Total Volume</th>

View File

@ -321,7 +321,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<th class=" font-semibold text-start text-sm">Date</th> <th class=" font-semibold text-start text-sm">Date</th>
<th class=" font-semibold text-end text-sm">Price</th> <th class=" font-semibold text-end text-sm">Price</th>

View File

@ -5,6 +5,7 @@
import TableHeader from "$lib/components/Table/TableHeader.svelte"; import TableHeader from "$lib/components/Table/TableHeader.svelte";
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte"; import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
import highcharts from "$lib/highcharts.ts"; import highcharts from "$lib/highcharts.ts";
import { mode } from "mode-watcher";
export let data; export let data;
export let ticker; export let ticker;
@ -378,7 +379,7 @@
// Highcharts configuration object // Highcharts configuration object
const options = { const options = {
chart: { chart: {
backgroundColor: "#09090B", backgroundColor: $mode === "light" ? "#fff" : "#09090B",
animation: false, animation: false,
height: 360, height: 360,
}, },
@ -467,7 +468,7 @@
}, },
borderRadius: 4, borderRadius: 4,
formatter: function () { formatter: function () {
let tooltipContent = `<span class="text-white m-auto text-black text-[1rem] font-[501]">${new Date( let tooltipContent = `<span class=" m-auto text-black text-[1rem] font-[501]">${new Date(
this.x, this.x,
).toLocaleDateString("en-US", { ).toLocaleDateString("en-US", {
year: "numeric", year: "numeric",
@ -476,8 +477,8 @@
})}</span><br>`; })}</span><br>`;
this.points.forEach((point) => { this.points.forEach((point) => {
tooltipContent += `<span class="text-white font-semibold text-sm">${point.series.name}:</span> tooltipContent += `<span class=" font-semibold text-sm">${point.series.name}:</span>
<span class="text-white font-normal text-sm" style="color:${point.color}">${abbreviateNumber( <span class=" font-normal text-sm" style="color:${point.color}">${abbreviateNumber(
point.y, point.y,
)}</span><br>`; )}</span><br>`;
}); });
@ -569,22 +570,20 @@
} }
</script> </script>
<section <section class="w-full overflow-hidden min-h-screen pb-40">
class="w-full bg-default overflow-hidden text-white min-h-screen pb-40"
>
<div class="w-full flex h-full overflow-hidden"> <div class="w-full flex h-full overflow-hidden">
<div <div
class="w-full relative flex justify-center items-center overflow-hidden" class="w-full relative flex justify-center items-center overflow-hidden"
> >
<div class="sm:pl-7 sm:pb-7 sm:pt-7 w-full m-auto mt-2 sm:mt-0"> <div class="sm:pl-7 sm:pb-7 sm:pt-7 w-full m-auto mt-2 sm:mt-0">
<h2 <h2
class=" flex flex-row items-center text-white text-xl sm:text-2xl font-bold w-fit mb-2 sm:mb-0" class=" flex flex-row items-center text-xl sm:text-2xl font-bold w-fit mb-2 sm:mb-0"
> >
Hottest Contracts (Highest Volume) Hottest Contracts (Highest Volume)
</h2> </h2>
<div class="w-full overflow-x-auto text-white"> <div class="w-full overflow-x-auto">
<table <table
class="w-full table table-sm table-compact bg-table border border-gray-800 rounded-none sm:rounded-md m-auto mt-4 overflow-x-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead> <thead>
<TableHeader {columns} {sortOrders} {sortData} /> <TableHeader {columns} {sortOrders} {sortData} />
@ -592,7 +591,7 @@
<tbody> <tbody>
{#each volumeList as item, index} {#each volumeList as item, index}
<tr <tr
class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-oddborder-b border-gray-800 {index + class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd {index +
1 === 1 ===
volumeList?.slice(0, 3)?.length && volumeList?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier) !['Pro']?.includes(data?.user?.tier)
@ -604,8 +603,8 @@
> >
<span <span
class={item?.option_type === "C" class={item?.option_type === "C"
? "text-[#00FC50]" ? "text-green-600 dark:text-[#00FC50]"
: "text-[#FF2F1F]"} : "text-red-600 dark:text-[#FF2F1F]"}
> >
{item?.option_type === "C" ? "Call" : "Put"} {item?.option_type === "C" ? "Call" : "Put"}
</span> </span>
@ -613,7 +612,7 @@
on:click={() => handleViewData(item)} on:click={() => handleViewData(item)}
on:mouseover={() => on:mouseover={() =>
getContractHistory(item?.option_symbol)} getContractHistory(item?.option_symbol)}
class="px-2 sm:px-0 cursor-pointer text-[#04D9FF] sm:hover:text-white sm:hover:underline sm:hover:underline-offset-4" class="px-2 sm:px-0 cursor-pointer text-[#04D9FF] sm:hover: sm:hover:underline sm:hover:underline-offset-4"
> >
{item?.strike_price} {item?.strike_price}
@ -631,22 +630,22 @@
</label> </label>
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.dte} {item?.dte}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.otm}% {item?.otm}%
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.last ?? "n/a"} {item?.last ?? "n/a"}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{#if item?.low && item?.high} {#if item?.low && item?.high}
{item?.low}-{item?.high} {item?.low}-{item?.high}
@ -655,17 +654,17 @@
{/if} {/if}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.volume?.toLocaleString("en-US")} {item?.volume?.toLocaleString("en-US")}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.open_interest?.toLocaleString("en-US")} {item?.open_interest?.toLocaleString("en-US")}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{#if item?.changeOI >= 0} {#if item?.changeOI >= 0}
<span class="text-green-600 dark:text-[#00FC50]" <span class="text-green-600 dark:text-[#00FC50]"
@ -683,7 +682,7 @@
{item?.iv ? item?.iv + "%" : "n/a"} {item?.iv ? item?.iv + "%" : "n/a"}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{@html abbreviateNumberWithColor( {@html abbreviateNumberWithColor(
item?.total_premium, item?.total_premium,
@ -698,13 +697,13 @@
</div> </div>
<h2 <h2
class=" flex flex-row items-center text-white text-xl sm:text-2xl font-bold w-fit mt-10" class=" flex flex-row items-center text-xl sm:text-2xl font-bold w-fit mt-10"
> >
Highest OI Contracts Highest OI Contracts
</h2> </h2>
<div class="w-full overflow-x-auto text-white"> <div class="w-full overflow-x-auto">
<table <table
class="w-full table table-sm table-compact bg-table border border-gray-800 rounded-none sm:rounded-md m-auto mt-4 overflow-x-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead> <thead>
<TableHeader {columns} {sortOrders} sortData={sortDataOI} /> <TableHeader {columns} {sortOrders} sortData={sortDataOI} />
@ -712,7 +711,7 @@
<tbody> <tbody>
{#each openInterestList as item, index} {#each openInterestList as item, index}
<tr <tr
class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-oddborder-b border-gray-800 {index + class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd {index +
1 === 1 ===
openInterestList?.slice(0, 3)?.length && openInterestList?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier) !['Pro']?.includes(data?.user?.tier)
@ -724,8 +723,8 @@
> >
<span <span
class={item?.option_type === "C" class={item?.option_type === "C"
? "text-[#00FC50]" ? "text-green-600 dark:text-[#00FC50]"
: "text-[#FF2F1F]"} : "text-red-600 dark:text-[#FF2F1F]"}
> >
{item?.option_type === "C" ? "Call" : "Put"} {item?.option_type === "C" ? "Call" : "Put"}
</span> </span>
@ -733,7 +732,7 @@
on:click={() => handleViewData(item)} on:click={() => handleViewData(item)}
on:mouseover={() => on:mouseover={() =>
getContractHistory(item?.option_symbol)} getContractHistory(item?.option_symbol)}
class="cursor-pointer text-[#04D9FF] sm:hover:text-white sm:hover:underline sm:hover:underline-offset-4" class="cursor-pointer text-[#04D9FF] sm:hover: sm:hover:underline sm:hover:underline-offset-4"
> >
{item?.strike_price} {item?.strike_price}
@ -751,22 +750,22 @@
</label> </label>
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.dte} {item?.dte}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.otm}% {item?.otm}%
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.last ?? "n/a"} {item?.last ?? "n/a"}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{#if item?.low && item?.high} {#if item?.low && item?.high}
{item?.low}-{item?.high} {item?.low}-{item?.high}
@ -775,17 +774,17 @@
{/if} {/if}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.volume?.toLocaleString("en-US")} {item?.volume?.toLocaleString("en-US")}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.open_interest?.toLocaleString("en-US")} {item?.open_interest?.toLocaleString("en-US")}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{#if item?.changeOI >= 0} {#if item?.changeOI >= 0}
<span class="text-green-600 dark:text-[#00FC50]" <span class="text-green-600 dark:text-[#00FC50]"
@ -803,7 +802,7 @@
{item?.iv ? item?.iv + "%" : "n/a"} {item?.iv ? item?.iv + "%" : "n/a"}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{@html abbreviateNumberWithColor( {@html abbreviateNumberWithColor(
item?.total_premium, item?.total_premium,
@ -828,26 +827,28 @@
class="modal {$screenWidth < 640 ? 'modal-bottom ' : ''} bg-[#000]/40 sm:px-5" class="modal {$screenWidth < 640 ? 'modal-bottom ' : ''} bg-[#000]/40 sm:px-5"
> >
<div <div
class="modal-box w-full {rawDataHistory?.length > 0 class="modal-box bg-white dark:bg-default w-full {rawDataHistory?.length > 0
? 'max-w-7xl' ? 'max-w-7xl'
: 'w-full'} rounded-md bg-default border-t sm:border border-gray-800 min-h-48 h-auto" : 'w-full'} rounded-md border-t sm:border border-gray-300 dark:border-gray-800 min-h-48 h-auto"
> >
<form <form
method="dialog" method="dialog"
class="modal-backdrop backdrop-blur-[4px] flex flex-row items-center w-full justify-between" class="modal-backdrop backdrop-blur-[4px] flex flex-row items-center w-full justify-between"
> >
<p class="text-white text-[1rem] sm:text-xl font-semibold cursor-text"> <p
class="text-muted dark:text-white text-[1rem] sm:text-xl font-semibold cursor-text"
>
Contract: <span Contract: <span
class={optionType === "Calls" ? "text-[#00FC50]" : "text-[#FF2F1F]"} class={optionType === "Calls"
? "text-green-600 dark:text-[#00FC50]"
: "text-red-600 dark:text-[#FF2F1F]"}
>{ticker} >{ticker}
{strikePrice} {strikePrice}
{optionType} {optionType}
{dateExpiration} ({daysLeft(dateExpiration)}) {dateExpiration} ({daysLeft(dateExpiration)})
</span> </span>
</p> </p>
<button <button class="cursor-pointer text-[1.8rem] focus:outline-hidden">
class="cursor-pointer text-[1.8rem] text-white focus:outline-hidden"
>
<svg <svg
class="w-8 h-8" class="w-8 h-8"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -861,10 +862,10 @@
</form> </form>
{#if rawDataHistory?.length > 0} {#if rawDataHistory?.length > 0}
<div <div
class="border-b border-gray-800 w-full mt-2 mb-2 sm:mb-3 sm:mt-3" class="border-b border-gray-300 dark:border-gray-800 w-full mt-2 mb-2 sm:mb-3 sm:mt-3"
></div> ></div>
<div class="hidden sm:flex flex-wrap text-white pb-2"> <div class="hidden sm:flex flex-wrap pb-2">
<div class="mr-3 whitespace-nowrap"> <div class="mr-3 whitespace-nowrap">
{formatDate(optionHistoryList?.at(0)?.date)}: {formatDate(optionHistoryList?.at(0)?.date)}:
</div> </div>
@ -892,7 +893,7 @@
</div> </div>
</div> </div>
<div class="pb-8 sm:pb-2 rounded-md bg-default overflow-hidden"> <div class="pb-8 sm:pb-2 rounded-md overflow-hidden">
<div <div
class="flex flex-row items-center justify-between gap-x-2 ml-auto w-fit mt-2" class="flex flex-row items-center justify-between gap-x-2 ml-auto w-fit mt-2"
> >
@ -900,15 +901,15 @@
<label <label
on:click={() => (selectGraphType = item)} on:click={() => (selectGraphType = item)}
class="px-3 py-1.5 {selectGraphType === item class="px-3 py-1.5 {selectGraphType === item
? 'bg-white text-black ' ? 'shadow-sm bg-gray-100 dark:bg-white text-black '
: 'text-white bg-default text-opacity-[0.6] border border-gray-600'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer" : 'shadow-sm text-opacity-[0.6] border border-gray-300 dark:border-gray-600'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
> >
{item} {item}
</label> </label>
{/each} {/each}
</div> </div>
<div <div
class="mt-2 border border-gray-800 rounded" class="mt-2 border border-gray-300 dark:border-gray-800 rounded"
use:highcharts={config} use:highcharts={config}
></div> ></div>
</div> </div>
@ -921,55 +922,45 @@
<div class="flex justify-start items-center m-auto cursor-normal"> <div class="flex justify-start items-center m-auto cursor-normal">
{#if isLoaded} {#if isLoaded}
<table <table
class="table table-pin-cols table-sm bg-table border border-gray-800 table-compact rounded-none sm:rounded-md w-full m-auto mt-4 overflow-x-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead class="bg-default"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<td class="text-white font-semibold text-sm text-start" <td class=" font-semibold text-sm text-start">Date</td>
>Date</td <td class=" font-semibold text-sm text-end">Vol</td>
> <td class=" font-semibold text-sm text-end">OI</td>
<td class="text-white font-semibold text-sm text-end">Vol</td> <td class=" font-semibold text-sm text-end">OI Change</td>
<td class="text-white font-semibold text-sm text-end">OI</td> <td class=" font-semibold text-sm text-end">% Change OI</td>
<td class="text-white font-semibold text-sm text-end" <td class=" font-semibold text-sm text-end">Last Price</td>
>OI Change</td <td class=" font-semibold text-sm text-end">Avg Price</td>
> <td class=" font-semibold text-sm text-end">IV</td>
<td class="text-white font-semibold text-sm text-end" <td class=" font-semibold text-sm text-end">Total Prem</td>
>% Change OI</td <td class=" font-semibold text-sm text-end">GEX</td>
> <td class=" font-semibold text-sm text-end">DEX</td>
<td class="text-white font-semibold text-sm text-end"
>Last Price</td
>
<td class="text-white font-semibold text-sm text-end"
>Avg Price</td
>
<td class="text-white font-semibold text-sm text-end">IV</td>
<td class="text-white font-semibold text-sm text-end"
>Total Prem</td
>
<td class="text-white font-semibold text-sm text-end">GEX</td>
<td class="text-white font-semibold text-sm text-end">DEX</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each optionHistoryList as item} {#each optionHistoryList as item}
<!-- row --> <!-- row -->
<tr class="odd:bg-odd border-b border-gray-800"> <tr
<td class="text-sm sm:text-[1rem] text-start text-white"> class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd"
>
<td class="text-sm sm:text-[1rem] text-start">
{formatDate(item?.date)} {formatDate(item?.date)}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{item?.volume !== null {item?.volume !== null
? item?.volume?.toLocaleString("en-US") ? item?.volume?.toLocaleString("en-US")
: 0} : 0}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{item?.open_interest !== undefined {item?.open_interest !== undefined
? item?.open_interest?.toLocaleString("en-US") ? item?.open_interest?.toLocaleString("en-US")
: "n/a"} : "n/a"}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{#if item?.changeOI >= 0 && item?.changeOI !== null} {#if item?.changeOI >= 0 && item?.changeOI !== null}
<span class="text-green-600 dark:text-[#00FC50]" <span class="text-green-600 dark:text-[#00FC50]"
>+{item?.changeOI?.toLocaleString("en-US")}</span >+{item?.changeOI?.toLocaleString("en-US")}</span
@ -983,7 +974,7 @@
{/if} {/if}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{#if item?.changesPercentageOI > 0 && item?.changesPercentageOI !== undefined} {#if item?.changesPercentageOI > 0 && item?.changesPercentageOI !== undefined}
<span class="text-green-600 dark:text-[#00FC50]" <span class="text-green-600 dark:text-[#00FC50]"
>+{item?.changesPercentageOI + "%"}</span >+{item?.changesPercentageOI + "%"}</span
@ -999,32 +990,28 @@
{/if} {/if}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{item?.close} {item?.close}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{item?.mark} {item?.mark}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{(item?.implied_volatility * 100)?.toLocaleString( {(item?.implied_volatility * 100)?.toLocaleString(
"en-US", "en-US",
) + "%"} ) + "%"}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{@html abbreviateNumberWithColor( {abbreviateNumber(item?.total_premium, false, true)}
item?.total_premium,
false,
true,
)}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{@html abbreviateNumberWithColor(item?.gex, false, true)} {abbreviateNumber(item?.gex, false, true)}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{@html abbreviateNumberWithColor(item?.dex, false, true)} {abbreviateNumber(item?.dex, false, true)}
</td> </td>
</tr> </tr>
{/each} {/each}
@ -1046,7 +1033,7 @@
</div> </div>
{:else} {:else}
<div <div
class="mt-10 flex justify-center sm:justify-start items-center w-full text-white" class="mt-10 flex justify-center sm:justify-start items-center w-full"
> >
No historical data available yet for the given contract No historical data available yet for the given contract
</div> </div>

View File

@ -1,11 +1,12 @@
<script lang="ts"> <script lang="ts">
import { abbreviateNumber, abbreviateNumberWithColor } from "$lib/utils"; import { abbreviateNumber } from "$lib/utils";
import { screenWidth, setCache, getCache } from "$lib/store"; import { screenWidth, setCache, getCache } from "$lib/store";
import TableHeader from "$lib/components/Table/TableHeader.svelte"; import TableHeader from "$lib/components/Table/TableHeader.svelte";
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte"; import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
import Infobox from "$lib/components/Infobox.svelte"; import Infobox from "$lib/components/Infobox.svelte";
import highcharts from "$lib/highcharts.ts"; import highcharts from "$lib/highcharts.ts";
import { mode } from "mode-watcher";
import { onMount } from "svelte"; import { onMount } from "svelte";
@ -34,7 +35,7 @@
let displayList = rawData?.slice(0, 150) || []; let displayList = rawData?.slice(0, 150) || [];
let configUnusual = plotData(); let configUnusual = null;
function daysLeft(targetDate) { function daysLeft(targetDate) {
const targetTime = new Date(targetDate).getTime(); const targetTime = new Date(targetDate).getTime();
@ -154,7 +155,7 @@
borderWidth: 0, // Optional: Remove borders if not needed borderWidth: 0, // Optional: Remove borders if not needed
}, },
series: { series: {
color: "white", color: $mode === "light" ? "black" : "white",
animation: false, // Disable series animation animation: false, // Disable series animation
states: { states: {
hover: { hover: {
@ -164,15 +165,15 @@
}, },
}, },
chart: { chart: {
backgroundColor: "#09090B", backgroundColor: $mode === "light" ? "#fff" : "#09090B",
plotBackgroundColor: "#09090B", plotBackgroundColor: $mode === "light" ? "#fff" : "#09090B",
height: 360, height: 360,
animation: false, animation: false,
}, },
title: { title: {
text: `<h3 class="mt-3 mb-1 text-[1rem] sm:text-lg">${ticker} Unusual Options Activity</h3>`, text: `<h3 class="mt-3 mb-1 text-[1rem] sm:text-lg">${ticker} Unusual Options Activity</h3>`,
style: { style: {
color: "white", color: $mode === "light" ? "black" : "white",
}, },
useHTML: true, useHTML: true,
}, },
@ -181,13 +182,13 @@
endOnTick: false, endOnTick: false,
categories: dates, categories: dates,
crosshair: { crosshair: {
color: "#fff", color: $mode === "light" ? "black" : "white",
width: 1, width: 1,
dashStyle: "Solid", dashStyle: "Solid",
}, },
labels: { labels: {
style: { style: {
color: "#fff", color: $mode === "light" ? "black" : "white",
}, },
formatter: function () { formatter: function () {
const date = new Date(this.value); const date = new Date(this.value);
@ -212,9 +213,9 @@
yAxis: [ yAxis: [
{ {
gridLineWidth: 1, gridLineWidth: 1,
gridLineColor: "#111827", gridLineColor: $mode === "light" ? "#d1d5dc" : "#111827",
labels: { labels: {
style: { color: "white" }, style: { color: $mode === "light" ? "black" : "white" },
}, },
title: { text: null }, title: { text: null },
opposite: true, opposite: true,
@ -232,8 +233,8 @@
tooltip: { tooltip: {
shared: true, shared: true,
useHTML: true, useHTML: true,
backgroundColor: "rgba(0, 0, 0, 0.8)", backgroundColor: "rgba(0, 0, 0, 0.8)", // Semi-transparent black
borderColor: "rgba(255, 255, 255, 0.2)", borderColor: "rgba(255, 255, 255, 0.2)", // Slightly visible white border
borderWidth: 1, borderWidth: 1,
style: { style: {
color: "#fff", color: "#fff",
@ -242,7 +243,8 @@
}, },
borderRadius: 4, borderRadius: 4,
formatter: function () { formatter: function () {
let tooltipContent = `<span class="text-white m-auto text-black text-[1rem] font-[501]">${new Date( // Format the x value to display time in a custom format
let tooltipContent = `<span class="m-auto text-[1rem] font-[501]">${new Date(
this?.x, this?.x,
).toLocaleDateString("en-US", { ).toLocaleDateString("en-US", {
year: "numeric", year: "numeric",
@ -250,11 +252,12 @@
day: "numeric", day: "numeric",
})}</span><br>`; })}</span><br>`;
// Loop through each point in the shared tooltip
this.points.forEach((point) => { this.points.forEach((point) => {
tooltipContent += `<span class="text-white font-semibold text-sm">${point.series.name}:</span> tooltipContent += `
<span class="text-white font-normal text-sm" style="color:${point.color}">${abbreviateNumber( <span style="display:inline-block; width:10px; height:10px; background-color:${point.color}; border-radius:50%; margin-right:5px;"></span>
point.y, <span class="font-semibold text-sm">${point.series.name}:</span>
)}</span><br>`; <span class="font-normal text-sm">${abbreviateNumber(point.y)}</span><br>`;
}); });
return tooltipContent; return tooltipContent;
@ -290,7 +293,7 @@
type: "area", type: "area",
yAxis: 1, yAxis: 1,
data: priceList, data: priceList,
color: "#fff", color: $mode === "light" ? "#3B82F6" : "white",
lineWidth: 1, lineWidth: 1,
marker: { marker: {
enabled: false, enabled: false,
@ -388,7 +391,7 @@
new Date(item.date).getTime(), new Date(item.date).getTime(),
item.price, item.price,
]), ]),
color: "#fff", color: $mode === "light" ? "#3B82F6" : "white",
lineWidth: 1, lineWidth: 1,
marker: { enabled: false }, marker: { enabled: false },
animation: false, animation: false,
@ -429,7 +432,7 @@
new Date(item.date).getTime(), new Date(item.date).getTime(),
item.price, item.price,
]), ]),
color: "#fff", color: $mode === "light" ? "black" : "white",
lineWidth: 1, lineWidth: 1,
marker: { enabled: false }, marker: { enabled: false },
animation: false, animation: false,
@ -440,7 +443,7 @@
// Highcharts configuration object // Highcharts configuration object
const options = { const options = {
chart: { chart: {
backgroundColor: "#09090B", backgroundColor: $mode === "light" ? "#fff" : "#09090B",
animation: false, animation: false,
height: 360, height: 360,
}, },
@ -448,12 +451,12 @@
title: { title: {
text: `<h3 class="mt-3 mb-1 text-[1rem] sm:text-lg">Contract History</h3>`, text: `<h3 class="mt-3 mb-1 text-[1rem] sm:text-lg">Contract History</h3>`,
useHTML: true, useHTML: true,
style: { color: "white" }, style: { color: $mode === "light" ? "black" : "white" },
}, },
// Disable markers globally on hover for all series // Disable markers globally on hover for all series
plotOptions: { plotOptions: {
series: { series: {
color: "white", color: $mode === "light" ? "black" : "white",
animation: false, // Disable series animation animation: false, // Disable series animation
states: { states: {
hover: { hover: {
@ -466,7 +469,7 @@
type: "datetime", type: "datetime",
endOnTick: false, endOnTick: false,
crosshair: { crosshair: {
color: "#fff", color: $mode === "light" ? "black" : "white",
width: 1, width: 1,
dashStyle: "Solid", dashStyle: "Solid",
}, },
@ -495,8 +498,8 @@
yAxis: [ yAxis: [
{ {
gridLineWidth: 1, gridLineWidth: 1,
gridLineColor: "#111827", gridLineColor: $mode === "light" ? "#d1d5dc" : "#111827",
labels: { style: { color: "white" } }, labels: { style: { color: $mode === "light" ? "black" : "white" } },
title: { text: null }, title: { text: null },
opposite: true, opposite: true,
}, },
@ -519,8 +522,8 @@
tooltip: { tooltip: {
shared: true, shared: true,
useHTML: true, useHTML: true,
backgroundColor: "rgba(0, 0, 0, 0.8)", backgroundColor: "rgba(0, 0, 0, 0.8)", // Semi-transparent black
borderColor: "rgba(255, 255, 255, 0.2)", borderColor: "rgba(255, 255, 255, 0.2)", // Slightly visible white border
borderWidth: 1, borderWidth: 1,
style: { style: {
color: "#fff", color: "#fff",
@ -529,20 +532,23 @@
}, },
borderRadius: 4, borderRadius: 4,
formatter: function () { formatter: function () {
let tooltipContent = `<span class="text-white m-auto text-black text-[1rem] font-[501]">${new Date( // Format the x value to display time in a custom format
this.x, let tooltipContent = `<span class="m-auto text-[1rem] font-[501]">${new Date(
this?.x,
).toLocaleDateString("en-US", { ).toLocaleDateString("en-US", {
year: "numeric", year: "numeric",
month: "short", month: "short",
day: "numeric", day: "numeric",
})}</span><br>`; })}</span><br>`;
// Loop through each point in the shared tooltip
this.points.forEach((point) => { this.points.forEach((point) => {
tooltipContent += `<span class="text-white font-semibold text-sm">${point.series.name}:</span> tooltipContent += `
<span class="text-white font-normal text-sm" style="color:${point.color}">${abbreviateNumber( <span style="display:inline-block; width:10px; height:10px; background-color:${point.color}; border-radius:50%; margin-right:5px;"></span>
point.y, <span class="font-semibold text-sm">${point.series.name}:</span>
)}</span><br>`; <span class="font-normal text-sm">${abbreviateNumber(point.y)}</span><br>`;
}); });
return tooltipContent; return tooltipContent;
}, },
}, },
@ -704,7 +710,7 @@
}; };
$: { $: {
if (typeof window !== "undefined" && selectGraphType) { if (selectGraphType) {
isLoaded = false; isLoaded = false;
if (rawDataHistory?.length > 0) { if (rawDataHistory?.length > 0) {
configContract = plotContractHistory(); configContract = plotContractHistory();
@ -715,18 +721,22 @@
isLoaded = true; isLoaded = true;
} }
} }
$: {
if ($mode) {
configUnusual = plotData() || null;
}
}
</script> </script>
<section <section class="w-full overflow-hidden min-h-screen pb-40">
class="w-full bg-default overflow-hidden text-white min-h-screen pb-40"
>
<div class="w-full flex h-full overflow-hidden"> <div class="w-full flex h-full overflow-hidden">
<div <div
class="w-full relative flex justify-center items-center overflow-hidden" class="w-full relative flex justify-center items-center overflow-hidden"
> >
<div class="sm:pl-7 sm:pb-7 sm:pt-7 w-full m-auto mt-2 sm:mt-0"> <div class="sm:pl-7 sm:pb-7 sm:pt-7 w-full m-auto mt-2 sm:mt-0">
<h2 <h2
class=" flex flex-row items-center text-white text-xl sm:text-2xl font-bold w-fit mb-2 sm:mb-0" class=" flex flex-row items-center text-xl sm:text-2xl font-bold w-fit mb-2 sm:mb-0"
> >
Unusual Activity Unusual Activity
</h2> </h2>
@ -735,21 +745,21 @@
/> />
<div <div
class="mt-5 border border-gray-800 rounded" class="mt-5 border border-gray-300 dark:border-gray-800 rounded"
use:highcharts={configUnusual} use:highcharts={configUnusual}
></div> ></div>
<div class="w-full overflow-x-auto text-white"> <div class="w-full overflow-x-auto">
<table <table
class="w-full table table-sm table-compact bg-table border border-gray-800 rounded-none sm:rounded-md m-auto mt-4 overflow-x-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead> <thead class="text-muted dark:text-white dark:bg-default">
<TableHeader {columns} {sortOrders} {sortData} /> <TableHeader {columns} {sortOrders} {sortData} />
</thead> </thead>
<tbody> <tbody>
{#each data?.user?.tier !== "Pro" ? displayList?.slice(0, 3) : displayList as item, index} {#each data?.user?.tier !== "Pro" ? displayList?.slice(0, 3) : displayList as item, index}
<tr <tr
class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-oddborder-b border-gray-800 {index + class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd {index +
1 === 1 ===
rawData?.slice(0, 3)?.length && rawData?.slice(0, 3)?.length &&
!['Pro']?.includes(data?.user?.tier) !['Pro']?.includes(data?.user?.tier)
@ -757,7 +767,7 @@
: ''}" : ''}"
> >
<td <td
class="text-white text-sm sm:text-[1rem] text-start whitespace-nowrap" class=" text-sm sm:text-[1rem] text-start whitespace-nowrap"
> >
{formatDate(item?.date)} {formatDate(item?.date)}
</td> </td>
@ -776,7 +786,7 @@
on:click={() => handleViewData(item)} on:click={() => handleViewData(item)}
on:mouseover={() => on:mouseover={() =>
getContractHistory(item?.option_symbol)} getContractHistory(item?.option_symbol)}
class="cursor-pointer text-[#04D9FF] sm:hover:text-white sm:hover:underline sm:hover:underline-offset-4" class="cursor-pointer text-[#3B82F6] dark:text-[#04D9FF] dark:sm:hover:text-white sm:hover:underline sm:hover:underline-offset-4"
> >
{item?.strike} {item?.strike}
@ -786,7 +796,7 @@
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
class="inline-block w-4 h-4 -mt-1" class="inline-block w-4 h-4 -mt-1"
viewBox="0 0 512 512" viewBox="0 0 512 512"
fill="#04D9FF" fill={$mode === "light" ? "#3B82F6" : "#04D9FF"}
><path ><path
d="M104 496H72a24 24 0 01-24-24V328a24 24 0 0124-24h32a24 24 0 0124 24v144a24 24 0 01-24 24zM328 496h-32a24 24 0 01-24-24V232a24 24 0 0124-24h32a24 24 0 0124 24v240a24 24 0 01-24 24zM440 496h-32a24 24 0 01-24-24V120a24 24 0 0124-24h32a24 24 0 0124 24v352a24 24 0 01-24 24zM216 496h-32a24 24 0 01-24-24V40a24 24 0 0124-24h32a24 24 0 0124 24v432a24 24 0 01-24 24z" d="M104 496H72a24 24 0 01-24-24V328a24 24 0 0124-24h32a24 24 0 0124 24v144a24 24 0 01-24 24zM328 496h-32a24 24 0 01-24-24V232a24 24 0 0124-24h32a24 24 0 0124 24v240a24 24 0 01-24 24zM440 496h-32a24 24 0 01-24-24V120a24 24 0 0124-24h32a24 24 0 0124 24v352a24 24 0 01-24 24zM216 496h-32a24 24 0 01-24-24V40a24 24 0 0124-24h32a24 24 0 0124 24v432a24 24 0 01-24 24z"
></path></svg ></path></svg
@ -795,19 +805,19 @@
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.dte} {item?.dte}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.unusualType} {item?.unusualType}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.executionEst} {item?.executionEst}
</td> </td>
@ -818,29 +828,25 @@
? 'text-green-600 dark:text-[#00FC50]' ? 'text-green-600 dark:text-[#00FC50]'
: item?.sentiment === 'Bearish' : item?.sentiment === 'Bearish'
? 'text-red-600 dark:text-[#FF2F1F]' ? 'text-red-600 dark:text-[#FF2F1F]'
: 'text-[#C8A32D]'} " : 'text-orange-600 dark:text-[#C8A32D]'} "
> >
{item?.sentiment} {item?.sentiment}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.size?.toLocaleString("en-US")} {item?.size?.toLocaleString("en-US")}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{item?.price} {item?.price}
</td> </td>
<td <td
class="text-white text-sm sm:text-[1rem] text-end whitespace-nowrap" class=" text-sm sm:text-[1rem] text-end whitespace-nowrap"
> >
{@html abbreviateNumberWithColor( {abbreviateNumber(item?.premium, false, true)}
item?.premium,
false,
true,
)}
</td> </td>
</tr> </tr>
{/each} {/each}
@ -859,26 +865,28 @@
class="modal {$screenWidth < 640 ? 'modal-bottom ' : ''} bg-[#000]/40 sm:px-5" class="modal {$screenWidth < 640 ? 'modal-bottom ' : ''} bg-[#000]/40 sm:px-5"
> >
<div <div
class="modal-box w-full {rawDataHistory?.length > 0 class="modal-box bg-white dark:bg-default w-full {rawDataHistory?.length > 0
? 'max-w-7xl' ? 'max-w-7xl'
: 'w-full'} rounded-md bg-default border-t sm:border border-gray-800 min-h-48 h-auto" : 'w-full'} rounded-md border-t sm:border border-gray-300 dark:border-gray-800 min-h-48 h-auto"
> >
<form <form
method="dialog" method="dialog"
class="modal-backdrop backdrop-blur-[4px] flex flex-row items-center w-full justify-between" class="modal-backdrop backdrop-blur-[4px] flex flex-row items-center w-full justify-between"
> >
<p class="text-white text-[1rem] sm:text-xl font-semibold cursor-text"> <p
class="text-muted dark:text-white text-[1rem] sm:text-xl font-semibold cursor-text"
>
Contract: <span Contract: <span
class={optionType === "Calls" ? "text-[#00FC50]" : "text-[#FF2F1F]"} class={optionType === "Calls"
? "text-green-600 dark:text-[#00FC50]"
: "text-red-600 dark:text-[#FF2F1F]"}
>{ticker} >{ticker}
{strikePrice} {strikePrice}
{optionType} {optionType}
{dateExpiration} ({daysLeft(dateExpiration)}) {dateExpiration} ({daysLeft(dateExpiration)})
</span> </span>
</p> </p>
<button <button class="cursor-pointer text-[1.8rem] focus:outline-hidden">
class="cursor-pointer text-[1.8rem] text-white focus:outline-hidden"
>
<svg <svg
class="w-8 h-8" class="w-8 h-8"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -892,10 +900,10 @@
</form> </form>
{#if rawDataHistory?.length > 0} {#if rawDataHistory?.length > 0}
<div <div
class="border-b border-gray-800 w-full mt-2 mb-2 sm:mb-3 sm:mt-3" class="border-b border-gray-300 dark:border-gray-800 w-full mt-2 mb-2 sm:mb-3 sm:mt-3"
></div> ></div>
<div class="hidden sm:flex flex-wrap text-white pb-2"> <div class="hidden sm:flex flex-wrap pb-2">
<div class="mr-3 whitespace-nowrap"> <div class="mr-3 whitespace-nowrap">
{formatDate(optionHistoryList?.at(0)?.date)}: {formatDate(optionHistoryList?.at(0)?.date)}:
</div> </div>
@ -923,7 +931,7 @@
</div> </div>
</div> </div>
<div class="pb-8 sm:pb-2 rounded-md bg-default overflow-hidden"> <div class="pb-8 sm:pb-2 rounded-md overflow-hidden">
<div <div
class="flex flex-row items-center justify-between gap-x-2 ml-auto w-fit mt-2" class="flex flex-row items-center justify-between gap-x-2 ml-auto w-fit mt-2"
> >
@ -931,15 +939,15 @@
<label <label
on:click={() => (selectGraphType = item)} on:click={() => (selectGraphType = item)}
class="px-3 py-1.5 {selectGraphType === item class="px-3 py-1.5 {selectGraphType === item
? 'bg-white text-black ' ? 'shadow-sm bg-gray-100 dark:bg-white text-black '
: 'text-white bg-default text-opacity-[0.6] border border-gray-600'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer" : 'shadow-sm text-opacity-[0.6] border border-gray-300 dark:border-gray-600'} transition ease-out duration-100 sm:hover:bg-white sm:hover:text-black rounded-md cursor-pointer"
> >
{item} {item}
</label> </label>
{/each} {/each}
</div> </div>
<div <div
class="mt-2 border border-gray-800 rounded" class="mt-2 border border-gray-300 dark:border-gray-800 rounded"
use:highcharts={configContract} use:highcharts={configContract}
></div> ></div>
</div> </div>
@ -952,55 +960,45 @@
<div class="flex justify-start items-center m-auto cursor-normal"> <div class="flex justify-start items-center m-auto cursor-normal">
{#if isLoaded} {#if isLoaded}
<table <table
class="table table-pin-cols table-sm bg-table border border-gray-800 table-compact rounded-none sm:rounded-md w-full m-auto mt-4 overflow-x-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead class="bg-default"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<td class="text-white font-semibold text-sm text-start" <td class=" font-semibold text-sm text-start">Date</td>
>Date</td <td class=" font-semibold text-sm text-end">Vol</td>
> <td class=" font-semibold text-sm text-end">OI</td>
<td class="text-white font-semibold text-sm text-end">Vol</td> <td class=" font-semibold text-sm text-end">OI Change</td>
<td class="text-white font-semibold text-sm text-end">OI</td> <td class=" font-semibold text-sm text-end">% Change OI</td>
<td class="text-white font-semibold text-sm text-end" <td class=" font-semibold text-sm text-end">Last Price</td>
>OI Change</td <td class=" font-semibold text-sm text-end">Avg Price</td>
> <td class=" font-semibold text-sm text-end">IV</td>
<td class="text-white font-semibold text-sm text-end" <td class=" font-semibold text-sm text-end">Total Prem</td>
>% Change OI</td <td class=" font-semibold text-sm text-end">GEX</td>
> <td class=" font-semibold text-sm text-end">DEX</td>
<td class="text-white font-semibold text-sm text-end"
>Last Price</td
>
<td class="text-white font-semibold text-sm text-end"
>Avg Price</td
>
<td class="text-white font-semibold text-sm text-end">IV</td>
<td class="text-white font-semibold text-sm text-end"
>Total Prem</td
>
<td class="text-white font-semibold text-sm text-end">GEX</td>
<td class="text-white font-semibold text-sm text-end">DEX</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each optionHistoryList as item} {#each optionHistoryList as item}
<!-- row --> <!-- row -->
<tr class="odd:bg-odd border-b border-gray-800"> <tr
<td class="text-sm sm:text-[1rem] text-start text-white"> class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd"
>
<td class="text-sm sm:text-[1rem] text-start">
{formatDate(item?.date)} {formatDate(item?.date)}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{item?.volume !== null {item?.volume !== null
? item?.volume?.toLocaleString("en-US") ? item?.volume?.toLocaleString("en-US")
: 0} : 0}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{item?.open_interest !== undefined {item?.open_interest !== undefined
? item?.open_interest?.toLocaleString("en-US") ? item?.open_interest?.toLocaleString("en-US")
: "n/a"} : "n/a"}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{#if item?.changeOI >= 0 && item?.changeOI !== null} {#if item?.changeOI >= 0 && item?.changeOI !== null}
<span class="text-green-600 dark:text-[#00FC50]" <span class="text-green-600 dark:text-[#00FC50]"
>+{item?.changeOI?.toLocaleString("en-US")}</span >+{item?.changeOI?.toLocaleString("en-US")}</span
@ -1014,7 +1012,7 @@
{/if} {/if}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{#if item?.changesPercentageOI > 0 && item?.changesPercentageOI !== undefined} {#if item?.changesPercentageOI > 0 && item?.changesPercentageOI !== undefined}
<span class="text-green-600 dark:text-[#00FC50]" <span class="text-green-600 dark:text-[#00FC50]"
>+{item?.changesPercentageOI + "%"}</span >+{item?.changesPercentageOI + "%"}</span
@ -1030,32 +1028,28 @@
{/if} {/if}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{item?.close} {item?.close}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{item?.mark} {item?.mark}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{(item?.implied_volatility * 100)?.toLocaleString( {(item?.implied_volatility * 100)?.toLocaleString(
"en-US", "en-US",
) + "%"} ) + "%"}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{@html abbreviateNumberWithColor( {abbreviateNumber(item?.total_premium, false, true)}
item?.total_premium,
false,
true,
)}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{@html abbreviateNumberWithColor(item?.gex, false, true)} {abbreviateNumber(item?.gex, false, true)}
</td> </td>
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end">
{@html abbreviateNumberWithColor(item?.dex, false, true)} {abbreviateNumber(item?.dex, false, true)}
</td> </td>
</tr> </tr>
{/each} {/each}
@ -1077,7 +1071,7 @@
</div> </div>
{:else} {:else}
<div <div
class="mt-10 flex justify-center sm:justify-start items-center w-full text-white" class="mt-10 flex justify-center sm:justify-start items-center w-full"
> >
No historical data available yet for the given contract No historical data available yet for the given contract
</div> </div>

View File

@ -66,7 +66,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<th class=" font-semibold text-sm text-start">IPO Date</th> <th class=" font-semibold text-sm text-start">IPO Date</th>
<th class=" font-semibold text-sm text-start">Symbol</th> <th class=" font-semibold text-sm text-start">Symbol</th>

View File

@ -275,7 +275,7 @@
class="mt-5 table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="mt-5 table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<!-- head --> <!-- head -->
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<th <th
class="hidden lg:table-cell text-start text-sm font-semibold" class="hidden lg:table-cell text-start text-sm font-semibold"

View File

@ -106,7 +106,9 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead
class="text-muted dark:text-white dark:bg-default"
>
<tr class=""> <tr class="">
<th class=" text-start text-sm sm:font-semibold"> <th class=" text-start text-sm sm:font-semibold">
Person Person

View File

@ -416,7 +416,7 @@
class="table table-sm table-compact rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4" class="table table-sm table-compact rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<!-- head --> <!-- head -->
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<th class=" font-semibold text-sm">Symbol</th> <th class=" font-semibold text-sm">Symbol</th>
<th class=" font-semibold text-sm">Company</th> <th class=" font-semibold text-sm">Company</th>

View File

@ -176,7 +176,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<th class="text-start text-sm font-semibold"> <th class="text-start text-sm font-semibold">
Ex-Dividend Date Ex-Dividend Date

View File

@ -506,7 +506,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<td class="text-start text-sm font-semibold pr-10" <td class="text-start text-sm font-semibold pr-10"
>Year</td >Year</td

View File

@ -542,7 +542,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<td class="text-start text-sm font-semibold pr-10" <td class="text-start text-sm font-semibold pr-10"
>Year</td >Year</td

View File

@ -504,7 +504,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<td class="text-start text-sm font-semibold pr-10" <td class="text-start text-sm font-semibold pr-10"
>Year</td >Year</td

View File

@ -493,7 +493,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<td class="text-start text-sm font-semibold pr-10" <td class="text-start text-sm font-semibold pr-10"
>Year</td >Year</td

View File

@ -344,7 +344,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<td class=" font-semibold text-sm text-start">Analyst</td> <td class=" font-semibold text-sm text-start">Analyst</td>
<td class=" font-semibold text-sm text-start">Firm</td> <td class=" font-semibold text-sm text-start">Firm</td>

View File

@ -89,7 +89,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<th <th
class=" border-b border-gray-300 dark:border-gray-800 font-semibold text-sm sm:text-[1rem] text-start" class=" border-b border-gray-300 dark:border-gray-800 font-semibold text-sm sm:text-[1rem] text-start"
@ -167,7 +167,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<th <th
class="whitespace-nowrap dark:odd:bg-odd text-sm sm:text-[1rem] font-normal text-start border-b border-gray-300 dark:border-gray-800" class="whitespace-nowrap dark:odd:bg-odd text-sm sm:text-[1rem] font-normal text-start border-b border-gray-300 dark:border-gray-800"
@ -244,7 +244,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<th <th
class=" border-b border-gray-300 dark:border-gray-800 font-semibold text-sm sm:text-[1rem] text-start" class=" border-b border-gray-300 dark:border-gray-800 font-semibold text-sm sm:text-[1rem] text-start"

View File

@ -219,7 +219,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class="border-b border-gray-300 dark:border-gray-800"> <tr class="border-b border-gray-300 dark:border-gray-800">
<th class=" font-semibold text-start text-sm">Quarter</th> <th class=" font-semibold text-start text-sm">Quarter</th>
<th class=" font-semibold text-end text-sm">Value</th> <th class=" font-semibold text-end text-sm">Value</th>

View File

@ -353,7 +353,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-3" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-3"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr class=""> <tr class="">
<td class=" font-semibold text-sm text-start">Date</td> <td class=" font-semibold text-sm text-start">Date</td>
<td class=" font-semibold text-sm text-end">% Change</td> <td class=" font-semibold text-sm text-end">% Change</td>

View File

@ -13,9 +13,7 @@
description={`Analyze historical volume, open interest, and trends in option chains for ${$displayCompanyName} (${$stockTicker}). Discover actionable insights for trading decisions.`} description={`Analyze historical volume, open interest, and trends in option chains for ${$displayCompanyName} (${$stockTicker}). Discover actionable insights for trading decisions.`}
/> />
<section <section class="w-full overflow-hidden min-h-screen pb-40">
class="w-full bg-default overflow-hidden text-white min-h-screen pb-40"
>
<div class="w-full flex h-full overflow-hidden"> <div class="w-full flex h-full overflow-hidden">
<div <div
class="w-full relative flex justify-center items-center overflow-hidden" class="w-full relative flex justify-center items-center overflow-hidden"

View File

@ -14,9 +14,7 @@
description={`Analyze historical unusual option trades with a minimum of 1 million dollar premium for ${$displayCompanyName} (${$stockTicker}).`} description={`Analyze historical unusual option trades with a minimum of 1 million dollar premium for ${$displayCompanyName} (${$stockTicker}).`}
/> />
<section <section class="w-full overflow-hidden min-h-screen pb-40">
class="w-full bg-default overflow-hidden text-white min-h-screen pb-40"
>
<div class="w-full flex h-full overflow-hidden"> <div class="w-full flex h-full overflow-hidden">
<div <div
class="w-full relative flex justify-center items-center overflow-hidden" class="w-full relative flex justify-center items-center overflow-hidden"

View File

@ -715,7 +715,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<th class=" font-semibold text-start text-sm">Date</th> <th class=" font-semibold text-start text-sm">Date</th>
<th class=" font-semibold text-end text-sm">Market Cap</th <th class=" font-semibold text-end text-sm">Market Cap</th

View File

@ -418,7 +418,7 @@
<table <table
class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4" class="table table-sm table-compact no-scrollbar rounded-none sm:rounded-md w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800 m-auto mt-4"
> >
<thead class="text-muted dark:text-white"> <thead class="text-muted dark:text-white dark:bg-default">
<tr> <tr>
<th class=" font-semibold text-start text-sm" <th class=" font-semibold text-start text-sm"
>{activeIdx === 0 >{activeIdx === 0