skills$openclaw/apex
joshlin1118.9k

by joshlin111

apex – OpenClaw Skill

apex is an OpenClaw Skills integration for coding workflows. Trade and monitor ApeX perpetual futures. Check balances, view positions with P&L, place/cancel orders, execute market trades. Use when the user asks about ApeX trading, portfolio status, crypto positions, or wants to execute trades on ApeX.

8.9k stars4.6k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nameapex
descriptionTrade and monitor ApeX perpetual futures. Check balances, view positions with P&L, place/cancel orders, execute market trades. Use when the user asks about ApeX trading, portfolio status, crypto positions, or wants to execute trades on ApeX. OpenClaw Skills integration.
ownerjoshlin111
repositoryjoshlin111/apex-trading
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @joshlin111/apex-trading
last updatedFeb 7, 2026

Maintainer

joshlin111

joshlin111

Maintains apex in the OpenClaw Skills directory.

View GitHub profile
File Explorer
13 files
.
references
api.md
1.4 KB
scripts
analyze-coingecko.mjs
4.8 KB
analyze-market.mjs
4.7 KB
apex.mjs
9.5 KB
check-positions.mjs
5.3 KB
package-lock.json
167.0 KB
package.json
197 B
scan-market.mjs
2.3 KB
_meta.json
291 B
README.md
5.9 KB
SKILL.md
4.6 KB
SKILL.md

name: apex description: Trade and monitor ApeX perpetual futures. Check balances, view positions with P&L, place/cancel orders, execute market trades. Use when the user asks about ApeX trading, portfolio status, crypto positions, or wants to execute trades on ApeX.

ApeX Trading Skill

Full trading and portfolio management for ApeX perpetual futures exchange.

Prerequisites

Install dependencies once:

cd skills/apex/scripts && npm install

Authentication

Private operations require API credentials and an Omni seed:

  • APEX_API_KEY
  • APEX_API_SECRET
  • APEX_API_PASSPHRASE
  • APEX_OMNI_SEED

Testnet:

  • Set APEX_TESTNET=1 (or APEX_ENV=qa).

Core Operations

Market Data (Public)

Get price for a coin:

node scripts/apex.mjs price BTC

List available symbols:

node scripts/apex.mjs meta

Portfolio Monitoring (Private)

Check balance:

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs balance

View positions with P&L:

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs positions

Check open orders:

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs orders

View trade history:

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs fills

Trading Operations

All trading commands require the ApeX API credentials and seed.

Place limit orders:

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs limit-buy BTC 0.1 45000

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs limit-sell ETH 1 3000

Market orders:

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs market-buy BTC 0.5

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs market-sell ETH 2

Cancel orders:

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs cancel-all

APEX_API_KEY=... APEX_API_SECRET=... APEX_API_PASSPHRASE=... APEX_OMNI_SEED=... \
  node scripts/apex.mjs cancel-all BTC

Output Formatting

All commands output JSON. Parse and format for chat display:

For balance/portfolio:

  • Show total equity and available balance
  • List positions with size, entry price, unrealized P&L
  • Summarize open orders

For trade execution:

  • Confirm order details before executing
  • Report order ID and status after execution
  • Show filled price if immediately executed

Safety Guidelines

Before executing trades:

  1. Confirm trade parameters with user (symbol, size, side, price)
  2. Show current price and position for context
  3. Calculate estimated cost/proceeds

Position sizing:

  • Warn if trade is >20% of account equity
  • Suggest appropriate sizes based on account balance

Price checks:

  • For limit orders, compare limit price to current market price
  • Warn if limit price is >5% away from market (likely mistake)

Error Handling

Common errors:

  • "Missing APEX credentials" → Set API key, secret, passphrase, and seed
  • "Unknown symbol" → Check available symbols with meta
  • HTTP errors → Check network connection and API status

When errors occur:

  • Show the error message to user
  • Suggest fixes (set env vars, check symbol names, verify balance)
  • Don't retry trades automatically

Workflow Examples

"How's my ApeX portfolio?"

  1. Run balance to get total equity
  2. Run positions to get open positions
  3. Format summary: equity, positions with P&L, total unrealized P&L

"Buy 0.5 BTC on ApeX"

  1. Run price BTC to get current price
  2. Confirm with user: "Buy 0.5 BTC at market? Current price: $X. Estimated cost: $Y"
  3. Execute market-buy BTC 0.5
  4. Report result

"What's the current BTC price on ApeX?"

  1. Run price BTC
  2. Format response: "BTC: $X on ApeX"

"Close my ETH position"

  1. Run positions to get current ETH position size
  2. If long → market-sell, if short → market-buy
  3. Execute with position size
  4. Report result

Advanced Features

List all available symbols:

node scripts/apex.mjs meta

Notes

  • Symbols use -USDT format for trading (e.g., BTC-USDT).
  • Public market data endpoints often use BTCUSDT format.
  • Prices are in USD.
  • ApeX uses perpetual futures, not spot trading.
  • Check references/api.md for API details.
README.md

ApeX Trading Skill for Clawdbot

Full-featured Clawdbot skill for trading ApeX perpetual futures. Monitor your portfolio, analyze markets with charts/volume, and execute trades with AI assistance.

Features

Core Trading

  • Portfolio Monitoring: Balance, positions, P&L tracking
  • Order Execution: Market and limit orders (long & short)
  • Order Management: Cancel specific orders or all at once
  • Trade History: View recent fills
  • Security: API credentials required for private operations

