Nasdaq-100 Futures Quote (Node.js)
Quick Start
This is an OpenClaw/ClawHub-style Node.js skill. The runtime entrypoint is scripts/main.handler (see manifest.json), and the exposed function is get_nasdaq100_futures.
Use this skill when you need the latest quote for Nasdaq-100 futures (or another Yahoo Finance symbol), including:
- - regularMarketPrice
- previousClose
- change and changePercent
- timestamp (formatted)
How to Call
Call the function get_nasdaq100_futures (as declared in manifest.json) with optional parameters:
- - symbol (string, optional): Yahoo Finance symbol. Default is
NQ=F (Nasdaq-100 futures).
Invocation Contract (Agent skill calling shape)
The handler expects the OpenClaw event shape (function parameters wrapped under parameters):
CODEBLOCK0
If parameters.symbol is omitted, it defaults to NQ=F.
Output
On success, returns a JSON object with these keys:
- - symbol: the requested symbol (e.g.
NQ=F) - price: latest price (string, 2 decimals)
- change: price change vs previous close (string, signed, 2 decimals)
- changePercent: percent change vs previous close (string, signed, 2 decimals)
- time: formatted timestamp string
- message: human-readable Chinese summary
On failure, returns:
- - error: true
- message: error message
Examples
Example: Default Nasdaq-100 futures
Input:
CODEBLOCK1
Output (example):
CODEBLOCK2
Example: Custom symbol
Input:
CODEBLOCK3
Notes
- - Data source is Yahoo Finance chart API (
query1.finance.yahoo.com). Results depend on market hours and network availability. - Requires Node.js >= 18 (uses built-in
fetch). - If you need a different data provider, adjust
scripts/main.js accordingly.
Additional resources
纳斯达克100期货报价 (Node.js)
快速开始
这是一个OpenClaw/ClawHub风格的Node.js技能。运行时入口点为scripts/main.handler(参见manifest.json),暴露的函数为getnasdaq100futures。
当您需要获取纳斯达克100期货(或其他雅虎财经代码)的最新报价时,可使用此技能,包括:
- - regularMarketPrice(常规市场价)
- previousClose(前收盘价)
- change(涨跌额)和changePercent(涨跌幅)
- timestamp(时间戳,已格式化)
调用方式
调用函数getnasdaq100futures(如manifest.json中所声明),可附带可选参数:
- - symbol(字符串,可选):雅虎财经代码。默认为NQ=F(纳斯达克100期货)。
调用契约(Agent技能调用格式)
处理器期望OpenClaw事件格式(函数参数封装在parameters下):
json
{
parameters: {
symbol: NQ=F
}
}
如果省略parameters.symbol,则默认为NQ=F。
输出
成功时,返回包含以下键的JSON对象:
- - symbol:请求的代码(例如NQ=F)
- price:最新价格(字符串,保留两位小数)
- change:与前收盘价相比的涨跌额(字符串,带符号,保留两位小数)
- changePercent:与前收盘价相比的涨跌幅(字符串,带符号,保留两位小数)
- time:格式化后的时间戳字符串
- message:人类可读的中文摘要
失败时,返回:
示例
示例:默认纳斯达克100期货
输入:
json
{
parameters: {}
}
输出(示例):
json
{
symbol: NQ=F,
price: 15780.50,
change: +120.25,
changePercent: +0.77,
time: 2025-06-10 14:30:00,
message: 纳斯达克100期货最新价: $15780.50 (+120.25 / +0.77%) 数据时间: 2025-06-10 14:30:00
}
示例:自定义代码
输入:
json
{
parameters: {
symbol: ES=F
}
}
注意事项
- - 数据来源为雅虎财经图表API(query1.finance.yahoo.com)。结果取决于市场交易时间和网络可用性。
- 需要Node.js >= 18(使用内置fetch)。
- 如需使用其他数据提供商,请相应调整scripts/main.js。
其他资源