Tutorial

Unified financial tools platform - one API Key for all features

Platform Overview

OpenFinClaw is a unified financial tools platform - one API Key for all features:

  • Market Data: Price quotes, K-lines, crypto market data, multi-asset comparison, code search
  • Strategy Tools: Create, validate, publish, and fork strategies
  • Unified Auth: One API Key for Hub and DataHub

Hub Platform

Hub Platform (hub.openfinclaw.ai) is a 7×24 global strategy evolution network:

  • Strategy Sharing: Publish your strategies for the community to view and Fork
  • Backtest Validation: Automatic backtest on publish to verify strategy effectiveness
  • Community Evolution: Other users can Fork your strategies for optimization
  • Performance Leaderboard: View top performing strategies across markets

DataHub

DataHub provides real-time market data:

  • Multi-Market Coverage: Crypto, A-shares, HK stocks, US stocks
  • Rich Data: Prices, K-lines, OHLCV, DeFi TVL, funding rates
  • Data Sources: CoinGecko, DefiLlama, CCXT, Tushare

Core Value: Don't chase the wave. Create the wave.

Installation Guide

Prerequisites

Before installing, check if OpenClaw is installed:

openclaw --version

If not installed, please install OpenClaw from the official website.

Install openfinclaw Plugin

Run the following commands in OpenClaw:

openclaw plugins install @openfinclaw/openfinclaw-strategy openclaw plugins enable @openfinclaw/openfinclaw-strategy

On success, the plugin path will be shown.

Verify Installation

Check plugin status:

openclaw plugins list

Test command:

openclaw strategy list

Quick Start

Market Data Queries (Requires API Key)

User: What's the price of BTC now
Agent: Use fin_price to get real-time price

User: ETH 7-day trend
Agent: Use fin_kline to get K-line data

User: Which DeFi protocol has the highest TVL
Agent: Use fin_crypto to get DeFi rankings

User: Which performed better, BTC or ETH
Agent: Use fin_compare to compare returns

Strategy Management

View leaderboard:

openclaw strategy leaderboard

View returns leaderboard Top 10:

openclaw strategy leaderboard returns --limit 10

View strategy details:

openclaw strategy show 550e8400-e29b-41d4-a716-446655440001 --remote

Configure API Key

Get API Key

Get your API Key from hub.openfinclaw.ai (starts with fch_). One Key for all features.

Configuration

Use OpenClaw config:

openclaw config set plugins.entries.openfinclaw-strategy.config.apiKey YOUR_API_KEY

Or use environment variable:

export OPENFINCLAW_API_KEY=YOUR_API_KEY

⚠️ API Key Security Reminder

Important: Do not expose your API Key!

  • API Key starts with fch_, used for Hub and DataHub API authentication
  • Do not commit API Key to Git repositories or share publicly
  • Do not expose real API Key in public chats, screenshots, or code examples
  • If you suspect the Key is compromised, regenerate it immediately in Hub settings

Features Overview

Market Data Tools

ToolPurposeRequires API Key
fin_pricePrice quotes (stocks/crypto/index)Yes
fin_klineK-line/OHLCV dataYes
fin_cryptoCrypto market data (21 endpoints)Yes
fin_compareMulti-asset price comparison (2-5 assets)Yes
fin_slim_searchCode/name searchYes

Strategy Tools

ToolPurposeRequires API Key
skill_leaderboardQuery leaderboard (composite/returns/risk/popular/rising)Yes
skill_get_infoGet Hub strategy public detailsYes
skill_validateLocal strategy package validation (FEP v2.0)Yes
skill_list_localList locally downloaded strategiesYes
skill_forkDownload public strategy from Hub to localYes
skill_publishPublish strategy ZIP to Hub, auto-trigger backtestYes
skill_publish_verifyQuery publish status and backtest reportYes

Market Data Skills

SkillTrigger ScenarioDescription
price-checkQuick price check, how much is XXSimplest price query

Strategy Skills

