dart-fss-cli 0.4.6 → 0.4.8
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/dist/bin.js +1 -1
- package/dist/{chunk-UHR5UNEO.js → chunk-HYSOUXSY.js} +32 -13
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1173,11 +1173,11 @@ function getGlobalOpts(cmd) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
function registerDisclosureCommands(program) {
|
|
1175
1175
|
const group = program.command("disclosure").description(
|
|
1176
|
-
'DS001: Disclosure info \u2014 search filings, company overview, original documents, corp codes.\
|
|
1176
|
+
'DS001: Disclosure info \u2014 search filings, company overview, original documents, corp codes.\n\nExamples:\n dart-fss disclosure company --corp "\uC0BC\uC131\uC804\uC790" --pretty\n dart-fss disclosure list --corp "\uCE74\uCE74\uC624" --from 20250101 --to 20251231'
|
|
1177
1177
|
);
|
|
1178
1178
|
group.command("list").description(
|
|
1179
1179
|
"Search DART disclosure filings. Returns paginated results with report name, filing date, receipt number.\nWithout --corp, searches ALL companies (date range limited to 3 months).\nWith --corp, searches specific company with no date limit.\nDisclosure types: A=Regular, B=Major events, C=Issuance, D=Equity, E=Other, F=Audit, G=Fund, H=ABS, I=Exchange, J=FTC"
|
|
1180
|
-
).option("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').option("--from <YYYYMMDD>", "Start date in YYYYMMDD format (e.g. 20240101)").option("--to <YYYYMMDD>", "End date in YYYYMMDD format (e.g. 20241231)").option("--type <code>", "Disclosure type: A=Regular, B=Major events, C=Issuance, D=Equity, E=Other, F=Audit, G=Fund, H=ABS, I=Exchange, J=FTC").option("--corp-cls <cls>", "Corp class filter: Y=KOSPI, K=KOSDAQ, N=KONEX, E=Other").option("--page <n>", "Page number, starting from 1 (default: 1)", "1").option("--count <n>", "Items per page, 1-100 (default: 10)", "10").action(async (opts) => {
|
|
1180
|
+
).option("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').option("--from <YYYYMMDD>", "Start date in YYYYMMDD format (e.g. 20240101)").option("--to <YYYYMMDD>", "End date in YYYYMMDD format (e.g. 20241231)").option("--type <code>", "Disclosure type: A=Regular, B=Major events, C=Issuance, D=Equity, E=Other, F=Audit, G=Fund, H=ABS, I=Exchange, J=FTC").option("--corp-cls <cls>", "Corp class filter: Y=KOSPI, K=KOSDAQ, N=KONEX, E=Other").option("--page <n>", "Page number, starting from 1 (default: 1)", "1").option("--count <n>", "Items per page, 1-100 (default: 10)", "10").addHelpText("after", '\nExamples:\n dart-fss disclosure list --corp "\uC0BC\uC131\uC804\uC790" --from 20250101 --to 20251231 --pretty\n dart-fss disclosure list --from 20250101 --to 20250131 --count 20').action(async (opts) => {
|
|
1181
1181
|
const globalOpts = getGlobalOpts(group);
|
|
1182
1182
|
const apiKey = getApiKey(globalOpts.apiKey);
|
|
1183
1183
|
if (globalOpts.json) {
|
|
@@ -1203,7 +1203,7 @@ function registerDisclosureCommands(program) {
|
|
|
1203
1203
|
});
|
|
1204
1204
|
group.command("company").description(
|
|
1205
1205
|
'Get company profile from DART. Returns corp name, CEO, address, stock code, industry code, incorporation date, fiscal month.\nAccepts company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code.'
|
|
1206
|
-
).requiredOption("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').action(async (opts) => {
|
|
1206
|
+
).requiredOption("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').addHelpText("after", '\nExamples:\n dart-fss disclosure company --corp "\uC0BC\uC131\uC804\uC790" --pretty\n dart-fss disclosure company --corp 00126380 --fields "corp_name,ceo_nm,adres"').action(async (opts) => {
|
|
1207
1207
|
const globalOpts = getGlobalOpts(group);
|
|
1208
1208
|
const apiKey = getApiKey(globalOpts.apiKey);
|
|
1209
1209
|
if (globalOpts.json) {
|
|
@@ -1289,13 +1289,16 @@ function getGlobalOpts2(cmd) {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
function registerPeriodicReportCommands(program) {
|
|
1291
1291
|
const group = program.command("report").description(
|
|
1292
|
-
|
|
1292
|
+
'DS002: Periodic report key information \u2014 28 APIs extracting data from annual/quarterly reports.\nCovers: capital changes, dividends, treasury stock, shareholders, executives, employees,\ncompensation, debt securities, audit info, outside directors, investments, fund usage.\nData available from 2015 onward.\n\nAll subcommands require: --corp <name> --year <YYYY> --quarter <q1|half|q3|annual>\n\nExamples:\n dart-fss report employee --corp "\uC0BC\uC131\uC804\uC790" --year 2025 --quarter annual --pretty\n dart-fss report dividend --corp "\uCE74\uCE74\uC624" --year 2025 --quarter annual\n dart-fss report exec-pay-individual --corp "\uB124\uC774\uBC84" --year 2025 --quarter annual --fields "nm,ofcps,mendng_totamt"'
|
|
1293
1293
|
);
|
|
1294
1294
|
const endpoints = (REGISTRY_BY_GROUP.get("report") || []).filter(
|
|
1295
1295
|
(ep) => ep.pattern === "periodic"
|
|
1296
1296
|
);
|
|
1297
1297
|
for (const ep of endpoints) {
|
|
1298
|
-
group.command(ep.cliName).description(ep.summary).requiredOption("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').requiredOption("--year <YYYY>", "Business year in YYYY format (e.g. 2024). Data from 2015 onward").requiredOption("--quarter <q1|half|q3|annual>", "Report quarter: q1 (Q1), half (semi-annual), q3 (Q3), annual (full year)").
|
|
1298
|
+
group.command(ep.cliName).description(ep.summary).requiredOption("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').requiredOption("--year <YYYY>", "Business year in YYYY format (e.g. 2024). Data from 2015 onward").requiredOption("--quarter <q1|half|q3|annual>", "Report quarter: q1 (Q1), half (semi-annual), q3 (Q3), annual (full year)").addHelpText("after", `
|
|
1299
|
+
Examples:
|
|
1300
|
+
dart-fss report ${ep.cliName} --corp "\uC0BC\uC131\uC804\uC790" --year 2025 --quarter annual --pretty
|
|
1301
|
+
dart-fss report ${ep.cliName} --corp "\uC0BC\uC131\uC804\uC790" --year 2025 --quarter annual --fields "corp_name,nm"`).action(async (opts) => {
|
|
1299
1302
|
const globalOpts = getGlobalOpts2(group);
|
|
1300
1303
|
const apiKey = getApiKey(globalOpts.apiKey);
|
|
1301
1304
|
if (globalOpts.json) {
|
|
@@ -1326,7 +1329,7 @@ function getGlobalOpts3(cmd) {
|
|
|
1326
1329
|
}
|
|
1327
1330
|
function registerFinancialCommands(program) {
|
|
1328
1331
|
const group = program.command("financial").description(
|
|
1329
|
-
|
|
1332
|
+
'DS003: Financial data \u2014 statements, indices, and XBRL for listed companies (KOSPI/KOSDAQ).\nIncludes key accounts (assets, liabilities, revenue), full financial statements,\nfinancial indices (profitability, stability, growth, activity), and XBRL taxonomy.\n\nMost subcommands require: --corp <name> --year <YYYY> --quarter <q1|half|q3|annual>\n\nExamples:\n dart-fss financial single-account --corp "\uC0BC\uC131\uC804\uC790" --year 2025 --quarter annual --pretty\n dart-fss financial full-statement --corp "SK\uD558\uC774\uB2C9\uC2A4" --year 2025 --quarter annual --fs-div CFS'
|
|
1330
1333
|
);
|
|
1331
1334
|
const endpoints = REGISTRY_BY_GROUP.get("financial") || [];
|
|
1332
1335
|
for (const ep of endpoints) {
|
|
@@ -1445,13 +1448,16 @@ function getGlobalOpts4(cmd) {
|
|
|
1445
1448
|
}
|
|
1446
1449
|
function registerEquityDisclosureCommands(program) {
|
|
1447
1450
|
const group = program.command("equity").description(
|
|
1448
|
-
'DS004: Equity disclosure \u2014 major shareholding reports and executive/major shareholder ownership.\
|
|
1451
|
+
'DS004: Equity disclosure \u2014 major shareholding reports and executive/major shareholder ownership.\n\nAll subcommands require: --corp <name>\n\nExamples:\n dart-fss equity major-stock --corp "\uC0BC\uC131\uC804\uC790" --pretty\n dart-fss equity executive-stock --corp "\uCE74\uCE74\uC624"'
|
|
1449
1452
|
);
|
|
1450
1453
|
const endpoints = (REGISTRY_BY_GROUP.get("equity") || []).filter(
|
|
1451
1454
|
(ep) => ep.pattern === "corpOnly"
|
|
1452
1455
|
);
|
|
1453
1456
|
for (const ep of endpoints) {
|
|
1454
|
-
group.command(ep.cliName).description(ep.summary).requiredOption("--corp <name-or-code>", "Company name or corp_code").
|
|
1457
|
+
group.command(ep.cliName).description(ep.summary).requiredOption("--corp <name-or-code>", "Company name or corp_code").addHelpText("after", `
|
|
1458
|
+
Examples:
|
|
1459
|
+
dart-fss equity ${ep.cliName} --corp "\uC0BC\uC131\uC804\uC790" --pretty
|
|
1460
|
+
dart-fss equity ${ep.cliName} --corp "\uC0BC\uC131\uC804\uC790" --fields "repror,stkqy,stkrt"`).action(async (opts) => {
|
|
1455
1461
|
const globalOpts = getGlobalOpts4(group);
|
|
1456
1462
|
const apiKey = getApiKey(globalOpts.apiKey);
|
|
1457
1463
|
if (globalOpts.json) {
|
|
@@ -1478,13 +1484,16 @@ function getGlobalOpts5(cmd) {
|
|
|
1478
1484
|
}
|
|
1479
1485
|
function registerMajorReportCommands(program) {
|
|
1480
1486
|
const group = program.command("major").description(
|
|
1481
|
-
|
|
1487
|
+
'DS005: Major event reports \u2014 36 APIs for significant corporate events.\nCovers: capital increases/reductions, bond issuances (convertible, exchangeable, warrant),\ntreasury stock, M&A (mergers, splits, business/asset transfers), lawsuits,\noverseas listings, defaults, business suspension, rehabilitation.\nData available from 2015 onward.\n\nAll subcommands require: --corp <name> --from <YYYYMMDD> --to <YYYYMMDD>\n\nExamples:\n dart-fss major lawsuit --corp "\uC0BC\uC131\uC804\uC790" --from 20230101 --to 20251231 --pretty\n dart-fss major convertible-bond --corp "\uCE74\uCE74\uC624" --from 20250101 --to 20251231'
|
|
1482
1488
|
);
|
|
1483
1489
|
const endpoints = (REGISTRY_BY_GROUP.get("major") || []).filter(
|
|
1484
1490
|
(ep) => ep.pattern === "dateRange"
|
|
1485
1491
|
);
|
|
1486
1492
|
for (const ep of endpoints) {
|
|
1487
|
-
group.command(ep.cliName).description(ep.summary).requiredOption("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').requiredOption("--from <YYYYMMDD>", "Start date in YYYYMMDD format (filing date). Data from 2015 onward").requiredOption("--to <YYYYMMDD>", "End date in YYYYMMDD format (filing date)").
|
|
1493
|
+
group.command(ep.cliName).description(ep.summary).requiredOption("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').requiredOption("--from <YYYYMMDD>", "Start date in YYYYMMDD format (filing date). Data from 2015 onward").requiredOption("--to <YYYYMMDD>", "End date in YYYYMMDD format (filing date)").addHelpText("after", `
|
|
1494
|
+
Examples:
|
|
1495
|
+
dart-fss major ${ep.cliName} --corp "\uC0BC\uC131\uC804\uC790" --from 20230101 --to 20251231 --pretty
|
|
1496
|
+
dart-fss major ${ep.cliName} --corp "\uCE74\uCE74\uC624" --from 20250101 --to 20251231`).action(async (opts) => {
|
|
1488
1497
|
const globalOpts = getGlobalOpts5(group);
|
|
1489
1498
|
const apiKey = getApiKey(globalOpts.apiKey);
|
|
1490
1499
|
if (globalOpts.json) {
|
|
@@ -1511,13 +1520,15 @@ function getGlobalOpts6(cmd) {
|
|
|
1511
1520
|
}
|
|
1512
1521
|
function registerSecuritiesFilingCommands(program) {
|
|
1513
1522
|
const group = program.command("securities").description(
|
|
1514
|
-
|
|
1523
|
+
'DS006: Securities registration statements \u2014 6 APIs for securities filings.\nCovers: equity securities, debt securities, depository receipts,\nmergers, comprehensive stock exchange/transfer, and splits.\nData available from 2015 onward.\n\nAll subcommands require: --corp <name> --from <YYYYMMDD> --to <YYYYMMDD>\n\nExamples:\n dart-fss securities equity-securities --corp "\uC0BC\uC131\uC804\uC790" --from 20230101 --to 20251231'
|
|
1515
1524
|
);
|
|
1516
1525
|
const endpoints = (REGISTRY_BY_GROUP.get("securities") || []).filter(
|
|
1517
1526
|
(ep) => ep.pattern === "dateRange"
|
|
1518
1527
|
);
|
|
1519
1528
|
for (const ep of endpoints) {
|
|
1520
|
-
group.command(ep.cliName).description(ep.summary).requiredOption("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').requiredOption("--from <YYYYMMDD>", "Start date in YYYYMMDD format (filing date). Data from 2015 onward").requiredOption("--to <YYYYMMDD>", "End date in YYYYMMDD format (filing date)").
|
|
1529
|
+
group.command(ep.cliName).description(ep.summary).requiredOption("--corp <name-or-code>", 'Company name (e.g. "\uC0BC\uC131\uC804\uC790") or 8-digit corp_code').requiredOption("--from <YYYYMMDD>", "Start date in YYYYMMDD format (filing date). Data from 2015 onward").requiredOption("--to <YYYYMMDD>", "End date in YYYYMMDD format (filing date)").addHelpText("after", `
|
|
1530
|
+
Examples:
|
|
1531
|
+
dart-fss securities ${ep.cliName} --corp "\uC0BC\uC131\uC804\uC790" --from 20230101 --to 20251231 --pretty`).action(async (opts) => {
|
|
1521
1532
|
const globalOpts = getGlobalOpts6(group);
|
|
1522
1533
|
const apiKey = getApiKey(globalOpts.apiKey);
|
|
1523
1534
|
if (globalOpts.json) {
|
|
@@ -1666,7 +1677,15 @@ function createDartProgram() {
|
|
|
1666
1677
|
const program = new Command();
|
|
1667
1678
|
program.name("dart-fss").description(
|
|
1668
1679
|
'DART Open API CLI \u2014 access Korea Financial Supervisory Service (FSS) electronic disclosure system.\nProvides 83 API endpoints for company filings, financial statements, equity disclosures, and more.\nAuthentication: set DART_API_KEY env var or pass --api-key. Get a key at https://opendart.fss.or.kr\nCompanies are identified by 8-digit corp_code or company name. Use "dart-fss lookup <name>" to find corp_code.\nOutput is JSON by default (compact single-line). Use --pretty for formatted output.\nRate limit: approximately 20,000 requests per day per API key.'
|
|
1669
|
-
).version("0.4.
|
|
1680
|
+
).version("0.4.8").option("--api-key <key>", "DART API key (default: DART_API_KEY env). Get one at https://opendart.fss.or.kr").option("--pretty", "Pretty-print JSON output (default: compact single-line JSON)").option("--output <file>", "Save result to file instead of stdout").option("--json <params>", "Pass raw API parameters as JSON string, bypassing flag parsing").option("--fields <f1,f2,...>", "Comma-separated field names to include in output (reduces response size for agents)").option("--dry-run", "Validate parameters and print the resolved API request without calling the API").addHelpText("after", `
|
|
1681
|
+
Examples:
|
|
1682
|
+
dart-fss lookup "\uC0BC\uC131\uC804\uC790"
|
|
1683
|
+
dart-fss disclosure company --corp "\uC0BC\uC131\uC804\uC790" --pretty
|
|
1684
|
+
dart-fss report employee --corp "\uC0BC\uC131\uC804\uC790" --year 2025 --quarter annual --pretty
|
|
1685
|
+
dart-fss financial single-account --corp "SK\uD558\uC774\uB2C9\uC2A4" --year 2025 --quarter annual --fields "account_nm,thstrm_amount"
|
|
1686
|
+
dart-fss major lawsuit --corp "\uCE74\uCE74\uC624" --from 20230101 --to 20251231
|
|
1687
|
+
dart-fss endpoints --json-output
|
|
1688
|
+
dart-fss schema employee`);
|
|
1670
1689
|
registerDisclosureCommands(program);
|
|
1671
1690
|
registerPeriodicReportCommands(program);
|
|
1672
1691
|
registerFinancialCommands(program);
|
package/dist/cli.js
CHANGED