From 45841bfe7e6883cacacdaa537e56628251a7e6a6 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 1 Jan 2025 16:16:44 +0100 Subject: [PATCH] bugfixing --- .../options/hottest-contracts/+page.svelte | 295 ++++++------------ 1 file changed, 90 insertions(+), 205 deletions(-) diff --git a/src/routes/stocks/[tickerID]/options/hottest-contracts/+page.svelte b/src/routes/stocks/[tickerID]/options/hottest-contracts/+page.svelte index 7ab9bab3..db74b7b5 100644 --- a/src/routes/stocks/[tickerID]/options/hottest-contracts/+page.svelte +++ b/src/routes/stocks/[tickerID]/options/hottest-contracts/+page.svelte @@ -1,12 +1,14 @@
- {#if volumeList?.length > 0} + {#if rawData?.length > 0}

- Hottest Contracts (Highest Volume) + Hottest Contracts (Highest OI)

- - - - - - - - - - - - - - - {#each volumeList as item, index} - - - - - - - - - - - - {/each} - -
ChainLastLow-HighVolumeOIOI ChangeBid/Ask VolTotal Prem
- {item?.strike_price} - - {item?.option_type === "C" ? "Call" : "Put"} - - {" " + - item?.date_expiration + - " " + - `(${daysLeft(item?.date_expiration)})`} - - {item?.last_price} - - {item?.low_price}-{item?.high_price} - - {item?.volume?.toLocaleString("en-US")} - - {item?.open_interest?.toLocaleString("en-US")} - - {#if item?.open_interest_change >= 0} - +{item?.open_interest_change?.toLocaleString( - "en-US", - )} - {:else} - {item?.open_interest_change?.toLocaleString( - "en-US", - )} - {/if} - - - -
- -
- -
- - -
- - -
-
-
-
- -
-
-
- Bid Vol: {@html abbreviateNumberWithColor( - item?.bid_volume, - false, - true, - )} -
-
- Mid Vol: {@html abbreviateNumberWithColor( - item?.mid_volume, - false, - true, - )} -
-
- Ask Vol: {@html abbreviateNumberWithColor( - item?.ask_volume, - false, - true, - )} -
-
-
-
-
-
- {@html abbreviateNumberWithColor( - item?.total_premium, - false, - true, - )} -
-
-

- Highest OI Contracts -

-
- - - - - - - - - - - - - + + {#each openInterestList as item, index} @@ -386,6 +270,7 @@
ChainLastLow-HighVolumeOIOI ChangeBid/Ask VolTotal Prem
+
{:else}