margin-trading
Binance Margin-trading request using the Binance API. Authentication requires API key and secret key.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/binance-skills-hub/binance-margin-tradingWhat This Skill Does
The margin-trading skill provides an interface for interacting with Binance's complex margin trading ecosystem through OpenClaw. This skill enables users to perform both cross and isolated margin trading operations programmatically. It covers the full lifecycle of a margin position, including account management, borrowing, repaying, and retrieving historical data. Whether you are managing cross margin collateral, adjusting leverage ratios, or querying interest rate histories, this tool acts as a bridge between the Binance SAPI endpoints and the agent's workflow. It returns all results in a clean JSON format, making it ideal for integration into larger automated financial analysis pipelines.
Installation
To install this skill, use the ClawHub command line interface within your project terminal. Ensure you have your OpenClaw environment initialized before running the following command:
clawhub install openclaw/skills/skills/binance-skills-hub/binance-margin-trading
Once installed, ensure you have configured your Binance API credentials within the agent's security vault. The skill requires an API key and a secret key with 'Enable Margin' permissions checked in your Binance account settings to execute trade and borrow functions.
Use Cases
- Portfolio Rebalancing: Automatically borrow assets to cover margin requirements during high-volatility events.
- Risk Management: Monitor and adjust cross-margin leverage settings dynamically based on real-time market data.
- Audit & Reporting: Extract interest payment history and capital flow logs for tax reporting and accounting purposes.
- Isolated Position Control: Enable or disable isolated margin accounts for specific trading pairs to compartmentalize risk.
- Data-Driven Strategy: Query future interest rates and margin fee data to forecast the cost of carry for long-term leveraged positions.
Example Prompts
- "Check my cross margin account details and list all currently enabled isolated margin symbols."
- "What is the current hourly interest rate for BNB, and can you fetch the borrow history for the last 24 hours?"
- "Adjust my max leverage for cross margin trading to 3x and confirm the change."
Tips & Limitations
- Authentication: Most endpoints require signed requests. Ensure your API keys have the appropriate scope; otherwise, you will receive 'Unauthorized' errors.
- Rate Limiting: Binance enforces strict weight-based rate limits. Avoid high-frequency polling on
/sapiendpoints to prevent temporary IP bans. - Security: Never expose your API secret keys in public code repositories. Use local encrypted configuration files or environment variables.
- Market Risk: Margin trading involves significant financial risk. Automated agents can execute trades faster than you can manually intervene, so always include stop-loss logic in your scripts.
- Maintenance: Some endpoints are specific to either Cross or Isolated margin; ensure your input parameters (like
symbolvsasset) match the endpoint requirements documented in the reference guide.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-binance-skills-hub-binance-margin-trading": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api
Related Skills
query-token-info
Query token details by keyword, contract address, or chain. Search tokens, get metadata and social links, retrieve real-time market data (price, price trend, volume, holders, liquidity), and fetch K-Line candlestick charts. Use this skill when users search tokens, check token prices, view market data, or request kline/candlestick charts.
binance
Use binance-cli for Binance Spot, Futures (USD-S), and Convert. Requires auth.
meme-rush
Meme token fast-trading assistant with two core capabilities: 1. Meme Rush - Real-time meme token lists from launchpads (Pump.fun, Four.meme, etc.) across new, finalizing, and migrated stages 2. Topic Rush - AI-powered market hot topics with associated tokens ranked by net inflow Use this skill when users ask about new meme tokens, meme launches, bonding curve, migration status, pump.fun tokens, four.meme tokens, fast meme trading, market hot topics, or trending narratives.
query-address-info
Query any on-chain wallet address token balances and positions. Retrieves all token holdings for a specified wallet address on a given chain, including token name, symbol, price, 24h price change, and holding quantity. Use this skill when users ask about wallet balance, token holds, portfolio, or asset positions for any blockchain address.
crypto-market-rank
Crypto market rankings and leaderboards. Query trending tokens, top searched tokens, Binance Alpha tokens, tokenized stocks, social hype sentiment ranks, smart money inflow token rankings, top meme token rankings from Pulse launchpad, and top trader PnL leaderboards. Use this skill when users ask about token rankings, market trends, social buzz, meme rankings, breakout meme tokens, or top traders.