
Derivatives Trading Portfolio Margin
Wire an agent or script to Binance portfolio-margin derivatives endpoints with correct API auth and request signing.
Overview
Derivatives-trading-portfolio-margin is an agent skill for the Build phase that guides authenticated Binance portfolio-margin derivatives API requests using keys from environment variables or files and supported signatur
Install
npx skills add https://github.com/binance/binance-skills-hub --skill derivatives-trading-portfolio-marginWhat is this skill?
- Authenticated Binance derivatives portfolio-margin API requests from agent workflows
- API key and secret via environment variables or files (v1.1.0)
- RSA and Ed25519 signature generation fixes for non-HMAC keys
- Openclaw metadata in User-Agent per Binance hub changelog
- MIT-licensed official Binance skills-hub package
- Changelog v1.1.0 dated 2026-03-24
- Initial release v1.0.0 dated 2026-03-19
Adoption & trust: 1.2k installs on skills.sh; 881 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want portfolio-margin derivatives calls from an agent but keep mis-signing requests or scattering API key handling across ad-hoc scripts.
Who is it for?
Indie builders wiring Claude Code or Cursor to Binance portfolio-margin for bots, alerts, or internal tooling after they already understand margin risk.
Skip if: Builders who only need spot wallets, who cannot store API secrets safely, or who want strategy advice without touching exchange APIs.
When should I use this skill?
You need Binance derivatives portfolio-margin API requests with Binance API authentication (keys via env or files).
What do I get? / Deliverables
Your agent follows a consistent Binance portfolio-margin request and auth pattern so you can plug trading logic into a repo-backed workflow with env-based credentials.
- Correctly signed portfolio-margin API request sequences
- Env- or file-based credential configuration pattern
Recommended Skills
Journey fit
Canonical shelf is Build because solo builders install this when connecting a product or agent to Binance’s portfolio-margin API, not when operating day-to-day P&L alone. Integrations is the right subphase: it is an external API connector with keys, signatures, and env-based credentials rather than UI or core backend logic.
How it compares
Official exchange API skill package—not a generic REST MCP server or a backtesting framework.
Common Questions / FAQ
Who is derivatives-trading-portfolio-margin for?
Solo and indie developers building agent-driven or scripted integrations with Binance portfolio-margin derivatives who need documented auth and request patterns.
When should I use derivatives-trading-portfolio-margin?
Use it in the Build phase when you add or refactor Binance portfolio-margin API calls; in Operate when you extend monitoring or reconciliation jobs that already use those endpoints.
Is derivatives-trading-portfolio-margin safe to install?
It requires API secrets and network access to Binance—review the Security Audits panel on this Prism page and never commit keys; trading margin carries financial risk beyond code safety.
SKILL.md
READMESKILL.md - Derivatives Trading Portfolio Margin
# Changelog ## 1.1.0 - 2026-03-24 - Environmental variables or files can now be used as input for the API key and secret key. - Fix signature generation for RSA and Ed25519 keys. - Add `Openclaw` metadata to the User Agent header ## 1.0.0 - 2026-03-19 - Initial release MIT License Copyright (c) 2026 Binance Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- name: derivatives-trading-portfolio-margin description: Binance Derivatives-trading-portfolio-margin request using the Binance API. Authentication requires API key and secret key. Supports testnet and mainnet. metadata: version: 1.1.0 author: Binance openclaw: requires: bins: - curl - openssl - date homepage: https://github.com/binance/binance-skills-hub/tree/main/skills/binance/derivatives-trading-portfolio-margin/SKILL.md license: MIT --- # Binance Derivatives-trading-portfolio-margin Skill Derivatives-trading-portfolio-margin request on Binance using authenticated API endpoints. Requires API key and secret key for certain endpoints. Return the result in JSON format. ## Quick Reference | Endpoint | Description | Required | Optional | Authentication | |----------|-------------|----------|----------|----------------| | `/papi/v1/balance` (GET) | Account Balance(USER_DATA) | None | asset, recvWindow | Yes | | `/papi/v1/account` (GET) | Account Information(USER_DATA) | None | recvWindow | Yes | | `/papi/v1/bnb-transfer` (POST) | BNB transfer (TRADE) | amount, transferSide | recvWindow | Yes | | `/papi/v1/cm/leverageBracket` (GET) | CM Notional and Leverage Brackets(USER_DATA) | None | symbol, recvWindow | Yes | | `/papi/v1/repay-futures-switch` (POST) | Change Auto-repay-futures Status(TRADE) | autoRepay | recvWindow | Yes | | `/papi/v1/repay-futures-switch` (GET) | Get Auto-repay-futures Status(USER_DATA) | None | recvWindow | Yes | | `/papi/v1/cm/leverage` (POST) | Change CM Initial Leverage (TRADE) | symbol, leverage | recvWindow | Yes | | `/papi/v1/cm/positionSide/dual` (POST) | Change CM Position Mode(TRADE) | dualSidePosition | recvWindow | Yes | | `/papi/v1/cm/positionSide/dual` (GET) | Get CM Current Position Mode(USER_DATA) | None | recvWindow | Yes | | `/papi/v1/um/leverage` (POST) | Change UM Initial Leverage(TRADE) | symbol, leverage | recvWindow | Yes | | `/papi/v1/um/positionSide/dual` (POST) | Change UM Position Mode(TRADE) | dualSidePosition | recvWindow | Yes | | `/papi/v1/um/positionSide/dual` (GET) | Get UM Current Position Mode(USER_DATA) | None | recvWindow | Yes | | `/papi/v1/auto-collection` (POST) | Fund Auto-collection(TRADE) | None | recvWindow | Yes | | `/papi/v1/asset-collection` (POST) | Fund Collection by Asset(TRADE) | asset | recvWindow | Yes | | `/papi/v1/cm/account` (GET) | Get CM Account Detail(USER_DATA) | None | recvWindow | Yes | | `/papi/v1/cm/income` (GET) | Get CM Income History(USER_DATA) | None | symbol, incomeType, startTime, endTime, page, limit, recvWindow | Yes | | `/papi/v1/um/order/asyn` (GET) | Get Download Id For