wheelx-fi

WheelX Skill

0
0
# Install this skill:
npx skills add wheelx-fi/wheelx-skills

Or install specific skill: npx add-skill https://github.com/wheelx-fi/wheelx-skills

# Description

agent skills to use WheelX API

# SKILL.md

WheelX Skill

查询钱包资产、跨链报价、订单状态、链信息的工具。

API Base URL

https://api.wheelx.fi/v1

可用功能

1. 查询链信息 (Chain Info)

获取 WheelX 支持的所有链信息,包括热门 token 地址。

Endpoint: GET /chain-info

示例:

https://api.wheelx.fi/v1/chain-info

返回字段:
- chains - 链列表
- chain_id - 链 ID
- name - 链名称
- server_name - 服务器名称
- is_testnet - 是否测试网
- is_popular - 是否热门
- eth_token - 原生 ETH 地址
- usdc_token - USDC 地址
- usdt_token - USDT 地址
- rpc_url - RPC 地址
- is_evm - 是否 EVM 兼容


2. 查询 Token 信息 (Token Info)

通过关键字或合约地址搜索代币信息。

Endpoint: GET /token-info?address={keyword_or_address}

参数:
- address: 可以是代币符号(如 "USDC")、名称、或合约地址

示例:

https://api.wheelx.fi/v1/token-info?address=USDC
https://api.wheelx.fi/v1/token-info?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

返回字段:
- symbol - 代币符号
- name - 代币名称
- decimals - 精度
- address - 合约地址
- chain_id - 所属链 ID
- logo - 代币图标 URL
- tags - 标签
- categories - 分类


3. 查询钱包 Token 持仓

获取指定钱包在所有链上的代币持仓。

Endpoint: GET /token-balances?address={wallet_address}

示例:

https://api.wheelx.fi/v1/token-balances?address=0x69Efcb7710de973BE4aCf86600ec6044fa9D6eF3

返回字段:
- chain_id - 链ID
- token.symbol - 代币符号
- token.name - 代币名称
- balance - 持仓数量
- price - USD 价格

常用 Chain ID:
| 链 | Chain ID | USDC 地址 |
|---|:---:|---|
| Ethereum | 1 | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| BSC | 56 | 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d |
| Polygon | 137 | 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 |
| Arbitrum | 42161 | 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 |
| Optimism | 10 | 0x0b2C639c533813f1aF6D2D07a9d2A7a87a30a5f5 |
| Base | 8453 | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Mantle | 5000 | 0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9 |
| Avalanche | 43114 | 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E |
| Blast | 81457 | 0x4300000000000000000000000000000000000003 |
| Monad/Plasma | 143 | 0x754704Bc059F8C67012fEd69BC8A327a5aafb603 |
| Sonic | 146 | 0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38 |
| Flare | 14 | - |
| Celo | 42220 | - |
| Gnosis | 100 | - |
| Ronin | 2020 | - |
| Metis | 1088 | - |
| Cronos | 25 | - |
| Sei | 1329 | - |
| XDC | 50 | - |
| Plume | 98866 | 0x222365EF19F7947e5484218551B56bb3965Aa7aF |
| Abstract | 2741 | 0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1 |

注意: 原生代币 (ETH, BNB 等) 地址用 0x0000000000000000000000000000000000000000


4. 获取跨链报价 (Quote)

获取 swap/bridge 的报价(不发送交易)。

Endpoint: POST /quote

请求体:

{
  "from_chain": 42161,
  "to_chain": 8453,
  "from_token": "0x0000000000000000000000000000000000000000",
  "to_token": "0x0000000000000000000000000000000000000000",
  "from_address": "0x...",
  "to_address": "0x...",
  "amount": "1000000000000000000",
  "slippage": 50
}

参数说明:
| 参数 | 类型 | 说明 |
|-----|-----|-----|
| from_chain | integer | 源链 ID |
| to_chain | integer | 目标链 ID |
| from_token | string | 源代币地址 (原生代币用 0x0...0) |
| to_token | string | 目标代币地址 |
| from_address | string | 发送者钱包地址 |
| to_address | string | 接收者钱包地址 |
| amount | string | 输入金额 (以 token 最小单位) |
| slippage | integer | 滑点 (50 = 0.5%) |
| affiliation | string | 推荐码 (可选) |

返回字段:
- request_id - 报价ID
- amount_out - 输出金额
- fee - 手续费
- min_receive - 最低接收金额
- estimated_time - 预计时间 (秒)
- router_type - 路由类型 (swap/bridge/wrap/unwrap)
- price_impact - 价格影响
- tx - 交易数据 (to, value, data, gas)
- approve - 授权信息 (如需)


5. 查询订单状态

通过 request_id 查询单个订单状态。

Endpoint: GET /order/{request_id}

示例:

https://api.wheelx.fi/v1/order/0x1234...

返回字段:
- order_id - 订单ID
- from_amount / to_amount - 输入/输出金额
- status - 订单状态 (Open/Filled/Failed/Refund)
- open_tx_hash - 发起交易哈希
- fill_tx_hash - 完成交易哈希
- points - 奖励积分


6. 查询历史订单

查询钱包的历史交易记录。

