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 @@ $: {
| Time | Date | -Expiry | -Strike | -C/P | -Sent. | -Spot | -Price | -Prem. | -Type | -Vol. | -OI | +% Change | +P/C | +Bear/Bull | +Total Volume | +Total OI | +Total 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)} - | - - +