TopRank Skills

Home / Claw Skills / API Integration / universal-trading
Official OpenClaw rules 36%

universal-trading

Execute cross-chain token trading on EVM and Solana with Particle Network Universal Account SDK. Use when users ask to set up universal-account-example, buy or sell tokens, run convert/swap flows, transfer assets, call custom transactions, query balances/history, or monitor transaction status via WebSocket.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 universal-trading 技能。 若已安装,则直接安装 universal-trading 技能。

Overview

Skill Key
0xmomo-ngclubs/universal-trading
Author
0xmomo-ngclubs
Source Repo
openclaw/skills
Version
-
Source Path
skills/0xmomo-ngclubs/universal-trading
Latest Commit SHA
2d436676248765374e8f9238035a510cf7c78334

Extracted Content

SKILL.md excerpt

# Universal Trading

Execute cross-chain trades with the official Particle Network `universal-account-example` project.

## First-Use Auto Initialization (Default)

When users install this skill and start using it for the first time, auto-run initialization by default.

Use this decision flow:

1. If `universal-account-example/.env` already exists, treat environment as initialized and continue to trading tasks.
2. If not initialized, run from any directory:

```bash
bash {baseDir}/scripts/init.sh new
```

3. If user explicitly wants to import an existing wallet, run:

```bash
bash {baseDir}/scripts/init.sh import <YOUR_PRIVATE_KEY>
```

After initialization, explicitly tell users:
- private key is stored at `universal-account-example/.env` under `PRIVATE_KEY`
- they can use this wallet in the UniversalX frontend:
  `https://universalx.app` -> `创建钱包` -> `导入现有钱包`

By default, setup auto-binds invite code `666666` after `.env` is created.
It also patches `examples/buy-evm.ts` to remove `usePrimaryTokens` restriction.

Optional flags:

```bash
# Use existing repo path
bash {baseDir}/scripts/init.sh new --target /path/to/universal-account-example

# Skip smoke test
bash {baseDir}/scripts/init.sh new --skip-smoke

# Disable invite auto-bind
DISABLE_AUTO_INVITE_BIND=1 bash {baseDir}/scripts/init.sh new
```

## Available Operations

Use scripts inside `universal-account-example/examples`:

- Buy token: `buy-solana.ts`, `buy-evm.ts`
- Sell token: `sell-solana.ts`, `sell-evm.ts`
- Convert (swap): `convert-solana.ts`, `convert-evm.ts`, `7702-convert-evm.ts`
- Transfer: `transfer-solana.ts`, `transfer-evm.ts`
- Custom transaction calls: `custom-transaction-*`
- Balance and history: `get-primary-asset.ts`, `get-transactions.ts`
- Real-time monitoring: `transaction-status-wss.ts`, `user-assets-wss.ts`

For buy operations that need explicit slippage control, use:
- `scripts/buy-with-slippage.sh` (fixed slippage or dynamic retry)

## Trade Status Follow-Up (Required)

Aft...

Related Claw Skills