Endpoint: GET /orders?address={wallet}&limit=10&offset=0

参数:
| 参数 | 类型 | 说明 |
|-----|-----|-----|
| address | array | 钱包地址 (可多个) |
| network | string | mainnet/testnet |
| limit | integer | 返回数量 (1-50) |
| offset | integer | 偏移量 |


使用示例

查询持仓

用户说 "查询 0x... 的资产",调用 token-balances API。

查询链信息

用户说 "支持哪些链" 或 "查看链信息",调用 chain-info API。

查询 Token 信息

用户说 "搜索 USDC" 或 "查询代币信息",调用 token-info API。

获取报价

用户说 "从 Arbitrum 跨链 1 ETH 到 Base",调用 quote API。

查看订单

用户说 "查看订单 0x1234...",调用 order API。

查看历史

用户说 "查看我的交易历史",调用 orders API。


注意事项

  • 不包含交易签名发送 - 此 skill 仅用于查询和报价
  • 所有金额单位为 token 最小单位 (如 ETH 用 wei = 10^18)
  • 报价有时效性,实际交易前需重新获取
  • 支持 EVM、Bitcoin、Solana 跨链

相关链接

  • 文档: https://docs.wheelx.fi
  • API: https://api.wheelx.fi

# README.md

WheelX Skill for Claude Code

A Claude Code skill for interacting with WheelX cross-chain bridge and swap APIs. This skill provides tools to query wallet balances, get cross-chain quotes, check order status, and retrieve blockchain information.

Quick Start

When users need to interact with WheelX services, use this skill to:
- Query wallet token balances across multiple chains
- Get cross-chain swap/bridge quotes
- Check order status and transaction history
- Retrieve supported chain information

API Reference

Base URL: https://api.wheelx.fi/v1

Available Endpoints

  1. Chain Info - GET /chain-info
  2. Get all supported chains and their popular token addresses

  3. Token Info - GET /token-info?address={keyword_or_address}

  4. Search tokens by symbol, name, or contract address

  5. Token Balances - GET /token-balances?address={wallet_address}

  6. Get wallet token balances across all supported chains

  7. Cross-chain Quote - POST /quote

  8. Get swap/bridge quotes without sending transactions

  9. Order Status - GET /order/{request_id}

  10. Check status of a specific order

  11. Order History - GET /orders?address={wallet}&limit=10&offset=0

  12. Get transaction history for wallet(s)

Usage Examples

Query Wallet Balances

curl "https://api.wheelx.fi/v1/token-balances?address=0x69Efcb7710de973BE4aCf86600ec6044fa9D6eF3"

Get Cross-chain Quote

curl -X POST "https://api.wheelx.fi/v1/quote" \
  -H "Content-Type: application/json" \
  -d '{
    "from_chain": 42161,
    "to_chain": 8453,
    "from_token": "0x0000000000000000000000000000000000000000",
    "to_token": "0x0000000000000000000000000000000000000000",
    "from_address": "0x69Efcb7710de973BE4aCf86600ec6044fa9D6eF3",
    "to_address": "0x69Efcb7710de973BE4aCf86600ec6044fa9D6eF3",
    "amount": "1000000000000000000",
    "slippage": 50
  }'

Check Order Status

curl "https://api.wheelx.fi/v1/order/0xabc123..."

JavaScript Helper Functions

The repository includes a tools.js file with helper functions:

const { getTokenBalances, getQuote, getOrder, getOrders, CHAIN_IDS } = require('./tools.js');

// Get wallet balances
const balances = await getTokenBalances('0x...');

// Get cross-chain quote
const quote = await getQuote({
  from_chain: CHAIN_IDS.arbitrum,
  to_chain: CHAIN_IDS.base,
  from_token: '0x0000000000000000000000000000000000000000',
  to_token: '0x0000000000000000000000000000000000000000',
  from_address: '0x...',
  to_address: '0x...',
  amount: '1000000000000000000',
  slippage: 50
});

// Check order status
const order = await getOrder('0x...');

// Get order history
const history = await getOrders(['0x...'], 10, 0);

File Structure

  • README.md - This documentation file
  • SKILL.md - Detailed API documentation in Chinese
  • examples.md - Usage examples and sample conversations
  • tools.js - JavaScript helper functions for API calls

Important Notes

  1. Read-Only Operations - This skill only performs queries and gets quotes. It does NOT sign or send transactions.
  2. Amount Units - All amounts are in token smallest units (e.g., wei for ETH = 10^18).
  3. Quote Validity - Quotes have limited validity (typically 30-60 seconds).
  4. Supported Chains - WheelX supports EVM chains, Bitcoin, and Solana for cross-chain operations.
  5. Error Handling - Always check API responses for error messages and handle them appropriately.

Integration with Claude Code

When users ask about:
- "Check my wallet balances" → Use token-balances API
- "Get a quote for cross-chain swap" → Use quote API
- "What chains are supported?" → Use chain-info API
- "Check my transaction status" → Use order API
- "Show my transaction history" → Use orders API


This skill is maintained for LLM agents (Claude Code, OpenClaw) to interact with WheelX cross-chain bridge services.

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.