Agent skill

Weex Trading

by LeoYeAI in LeoYeAI/openclaw-master-skills

WEEX Futures exchange integration. An agent skill from LeoYeAI/openclaw-master-skills.

MITAuto-check passedBusiness, Finance & HR

Install Weex Trading

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill weex-trading -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills weex-trading --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/weex-trading-skills .claude/skills/weex-trading && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
weex-trading
GitHub stars
2.2k
Token cost
~6k tokens
SKILL.md length
513 words
Files
5 (incl. scripts, references)
Skills in repo
1,235
Repo updated
First seen
Licence
MIT

At a glance

WEEX Futures exchange integration. An agent skill from LeoYeAI/openclaw-master-skills.

  • Works in 6 steps: ALWAYS display order details before… → VERIFY trading pair and quantity → CHECK account balance before trading → …
  • Tasks that involve Trading and backtesting
  • SKILL.md covers Features, Environment Variables, Authentication and Get Server Time, plus 22 more sections
  • Runs Python scripts from its folder; calls curl, jq and python3; reaches api-contract.weex.com; needs API_KEY and WEEX_API_KEY

What it does

Weex Trading is an agent skill from LeoYeAI/openclaw-master-skills. WEEX Futures exchange integration. Trade USDT-M perpetual futures with up to 125x leverage on WEEX.

Its SKILL.md is about 6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `README.md`, `_meta.json` and `references/api_reference.md`).

It sits in Business, Finance & HR, covering Trading and backtesting. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.

When your agent uses it

  • Tasks that involve Trading and backtesting

Example prompts

  • “/weex-trading”

Requirements

  • Python 3
  • A credential in WEEX_API_KEY
  • A credential in WEEX_API_SECRET

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. ALWAYS display order details before execution
  2. VERIFY trading pair and quantity
  3. CHECK account balance before trading
  4. WARN about leverage risks (up to 125x)
  5. NEVER execute without user confirmation
  6. CONFIRM position closure before executing

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • curl
    • jq
    • python3
    • openssl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api-contract.weex.com

    Also links to:

    • weex.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY
    • WEEX_API_KEY
    • WEEX_API_SECRET

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Weex Trading loads about 6k tokens when it runs, and up to ~7.3k if it reads all its reference files. Until then it costs about 28 tokens; SKILL.md has 513 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 513 words, ~6,009 tokens.

Download SKILL.mdSave it as .claude/skills/weex-trading/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
weex-trading
description
WEEX Futures exchange integration. Trade USDT-M perpetual futures with up to 125x leverage on WEEX.
metadata.emoji
🔵
metadata.category
trading
metadata.tags
crypto, futures, trading, weex, derivatives
metadata.compatibility
claude, openai, gemini, llama, mistral, any-agent

WEEX Futures Trading 🔵

Open AI Agent Skill for USDT-margined perpetual futures trading on WEEX exchange. Up to 125x leverage.

Open Agent Skill: This skill is designed to work with any AI agent that supports bash/curl commands, including Claude, GPT, Gemini, LLaMA, Mistral, and other LLM-based agents.

Features

  • 📊 Futures Trading - USDT-M perpetual contracts up to 125x leverage
  • 💰 Account Management - Balance, positions, margin settings
  • 📈 Market Data - Tickers, order book, candlesticks, funding rates
  • 🎯 Advanced Orders - Trigger orders, TP/SL, conditional orders
  • 🤖 AI Integration - Log AI trading decisions
  • 🔌 Universal Compatibility - Works with any AI agent supporting shell commands

Environment Variables

