add new list
This commit is contained in:
parent
a00b3a04ad
commit
cc588d559c
@ -112,6 +112,7 @@
|
||||
{ name: "Piotroski F-Score", rule: "piotroskiScore", type: "float" },
|
||||
{ name: "Total Liabilities", rule: "totalLiabilities", type: "int" },
|
||||
{ name: "RSI", rule: "rsi", type: "float" },
|
||||
{ name: "Stock Buybacks", rule: "commonStockRepurchased", type: "int" },
|
||||
{ name: "Short Ratio", rule: "shortRatio", type: "int" },
|
||||
{ name: "Short Interest", rule: "sharesShort", type: "int" },
|
||||
{ name: "Short % Float", rule: "shortFloatPercent", type: "percent" },
|
||||
|
||||
@ -281,6 +281,10 @@
|
||||
title: "Biggest Online Gambling Stocks",
|
||||
link: "/list/online-gambling",
|
||||
},
|
||||
{
|
||||
title: "Biggest U.S. Companies with Highest Buybacks",
|
||||
link: "/list/most-buybacks",
|
||||
},
|
||||
];
|
||||
|
||||
navigation = [...navigationIndustry, ...navigation];
|
||||
|
||||
@ -226,6 +226,12 @@
|
||||
>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="text-blue-400 sm:hover:text-white" href="/list/most-buybacks/"
|
||||
>Biggest Buybacks</a
|
||||
>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="text-blue-400 sm:hover:text-white" href="/list/reit-stocks"
|
||||
>All REITs</a
|
||||
|
||||
26
src/routes/list/most-buybacks/+page.server.ts
Normal file
26
src/routes/list/most-buybacks/+page.server.ts
Normal file
@ -0,0 +1,26 @@
|
||||
export const load = async ({ locals, setHeaders }) => {
|
||||
|
||||
const getData = async () => {
|
||||
const { apiKey, apiURL } = locals;
|
||||
const postData = { filterList: 'most-buybacks' };
|
||||
|
||||
const response = await fetch(apiURL + "/list-category", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-API-KEY": apiKey,
|
||||
},
|
||||
body: JSON.stringify(postData),
|
||||
});
|
||||
|
||||
const output = await response.json();
|
||||
setHeaders({ "cache-control": "public, max-age=60*5" });
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
// Make sure to return a promise
|
||||
return {
|
||||
getData: await getData(),
|
||||
};
|
||||
};
|
||||
30
src/routes/list/most-buybacks/+page.svelte
Normal file
30
src/routes/list/most-buybacks/+page.svelte
Normal file
@ -0,0 +1,30 @@
|
||||
<script lang="ts">
|
||||
import Table from "$lib/components/Table/Table.svelte";
|
||||
import Infobox from "$lib/components/Infobox.svelte";
|
||||
import SEO from "$lib/components/SEO.svelte";
|
||||
|
||||
export let data;
|
||||
|
||||
const defaultList = [
|
||||
{ name: "Buybacks", rule: "commonStockRepurchased" },
|
||||
{ name: "Price", rule: "price" },
|
||||
{ name: "% Change", rule: "changesPercentage" },
|
||||
{ name: "Market Cap", rule: "marketCap" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<SEO
|
||||
title={"Top 100 U.S. Companies with Highest Buybacks"}
|
||||
description={"A list of the biggest U.S. companies ranked by the highest buybacks"}
|
||||
/>
|
||||
|
||||
<section class="w-full overflow-hidden m-auto">
|
||||
<Infobox
|
||||
text="These are the biggest U.S. companies ranked by the highest repurchasing common stock also known as buybacks.
|
||||
These are companies based in the United States of
|
||||
America and listed on the stock market."
|
||||
/>
|
||||
|
||||
<!-- Page wrapper -->
|
||||
<Table {data} rawData={data?.getData} {defaultList} />
|
||||
</section>
|
||||
Loading…
x
Reference in New Issue
Block a user