diff --git a/src/lib/components/Table/Table.svelte b/src/lib/components/Table/Table.svelte index 97b049ac..75bf2c14 100644 --- a/src/lib/components/Table/Table.svelte +++ b/src/lib/components/Table/Table.svelte @@ -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" }, diff --git a/src/routes/list/+layout.svelte b/src/routes/list/+layout.svelte index c81a67eb..9f07c4d7 100644 --- a/src/routes/list/+layout.svelte +++ b/src/routes/list/+layout.svelte @@ -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]; diff --git a/src/routes/list/+page.svelte b/src/routes/list/+page.svelte index 50ef4a51..4096efca 100644 --- a/src/routes/list/+page.svelte +++ b/src/routes/list/+page.svelte @@ -226,6 +226,12 @@ > +
  • + Biggest Buybacks +
  • +
  • All REITs { + + 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(), + }; +}; diff --git a/src/routes/list/most-buybacks/+page.svelte b/src/routes/list/most-buybacks/+page.svelte new file mode 100644 index 00000000..acd9c618 --- /dev/null +++ b/src/routes/list/most-buybacks/+page.svelte @@ -0,0 +1,30 @@ + + + + +
    + + + + +