Market Analysis Tools

  • Chart Data with Volume: Historical price action via CoinGecko
  • Momentum Detection: Automated signal generation (strong bull/bear/neutral)
  • Volume Analysis: Compare current volume vs average
  • Multi-timeframe: 1-hour and 6-hour trend analysis
  • Multi-Asset Coverage: Trade any perpetual supported by ApeX

Strategy Support

  • Position Monitoring: Check P&L with automated alerts
  • Risk Management: 10% position size, stop losses, profit targets
  • Market Scanner: Quick overview of all major assets
  • Decision Support: Wait for high-probability setups

Installation

# Install via ClawdHub (recommended)
clawdhub install apex

# Or install manually in your Clawdbot workspace
cd skills
# Clone or copy the apex skill folder here

# Install dependencies
cd apex/scripts
npm install

Configuration

API Credentials (Required for Private Operations)

export APEX_API_KEY=your_api_key
export APEX_API_SECRET=your_api_secret
export APEX_API_PASSPHRASE=your_passphrase
export APEX_OMNI_SEED=your_omni_seed

Or use .env file (recommended for security):

cd apex
cp .env.example .env
# Edit .env with your credentials
nano .env

Testnet

To use ApeX testnet (QA):

export APEX_TESTNET=1
# or
export APEX_ENV=qa

Usage

Market Analysis

Analyze market with charts and volume:

cd scripts
./analyze-coingecko.mjs

Quick market scan:

./scan-market.mjs

Check your positions:

./check-positions.mjs

Direct CLI Trading

# Check balance
node scripts/apex.mjs balance

# View positions with P&L
node scripts/apex.mjs positions

# Get current BTC price
node scripts/apex.mjs price BTC

# Place market orders
node scripts/apex.mjs market-buy SOL 0.1
node scripts/apex.mjs market-sell ETH 0.5

# Place limit orders
node scripts/apex.mjs limit-buy BTC 0.001 88000
node scripts/apex.mjs limit-sell ETH 1 3100

# Cancel all orders
node scripts/apex.mjs cancel-all

Through Clawdbot

Once installed, interact naturally:

  • "Analyze the crypto market on ApeX"
  • "What's the momentum on BTC right now?"
  • "Check my ApeX positions"
  • "Show me current SOL price and volume"
  • "Enter a BTC long position"
  • "Close my ETH position"

Commands Reference

Public Operations

  • price <coin> - Get current price (auto-maps to -USDT)
  • meta - List all available symbols

Trading Operations (Requires ApeX API Credentials)

  • balance - Show account balance and equity
  • positions - Show open positions with P&L
  • orders - Show open orders
  • fills - Show recent trade history
  • market-buy <coin> <size> - Market buy
  • market-sell <coin> <size> - Market sell
  • limit-buy <coin> <size> <price> - Place limit buy order
  • limit-sell <coin> <size> <price> - Place limit sell order
  • cancel-all [coin] - Cancel all orders (optionally for one coin)

Analysis Scripts

  • analyze-coingecko.mjs - Full market analysis with charts/volume
  • check-positions.mjs - Monitor open positions and P&L
  • scan-market.mjs - Quick price overview

Strategy Examples

# 1. Analyze market conditions
./analyze-coingecko.mjs

# 2. If signal is "STRONG BULLISH" or "STRONG BEARISH", check position size
# Account: $100, 10% position = $10

# 3. Enter trade
node scripts/apex.mjs market-buy ETH 0.0033  # ~$10 position

# 4. Monitor position every 30-60 minutes
./check-positions.mjs

# 5. Exit at +2% profit target or -1% stop loss
node scripts/apex.mjs market-sell ETH 0.0033

Risk Parameters (Example)

  • Position Size: 10% of account per trade
  • Max Loss: 1% per trade (stop loss)
  • Profit Target: 2% per trade
  • Max Positions: 1 at a time (focus)
  • Entry Signal: Volume >1.5x average + price move >0.5%

Architecture

  • CLI Client: scripts/apex.mjs - ApeX Omni SDK wrapper
  • Market Analysis: scripts/analyze-coingecko.mjs - CoinGecko API integration
  • Position Monitor: scripts/check-positions.mjs - Real-time P&L tracking
  • Market Scanner: scripts/scan-market.mjs - Quick price overview
  • Skill Definition: SKILL.md - Instructions for Clawdbot
  • API Reference: references/api.md - ApeX API docs
  • Dependencies: apexpro-connector-node, node-fetch

API & Data Sources

Trading:

  • ApeX Omni API (mainnet: https://omni.apex.exchange)
  • Official SDK: apexpro-connector-node

Market Data:

  • CoinGecko Free API (no auth required)
  • 24-hour historical data with volume
  • Automatic momentum signal generation

Safety Features

  • Credential-based access: Private operations require API key + seed
  • Position size validation: Checks minimum order size via ApeX rules
  • Stop loss alerts: Automated notifications when hit
  • Profit target tracking: Know when to take gains
  • Clear signal thresholds: Only trade strong momentum (>0.5% + volume)

Development

Built with:

  • Node.js (ES modules)
  • ApeX Omni SDK for trading
  • CoinGecko API for market analysis
  • node-fetch for HTTP requests

License

MIT

About Clawdbot

Clawdbot is an AI assistant framework with extensible skills. Learn more at https://clawd.bot


Disclaimer: This is unofficial software. Use at your own risk. Trading cryptocurrency perpetual futures is high risk. Always verify trades before execution. The automated signals are for informational purposes only and not financial advice.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

Install dependencies once: ```bash cd skills/apex/scripts && npm install ```

FAQ

How do I install apex?

Run openclaw add @joshlin111/apex-trading in your terminal. This installs apex into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/joshlin111/apex-trading. Review commits and README documentation before installing.