Global Stock Analysis
Use these workflows to research stocks, evaluate companies, read technical signals, and monitor macro conditions — all from the terminal.
Setup
- 1. Install:
pip install marketdata-cli or uv tool install marketdata-cli --force or run directly with INLINECODE2 - Set API key (one of):
-
export ALPHAVANTAGE_API_KEY=your_key
- Add
ALPHAVANTAGE_API_KEY=your_key to a
.env file
- Pass
-k your_key on each command
Get a free key at https://www.alphavantage.co/support/#api-key
Workflows
1. Quick Stock Lookup
Get a snapshot of where a stock is right now — price, recent history, and news.
CODEBLOCK0
2. Fundamental Analysis
Evaluate a company's financial health: overview, financials, earnings, dividends, and insider activity.
See fundamentals.md for the full step-by-step guide.
3. Technical Analysis
Assess trend, momentum, volatility, and volume signals.
See technicals.md for the full step-by-step guide.
4. Macro & Market Overview
Check economic conditions, commodities, market movers, and upcoming events.
See macro.md for the full step-by-step guide.
5. Sector / Multi-Stock Comparison
Compare fundamentals or technicals across multiple tickers by running the same commands for each symbol:
CODEBLOCK1
See comparison.md for more examples.
6. Forex & Crypto
Exchange rates and price history for currencies and cryptocurrencies.
See forex-crypto.md for the full step-by-step guide.
Quick Reference
Run marketdata-cli --help for the full list of 100+ commands, or marketdata-cli <command> --help for any specific command.
| Flag | Description |
|---|
| INLINECODE9 | API key (overrides env var) |
| INLINECODE10 |
Enable verbose logging |
|
-h, --help | Show help for any command |
- - Most stock commands accept a positional SYMBOL argument (e.g.,
marketdata-cli global_quote AAPL) - Forex commands use
--from_symbol / --to_symbol or --from_currency / INLINECODE16 - Technical indicators default to
daily interval if not specified
全球股票分析
使用这些工作流程在终端中研究股票、评估公司、解读技术信号并监控宏观状况。
环境配置
- 1. 安装:pip install marketdata-cli 或 uv tool install marketdata-cli --force,或直接使用 uvx marketdata-cli 运行
- 设置API密钥(任选其一):
- export ALPHAVANTAGE
APIKEY=your_key
- 将 ALPHAVANTAGE
APIKEY=your_key 添加到 .env 文件
- 在每条命令后添加 -k your_key
在 https://www.alphavantage.co/support/#api-key 获取免费密钥
工作流程
1. 快速股票查询
获取股票的当前快照——价格、近期历史走势和新闻。
bash
marketdata-cli global_quote AAPL
marketdata-cli timeseriesdaily AAPL
marketdata-cli news_sentiment --tickers AAPL
可选:日内详情
marketdata-cli time
seriesintraday AAPL --interval 5min
2. 基本面分析
评估公司的财务健康状况:概览、财务报表、收益、股息和内幕交易活动。
完整分步指南请参见 fundamentals.md。
3. 技术分析
评估趋势、动量、波动性和成交量信号。
完整分步指南请参见 technicals.md。
4. 宏观与市场概览
查看经济状况、大宗商品、市场驱动因素和即将发生的事件。
完整分步指南请参见 macro.md。
5. 行业/多股票比较
通过对每个代码运行相同命令,比较多个股票的基本面或技术指标:
bash
marketdata-cli company_overview AAPL
marketdata-cli company_overview MSFT
marketdata-cli company_overview GOOGL
更多示例请参见 comparison.md。
6. 外汇与加密货币
查看货币和加密货币的汇率及价格历史。
完整分步指南请参见 forex-crypto.md。
快速参考
运行 marketdata-cli --help 查看全部100多个命令,或运行 marketdata-cli --help 查看特定命令的帮助信息。
| 标志 | 描述 |
|---|
| -k, --api-key | API密钥(覆盖环境变量) |
| -v, --verbose |
启用详细日志输出 |
| -h, --help | 显示任何命令的帮助信息 |
- - 大多数股票命令接受位置参数SYMBOL(例如,marketdata-cli globalquote AAPL)
- 外汇命令使用 --fromsymbol / --tosymbol 或 --fromcurrency / --to_currency
- 技术指标默认使用 daily 间隔(如未指定)