weex-trading
WEEX Futures exchange integration. Trade USDT-M perpetual futures with up to 125x leverage on WEEX.
What this skill does
# 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
| Variable | Description | Required |
|----------|-------------|----------|
| `WEEX_API_KEY` | API Key from WEEX | Yes |
| `WEEX_API_SECRET` | API Secret | Yes |
| `WEEX_PASSPHRASE` | API Passphrase | Yes |
| `WEEX_BASE_URL` | API base URL | No (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 "impoRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.