opentrade-cex
Installation
SKILL.md
OpenTrade CEX Trading
39 API endpoints for centralized exchange trading — market data, public metadata, account management, spot & futures orders, positions, and leverage.
IMPORTANT: This is a CEX (centralized exchange) trading skill. All trades are executed server-side with built-in risk controls — no private key management or transaction signing required.
IMPORTANT: Write operations (place order, close position, set leverage) are protected by a 4-layer risk engine: price deviation check, position limit, rate limit, and balance verification.
CRITICAL — Required Parameters for Orders:
type(REQUIRED): Order type must always be specified (market,limit,stop_market,take_profit_market). Each type has different parameter requirements.hedged(REQUIRED): When placing orders (POST /orders) or closing positions (POST /positions/close), thehedgedfield is required. If thehedgedvalue is unknown or not provided by the user, you MUST first callGET /position/modeto obtaindata.hedged. Once obtained, the value can be reused for subsequent requests on the same symbol and exchange without re-fetching. Using an incorrecthedgedvalue may cause order rejection or affect the wrong position.quantityfor close position (REQUIRED): When closing a position, you must explicitly provide the quantity to close.0is not allowed. Use the actual position size fromGET /positionswhen closing the full position.CRITICAL — Prefer Contract (Swap) Symbol:
- When
/market/metadatareturns multiple markets, default to the perpetual/swap symbol (e.g.,BTC/USDT:USDT) rather than the spot symbol (e.g.,BTC/USDT).- Only use the spot symbol when the user explicitly requests spot trading.
- Always use
symbolfield, NOTdisplaySymbol, when making API calls.