CMB FX Rates for Openclaw

A specialized tool for retrieving real-time foreign exchange rates and calculating middle prices directly from China Merchants Bank official APIs.

horsley
v1.0.0
Feb 25, 2026
0
942
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cmb-fx

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cmb-fx using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is CMB FX Rates?

The cmb-fx skill provides developers and automated agents with direct access to official China Merchants Bank (CMB) foreign exchange data. It facilitates the retrieval of spot and cash buying/selling prices for various currencies, enabling precise financial calculations within the Openclaw Skills ecosystem.

This tool is essential for applications requiring accurate, up-to-date currency conversion data sourced from a major financial institution. It simplifies the process of monitoring currency fluctuations by providing a structured way to interact with the CMB official API endpoint without manual web scraping.

CMB FX Rates Use Cases

  • Automated monitoring of HKD, USD, or other major currency exchange rates for trading.
  • Calculating precise middle prices for internal corporate financial reporting.
  • Triggering automated alerts or workflows based on specific exchange rate thresholds.
  • Integrating real-time FX data into accounting software or custom fintech applications.

How CMB FX Rates Works

  1. The skill initiates a secure HTTP request to the official CMB FX rate API endpoint using curl.
  2. It retrieves a comprehensive JSON payload containing current rates for all supported currency pairs.
  3. The agent or user applies filters (such as currency codes like HKD) to isolate the relevant data fields.
  4. It identifies the specific spot or cash buying/selling prices provided per 100 foreign currency units.
  5. The middle price is calculated using the standard formula to provide a normalized exchange rate.

CMB FX Rates Setup

This skill requires the curl binary to be available on your system path. To set up and verify the connection, use the following commands:

# Ensure curl is installed
curl --version

# Test the CMB API connectivity and filter for HKD rates
curl -s "https://fx.cmbchina.com/api/v1/fx/rate" | jq '.body[] | select(.ccyNbrEng | contains("HKD"))'

CMB FX Rates Data Schema & Taxonomy

The skill processes data based on the official CMB API response structure. All price values are returned relative to 100 units of the foreign currency.

Field Description
rthBid Spot Buying Price (per 100 units)
rthOfr Spot Selling Price (per 100 units)
rtcBid Cash Buying Price (per 100 units)
rtcOfr Cash Selling Price (per 100 units)
ratTim Data Update Timestamp
ccyNbrEng English Currency Code (e.g., HKD, USD, EUR)

CMB FX Rates Advanced Features

  • Programmatic middle price calculation: Formula used is (Spot Buying + Spot Selling) / 2 / 100.
  • High-frequency polling support for real-time currency monitoring within Openclaw Skills.
  • Lightweight footprint utilizing standard CLI tools for maximum compatibility across environments.
  • Direct integration with jq for complex JSON filtering and data transformation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*