TopRank Skills

Home / Claw Skills / 金融 / 加密 / headless-trading
Official OpenClaw rules 36%

headless-trading

Autonomous trading for AI agents on Solana and BNB Chain. Use when: (1) executing token swaps on DEXs (Raydium, PancakeSwap), (2) checking token prices and balances, (3) monitoring liquidity pools, (4) implementing trading strategies, (5) managing portfolio positions. Supports headless execution without browser interaction.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

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

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

Overview

Skill Key
bnbcompanions/headless-crypto
Author
bnbcompanions
Source Repo
openclaw/skills
Version
-
Source Path
skills/bnbcompanions/headless-crypto
Latest Commit SHA
ea6ff9aeb0025dfe1f294b3512ba2effe8c90ce5

Extracted Content

SKILL.md excerpt

# Headless Trading

Autonomous trading toolkit for AI agents on Solana (Raydium) and BNB Chain (PancakeSwap).

## Core Capabilities

### 1. Token Swaps
Execute swaps on decentralized exchanges without browser interaction:
- Raydium (Solana): SOL ↔ SPL tokens
- PancakeSwap (BNB Chain): BNB ↔ BEP20 tokens

### 2. Price Monitoring
Fetch real-time token prices:
- DEX liquidity pool prices
- Multiple pair support
- Slippage calculation

### 3. Portfolio Management
Check balances and positions:
- Native token balances (SOL, BNB)
- Token holdings across wallets
- Transaction history

### 4. Strategy Execution
Implement automated trading strategies:
- Limit orders (via monitoring + execution)
- DCA (Dollar Cost Averaging)
- Stop-loss / Take-profit
- Arbitrage opportunities

## Quick Start

### Prerequisites

1. **Private key** (environment variable or secure storage)
2. **RPC endpoint** (public or private node)
3. **Python 3.8+** with dependencies

### Installation

```bash
pip install solana web3 anchorpy raydium-py base58
pip install web3 pancakeswap-sdk
```

### Basic Swap Example

```python
from scripts.raydium_swap import swap_on_raydium

# Swap 0.1 SOL for USDC
tx_hash = swap_on_raydium(
    input_token="SOL",
    output_token="USDC",
    amount=0.1,
    slippage=1.0  # 1% slippage tolerance
)
```

## Workflow Decision Tree

**1. What chain are you trading on?**
- Solana → Use `raydium_*` scripts + See [references/raydium.md](references/raydium.md)
- BNB Chain → Use `pancakeswap_*` scripts + See [references/pancakeswap.md](references/pancakeswap.md)

**2. What operation do you need?**
- Get token price → `get_price.py`
- Check wallet balance → `get_balance.py`
- Execute swap → `swap.py`
- Monitor liquidity → `monitor_pool.py`

**3. What strategy are you implementing?**
- One-time trade → Direct swap
- Automated strategy → See [references/strategies.md](references/strategies.md)

## Trading Operations

### Get Token Price

```python
from scripts.get_price import get_to...

Related Claw Skills