首页龙虾技能列表 › Reliable Bitcoin Price Feed — Reliable工具

Reliable Bitcoin Price Feed — Reliable工具

v1.0.4

[AI辅助] Real-time streaming Bitcoin price feed for traders. Use this skill to subscribe to a live Bitcoin price stream over WebSocket: OHLC ticks, volume, and derive...

0· 341·0 当前·0 累计
by @divyn (Divyasshree)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/10
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's code and instructions match its stated purpose (a Bitquery WebSocket Bitcoin price stream); the only notable issues are metadata omissions and the expected risk that the API key must be passed in the URL (which can leak to logs).
评估建议
This skill appears to do exactly what it says: open a Bitquery WebSocket subscription and stream 1s Bitcoin ticks. Before installing: (1) confirm the publisher/source since the registry metadata currently omits the required BITQUERY_API_KEY; (2) store BITQUERY_API_KEY securely (env secret manager) and do not print the full WebSocket URL (the token is passed as ?token= and can appear in logs); (3) run the included script in a sandbox/virtualenv to validate behavior; (4) rotate the key if you susp...
详细分析 ▾
用途与能力
The skill name/description (real-time Bitcoin price feed) matches the included script (scripts/stream_bitquery.py) and SKILL.md. The script legitimately requires a Bitquery API key to open a WebSocket subscription. Minor inconsistency: registry metadata does not declare the required BITQUERY_API_KEY even though SKILL.md and the script require it; the registry omission should be corrected before installation.
指令范围
SKILL.md and the script narrowly instruct the agent to read BITQUERY_API_KEY, install a single Python dependency, and connect to Bitquery's WebSocket stream to subscribe to Trading.Tokens for bid:bitcoin. The instructions do not ask the agent to read unrelated files, other credentials, or post data to third-party endpoints beyond Bitquery. SKILL.md does include a strong 'ALWAYS use this skill when…' trigger guidance for selection, which is a policy for invocation rather than a technical I/O concern.
安装机制
No install spec that writes arbitrary code to disk; this is instruction-only plus a single small Python script and requirements.txt. Dependency is a standard Python package (gql[websockets]) available on PyPI — reasonable and proportionate to the task. No downloads from untrusted URLs or archive extraction are present.
凭证需求
The only secret required is BITQUERY_API_KEY, which is appropriate for a Bitquery stream. However, the skill must pass the key as a query parameter in the WebSocket URL (wss://streaming.bitquery.io/graphql?token=...), which can expose the token in logs, monitoring, or history. SKILL.md acknowledges this and advises treating the token as a secret. The registry failing to declare the env requirement is an administrative gap to fix.
持久化与权限
The skill does not request permanent presence (always:false), does not modify other skills or system configuration, and does not require config paths or extra privileges. Autonomous invocation is allowed (platform default) but does not combine with other high-risk behaviors here.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.42026/3/6

- Added a "What to consider before installing" section with security, environment, and publisher verification guidance. - Warns that the registry may not list the required `BITQUERY_API_KEY` and advises on surfacing secret requirements. - Recommends sandbox testing and publisher/source verification before use. - No functional changes to usage, streaming behavior, or API example code.

● 无害

安装命令 点击复制

官方npx clawhub@latest install bitquery-crypto-price-stream
镜像加速npx clawhub@latest install bitquery-crypto-price-stream --registry https://cn.clawhub-mirror.com

技能文档

This skill gives you a real-time streaming Bitcoin price feed over WebSocket: live OHLC ticks, volume, and derived metrics on the stream (Mean, SMA, EMA, WMA, and tick-to-tick % change). Data is streamed in real time from the Bitquery API — no polling.

当...时 到 使用 skill

  • Stream Bitcoin price 在...中 real 时间 (live feed)
  • 获取 derived metrics 在...上 stream: moving averages 和 % 更改 per tick
  • Live OHLC 和 volume 对于 trading 或 dashboards

什么 到 consider 之前 installing

This skill implements a Bitquery WebSocket Bitcoin price stream and uses one external dependency and one credential. Before installing:

  • Registry metadata: registry 可能 不 列表 BITQUERY_API_KEY 甚至 虽然 skill 和 script require . Ask publisher 或 更新 registry metadata 之前 installing 所以 installers surface secret requirement.
  • API 键 在...中 URL: API 键 必须 passed 在...中 WebSocket URL 作为 查询 parameter, 哪个 可以 leak 到 logs 或 histories. Avoid printing 满 URL, store 键 在...中 secure environment 变量, 和 rotate 如果 可能 有 已 exposed.
  • Sandbox 第一个: Review 和 run included script 在...中 sandboxed environment (e.g. virtualenv) 到 confirm behavior 和 limit blast radius.
  • Source 和 publisher: 如果 skill’s homepage 或 source unknown, consider verifying publisher 或 使用 alternative 带有 verified source. 如果 registry metadata declares BITQUERY_API_KEY 和 source/publisher validated, skill likely coherent 和 benign.

Prerequisites

  • Environment: BITQUERY_API_KEY — Bitquery API 令牌 (必填). 令牌 必须 passed 在...中 WebSocket URL 仅 作为 ?令牌=... (e.g. wss://streaming.bitquery.io/graphql?令牌=YOUR_KEY); Bitquery 做 不 support 页头-based auth 对于 endpoint. 因为 令牌 appears 在...中 URL, 可以 show up 在...中 logs, monitoring tools, 或 browser/IDE history — treat 作为 secret 和 avoid logging 或 printing 满 URL.
  • Runtime: Python 3 和 pip. Install dependency: pip install 'gql[websockets]'.

Step 1 — Check API 键

import os
api_key = os.getenv("BITQUERY_API_KEY")
if not api_key:
    print("ERROR: BITQUERY_API_KEY environment variable is not set.")
    print("Run: export BITQUERY_API_KEY=your_token")
    exit(1)

If the key is missing, tell the user and stop. Do not proceed without it.

Step 2 — Run stream

Install the WebSocket dependency once:

pip install 'gql[websockets]'

Use the streaming script (subscribes to the Bitcoin price feed in real time):

python ~/.openclaw/skills/bitcoin-price-feed/scripts/stream_bitquery.py

Optional: stop after N seconds:

python ~/.openclaw/skills/bitcoin-price-feed/scripts/stream_bitquery.py --timeout 60

Or subscribe inline with Python (real-time stream):

import asyncio
from gql import Client, gql
from gql.transport.websockets import WebsocketsTransport

async def main(): token = os.environ["BITQUERY_API_KEY"] url = f"wss://streaming.bitquery.io/graphql?token={token}" transport = WebsocketsTransport( url=url, headers={"Sec-WebSocket-Protocol": "graphql-ws"}, ) async with Client(transport=transport) as session: sub = gql(""" subscription { Trading { Tokens(where: {Currency: {Id: {is: "bid:bitcoin"}}, Interval: {Time: {Duration: {eq: 1}}}}) { Token { Name Symbol Network } Block { Time } Price { Ohlc { Open High Low Close } Average { Mean SimpleMoving ExponentialMoving } } Volume { Usd } } } } """) async for result in session.subscribe(sub): print(result) # each tick streamed in real time

asyncio.run(main())

Step 3 — 什么 您 获取 在...上 stream

Each tick includes:

  • OHLC (打开, High, Low, 关闭) 和 Volume (USD) 对于 1-第二个 间隔
  • Derived metrics (从 Bitquery): Mean, SimpleMoving (SMA), ExponentialMoving (EMA), WeightedSimpleMoving (WMA)
  • 会话-derived: % 更改 vs 上一个 tick (computed 从 stream)

The stream runs until you stop it (Ctrl+C) or use --timeout.

Step 4 — 格式 输出 clearly

When presenting streamed ticks to the user, use a clear format like:

Bitcoin (BTC) — ethereum network  @ 2025-03-06T14:00:00Z

OHLC: Open: $85,200.00 High: $86,100.00 Low: $84,950.00 Close: $85,780.00 Derived (on stream): Mean: $85,500.00 SMA: $85,400.00 EMA: $85,520.00 Tick Δ: +0.12% vs previous

Volume (USD): $1,234,567.00

间隔 (subscription)

The default subscription uses duration 1 (1-second tick data). The same Trading.Tokens subscription supports other durations in the where clause (e.g. 5, 60, 1440 for 5m, 1h, 1d candles) if the API supports them for subscriptions.

错误 handling

  • Missing BITQUERY_API_KEY: Tell 用户 到 导出 变量 和 停止
  • WebSocket 连接 失败 / 401: 令牌 无效 或 已过期 (auth 通过 URL ?令牌= 仅 — 做 不 pass 令牌 在...中 headers)
  • Subscription errors 在...中 payload: Log 错误 消息 和 停止 cleanly (发送 complete, 关闭 transport)
  • 否 ticks received: Check 令牌 和 network; Bitquery 可能 需要 moment 到 发送 第一个 tick

Reference

Full field reference is in references/graphql-fields.md. Use it to add filters or request extra fields (e.g. date range) in the subscription.

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务