Nebula CLI

在终端、脚本或 CI 中查询股票、大宗商品、指数、加密货币和 AI 的全球市场情报。

安装

CLI 需要 Node.js 18 或更高版本。

npm install --global @hiddensystems/nebula-cli

身份验证

nebula auth login --key YOUR_API_KEY

CLI 将密钥存储在 ~/.nebula/config.json 中,并设置仅所有者可访问的权限。自动化场景请改为设置 NEBULA_API_KEY。

x402 支付

你也可以通过独立的 x402 HTTP API,使用 Base 上的 USDC 为符合条件的 API 读取付费,无需 Nebula 账户或 API 密钥。每笔支付均由你的钱包授权。MCP 和 CLI 连接仍使用账户身份验证和额度;它们不会自动进行钱包支付。参阅 x402 支付指南。

示例

nebula api list_assets --asset-class equity --query NVIDIA
nebula api get_sentiment
nebula api get_mindshare --asset-id NVDA --asset-class equity
nebula api create_chat_completion --body '{"messages":[{"content":"What changed in NVIDIA sentiment this week?","role":"user"}],"stream":false,"thinking_mode":"auto"}'

端点概览

每个 CLI 命令使用与 REST API、MCP、CLI 和 Nebula Agent 相同的操作级定价和共享账户余额。

  • 固定成本操作按每次请求所列的额度数扣费。
  • 参数不会改变操作的费用,除非其所在行标明了某一参数的价格:以 refresh=true 重新运行 mindshare 或情绪预测时,费用为 10 个额度而非 5 个。情绪始终花费 1 个额度,无论是否使用集群筛选。
  • 某一行也可能为较次的结果标注更低的价格:资产无法生成的预测(not_forecastable)免费,每个账户每小时最多 30 次此类回答;超出后,该端点会返回 429,直到该小时结束。以错误结束的请求不产生任何费用。
  • Agent 请求采用基于 token 用量、模型成本和工具调用的可变定价。完成的响应会报告所使用的额度数。
  • 所有操作在所有套餐中均可用。套餐的差异在于历史窗口(Free:90 天;Pro:各端点的最大值,大多数时间序列为一年)、速率限制(Free:每分钟 60 次请求;Pro:300 次)以及每月包含的额度;购买额度可延长使用量,但不会改变历史窗口或速率限制。

发现

命令额度说明
nebula api screener 2 筛选器
nebula api get_top_momentum 2 动量榜
nebula api get_top_trending 2 热门趋势

查询

命令额度说明
nebula api list_assets 1 文本转资产 ID
nebula api search 1 搜索
nebula api list_subjects 1 文本转主体 ID

社交与情绪

命令额度说明
nebula api get_emotions 1 情绪分布
nebula api get_mindshare 2 心智份额
nebula api get_related_subjects 2 相关主体
nebula api get_sentiment 1 情绪
nebula api get_sentiment_timeframes 1 分时段情绪
nebula api get_social_momentum 2 社交动能

预测

命令额度说明
nebula api list_forecast_assets 1 可预测资产
nebula api get_mindshare_forecast 5(refresh=true 时为 10;not_forecastable 时免费,每小时 30) 心智份额预测
nebula api get_sentiment_forecast 5(refresh=true 时为 10;not_forecastable 时免费,每小时 30) 情绪预测

市场情绪

命令额度说明
nebula api get_calls 2 多空喊单
nebula api get_call_returns 2 喊单结果分布
nebula api get_conviction_index 2 信念指数
nebula api get_fear_greed_index 1 恐惧与贪婪指数
nebula api get_price_levels 2 社交提及价格位
nebula api get_social_volume_index 2 社交量与交易量对比
nebula api get_social_volume_profile 2 社交量分布

市场数据

命令额度说明
nebula api get_price_history 1 价格历史

情报

命令额度说明
nebula api list_calendar_events 5 日历事件
nebula api list_insights 5 情报
nebula api get_insight_attention 5 洞察关注度

聚类

命令额度说明
nebula api list_clusters 2 作者聚类
nebula api compare_clusters 2 聚类对比
nebula api get_divisive_assets 2 分歧资产
nebula api compare_hype_cycles 2 炒作周期到达
nebula api compare_cluster_traits 2 聚类特征对比
nebula api get_cluster_hype_cycles 2 聚类炒作周期
nebula api get_cluster_overlap 2 聚类重叠
nebula api get_cluster_profile 2 聚类画像
nebula api get_cluster_rotation 2 聚类轮动
nebula api get_cluster_stances 2 聚类立场

Agent

命令额度说明
nebula api create_chat_completion 变量 Nebula Agent 对话补全

账户

命令额度说明
nebula api get_account 0 账户

生成的命令

路径、方法、帮助文本、默认值、选择器约束、请求 schema 和验证均直接来自 OpenAPI。

nebula api compare_cluster_traits聚类特征对比
nebula api compare_clusters聚类对比
nebula api compare_hype_cycles炒作周期到达
nebula api create_chat_completionNebula Agent 对话补全
nebula api get_account账户
nebula api get_call_returns喊单结果分布
nebula api get_calls多空喊单
nebula api get_cluster_hype_cycles聚类炒作周期
nebula api get_cluster_overlap聚类重叠
nebula api get_cluster_profile聚类画像
nebula api get_cluster_rotation聚类轮动
nebula api get_cluster_stances聚类立场
nebula api get_conviction_index信念指数
nebula api get_divisive_assets分歧资产
nebula api get_emotions情绪分布
nebula api get_fear_greed_index恐惧与贪婪指数
nebula api get_insight_attention洞察关注度
nebula api get_mindshare心智份额
nebula api get_mindshare_forecast心智份额预测
nebula api get_price_history价格历史
nebula api get_price_levels社交提及价格位
nebula api get_related_subjects相关主体
nebula api get_sentiment情绪
nebula api get_sentiment_forecast情绪预测
nebula api get_sentiment_timeframes分时段情绪
nebula api get_social_momentum社交动能
nebula api get_social_volume_index社交量与交易量对比
nebula api get_social_volume_profile社交量分布
nebula api get_top_momentum动量榜
nebula api get_top_trending热门趋势
nebula api list_assets文本转资产 ID
nebula api list_calendar_events日历事件
nebula api list_clusters作者聚类
nebula api list_forecast_assets可预测资产
nebula api list_insights情报
nebula api list_subjects文本转主体 ID
nebula api screener筛选器
nebula api search搜索

JSON 与编码智能体

添加 --json 以获得机器可读输出。运行 nebula api <operation_id> --help 可查看任意操作生成的参数。

MCP 助手

运行 nebula mcp 可打印 MCP 客户端配置。有关设置详情,请参阅 MCP 文档。

CI 与自动化

在密钥管理器中设置 NEBULA_API_KEY,并使用 --json 获得结构化输出。NEBULA_API_BASE_URL 仅用于开发或自托管 API。