tn-financial-data 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/cli.js +50 -3
- package/dist/client/index.d.ts +29 -1
- package/dist/client/index.js +5 -0
- package/package.json +1 -1
- package/skills/tn-financial-data/SKILL.md +13 -2
- package/skills/tn-financial-data/agents/claude.md +1 -1
- package/skills/tn-financial-data/agents/openai.yaml +1 -1
- package/skills/tn-financial-data/agents/opencode.md +1 -1
- package/skills/tn-financial-data/references/cli.md +54 -0
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ This package is the hosted agent-facing surface only. The repo's website, local
|
|
|
37
37
|
npm install -g tn-financial-data
|
|
38
38
|
|
|
39
39
|
export TN_FINANCIAL_DATA_API_KEY=<your-api-key>
|
|
40
|
-
tn-financial-data query
|
|
40
|
+
tn-financial-data query resolve-ticker --query google
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Live reads accept:
|
|
@@ -51,6 +51,8 @@ Optional base URL override:
|
|
|
51
51
|
- `TN_FINANCIAL_DATA_API_BASE_URL`
|
|
52
52
|
|
|
53
53
|
The published CLI reads those values from the current process environment only.
|
|
54
|
+
Use `resolve-ticker` to map company or brand input to supported symbols.
|
|
55
|
+
Treat `available-tickers` as the authoritative support list for exact symbols; do not silently swap an unsupported exact ticker to a different share class.
|
|
54
56
|
|
|
55
57
|
Production default:
|
|
56
58
|
|
|
@@ -61,6 +63,7 @@ https://api.truenorth-financial.ai/v1
|
|
|
61
63
|
## Quick Start
|
|
62
64
|
|
|
63
65
|
```bash
|
|
66
|
+
tn-financial-data query resolve-ticker --query google
|
|
64
67
|
tn-financial-data query available-tickers
|
|
65
68
|
tn-financial-data query company --ticker AAPL
|
|
66
69
|
tn-financial-data query filings --ticker AAPL --filing-type 8-K --limit 5
|
|
@@ -169,8 +172,11 @@ const client = new TnFinancialData({
|
|
|
169
172
|
apiKey: process.env.TN_FINANCIAL_DATA_API_KEY!,
|
|
170
173
|
});
|
|
171
174
|
|
|
175
|
+
const resolution = await client.resolveTicker("google");
|
|
176
|
+
console.log(resolution.status, resolution.resolved_ticker);
|
|
177
|
+
|
|
172
178
|
const filings = await client.getFilings("AAPL", {
|
|
173
|
-
|
|
179
|
+
filingTypes: ["8-K"],
|
|
174
180
|
limit: 3,
|
|
175
181
|
});
|
|
176
182
|
|
|
@@ -179,7 +185,7 @@ console.log(filings.filings[0]?.accession_number);
|
|
|
179
185
|
const filingItems = await client.getFilingItems("AAPL", {
|
|
180
186
|
accessionNumber: "0000320193-26-000005",
|
|
181
187
|
filingType: "8-K",
|
|
182
|
-
|
|
188
|
+
items: ["2.02"],
|
|
183
189
|
includeExhibits: true,
|
|
184
190
|
});
|
|
185
191
|
|
package/dist/cli.js
CHANGED
|
@@ -230,6 +230,11 @@ var TnFinancialData = class {
|
|
|
230
230
|
async getAvailableTickers() {
|
|
231
231
|
return this.request("/financials/income-statements/tickers");
|
|
232
232
|
}
|
|
233
|
+
async resolveTicker(query) {
|
|
234
|
+
return this.request(
|
|
235
|
+
`/tickers/resolve?${new URLSearchParams({ q: query })}`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
233
238
|
async getPrices(ticker, opts) {
|
|
234
239
|
const params = new URLSearchParams({
|
|
235
240
|
ticker,
|
|
@@ -568,13 +573,14 @@ function rootHelp() {
|
|
|
568
573
|
"tn-financial-data",
|
|
569
574
|
"",
|
|
570
575
|
"Usage:",
|
|
571
|
-
" tn-financial-data query <available-tickers|company|filings|filing-items|general-overview|financials|financial-metrics|financial-metrics-snapshot|earnings|quarterly-highlights|analyst-estimates|prices|snapshot|news|insider-trades|institutional-ownership|investor-portfolio|global-rates|segmented-revenues|screen|screen-fields> [options]",
|
|
576
|
+
" tn-financial-data query <available-tickers|resolve-ticker|company|filings|filing-items|general-overview|financials|financial-metrics|financial-metrics-snapshot|earnings|quarterly-highlights|analyst-estimates|prices|snapshot|news|insider-trades|institutional-ownership|investor-portfolio|global-rates|segmented-revenues|screen|screen-fields> [options]",
|
|
572
577
|
" tn-financial-data skill <install|print|targets> [--tool claude|opencode]",
|
|
573
578
|
" tn-financial-data describe opencli",
|
|
574
579
|
" tn-financial-data --version",
|
|
575
580
|
"",
|
|
576
581
|
"Examples:",
|
|
577
582
|
" tn-financial-data query available-tickers",
|
|
583
|
+
' tn-financial-data query resolve-ticker --query "google"',
|
|
578
584
|
" tn-financial-data query financials --ticker AAPL --period annual --statement all",
|
|
579
585
|
" tn-financial-data query filings --ticker AAPL --filing-type 8-K --limit 10",
|
|
580
586
|
" tn-financial-data query filing-items --ticker AAPL --accession-number 0000320193-26-000005 --full-text",
|
|
@@ -608,6 +614,7 @@ function queryHelp() {
|
|
|
608
614
|
return [
|
|
609
615
|
"Usage:",
|
|
610
616
|
" tn-financial-data query available-tickers [--api-key <key>] [--base-url <url>]",
|
|
617
|
+
" tn-financial-data query resolve-ticker --query <text> [--api-key <key>] [--base-url <url>]",
|
|
611
618
|
" tn-financial-data query company --ticker <symbol> [--api-key <key>] [--base-url <url>]",
|
|
612
619
|
" tn-financial-data query filings --ticker <symbol> [--filing-type <csv>] [--start-date <date>] [--end-date <date>] [--limit <n>] [--api-key <key>] [--base-url <url>]",
|
|
613
620
|
" tn-financial-data query filing-items --ticker <symbol> --accession-number <accession> [--filing-type <10-K|10-Q|8-K>] [--item <csv>] [--full-text] [--include-exhibits] [--api-key <key>] [--base-url <url>]",
|
|
@@ -728,6 +735,7 @@ function buildOpenCliDocument() {
|
|
|
728
735
|
],
|
|
729
736
|
examples: [
|
|
730
737
|
"tn-financial-data query available-tickers",
|
|
738
|
+
'tn-financial-data query resolve-ticker --query "google"',
|
|
731
739
|
"tn-financial-data query filings --ticker AAPL --filing-type 8-K --limit 10",
|
|
732
740
|
"tn-financial-data query filing-items --ticker AAPL --accession-number 0000320193-26-000005 --full-text",
|
|
733
741
|
"tn-financial-data query general-overview --ticker AAPL --period quarterly --financial-limit 4 --news-limit 5",
|
|
@@ -785,6 +793,24 @@ function buildOpenCliDocument() {
|
|
|
785
793
|
name: "available-tickers",
|
|
786
794
|
description: "Fetch the current supported ticker snapshot with financial and news freshness timestamps."
|
|
787
795
|
},
|
|
796
|
+
{
|
|
797
|
+
name: "resolve-ticker",
|
|
798
|
+
description: "Resolve a company keyword or exact symbol against the supported ticker universe without silently swapping share classes.",
|
|
799
|
+
options: [
|
|
800
|
+
{
|
|
801
|
+
name: "query",
|
|
802
|
+
required: true,
|
|
803
|
+
arguments: [
|
|
804
|
+
{
|
|
805
|
+
name: "text",
|
|
806
|
+
required: true,
|
|
807
|
+
description: "Company name, brand, prompt fragment, or ticker text."
|
|
808
|
+
}
|
|
809
|
+
],
|
|
810
|
+
description: "Query text to resolve."
|
|
811
|
+
}
|
|
812
|
+
]
|
|
813
|
+
},
|
|
788
814
|
{
|
|
789
815
|
name: "company",
|
|
790
816
|
description: "Fetch company facts for a single ticker.",
|
|
@@ -827,12 +853,16 @@ function buildOpenCliDocument() {
|
|
|
827
853
|
},
|
|
828
854
|
{
|
|
829
855
|
name: "start-date",
|
|
830
|
-
arguments: [
|
|
856
|
+
arguments: [
|
|
857
|
+
{ name: "date", required: true, description: "Inclusive lower bound." }
|
|
858
|
+
],
|
|
831
859
|
description: "Optional inclusive filing-date lower bound."
|
|
832
860
|
},
|
|
833
861
|
{
|
|
834
862
|
name: "end-date",
|
|
835
|
-
arguments: [
|
|
863
|
+
arguments: [
|
|
864
|
+
{ name: "date", required: true, description: "Inclusive upper bound." }
|
|
865
|
+
],
|
|
836
866
|
description: "Optional inclusive filing-date upper bound."
|
|
837
867
|
},
|
|
838
868
|
{
|
|
@@ -1671,6 +1701,18 @@ var QUERY_SUBCOMMAND_HELP = {
|
|
|
1671
1701
|
],
|
|
1672
1702
|
"tn-financial-data query available-tickers"
|
|
1673
1703
|
),
|
|
1704
|
+
"resolve-ticker": renderHelp(
|
|
1705
|
+
"resolve-ticker",
|
|
1706
|
+
[
|
|
1707
|
+
"Resolve a company keyword or exact symbol against the supported ticker universe without silently swapping share classes."
|
|
1708
|
+
],
|
|
1709
|
+
[
|
|
1710
|
+
"--query <text> Required. Company name, brand, prompt fragment, or ticker text.",
|
|
1711
|
+
"--api-key <key> API key. Overrides TN_FINANCIAL_DATA_API_KEY.",
|
|
1712
|
+
"--base-url <url> API base URL override."
|
|
1713
|
+
],
|
|
1714
|
+
'tn-financial-data query resolve-ticker --query "google"'
|
|
1715
|
+
),
|
|
1674
1716
|
company: renderHelp(
|
|
1675
1717
|
"company",
|
|
1676
1718
|
["Fetch the basic company identity record for a single ticker."],
|
|
@@ -2060,6 +2102,11 @@ async function handleQuery(parsed, runtime, deps) {
|
|
|
2060
2102
|
case "available-tickers":
|
|
2061
2103
|
printJson(runtime, await client.getAvailableTickers());
|
|
2062
2104
|
return 0;
|
|
2105
|
+
case "resolve-ticker": {
|
|
2106
|
+
const query = requireOption(parsed, "query");
|
|
2107
|
+
printJson(runtime, await client.resolveTicker(query));
|
|
2108
|
+
return 0;
|
|
2109
|
+
}
|
|
2063
2110
|
case "company": {
|
|
2064
2111
|
const ticker = requireOption(parsed, "ticker");
|
|
2065
2112
|
printJson(runtime, await client.getCompanyFacts(ticker));
|
package/dist/client/index.d.ts
CHANGED
|
@@ -498,6 +498,33 @@ interface AvailableTickersResponse {
|
|
|
498
498
|
as_of: string | null;
|
|
499
499
|
tickers: AvailableTicker[];
|
|
500
500
|
}
|
|
501
|
+
type TickerResolutionStatus = "exact_supported" | "resolved" | "ambiguous" | "exact_unsupported" | "none";
|
|
502
|
+
type TickerResolutionIntent = "ticker" | "keyword";
|
|
503
|
+
type TickerResolutionMatchKind = "ticker_exact" | "ticker_format" | "alias_exact" | "company_name" | "company_prefix" | "company_tokens";
|
|
504
|
+
type TickerResolutionRelationship = "supported" | "format_alias" | "brand_alias" | "deprecated_symbol" | "same_issuer_other_share_class";
|
|
505
|
+
type TickerResolutionConfidence = "high" | "medium" | "low";
|
|
506
|
+
interface TickerResolutionCandidate {
|
|
507
|
+
ticker: string;
|
|
508
|
+
name: string;
|
|
509
|
+
financials_updated_at: string | null;
|
|
510
|
+
news_updated_at: string | null;
|
|
511
|
+
updated_at: string;
|
|
512
|
+
match_kind: TickerResolutionMatchKind;
|
|
513
|
+
relationship: TickerResolutionRelationship;
|
|
514
|
+
confidence: TickerResolutionConfidence;
|
|
515
|
+
matched_alias: string | null;
|
|
516
|
+
}
|
|
517
|
+
interface TickerResolutionResponse {
|
|
518
|
+
query: string;
|
|
519
|
+
normalized_query: string;
|
|
520
|
+
intent: TickerResolutionIntent;
|
|
521
|
+
as_of: string | null;
|
|
522
|
+
extracted_query?: string;
|
|
523
|
+
status: TickerResolutionStatus;
|
|
524
|
+
resolved_ticker: string | null;
|
|
525
|
+
resolved_name: string | null;
|
|
526
|
+
candidates: TickerResolutionCandidate[];
|
|
527
|
+
}
|
|
501
528
|
interface PriceHistoryResponse extends ReadMetadata {
|
|
502
529
|
interval: PriceInterval;
|
|
503
530
|
prices: PriceBar[];
|
|
@@ -812,6 +839,7 @@ declare class TnFinancialData {
|
|
|
812
839
|
getGeneralOverview(ticker: string, opts?: GeneralOverviewOpts): Promise<ApiResponse<GeneralOverviewResponse>>;
|
|
813
840
|
getKeyStatistics(ticker: string): Promise<ApiResponse<KeyStatisticsResponse>>;
|
|
814
841
|
getAvailableTickers(): Promise<ApiResponse<AvailableTickersResponse>>;
|
|
842
|
+
resolveTicker(query: string): Promise<ApiResponse<TickerResolutionResponse>>;
|
|
815
843
|
getPrices(ticker: string, opts: PriceOpts): Promise<ApiResponse<PriceHistoryResponse>>;
|
|
816
844
|
getPriceSnapshot(ticker: string): Promise<ApiResponse<PriceSnapshotResponse>>;
|
|
817
845
|
getNews(ticker: string, opts?: NewsOpts): Promise<ApiResponse<NewsResponse>>;
|
|
@@ -831,4 +859,4 @@ declare class TnFinancialData {
|
|
|
831
859
|
screen(request: ScreenerRequest): Promise<ApiResponse<ScreenerResponse>>;
|
|
832
860
|
}
|
|
833
861
|
|
|
834
|
-
export { type AnalystEstimate, type AnalystEstimatesResponse, type AnalystPriceTarget, ApiError, type ApiResponse, type AvailableTicker, type AvailableTickersResponse, type BalanceSheet, type BalanceSheetsResponse, type CashFlowStatement, type CashFlowStatementsResponse, type ClientOptions, type CompanyFacts, type ConsensusSurprise, DEFAULT_API_BASE_URL, type DataAvailability, type EarningsOpts, type EarningsResponse, type EarningsRow, type FilingExhibit, type FilingItemSection, type FilingItemsOpts, type FilingItemsResponse, type FilingMetadata, type FilingsOpts, type FilingsResponse, type FinancialMetric, type FinancialMetricsOpts, type FinancialMetricsResponse, type FinancialMetricsSnapshotResponse, type FinancialOpts, type FinancialsResponse, type GeneralOverviewFinancials, type GeneralOverviewNews, type GeneralOverviewOpts, type GeneralOverviewPriceSnapshot, type GeneralOverviewResponse, type GlobalInterestRateObservation, type GlobalInterestRateSeries, type GlobalInterestRatesOpts, type GlobalInterestRatesResponse, type IncomeStatement, type IncomeStatementsResponse, type InsiderTrade, type InsiderTradesOpts, type InsiderTradesResponse, type InstitutionalOwnershipEntry, type InstitutionalOwnershipOpts, type InstitutionalOwnershipResponse, type InvestorPortfolioHolding, type InvestorPortfolioInvestor, type InvestorPortfolioOpts, type InvestorPortfolioResponse, type InvestorPortfolioSummary, type KeyStatistics, type KeyStatisticsResponse, type NewsArticle, type NewsOpts, type NewsResponse, type OptionalFinancialQueryOpts, type PriceBar, type PriceHistoryResponse, type PriceOpts, type PriceSnapshot, type PriceSnapshotResponse, type QuarterlyHighlightsMetric, type QuarterlyHighlightsOpts, type QuarterlyHighlightsPayload, type QuarterlyHighlightsResponse, type RateLimitAnnotatedResponse, type RateLimitInfo, type ReadMetadata, type ReportPeriodFilterOpts, type ScreenerFieldMetadata, type ScreenerFieldsResponse, type ScreenerRequest, type ScreenerResponse, type ScreenerResultRow, type SegmentedRevenueItem, type SegmentedRevenuePeriod, type SegmentedRevenuesOpts, type SegmentedRevenuesResponse, type SnakeCase, TnFinancialData };
|
|
862
|
+
export { type AnalystEstimate, type AnalystEstimatesResponse, type AnalystPriceTarget, ApiError, type ApiResponse, type AvailableTicker, type AvailableTickersResponse, type BalanceSheet, type BalanceSheetsResponse, type CashFlowStatement, type CashFlowStatementsResponse, type ClientOptions, type CompanyFacts, type ConsensusSurprise, DEFAULT_API_BASE_URL, type DataAvailability, type EarningsOpts, type EarningsResponse, type EarningsRow, type FilingExhibit, type FilingItemSection, type FilingItemsOpts, type FilingItemsResponse, type FilingMetadata, type FilingsOpts, type FilingsResponse, type FinancialMetric, type FinancialMetricsOpts, type FinancialMetricsResponse, type FinancialMetricsSnapshotResponse, type FinancialOpts, type FinancialsResponse, type GeneralOverviewFinancials, type GeneralOverviewNews, type GeneralOverviewOpts, type GeneralOverviewPriceSnapshot, type GeneralOverviewResponse, type GlobalInterestRateObservation, type GlobalInterestRateSeries, type GlobalInterestRatesOpts, type GlobalInterestRatesResponse, type IncomeStatement, type IncomeStatementsResponse, type InsiderTrade, type InsiderTradesOpts, type InsiderTradesResponse, type InstitutionalOwnershipEntry, type InstitutionalOwnershipOpts, type InstitutionalOwnershipResponse, type InvestorPortfolioHolding, type InvestorPortfolioInvestor, type InvestorPortfolioOpts, type InvestorPortfolioResponse, type InvestorPortfolioSummary, type KeyStatistics, type KeyStatisticsResponse, type NewsArticle, type NewsOpts, type NewsResponse, type OptionalFinancialQueryOpts, type PriceBar, type PriceHistoryResponse, type PriceOpts, type PriceSnapshot, type PriceSnapshotResponse, type QuarterlyHighlightsMetric, type QuarterlyHighlightsOpts, type QuarterlyHighlightsPayload, type QuarterlyHighlightsResponse, type RateLimitAnnotatedResponse, type RateLimitInfo, type ReadMetadata, type ReportPeriodFilterOpts, type ScreenerFieldMetadata, type ScreenerFieldsResponse, type ScreenerRequest, type ScreenerResponse, type ScreenerResultRow, type SegmentedRevenueItem, type SegmentedRevenuePeriod, type SegmentedRevenuesOpts, type SegmentedRevenuesResponse, type SnakeCase, type TickerResolutionCandidate, type TickerResolutionConfidence, type TickerResolutionIntent, type TickerResolutionMatchKind, type TickerResolutionRelationship, type TickerResolutionResponse, type TickerResolutionStatus, TnFinancialData };
|
package/dist/client/index.js
CHANGED
|
@@ -228,6 +228,11 @@ var TnFinancialData = class {
|
|
|
228
228
|
async getAvailableTickers() {
|
|
229
229
|
return this.request("/financials/income-statements/tickers");
|
|
230
230
|
}
|
|
231
|
+
async resolveTicker(query) {
|
|
232
|
+
return this.request(
|
|
233
|
+
`/tickers/resolve?${new URLSearchParams({ q: query })}`
|
|
234
|
+
);
|
|
235
|
+
}
|
|
231
236
|
async getPrices(ticker, opts) {
|
|
232
237
|
const params = new URLSearchParams({
|
|
233
238
|
ticker,
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tn-financial-data
|
|
3
|
-
description: Use this skill first for covered US equity data questions and covered-universe screens. Query server-backed company facts, general overviews, financials, analyst estimates, segmented revenues, prices, news, insider trades, institutional ownership, investor 13F portfolios, and global interest rates through the tn-financial-data CLI.
|
|
3
|
+
description: Use this skill first for covered US equity data questions and covered-universe screens. Query server-backed company facts, general overviews, financials, analyst estimates, segmented revenues, prices, news, insider trades, institutional ownership, investor 13F portfolios, raw SEC filings, and global interest rates through the tn-financial-data CLI.
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
Prefer the `tn-financial-data` CLI when it is installed. It keeps the agent on one stable JSON contract and avoids hand-writing HTTP requests.
|
|
8
|
+
If the CLI is not already present, the published package can be installed with `npm install -g tn-financial-data`.
|
|
8
9
|
|
|
9
10
|
## Authentication
|
|
10
11
|
|
|
@@ -26,6 +27,7 @@ Covered reads include:
|
|
|
26
27
|
- segment and geographic revenue mix
|
|
27
28
|
- price history, latest price snapshot, and stored company news
|
|
28
29
|
- insider trades, issuer-level institutional ownership, and investor `13F` portfolios
|
|
30
|
+
- SEC filing discovery plus bounded raw filing text for `10-K`, `10-Q`, and `8-K`
|
|
29
31
|
- covered-universe screening and ranking
|
|
30
32
|
- curated global central-bank and rate series
|
|
31
33
|
|
|
@@ -35,9 +37,13 @@ Covered reads include:
|
|
|
35
37
|
- For a narrow ask, prefer the narrower read instead of widening the problem too early.
|
|
36
38
|
- For Apple product mix or Greater China, Meta ad KPIs, Amazon `AWS` operating income or segment-profit prompts, and Tesla services-and-other or free-cash-flow prompts, start with `quarterly-highlights` before `segmented-revenues`, `financials`, or `general-overview`. For other covered issuers, `quarterly-highlights` now serves as a generic latest-quarter summary even when no issuer-specific release parser exists.
|
|
37
39
|
- Use `segmented-revenues` when the user explicitly wants XBRL dimension tables, additive segment rows, or issuer coverage that is outside the narrower `quarterly-highlights` surface.
|
|
40
|
+
- For raw SEC filing prompts, use `filings` to find the filing and accession number first, then use `filing-items` for specific sections or bounded raw text. Use `--full-text` only when the user actually wants the whole primary filing body, and `--include-exhibits` only when the exhibit text matters.
|
|
38
41
|
- For covered-universe filter or ranking questions, use `screen-fields` and `screen`.
|
|
39
42
|
- Keep issuer-centric ownership (`institutional-ownership`) separate from investor-centric portfolio lookup (`investor-portfolio`).
|
|
40
|
-
- If the company mapping is ambiguous, use `
|
|
43
|
+
- If the company mapping is ambiguous or the prompt names a company without a trusted ticker, use `resolve-ticker` before guessing a ticker.
|
|
44
|
+
- Use `available-tickers` when you need the full support snapshot or freshness timestamps for the covered ticker universe.
|
|
45
|
+
- Treat an exact user-supplied ticker as exact. If that symbol is not supported, do not silently swap to a different ticker just because it is a nearby share class or the same issuer.
|
|
46
|
+
- If only a different supported line exists for the issuer, call out that mismatch explicitly before using it. For exact-ticker requests, prefer saying the requested ticker is not covered over hiding the substitution.
|
|
41
47
|
- Only leave this skill when the user explicitly wants outside sources or the stored dataset does not cover the question.
|
|
42
48
|
|
|
43
49
|
## Answer Principles
|
|
@@ -55,6 +61,7 @@ Covered reads include:
|
|
|
55
61
|
These are the main commands an agent should reach for first. For full flags and examples, read [references/cli.md](references/cli.md).
|
|
56
62
|
|
|
57
63
|
```bash
|
|
64
|
+
tn-financial-data query resolve-ticker --query google
|
|
58
65
|
tn-financial-data query available-tickers
|
|
59
66
|
tn-financial-data query company --ticker AAPL
|
|
60
67
|
tn-financial-data query general-overview --ticker AAPL
|
|
@@ -63,6 +70,8 @@ tn-financial-data query financial-metrics --ticker AAPL --period annual --limit
|
|
|
63
70
|
tn-financial-data query financial-metrics-snapshot --ticker AAPL
|
|
64
71
|
tn-financial-data query earnings --ticker AAPL --period quarterly --limit 8
|
|
65
72
|
tn-financial-data query quarterly-highlights --ticker AAPL
|
|
73
|
+
tn-financial-data query filings --ticker AAPL --filing-type 8-K --limit 10
|
|
74
|
+
tn-financial-data query filing-items --ticker AAPL --accession-number 0000320193-26-000005 --item 2.02 --include-exhibits
|
|
66
75
|
tn-financial-data query analyst-estimates --ticker AAPL
|
|
67
76
|
tn-financial-data query segmented-revenues --ticker AAPL --period annual --limit 4
|
|
68
77
|
tn-financial-data query prices --ticker AAPL --interval day --start-date 2025-01-01 --end-date 2025-01-31
|
|
@@ -79,7 +88,9 @@ tn-financial-data query global-rates --series ecb_refi,boe_sonia --limit 10
|
|
|
79
88
|
Practical defaults:
|
|
80
89
|
|
|
81
90
|
- Use `general-overview` for broad one-ticker prompts like “what’s up with NVDA?”
|
|
91
|
+
- Use `resolve-ticker` first when the user gives a company name, brand name, or broad one-company phrase without a trusted symbol
|
|
82
92
|
- Use `quarterly-highlights` first for Apple product mix, Greater China, Meta ad KPIs, Amazon segment profitability, and Tesla services-and-other or free-cash-flow prompts
|
|
93
|
+
- Use `filings` plus `filing-items` when the user explicitly asks for an SEC filing, `8-K`, `10-K`, `10-Q`, or raw filing text
|
|
83
94
|
- Do not start Apple product-mix prompts with `segmented-revenues`; that surface only exposes broad `Product` and `Service` rollups, while `quarterly-highlights` carries the product-line fields the prompt usually wants
|
|
84
95
|
- Use `financials`, `financial-metrics`, `earnings`, `analyst-estimates`, `segmented-revenues`, `news`, `prices`, or `snapshot` when the user asks for a specific slice
|
|
85
96
|
- Use `investor-portfolio` for prompts like “What does Vanguard hold?” or “Show Berkshire’s latest 13F portfolio.”
|
|
@@ -5,4 +5,4 @@ Canonical instructions live in [../SKILL.md](../SKILL.md).
|
|
|
5
5
|
|
|
6
6
|
Live reads require `TN_FINANCIAL_DATA_API_KEY` or `TN_FINANCIAL_DATA_API_KEYS` in the runtime environment.
|
|
7
7
|
|
|
8
|
-
Use `tn-financial-data` before web search for covered US equity data, ownership, screening,
|
|
8
|
+
Use `tn-financial-data` before web search for covered US equity data, ownership, screening, global-rate questions, and raw SEC filing prompts. Start broad one-company prompts with the overview path. For narrower asks, choose the narrower covered read directly. Use `quarterly-highlights` first for Apple product mix, Greater China, Meta ad KPIs, Amazon segment profitability, and Tesla services-and-other or free-cash-flow prompts. Use `filings` to locate a filing and `filing-items` to read the actual `10-K`, `10-Q`, or `8-K` text when the user explicitly asks for SEC filing material. Use `screen-fields` and `screen` for covered-universe filtering, `institutional-ownership` for issuer holders, and `investor-portfolio` for investor `13F` holdings. Resolve ambiguous company names with `resolve-ticker`, use `available-tickers` for the support snapshot, and treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class. Prefer synthesized, structured answers over raw dumps.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "TN Financial Data"
|
|
3
3
|
short_description: "Use this first for covered US equity data and screening questions"
|
|
4
|
-
default_prompt: "Use $tn-financial-data before web search for covered US equity data, ownership, screening,
|
|
4
|
+
default_prompt: "Use $tn-financial-data before web search for covered US equity data, ownership, screening, global-rate questions, and raw SEC filing requests. Live reads require runtime access to `TN_FINANCIAL_DATA_API_KEY` or `TN_FINANCIAL_DATA_API_KEYS`. Start broad one-company prompts with the overview path, choose narrower covered reads when the ask is specific, use `filings` plus `filing-items` for explicit `10-K`, `10-Q`, or `8-K` prompts, resolve ambiguous names with `resolve-ticker`, use `available-tickers` for the support snapshot, treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class, and keep answers synthesized, structured, and user-facing."
|
|
5
5
|
|
|
6
6
|
policy:
|
|
7
7
|
allow_implicit_invocation: true
|
|
@@ -5,7 +5,7 @@ Canonical instructions live in [../SKILL.md](../SKILL.md).
|
|
|
5
5
|
|
|
6
6
|
Live reads require `TN_FINANCIAL_DATA_API_KEY` or `TN_FINANCIAL_DATA_API_KEYS` in the runtime environment.
|
|
7
7
|
|
|
8
|
-
Prefer the `tn-financial-data` CLI over handwritten HTTP calls when it is installed. Use the skill before web search for covered US equity data, ownership, screening,
|
|
8
|
+
Prefer the `tn-financial-data` CLI over handwritten HTTP calls when it is installed. Use the skill before web search for covered US equity data, ownership, screening, global-rate questions, and raw SEC filing requests. For broad one-company prompts, start with the overview path. For narrower asks, choose the matching narrow read directly. Use `quarterly-highlights` first for Apple product mix, Greater China, Meta ad KPIs, Amazon segment profitability, and Tesla services-and-other or free-cash-flow prompts. Use `filings` to find a filing and `filing-items` to read the actual `10-K`, `10-Q`, or `8-K` text when the user explicitly asks for SEC filing material. Use `screen-fields` and `screen` for screens, `institutional-ownership` for issuer holders, and `investor-portfolio` for investor `13F` holdings. Resolve ambiguous company names with `resolve-ticker`, use `available-tickers` for the support snapshot, treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class, and keep answers structured, synthesized, and user-facing.
|
|
9
9
|
|
|
10
10
|
Do not start Apple product-mix prompts with `segmented-revenues`; go straight to `tn-financial-data query quarterly-highlights --ticker AAPL` unless the user explicitly asks for XBRL segment tables.
|
|
11
11
|
For prompts that ask for a table plus one short bullet, keep the bullet descriptive and grounded in the fetched fields. Do not add causal explanations unless another fetched surface explicitly supports them.
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Use the CLI for agent access whenever possible.
|
|
4
4
|
|
|
5
|
+
Published package:
|
|
6
|
+
- install with `npm install -g tn-financial-data` when the CLI is not already present
|
|
7
|
+
- the package ships the typed client, packaged skill bundle, and the same hosted `/v1` query surface used below
|
|
8
|
+
|
|
5
9
|
Auth rule:
|
|
6
10
|
- the published package reads credentials from flags and ambient process env, not from project-local `.env`
|
|
7
11
|
- if there is any doubt, pass `--api-key` and `--base-url` explicitly
|
|
8
12
|
- throttling surfaces as a clean CLI error; raw HTTP callers should read `X-RateLimit-*` and `Retry-After`
|
|
13
|
+
- for ambiguous company, brand, or free-form one-company prompts, start with `resolve-ticker`
|
|
9
14
|
- for broad ticker prompts like "what's up with NVDA?", start with `general-overview`
|
|
10
15
|
- for covered recent-news prompts like "show me recent Nvidia news", start with `news`
|
|
11
16
|
- for latest-quarter product mix, supplemental KPIs, AWS segment profitability, or Tesla free-cash-flow prompts, start with `quarterly-highlights`
|
|
@@ -16,6 +21,21 @@ Auth rule:
|
|
|
16
21
|
|
|
17
22
|
## Query Commands
|
|
18
23
|
|
|
24
|
+
Resolve ticker:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
tn-financial-data query resolve-ticker --query google
|
|
28
|
+
tn-financial-data query resolve-ticker --query GOOGL
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use this to resolve a company keyword, brand name, prompt fragment, or exact symbol against the hosted supported universe.
|
|
32
|
+
|
|
33
|
+
Resolution semantics:
|
|
34
|
+
- returns one of `exact_supported`, `resolved`, `ambiguous`, `exact_unsupported`, or `none`
|
|
35
|
+
- use this before guessing a ticker from a company or brand prompt
|
|
36
|
+
- `exact_unsupported` can suggest a nearby supported line, but that suggestion is a hint, not an automatic substitution
|
|
37
|
+
- exact share-class mismatches must stay explicit to the user
|
|
38
|
+
|
|
19
39
|
Available tickers:
|
|
20
40
|
|
|
21
41
|
```bash
|
|
@@ -24,6 +44,11 @@ tn-financial-data query available-tickers
|
|
|
24
44
|
|
|
25
45
|
Use this to fetch the current supported ticker snapshot from the API. It returns ticker symbols plus the latest financial-data and news-data timestamps tracked in the database.
|
|
26
46
|
|
|
47
|
+
Support rule:
|
|
48
|
+
- treat this list as the package's authoritative support snapshot
|
|
49
|
+
- if the user asks for an exact ticker that is not in this list, do not silently substitute another ticker or share class
|
|
50
|
+
- if you intentionally continue with a different supported line for the same issuer, make that mismatch explicit to the user
|
|
51
|
+
|
|
27
52
|
Company facts:
|
|
28
53
|
|
|
29
54
|
```bash
|
|
@@ -123,6 +148,34 @@ Meaning:
|
|
|
123
148
|
- values are normalized into JSON with explicit units and `yoy_change` where the release provides a comparable prior-period baseline
|
|
124
149
|
- when the prompt asks for a table plus one short bullet, keep the bullet descriptive and grounded in the returned fields; do not add speculative causes unless another fetched surface actually supports them
|
|
125
150
|
|
|
151
|
+
Filings:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
tn-financial-data query filings --ticker AAPL --filing-type 8-K --limit 10
|
|
155
|
+
tn-financial-data query filings --ticker AAPL --filing-type 10-K,10-Q --start-date 2021-01-01 --end-date 2021-12-31 --limit 5
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Meaning:
|
|
159
|
+
- filing metadata index over stored SEC coverage
|
|
160
|
+
- use this first when the user wants to find a specific filing, accession number, filing date, or form family
|
|
161
|
+
- supports `10-K`, `10-Q`, `8-K`, `20-F`, `40-F`, and `6-K`
|
|
162
|
+
- prefer this over guessing an accession number or hand-building SEC archive URLs
|
|
163
|
+
|
|
164
|
+
Filing items:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
tn-financial-data query filing-items --ticker AAPL --accession-number 0000320193-26-000005 --item 2.02 --include-exhibits
|
|
168
|
+
tn-financial-data query filing-items --ticker AAPL --accession-number 0000320193-21-000105 --filing-type 10-K --item Item-1A,Item-7
|
|
169
|
+
tn-financial-data query filing-items --ticker AAPL --accession-number 0000320193-26-000005 --full-text
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Meaning:
|
|
173
|
+
- bounded raw filing-text retrieval for one filing
|
|
174
|
+
- use it when the user explicitly wants the filing text, a specific section, or the earnings-release exhibit tied to an `8-K`
|
|
175
|
+
- `--full-text` returns the full primary filing body
|
|
176
|
+
- `--include-exhibits` adds exhibit text such as `EX-99.1` when available
|
|
177
|
+
- for `8-K` workflows, resolve the filing with `filings` first unless the accession number is already known
|
|
178
|
+
|
|
126
179
|
Segmented revenues:
|
|
127
180
|
|
|
128
181
|
```bash
|
|
@@ -263,6 +316,7 @@ The published npm package is intentionally agent-facing:
|
|
|
263
316
|
- `skill`
|
|
264
317
|
- `describe opencli`
|
|
265
318
|
- the typed TypeScript client
|
|
319
|
+
- packaged access to raw SEC filing discovery and filing-item reads through the same hosted contract
|
|
266
320
|
|
|
267
321
|
Self-hosting commands such as local API serving, migrations, and ingest flows live in the repository checkout and are intentionally outside the published npm contract.
|
|
268
322
|
|