Package 'tensorust'

Title: Client for the 'Tensorust' Private Credit and Exposure Data API
Description: Retrieves data from the 'Tensorust' web API <https://shop.tensorust.com> as 'tibbles': the fair value marks that business development companies ('BDCs') report for the same private first-lien loan in their US Securities and Exchange Commission filings, the loans those lenders disagree on most, third-quarter markdowns as each filing posts, federal research awards whose papers name a vendor on a US banned-vendor list, and a catalog of entity-level datasets with free samples. Every endpoint answers a free preview without a key; a key set in the 'TENSORUST_API_KEY' environment variable returns full rows.
Authors: Matthew Busel [aut, cre], Tensorust LLC [cph, fnd]
Maintainer: Matthew Busel <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-11-16 03:53:06 UTC
Source: https://github.com/Mattbusel/tensorust-r

Help Index


Does the 'Tensorust' API answer?

Description

Sends one small request (the first catalog entry) with a short timeout. Never errors, so it is safe to use in ⁠if ()⁠ guards.

Usage

tr_api_available(timeout = 5)

Arguments

timeout

Seconds to wait for the answer.

Value

TRUE when the API answered with HTTP 200, otherwise FALSE.

Examples

tr_api_available()

Loans BDC lenders disagree on most

Description

Companies whose first-lien loan two or more BDC managers mark 10 or more points of par apart in the same quarter, widest gap first. Without a key the top 10 are returned.

Usage

tr_credit_disagreements()

Value

A tibble: company, gap_points (highest minus lowest mark, in points of par), lowest_mark_pct_of_par, lowest_manager, highest_mark_pct_of_par, highest_manager, loan_par_usd, funds (BDC funds holding the loan) and as_of (the 10-Q period end).

See Also

tr_lender_marks() for every fund's mark on one company.

Examples

gaps <- tr_credit_disagreements()
gaps[, c("company", "gap_points", "lowest_manager", "highest_manager")]

List the 'Tensorust' dataset catalog

Description

Reads the catalog of entity-level datasets (money owed, at risk, mispriced or about to expire, organization by organization), one row per dataset. The catalog is public and needs no key.

Usage

tr_datasets(max = Inf)

Arguments

max

Largest number of datasets to return. The default returns the whole catalog (about 145 datasets, read 50 at a time).

Value

A tibble with columns slug (the id used by tr_sample()), name, line (one-line description), category, rows (rows in the full file, when published), tiers (license tiers and prices, joined with "; "), page, sample_csv (the free sample link, NA when there is none yet) and buy_url.

See Also

tr_sample() to read a dataset's free sample.

Examples

catalog <- tr_datasets(max = 10)
catalog[, c("slug", "name", "category")]

Federal research awards exposed to banned vendors

Description

Federal research awards whose 2025-26 papers name a vendor on a US banned-vendor list: the Department of Defense 1260H list of Chinese military companies, the BIOSECURE list, the UFLPA entity list, Section 889 and the FCC Covered List. Ask either for one institution's awards or for the largest awards on one list.

Usage

tr_exposure(institution = NULL, list = NULL, limit = 50)

Arguments

institution

An institution name, for example "Stanford University". Without a key the 5 largest awards are returned; with a key every award, with the methods sentence that names the vendor and the paper it comes from.

list

A banned-vendor list: one of "1260H", "BIOSECURE", "UFLPA", "SEC889" or "FCC_COVERED". Returns the largest awards on that list. Give either institution or list, not both.

limit

Largest number of awards for a list search (1 to 50).

Value

A tibble with one row per award: award (the award number), recipient, recipient_uei, state, agency, title, fy25_obligations, fy26_amount, project_end, vendors, lists, rule_status, attribution (likely_paid, narrow or broad), in_force_or_no_grace, papers, latest_paper, evidence and evidence_paper. For a list search the totals across all matching awards are kept in attr(x, "summary").

Examples

stanford <- tr_exposure(institution = "Stanford University")
stanford[, c("award", "agency", "vendors", "lists")]

on_1260h <- tr_exposure(list = "1260H", limit = 5)
attr(on_1260h, "summary")$awards

Is a 'Tensorust' key set?

Description

Reports whether the TENSORUST_API_KEY environment variable holds a key. Without one, every function returns the free preview rows.

Usage

tr_has_key()

Value

TRUE or FALSE.

Examples

tr_has_key()

What each BDC lender marks a company's loan at

Description

Business development companies (BDCs) report a fair value for every private loan they hold in their quarterly SEC filings. When several BDCs lend to the same company, their marks for the same first-lien loan can differ by tens of points. This returns every fund's mark for the companies you name.

Usage

tr_lender_marks(company)

Arguments

company

One or more company names, as the BDC schedules spell them or close to it (for example "Pluralsight").

Value

A tibble with one row per company and fund: query (the name you asked for), company, fund, manager, mark_pct_of_par (latest 10-Q fair value as a percent of par), prior_mark_pct_of_par, sep30_mark_pct_of_par (once filed), par_usd, filing (link to the SEC filing) and as_of. The prior mark, par and filing link need a key.

See Also

tr_credit_disagreements() for the loans lenders disagree on most.

Examples

tr_lender_marks("Pluralsight")

Third-quarter 2026 markdowns as BDCs file

Description

BDC funds that cut a first-lien mark by 5 or more points of par from June 30 to September 30 2026, read from each third-quarter 10-Q as it posts on EDGAR, largest cut first. holders_not_filed_yet_above counts the other holders of the same loan that have not filed yet and still carry it 5 or more points higher. Without a key the top 10 are returned.

Usage

tr_q3_cuts()

Value

A tibble: company, fund, manager, jun30_pct_of_par, sep30_pct_of_par, change_points, par_usd, filed and holders_not_filed_yet_above.

Examples

cuts <- tr_q3_cuts()
cuts[, c("company", "manager", "change_points", "filed")]

Read a dataset's free sample

Description

Downloads the free sample (usually 25 rows) of one catalog dataset. Columns differ from dataset to dataset; tr_datasets() shows which datasets have a sample (sample_csv is not NA).

Usage

tr_sample(slug)

Arguments

slug

The dataset id, the slug column of tr_datasets(), for example "afida-foreign-farmland".

Value

A tibble with the sample rows, columns as published.

See Also

tr_datasets().

Examples

farmland <- tr_sample("afida-foreign-farmland")
farmland[, 1:4]