diff --git a/src/routes/options-flow/+page.svelte b/src/routes/options-flow/+page.svelte index 4e13dc77..bcb671b2 100644 --- a/src/routes/options-flow/+page.svelte +++ b/src/routes/options-flow/+page.svelte @@ -13,7 +13,24 @@ export let data; - let ruleOfList = []; + let ruleOfList = [ + { + "name": "underlying_type", + "value": "any" + }, + { + "name": "put_call", + "value": "any" + }, + { + "name": "date_expiration", + "value": "any" + }, + { + "name": "execution_estimate", + "value": "any" + }]; + let displayRules = []; let filterQuery = ''; @@ -30,7 +47,7 @@ const allRules = { cost_basis: { label: 'Premium', step: ['10M','5M','1M','500K','100K','50K','10K','5K'], defaultCondition: 'over', defaultValue: '50K' }, put_call: { label: 'Contract Type', step: ["Calls", "Puts"], defaultValue: 'any' }, sentiment: { label: 'Sentiment', step: ["Bullish","Neutral", "Bearish"], defaultValue: 'any' }, - execution_estimate: { label: 'Execution', step: ["At Ask","At Bid", "Below Ask", "Below Bid"], defaultValue: 'any' }, + execution_estimate: { label: 'Execution', step: ["At Ask","At Bid", "At Midpoint", "Below Ask", "Below Bid",], defaultValue: 'any' }, option_activity_type: { label: 'Option Type', step: ["Sweep","Trade"], defaultValue: 'any' }, date_expiration: { label: 'Date Expiration', step: ["Same Day", "1 day","1 Week","2 Weeks","1 Month","3 Months","6 Months","1 Year","3 Years"], defaultValue: 'any' }, underlying_type: { label: 'Asset Type', step: ["Stock", "ETF"], defaultValue: 'any' }, @@ -422,6 +439,10 @@ function daysLeft(targetDate) { onMount(async () => { + + displayRules = allRows?.filter(row => ruleOfList?.some(rule => rule?.name === row?.rule)); + + audio = new Audio(notifySound); rawData = data?.getOptionsFlowFeed; rawData?.forEach((item) => { @@ -1081,6 +1102,7 @@ $: {