diff --git a/src/routes/etf/[tickerID]/options/+page.svelte b/src/routes/etf/[tickerID]/options/+page.svelte index abd21d82..78172af2 100644 --- a/src/routes/etf/[tickerID]/options/+page.svelte +++ b/src/routes/etf/[tickerID]/options/+page.svelte @@ -23,7 +23,7 @@ let displayData = 'volume'; let options; let optionsGEX; - let rawData = data?.getOptionsFlowData + let rawData = data?.getOptionsChain let optionList = rawData?.slice(0,30); let flowSentiment = 'n/a'; let callPercentage; @@ -436,7 +436,6 @@ function processPlotData(filteredList: any[]) { onMount(async () => { - calculateStats(); if(data?.getOptionsGexData?.length !== 0) { optionsGEX = getGEXPlot(); } @@ -624,144 +623,13 @@ $: {

- Latest Options Activity + Historical Options Chain

{#if optionList?.length !== 0} - - -
-
- -
-
- Flow Sentiment - {flowSentiment} -
- -
- - -
-
- Put/Call - - {latestPutCallRatio?.toFixed(3)} - -
- -
- - - - - - =1 ? 0 : 100-(latestPutCallRatio*100)?.toFixed(2)}> - - - -
- {latestPutCallRatio?.toFixed(2)} -
-
- - -
- - -
-
- Call Flow - - {new Intl.NumberFormat("en", { - minimumFractionDigits: 0, - maximumFractionDigits: 0 - }).format(displayCallVolume)} - -
- -
- - - - - - - - - -
- {callPercentage}% -
-
- -
- - -
-
- Put Flow - - {new Intl.NumberFormat("en", { - minimumFractionDigits: 0, - maximumFractionDigits: 0 - }).format(displayPutVolume)} - -
- -
- - - - - - - - - -
- {putPercentage}% -
-
- - -
- - - -
-
- OTM Ratio - - Volume in % - -
- -
- - - - - - =1 ? 0 : 100-(displayOTMRatio*100)?.toFixed(2)}> - - - -
- {(displayOTMRatio*100)?.toFixed(0)}% -
-
- - -
- - - -
-
- + @@ -772,82 +640,82 @@ $: { - - - - - - - - - - - + + + + + + {#each (data?.user?.tier === 'Pro' ? optionList : optionList?.slice(0,3)) as item, index} - - - + - + + - + - - - - - - - - - - - - + @@ -858,6 +726,7 @@ $: {
Time DateExpiryStrikeC/PSent.SpotPricePrem.TypeVol.OI% ChangeP/CBear/BullTotal VolumeTotal OITotal Prem
- {formatTime(item?.time)} - {formatDate(item?.date)} - {item?.dte < 0 ? 'expired' : item?.dte +'d'} + {#if item?.changesPercentage >=0} + +{item?.changesPercentage >= 1000 ? abbreviateNumber(item?.changesPercentage) : item?.changesPercentage?.toFixed(2)}% + {:else} + {item?.changesPercentage <= -1000 ? abbreviateNumber(item?.changesPercentage) : item?.changesPercentage?.toFixed(2)}% + {/if} - {item?.strike_price} + {(item?.p_vol/item?.c_vol)?.toFixed(2)} - {item?.put_call} - + {#if item?.bear_ratio > (item?.neutral_ratio ?? 0) && item?.bear_ratio > (item?.bull_ratio ?? 0)} +
+ {item?.bear_ratio?.toFixed(0)}% Bearish +
+ {:else if item?.bull_ratio > (item?.neutral_ratio ?? 0) && item?.bull_ratio > (item?.bear_ratio ?? 0)} +
+ {item?.bull_ratio?.toFixed(0)}% Bullish +
+ {:else if item?.neutral_ratio > (item?.bull_ratio ?? 0) && item?.neutral_ratio > (item?.bear_ratio ?? 0)} +
+ {item?.neutral_ratio?.toFixed(0)}% Neutral +
+ {:else if item?.bear_ratio === item?.bull_ratio && item?.bear_ratio > (item?.neutral_ratio ?? 0)} +
+ {item?.bear_ratio?.toFixed(0)}% Bear/Bull Tie +
+ {:else if item?.bear_ratio === item?.neutral_ratio && item?.bear_ratio > (item?.bull_ratio ?? 0)} +
+ {item?.bear_ratio?.toFixed(0)}% Bear/Neutral Tie +
+ {:else if item?.bull_ratio === item?.neutral_ratio && item?.bull_ratio > (item?.bear_ratio ?? 0)} +
+ {item?.bull_ratio?.toFixed(0)}% Bull/Neutral Tie +
+ {:else} +
+ Equal Distribution +
+ {/if} +
- {item?.sentiment} + + {abbreviateNumber(item?.total_volume)} - {item?.underlying_price} + {abbreviateNumber(item?.total_oi)} - {item?.price} + {abbreviateNumber(item?.total_bull_prem+item?.total_bear_prem+item?.total_neutral_prem,true)} - {abbreviateNumber(item?.cost_basis)} - - {item?.type} - - {new Intl.NumberFormat("en", { - minimumFractionDigits: 0, - maximumFractionDigits: 0 - }).format(item?.volume)} - - {new Intl.NumberFormat("en", { - minimumFractionDigits: 0, - maximumFractionDigits: 0 - }).format(item?.open_interest)} -
+ @@ -887,7 +756,6 @@ $: { -