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 重新執行心智佔有率或情緒預測時,費用為 10 點而非 5 點。情緒一律為 1 點,無論是否使用叢集篩選條件。
  • 資料列也可能為較簡略的答案標明較低的價格:資產不可能有的預測(not_forecastable)免費,每個帳戶每小時最多可有 30 個這類答案;超過之後,端點會傳回 429,直到該小時結束。以錯誤收尾的要求不收費。
  • Agent 要求採用變動定價,依據權杖量、模型成本與工具呼叫次數計算。完成的回應會回報所使用的點數。
  • 每個方案都能使用所有作業。方案的差異在於歷史資料範圍(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 帳戶

產生的指令

路徑、方法、說明文字、預設值、選擇器限制、請求結構描述與驗證,全都直接來自 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 取得結構化輸出。只有在開發或使用自行託管的 API 時才使用 NEBULA_API_BASE_URL。