VariableDescriptionRequired
WEEX_API_KEYAPI Key from WEEXYes
WEEX_API_SECRETAPI SecretYes
WEEX_PASSPHRASEAPI PassphraseYes
WEEX_BASE_URLAPI base URLNo (default: https://api-contract.weex.com)

Authentication

bash
API_KEY="${WEEX_API_KEY}"
SECRET="${WEEX_API_SECRET}"
PASSPHRASE="${WEEX_PASSPHRASE}"
BASE_URL="${WEEX_BASE_URL:-https://api-contract.weex.com}"

TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")

# Generate signature
generate_signature() {
  local method="$1"
  local path="$2"
  local body="$3"
  local message="${TIMESTAMP}${method}${path}${body}"
  echo -n "$message" | openssl dgst -sha256 -hmac "$SECRET" -binary | base64
}

Market Data Endpoints (No Auth)

Get Server Time

bash
curl -s "${BASE_URL}/capi/v2/market/time" | jq '.'

Get All Contracts Info

bash
curl -s "${BASE_URL}/capi/v2/market/contracts" | jq '.data[] | {symbol: .symbol, baseCoin: .underlying_index, quoteCoin: .quote_currency, contractVal: .contract_val, minLeverage: .minLeverage, maxLeverage: .maxLeverage, tickSize: .tick_size, sizeIncrement: .size_increment}'

Get Single Contract Info

bash
SYMBOL="cmt_btcusdt"

curl -s "${BASE_URL}/capi/v2/market/contracts?symbol=${SYMBOL}" | jq '.data'

Get Ticker Price

bash
SYMBOL="cmt_btcusdt"

curl -s "${BASE_URL}/capi/v2/market/ticker?symbol=${SYMBOL}" | jq '.data | {symbol: .symbol, last: .last, high: .high_24h, low: .low_24h, volume: .volume_24h, markPrice: .markPrice}'

Get All Tickers

bash
curl -s "${BASE_URL}/capi/v2/market/tickers" | jq '.data[] | {symbol: .symbol, last: .last, change: .priceChangePercent, volume: .volume_24h}'

Get Order Book

bash
SYMBOL="cmt_btcusdt"

curl -s "${BASE_URL}/capi/v2/market/depth?symbol=${SYMBOL}&limit=15" | jq '.data | {asks: .asks[:5], bids: .bids[:5]}'

Get Recent Trades

bash
SYMBOL="cmt_btcusdt"
LIMIT="50"

curl -s "${BASE_URL}/capi/v2/market/trades?symbol=${SYMBOL}&limit=${LIMIT}" | jq '.data[] | {time: .time, price: .price, size: .size, side: (if .isBuyerMaker then "sell" else "buy" end)}'

Get Candlestick Data

bash
SYMBOL="cmt_btcusdt"
GRANULARITY="1h"    # 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d, 1w
LIMIT="100"

curl -s "${BASE_URL}/capi/v2/market/candles?symbol=${SYMBOL}&granularity=${GRANULARITY}&limit=${LIMIT}" | jq '.data[] | {timestamp: .[0], open: .[1], high: .[2], low: .[3], close: .[4], volume: .[5]}'

Get Index Price

bash
SYMBOL="cmt_btcusdt"

curl -s "${BASE_URL}/capi/v2/market/index?symbol=${SYMBOL}" | jq '.data | {symbol: .symbol, index: .index, timestamp: .timestamp}'

Get Open Interest

bash
SYMBOL="cmt_btcusdt"

curl -s "${BASE_URL}/capi/v2/market/open_interest?symbol=${SYMBOL}" | jq '.data[] | {symbol: .symbol, openInterest: .base_volume, value: .target_volume}'

Get Current Funding Rate

bash
SYMBOL="cmt_btcusdt"

curl -s "${BASE_URL}/capi/v2/market/currentFundRate?symbol=${SYMBOL}" | jq '.data[] | {symbol: .symbol, rate: .fundingRate, nextSettlement: .timestamp}'

Get Historical Funding Rates

bash
SYMBOL="cmt_btcusdt"
LIMIT="20"

curl -s "${BASE_URL}/capi/v2/market/getHistoryFundRate?symbol=${SYMBOL}&limit=${LIMIT}" | jq '.data[] | {symbol: .symbol, rate: .fundingRate, settleTime: .fundingTime}'

Get Next Funding Time

bash
SYMBOL="cmt_btcusdt"

curl -s "${BASE_URL}/capi/v2/market/funding_time?symbol=${SYMBOL}" | jq '.data | {symbol: .symbol, nextFundingTime: .fundingTime}'

Account Endpoints (Auth Required)

Get Account Assets

bash
PATH_URL="/capi/v2/account/assets"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data[] | {coin: .coinName, available: .available, frozen: .frozen, equity: .equity, unrealizedPnl: .unrealizePnl}'

Get Account List with Settings

bash
PATH_URL="/capi/v2/account/getAccounts"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data'

Get Single Account by Coin

bash
COIN="USDT"

PATH_URL="/capi/v2/account/getAccount?coin=${COIN}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data'

Get User Settings

bash
SYMBOL="cmt_btcusdt"

PATH_URL="/capi/v2/account/settings?symbol=${SYMBOL}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data'

Change Leverage

bash
SYMBOL="cmt_btcusdt"
LEVERAGE="20"
MARGIN_MODE="1"        # 1=Cross, 3=Isolated

PATH_URL="/capi/v2/account/leverage"
BODY="{\"symbol\":\"${SYMBOL}\",\"marginMode\":${MARGIN_MODE},\"longLeverage\":\"${LEVERAGE}\",\"shortLeverage\":\"${LEVERAGE}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Adjust Position Margin (Isolated Only)

bash
POSITION_ID="123456789"      # Isolated position ID
AMOUNT="100"                 # Positive to add, negative to reduce

PATH_URL="/capi/v2/account/adjustMargin"
BODY="{\"coinId\":2,\"isolatedPositionId\":${POSITION_ID},\"collateralAmount\":\"${AMOUNT}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Auto Margin Top-Up (Isolated Only)

bash
POSITION_ID="123456789"      # Isolated position ID
AUTO_APPEND="true"           # true to enable, false to disable

PATH_URL="/capi/v2/account/modifyAutoAppendMargin"
BODY="{\"positionId\":${POSITION_ID},\"autoAppendMargin\":${AUTO_APPEND}}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Get Account Bill History

bash
COIN="USDT"
LIMIT="20"

PATH_URL="/capi/v2/account/bills"
BODY="{\"coin\":\"${COIN}\",\"limit\":${LIMIT}}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.data'

Position Endpoints (Auth Required)

Get All Positions

bash
PATH_URL="/capi/v2/account/position/allPosition"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data[] | select(.size != "0") | {symbol: .symbol, side: .side, size: .size, leverage: .leverage, unrealizedPnl: .unrealizePnl, entryPrice: .avg_cost}'

Get Single Position

bash
SYMBOL="cmt_btcusdt"

PATH_URL="/capi/v2/account/position/singlePosition?symbol=${SYMBOL}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data[] | {symbol: .symbol, side: .side, size: .size, leverage: .leverage, unrealizedPnl: .unrealizePnl, entryPrice: .avg_cost, liquidationPrice: .liq_price}'

Change Margin Mode

bash
SYMBOL="cmt_btcusdt"
MARGIN_MODE="1"        # 1=Cross, 3=Isolated

PATH_URL="/capi/v2/account/position/changeHoldModel"
BODY="{\"symbol\":\"${SYMBOL}\",\"marginMode\":${MARGIN_MODE},\"separatedMode\":1}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Order Endpoints (Auth Required)

Place Market Order

bash
SYMBOL="cmt_btcusdt"
SIZE="10"              # Quantity in contracts
TYPE="1"               # 1=Open Long, 2=Open Short, 3=Close Long, 4=Close Short
CLIENT_OID="order_$(date +%s)"

PATH_URL="/capi/v2/order/placeOrder"
BODY="{\"symbol\":\"${SYMBOL}\",\"client_oid\":\"${CLIENT_OID}\",\"size\":\"${SIZE}\",\"type\":\"${TYPE}\",\"order_type\":\"0\",\"match_price\":\"1\",\"price\":\"0\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Place Limit Order

bash
SYMBOL="cmt_btcusdt"
SIZE="10"
TYPE="1"               # 1=Open Long
PRICE="90000"          # Limit price
ORDER_TYPE="0"         # 0=Normal, 1=Post-only, 2=FOK, 3=IOC
CLIENT_OID="limit_$(date +%s)"

PATH_URL="/capi/v2/order/placeOrder"
BODY="{\"symbol\":\"${SYMBOL}\",\"client_oid\":\"${CLIENT_OID}\",\"size\":\"${SIZE}\",\"type\":\"${TYPE}\",\"order_type\":\"${ORDER_TYPE}\",\"match_price\":\"0\",\"price\":\"${PRICE}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Get Open Orders

bash
PATH_URL="/capi/v2/order/current"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data[] | {orderId: .order_id, symbol: .symbol, side: .type, price: .price, size: .size, status: .status}'

Get Order Details

bash
ORDER_ID="1234567890"

PATH_URL="/capi/v2/order/detail?orderId=${ORDER_ID}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data'

Get Order History

bash
SYMBOL="cmt_btcusdt"
LIMIT="50"

PATH_URL="/capi/v2/order/history?symbol=${SYMBOL}&limit=${LIMIT}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data[] | {orderId: .order_id, symbol: .symbol, side: .type, price: .price, size: .size, filledSize: .filled_qty, status: .status}'

Get Trade Fills

bash
SYMBOL="cmt_btcusdt"
LIMIT="50"

PATH_URL="/capi/v2/order/fills?symbol=${SYMBOL}&limit=${LIMIT}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data[] | {tradeId: .trade_id, orderId: .order_id, symbol: .symbol, price: .price, size: .size, fee: .fee, time: .created_at}'

Cancel Order

bash
ORDER_ID="1234567890"

PATH_URL="/capi/v2/order/cancel_order"
BODY="{\"orderId\":\"${ORDER_ID}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Cancel All Orders

bash
SYMBOL="cmt_btcusdt"    # Optional: omit to cancel all

PATH_URL="/capi/v2/order/cancelAllOrders"
BODY="{\"symbol\":\"${SYMBOL}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Close All Positions

bash
PATH_URL="/capi/v2/order/closePositions"
BODY="{}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Trigger Order Endpoints (Auth Required)

Place Trigger Order (Stop-Loss / Take-Profit)

bash
SYMBOL="cmt_btcusdt"
SIZE="10"
TYPE="1"               # 1=Open Long, 2=Open Short, 3=Close Long, 4=Close Short
TRIGGER_PRICE="95000"  # Price that triggers the order
EXECUTE_PRICE="0"      # 0 for market, or limit price
TRIGGER_TYPE="1"       # 1=Fill price, 2=Mark price, 3=Index price
CLIENT_OID="trigger_$(date +%s)"

PATH_URL="/capi/v2/order/plan_order"
BODY="{\"symbol\":\"${SYMBOL}\",\"client_oid\":\"${CLIENT_OID}\",\"size\":\"${SIZE}\",\"type\":\"${TYPE}\",\"trigger_price\":\"${TRIGGER_PRICE}\",\"execute_price\":\"${EXECUTE_PRICE}\",\"trend_side\":\"1\",\"trigger_type\":\"${TRIGGER_TYPE}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Get Current Trigger Orders

bash
SYMBOL="cmt_btcusdt"

PATH_URL="/capi/v2/order/currentPlan?symbol=${SYMBOL}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data[] | {orderId: .order_id, symbol: .symbol, triggerPrice: .trigger_price, size: .size, type: .type}'

Get Trigger Order History

bash
SYMBOL="cmt_btcusdt"
LIMIT="50"

PATH_URL="/capi/v2/order/historyPlan?symbol=${SYMBOL}&limit=${LIMIT}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "GET" "$PATH_URL" "")

curl -s "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" | jq '.data[] | {orderId: .order_id, symbol: .symbol, triggerPrice: .trigger_price, status: .status}'

Cancel Trigger Order

bash
ORDER_ID="1234567890"

PATH_URL="/capi/v2/order/cancel_plan"
BODY="{\"orderId\":\"${ORDER_ID}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

TP/SL Order Endpoints (Auth Required)

Place TP/SL Order

bash
SYMBOL="cmt_btcusdt"
SIDE="1"               # 1=Long position, 2=Short position
TP_PRICE="100000"      # Take profit trigger price
SL_PRICE="85000"       # Stop loss trigger price
TP_SIZE="10"           # Take profit size (0 for entire position)
SL_SIZE="10"           # Stop loss size (0 for entire position)

PATH_URL="/capi/v2/order/placeTpSlOrder"
BODY="{\"symbol\":\"${SYMBOL}\",\"side\":\"${SIDE}\",\"tp_trigger_price\":\"${TP_PRICE}\",\"sl_trigger_price\":\"${SL_PRICE}\",\"tp_size\":\"${TP_SIZE}\",\"sl_size\":\"${SL_SIZE}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Modify TP/SL Order

bash
SYMBOL="cmt_btcusdt"
SIDE="1"               # 1=Long position, 2=Short position
TP_PRICE="105000"      # New take profit price
SL_PRICE="82000"       # New stop loss price

PATH_URL="/capi/v2/order/modifyTpSlOrder"
BODY="{\"symbol\":\"${SYMBOL}\",\"side\":\"${SIDE}\",\"tp_trigger_price\":\"${TP_PRICE}\",\"sl_trigger_price\":\"${SL_PRICE}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

AI Integration (Auth Required)

Upload AI Trading Log

bash
AI_LOG="Trading decision: Buy BTC based on momentum indicators"
ORDER_ID="1234567890"

PATH_URL="/capi/v2/order/uploadAiLog"
BODY="{\"orderId\":\"${ORDER_ID}\",\"aiLog\":\"${AI_LOG}\"}"
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(generate_signature "POST" "$PATH_URL" "$BODY")

curl -s -X POST "${BASE_URL}${PATH_URL}" \
  -H "ACCESS-KEY: ${API_KEY}" \
  -H "ACCESS-SIGN: ${SIGNATURE}" \
  -H "ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -H "ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq '.'

Reference Tables

Order Types

typeDescription
1Open Long (buy to open)
2Open Short (sell to open)
3Close Long (sell to close)
4Close Short (buy to close)
Show full SKILL.md (195 more words)Show less

Execution Types

order_typeDescription
0Normal order
1Post-only (maker only)
2FOK (fill or kill)
3IOC (immediate or cancel)

Price Types

match_priceDescription
0Limit order
1Market order

Margin Modes

marginModeDescription
1Cross margin
3Isolated margin

Trigger Types

trigger_typeDescription
1Fill price (last trade price)
2Mark price
3Index price
PairDescription
cmt_btcusdtBitcoin / USDT
cmt_ethusdtEthereum / USDT
cmt_solusdtSolana / USDT
cmt_xrpusdtXRP / USDT
cmt_dogeusdtDogecoin / USDT
cmt_bnbusdtBNB / USDT

Safety Rules

  1. ALWAYS display order details before execution
  2. VERIFY trading pair and quantity
  3. CHECK account balance before trading
  4. WARN about leverage risks (up to 125x)
  5. NEVER execute without user confirmation
  6. CONFIRM position closure before executing

Error Codes

CodeDescriptionSolution
00000Success-
40001Invalid parameterCheck parameter format
40101Invalid API key/signatureVerify credentials and timestamp
40301IP not whitelistedAdd IP to whitelist
42901Rate limit exceededReduce request frequency
50001Internal errorRetry after delay

Rate Limits

CategoryIP LimitUID Limit
Market Data20 req/secN/A
Account Info10 req/sec10 req/sec
Order Placement10 req/sec10 req/sec

Additional Resources

© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/weex-trading-skills of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • README.md
  • _meta.json
  • references/api_reference.md
  • scripts/weex_client.py

Open the folder on GitHubat commit e5199b5

Compare with similar skills

Weex Trading next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Weex Trading compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Weex Trading this skillLeoYeAI/openclaw-master-skills2.2k—~6kAutomated safety check: PassMIT
Tushare Datazillionare/zillionare3212 repos~2.3kAutomated safety check: PassNone
Tradingview MCPatilaahmettaner/tradingview-mcp5k—~1.3kAutomated safety check: PassMIT
Digital Oraclekomako-workshop/digital-oracle878—~5.9kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Markdownfacioquo/stock-indicators-dotnet1.2k—~812Automated safety check: PassApache-2.0

Similar skills

  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    321 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed
  • Tradingview MCP

    atilaahmettaner/tradingview-mcp

    AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…

    5k GitHub stars~1.3k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Digital Oracle

    komako-workshop/digital-oracle

    Answer prediction questions using market trading data, not opinions.

    878 GitHub stars~5.9k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Markdown

    facioquo/stock-indicators-dotnet

    Format and lint Markdown in this repository against GitHub Flavored Markdown and its markdownlint-cli2 configuration — headers, lists, code fences, callouts (VitePress containers on docs-site pages…

    1.2k GitHub stars~812 tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Openmobius Skill

    MobiusQuant/OpenMobius-skill

    Provides multi-school trading Q&A, chart/OHLCV analysis, annotation, and fresh-market workflows covering ICT/SMC, ChanLun, Wyckoff, Price Action, Order Flow, VSA, and Elliott Wave.

    697 GitHub stars~7.2k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed

More from LeoYeAI/openclaw-master-skills

All 1,235 skills in this repo
  • DevOps Pipeline Management

    LeoYeAI/openclaw-master-skills

    Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Feishu Document Collaboration

    LeoYeAI/openclaw-master-skills

    Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Files Memory System

    LeoYeAI/openclaw-master-skills

    Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    LeoYeAI/openclaw-master-skills

    Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    LeoYeAI/openclaw-master-skills

    Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Weex Trading

What does Weex Trading do?

WEEX Futures exchange integration. An agent skill from LeoYeAI/openclaw-master-skills. Weex Trading is an agent skill from LeoYeAI/openclaw-master-skills. WEEX Futures exchange integration.

When should I use Weex Trading?

Weex Trading fits situations like: tasks that involve Trading and backtesting.

How do I install Weex Trading in Claude Code?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill weex-trading -a claude-code`. Or copy the skill folder (skills/weex-trading-skills in LeoYeAI/openclaw-master-skills) into .claude/skills/weex-trading in your project. Claude Code loads it when a task matches its description.

How do I install Weex Trading in Codex?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill weex-trading -a codex`. Or copy the skill folder (skills/weex-trading-skills in LeoYeAI/openclaw-master-skills) into .agents/skills/weex-trading in your project. Codex loads it when a task matches its description.

Can I use Weex Trading in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill weex-trading -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/weex-trading, .gemini/skills/weex-trading, .github/skills/weex-trading and .opencode/skills/weex-trading in your project.

What does Weex Trading need to run?

Going by SKILL.md and its folder, Weex Trading needs Python for the scripts in its folder, the command-line tools its instructions call (curl, jq, python3 and openssl) and credentials named API_KEY, WEEX_API_KEY and WEEX_API_SECRET. Our summary lists: Python 3; A credential in WEEX_API_KEY; A credential in WEEX_API_SECRET.

Does Weex Trading access the network?

SKILL.md names 2 domains. In commands or code: api-contract.weex.com; the agent is likely to contact it when it follows the instructions. As links in the text: weex.com. This is read from the text; nothing was executed.

Is Weex Trading safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Weex Trading use?

Weex Trading is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Weex Trading use?

About 6k tokens (SKILL.md is roughly 24k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.

What are the alternatives to Weex Trading?

Skills that share tags, products or a category with Weex Trading: Tushare Data (zillionare/zillionare, 321 stars), Tradingview MCP (atilaahmettaner/tradingview-mcp, 5k stars), Digital Oracle (komako-workshop/digital-oracle, 878 stars) and Polyclaw (chainstacklabs/polyclaw, 359 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Weex Trading?

LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.

Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.