diff --git a/src/lib/components/BorrowedShare.svelte b/src/lib/components/BorrowedShare.svelte new file mode 100644 index 00000000..258abeba --- /dev/null +++ b/src/lib/components/BorrowedShare.svelte @@ -0,0 +1,394 @@ + + + + +
+
+ +
+ + +
+ + {#if data?.user?.tier === 'Pro'} + {#if isLoaded} + + {#if rawData?.length !== 0} + +
+
+ Over the past six months, Interactive Brokers had {abbreviateNumber(totalAvailableShares)} shares available for borrowing, with an average fee of {avgFee}%. +
+
+ +
+ + + +
+ +
+
+ +
+ +
+
+ + + + Available Shares + +
+
+ + + + Fee + +
+ +
+ + +

+ Latest Information +

+ + +
+ + + + + + + + + + + + + + + +
+ Date + + {formatDateRange(rawData?.slice(-1)?.at(0)?.date)} +
+ Fee Range + + {lowestFee+'%'+'-'+highestFee+'%'} +
+ Total Available Shares + + {abbreviateNumber(monthlyAvailableShares)} +
+
+ + + + {/if} + + {:else} +
+
+ +
+
+ {/if} + + {:else} +
+ + Unlock content with Pro Subscription +
+ {/if} + +
+
+ + + + + \ No newline at end of file diff --git a/src/lib/components/FailToDeliver.svelte b/src/lib/components/FailToDeliver.svelte index 88393440..c0d97676 100644 --- a/src/lib/components/FailToDeliver.svelte +++ b/src/lib/components/FailToDeliver.svelte @@ -331,7 +331,7 @@ function findLowestAndHighestPrice(data, lastDateStr) { Price Range - $({lowestPrice+'-'+highestPrice}) + {'$'+lowestPrice+'-'+'$'+highestPrice} diff --git a/src/lib/store.ts b/src/lib/store.ts index b9715c4d..ada83bae 100644 --- a/src/lib/store.ts +++ b/src/lib/store.ts @@ -74,6 +74,7 @@ export const marketMakerComponent = writable((false)); export const optionComponent = writable((false)); export const clinicalTrialComponent = writable((false)); export const failToDeliverComponent= writable((false)); +export const borrowedShareComponent= writable((false)); export const strategyId = writable( ("")); diff --git a/src/routes/stocks/[tickerID]/+page.svelte b/src/routes/stocks/[tickerID]/+page.svelte index 8bd3e397..ef07de29 100644 --- a/src/routes/stocks/[tickerID]/+page.svelte +++ b/src/routes/stocks/[tickerID]/+page.svelte @@ -3,7 +3,7 @@ import {AreaSeries, Chart, PriceLine, CandlestickSeries} from 'svelte-lightweight-charts'; import { TrackingModeExitMode } from 'lightweight-charts'; - import {getCache, setCache, clinicalTrialComponent, optionComponent, failToDeliverComponent, marketMakerComponent, analystEstimateComponent, sentimentComponent, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, varComponent, shareStatisticsComponent, enterpriseComponent, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, userRegion, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; + import {getCache, setCache, borrowedShareComponent, clinicalTrialComponent, optionComponent, failToDeliverComponent, marketMakerComponent, analystEstimateComponent, sentimentComponent, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, varComponent, shareStatisticsComponent, enterpriseComponent, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, userRegion, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; import { onDestroy, onMount } from 'svelte'; import BullBearSay from '$lib/components/BullBearSay.svelte'; import CommunitySentiment from '$lib/components/CommunitySentiment.svelte'; @@ -1341,6 +1341,14 @@ function changeChartType() { {/await} + + +
+ {#await import('$lib/components/BorrowedShare.svelte') then {default: Comp}} + + {/await} +
+