Blockchain Balance Checker

v1.0.5

Query the balance of a blockchain address via Tokenview API, defaulting to BTC and requiring TOKENVIEW_API_KEY in the environment.

0· 168·0 current·0 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name and description match the included code and SKILL.md. The skill requires TOKENVIEW_API_KEY and calls Tokenview's addr/b endpoint—exactly what a Tokenview-based balance checker needs. It also documents support for multiple chains (BTC/ETH/BSC/TRON), which the code implements.
Instruction Scope
Runtime instructions tell the agent to run tokenview_api.py and supply an address and optional coin. The script only reads TOKENVIEW_API_KEY from the environment, makes an HTTPS request to services.tokenview.io, and prints JSON to stdout. There are no instructions to read unrelated files, other env vars, or to transmit data to endpoints other than Tokenview.
Install Mechanism
There is no install spec (instruction-only install), but SKILL.md and the script declare a dependency on the Python 'requests' package. The skill will fail if 'requests' is not available; nothing is downloaded or executed from untrusted URLs.
Credentials
Only TOKENVIEW_API_KEY is required (declared in skill.json and used in code). That single API key is proportional to the functionality. The code does not request other credentials or access unrelated environment variables.
Persistence & Privilege
always is false and the skill does not attempt to modify other skills or system-wide settings. It only runs a standalone Python script and does not request permanent elevated presence.
Assessment
This skill is internally consistent, but check these practical points before installing: (1) You must provide a valid TOKENVIEW_API_KEY; ensure you trust Tokenview and understand any logging/usage limits tied to that key. (2) The runtime environment needs the Python 'requests' package — if it's missing the skill will fail. (3) The skill issues outbound HTTPS requests to services.tokenview.io — avoid using highly sensitive addresses if you don't want those queries visible to the API provider. (4) The package's source/homepage is unspecified; if you require provenance, request a known publisher or inspect the code yourself before enabling autonomous use.

Like a lobster shell, security has layers — review code before you run it.

latestvk97e552m143axmtxd238gvd9wd83h5m0
168downloads
0stars
6versions
Updated 3w ago
v1.0.5
MIT-0

SKILL: getAddressBalance

Description

A skill for querying the balance of a specified blockchain address using the Tokenview API.
The default supported coin is BTC, and the API Key must be provided through the environment variable TOKENVIEW_API_KEY.

Triggers

  • "What is the balance of BTC address <address>?" or "How much BTC does <address> have?"
  • Any conversation where an address is detected and interpreted as a balance query

API Endpoint and Secret Handling

  • Tokenview API:https://services.tokenview.io/vipapi/addr/b/{lowercase-coin-abbr}/{address}?apikey={apikey}
  • Using environment variable TOKENVIEW_API_KEY to config API Key。
  • Parameters:lowercase-coin-abbr is coin abbreviation in lowercase (default: btc),address blockchain address extracted from the conversation
  • Output format:The script returns JSON

Parameters

  • address:The Blockchain address
  • coin:Coin abbreviation, default is btc

Output Format

  • Success:The script returns JSON , and the user sees:"Balance is {balance} {COIN}"
  • Failure:Example raw Tokenview API JSON:
    {
      "code": 1,
      "msg": "404",
      "data": "NONE"
    }
    
    will be like: "Balance query failed:Code=1, Msg=404, Data=NONE"

Implementation (execution plan)

  • The skill executes the tokenview_api.py script to perform the API call:
    • Example command (BTC):
      python $OPENCLAW_STATE_DIR/workspace/skills/tokenview_balance_checker/tokenview_api.py <address> --coin btc
      
  • Script information:
    • Path: $OPENCLAW_STATE_DIR/workspace/skills/tokenview_balance_checker/tokenview_api.py
    • Inputs: address (required),coin (optional, default is btc)
    • Dependencies: requests
    • API Key: Provided via environment variable TOKENVIEW_API_KEY
    • Output: JSON printed to stdout, e.g.:{"code":1,"msg":"success","data":"0.123 BTC"}

Parameters (payload-driven)

  • address: blockchain address to query
  • coin: currency abbreviation (default: btc)

Output Mapping (to user-facing text)

  • Success: "Balance is {balance} {COIN}"
  • Failure: "Code={code}, Msg={msg}, Data={data}"

Example

  • Input: "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa 余额多少?"
  • Script output: {"code":1, "msg":"成功", "data":"0.12345678 BTC"}
  • User visible: 余额为 0.12345678 BTC

Comments

Loading comments...