SkillTrigger ScenarioDescription
strategy-builderCreate new strategy, generate strategy codeNatural language → FEP v2.0 strategy package
skill-publishPublish strategy to serverValidate → Package → Publish → Query backtest
strategy-forkDownload/clone Hub strategyFork → Local edit → Publish new version
strategy-packCreate backtest strategy packageGenerate fep.yaml + strategy.py

Typical Workflow

Market Query → Analysis → Strategy Create → Validate → Publish → Fork → Optimize
      ↓           ↓              ↓             ↓          ↓
  fin_price   compare    strategy-builder  skill_validate  skill_publish
  fin_kline                        skill_fork      skill_publish_verify

CLI Commands

strategy leaderboard

View Hub leaderboard:

Composite leaderboard Top 20 (default):

openclaw strategy leaderboard

Returns leaderboard Top 10:

openclaw strategy leaderboard returns --limit 10

Popular leaderboard rank 21-40:

openclaw strategy leaderboard popular --offset 20 --limit 20

Leaderboard Types:

TypeDescriptionSort By
compositeComposite (default)FCS score
returnsReturnsReturn rate
riskRiskRisk score
popularPopularSubscribers
risingRisingNew strategy returns within 30 days

strategy fork

Download strategy from Hub to local:

Using strategy ID:

openclaw strategy fork 34a5792f-7d20-4a15-90f3-26f1c54fa4a6

Using Hub URL:

openclaw strategy fork https://hub.openfinclaw.ai/strategy/34a5792f-7d20-4a15-90f3-26f1c54fa4a6

strategy list

List local strategies:

openclaw strategy list

strategy show

View strategy details:

View local strategy:

openclaw strategy show btc-adaptive-dca-34a5792f

Get latest info from Hub:

openclaw strategy show 550e8400-e29b-41d4-a716-446655440001 --remote

Local Storage Structure

Strategies are stored in ~/.openfinclaw/workspace/strategies/:

~/.openfinclaw/workspace/strategies/
└── 2026-03-16/                              # Organized by date
    ├── btc-adaptive-dca-34a5792f/           # Name + short ID (Forked)
    │   ├── fep.yaml                         # Strategy config
    │   ├── scripts/
    │   │   └── strategy.py                  # Strategy code
    │   └── .fork-meta.json                  # Metadata
    └── my-new-strategy/                     # Self-created (no short ID)
        └── ...

Dashboard

The plugin automatically starts an embedded HTTP service on launch (bound to 127.0.0.1 only):

Open browser and visit http://127.0.0.1:18792

The dashboard contains 4 tabs:

TabData SourceDescription
Activity Logagent_activity_logExecution records for all 12 tools
Event Streamagent_eventsKey events: Fork, publish, backtest completion
Strategy ListstrategiesLocal strategy lifecycle status
Backtest Resultsbacktest_resultsBacktest metrics (returns/Sharpe/drawdown etc.)

REST API (for frontend or other tools):

EndpointDescription
GET /api/activity-logTool call logs (paginated)
GET /api/agent-eventsEvent stream (paginated)
GET /api/strategiesStrategy list
GET /api/backtest-resultsBacktest results (filterable by strategy)

SQLite database path: ~/.openfinclaw/workspace/openfinclaw-plugin.db

Strategy lifecycle Level:

LevelStageDescription
L0CreatedForked or new, not yet backtested
L1BacktestBacktest submitted (in progress or completed)
L2Paper TradingPaper trading running (reserved)
L3Live TradingLive trading running (reserved)

FAQ

Q: Where can I get the API Key?

Visit hub.openfinclaw.ai and get it from your account settings after login. One Key for all features.

Q: Does market data require extra payment?

API Key includes market data access, no extra payment required.

Q: Can I modify a Forked strategy?

Yes. After Fork downloads to local, you can freely modify scripts/strategy.py and publish as your new version.

Q: Will published strategies be public?

Depends on identity.visibility setting in fep.yaml:

  • public: Public, visible to community and Forkable
  • private: Private, only visible to yourself
  • unlisted: Not public but accessible via link

Q: How to check if openfinclaw is installed?

openclaw plugins list | grep openfinclaw

Related Links