CLI for Financial Datasets API - command-line interface for accessing financial market data
npm install financialdatasets-cliA command-line interface for the Financial Datasets API. Query stock prices, crypto data, financial statements, earnings reports, news, SEC filings, insider trades, and more.
``bashnpm
npm install -g @simonxabris/financialdatasets-cli
Setup
Get an API key at financialdatasets.ai.
Make sure it's available in the environment as
FINANCIAL_DATASETS_API_KEYUsage
`bash
financialdatasets [options]
`Commands
$3
`bash
Historical stock prices
financialdatasets prices historical --ticker AAPL --start-date 2024-01-01 --end-date 2024-01-31Latest price snapshot
financialdatasets prices snapshot --ticker AAPL
`$3
`bash
Historical crypto prices
financialdatasets crypto historical --ticker BTC-USD --start-date 2024-01-01 --end-date 2024-01-31Latest crypto snapshot
financialdatasets crypto snapshot --ticker BTC-USD
`$3
`bash
Company facts and information
financialdatasets company facts --ticker AAPL
`$3
`bash
Earnings press releases
financialdatasets earnings press-releases --ticker AAPL
`$3
`bash
All financial statements
financialdatasets financials all --ticker AAPL --period annual --limit 5Income statements only
financialdatasets financials income-statements --ticker AAPL --period annual --limit 5Balance sheets
financialdatasets financials balance-sheets --ticker AAPL --period quarterlyCash flow statements
financialdatasets financials cash-flow-statements --ticker AAPL --period ttm
`$3
`bash
Company news
financialdatasets news --ticker AAPL --limit 20
`$3
`bash
List filings
financialdatasets filings list --ticker AAPL --filing-type 10-KGet specific filing items
financialdatasets filings items --ticker AAPL --filing-type 10-K --year 2024 --item Item-1
`$3
`bash
financialdatasets insider-trades --ticker AAPL --limit 50
`$3
`bash
financialdatasets institutional-ownership --ticker AAPL --limit 20
`$3
`bash
Historical metrics
financialdatasets financial-metrics historical --ticker AAPL --period annual --limit 5Latest metrics snapshot
financialdatasets financial-metrics snapshot --ticker AAPL
`Help
Get help for any command:
`bash
financialdatasets --help
financialdatasets prices --help
financialdatasets prices historical --help
``All commands return raw JSON responses from the API.
- Node.js >= 18.0.0
- FINANCIAL_DATASETS_API_KEY environment variable