[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ES8TT0495FFFP96NV3PCYJ":3,"skill-same:01M6ES8TT0495FFFP96NV3PCYJ":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":35,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M6ES8TT0495FFFP96NV3PCYJ","margin-trading",null,"Binance Margin-trading request using the Binance API. Authentication requires API key and secret key.","luokai0\u002Fai-agent-skills-by-luo-kai","luokai0","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F266954973?v=4","01M6E16VNT42JB8B3X3254QWJ7","luo kai","01M6E16VTFVP6S5XJF1V1MPV90",14,"MIT","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fbinance\u002Fmargin-trading\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35],"margin","trading","margin trading","github","authentication","https","openssl","api","curl","hub","binance","main","2026-11-10 10:12:30",false,"---\nname: margin-trading\ndescription: Binance Margin-trading request using the Binance API. Authentication requires API key and secret key. \nmetadata:\n  version: 1.1.0\n  author: Binance\n  openclaw:\n    requires:\n      bins:\n        - curl\n        - openssl\n        - date\n    homepage: https:\u002F\u002Fgithub.com\u002Fbinance\u002Fbinance-skills-hub\u002Ftree\u002Fmain\u002Fskills\u002Fbinance\u002Fmargin-trading\u002FSKILL.md\nlicense: MIT\n---\n\n# Binance Margin-trading Skill\n\nMargin-trading request on Binance using authenticated API endpoints. Requires API key and secret key for certain endpoints. Return the result in JSON format.\n\n## Quick Reference\n\n| Endpoint | Description | Required | Optional | Authentication |\n|----------|-------------|----------|----------|----------------|\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fmax-leverage` (POST) | Adjust cross margin max leverage (USER_DATA) | maxLeverage | None | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002Faccount` (DELETE) | Disable Isolated Margin Account (TRADE) | symbol | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002Faccount` (POST) | Enable Isolated Margin Account (TRADE) | symbol | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002Faccount` (GET) | Query Isolated Margin Account Info (USER_DATA) | None | symbols, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002FbnbBurn` (GET) | Get BNB Burn Status (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FtradeCoeff` (GET) | Get Summary of Margin account (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fcapital-flow` (GET) | Query Cross Isolated Margin Capital Flow (USER_DATA) | None | asset, symbol, type, startTime, endTime, fromId, limit, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Faccount` (GET) | Query Cross Margin Account Details (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FcrossMarginData` (GET) | Query Cross Margin Fee Data (USER_DATA) | None | vipLevel, coin, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002FaccountLimit` (GET) | Query Enabled Isolated Margin Account Limit (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FisolatedMarginData` (GET) | Query Isolated Margin Fee Data (USER_DATA) | None | vipLevel, symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FinterestHistory` (GET) | Get Interest History (USER_DATA) | None | asset, isolatedSymbol, startTime, endTime, current, size, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fnext-hourly-interest-rate` (GET) | Get future hourly interest rate (USER_DATA) | assets, isIsolated | None | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fborrow-repay` (POST) | Margin account borrow\u002Frepay(MARGIN) | asset, isIsolated, symbol, amount, type | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fborrow-repay` (GET) | Query borrow\u002Frepay records in Margin account(USER_DATA) | type | asset, isolatedSymbol, txId, startTime, endTime, current, size, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FinterestRateHistory` (GET) | Query Margin Interest Rate History (USER_DATA) | asset | vipLevel, startTime, endTime, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FmaxBorrowable` (GET) | Query Max Borrow (USER_DATA) | asset | isolatedSymbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FcrossMarginCollateralRatio` (GET) | Cross margin collateral ratio (MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FallPairs` (GET) | Get All Cross Margin Pairs (MARKET_DATA) | None | symbol | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002FallPairs` (GET) | Get All Isolated Margin Symbol(MARKET_DATA) | None | symbol, recvWindow | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FallAssets` (GET) | Get All Margin Assets (MARKET_DATA) | None | asset | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fdelist-schedule` (GET) | Get Delist Schedule (MARKET_DATA) | None | recvWindow | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flimit-price-pairs` (GET) | Get Limit Price Pairs(MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flist-schedule` (GET) | Get list Schedule (MARKET_DATA) | None | recvWindow | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Frisk-based-liquidation-ratio` (GET) | Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Frestricted-asset` (GET) | Get Margin Restricted Assets (MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FisolatedMarginTier` (GET) | Query Isolated Margin Tier Data (USER_DATA) | symbol | tier, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FleverageBracket` (GET) | Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FpriceIndex` (GET) | Query Margin PriceIndex (MARKET_DATA) | symbol | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Favailable-inventory` (GET) | Query Margin Available Inventory(USER_DATA) | type | None | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flisten-key` (DELETE) | Close User Data Stream (USER_STREAM) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flisten-key` (PUT) | Keepalive User Data Stream (USER_STREAM) | listenKey | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flisten-key` (POST) | Start User Data Stream (USER_STREAM) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FapiKey` (POST) | Create Special Key(Low-Latency Trading)(TRADE) | apiName | symbol, ip, publicKey, permissionMode, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FapiKey` (DELETE) | Delete Special Key(Low-Latency Trading)(TRADE) | None | apiName, symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FapiKey` (GET) | Query Special key(Low Latency Trading)(TRADE) | None | symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FapiKey\u002Fip` (PUT) | Edit ip for Special Key(Low-Latency Trading)(TRADE) | ip | symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FforceLiquidationRec` (GET) | Get Force Liquidation Record (USER_DATA) | None | startTime, endTime, isolatedSymbol, current, size, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fexchange-small-liability` (GET) | Get Small Liability Exchange Coin List (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fexchange-small-liability` (POST) | Small Liability Exchange (MARGIN) | assetNames | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fexchange-small-liability-history` (GET) | Get Small Liability Exchange History (USER_DATA) | current, size | startTime, endTime, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FopenOrders` (DELETE) | Margin Account Cancel all Open Orders on a Symbol (TRADE) | symbol | isIsolated, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FopenOrders` (GET) | Query Margin Account's Open Orders (USER_DATA) | None | symbol, isIsolated, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002ForderList` (DELETE) | Margin Account Cancel OCO (TRADE) | symbol | isIsolated, orderListId, listClientOrderId, newClientOrderId, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002ForderList` (GET) | Query Margin Account's OCO (USER_DATA) | None | isIsolated, symbol, orderListId, origClientOrderId, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder` (DELETE) | Margin Account Cancel Order (TRADE) | symbol | isIsolated, orderId, origClientOrderId, newClientOrderId, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder` (POST) | Margin Account New Order (TRADE) | symbol, side, type | isIsolated, quantity, quoteOrderQty, price, stopPrice, newClientOrderId, icebergQty, newOrderRespType, sideEffectType, timeInForce, selfTradePreventionMode, autoRepayAtCancel, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder` (GET) | Query Margin Account's Order (USER_DATA) | symbol | isIsolated, orderId, origClientOrderId, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder\u002Foco` (POST) | Margin Account New OCO (TRADE) | symbol, side, quantity, price, stopPrice | isIsolated, listClientOrderId, limitClientOrderId, limitIcebergQty, stopClientOrderId, stopLimitPrice, stopIcebergQty, stopLimitTimeInForce, newOrderRespType, sideEffectType, selfTradePreventionMode, autoRepayAtCancel, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder\u002Foto` (POST) | Margin Account New OTO (TRADE) | symbol, workingType, workingSide, workingPrice, workingQuantity, workingIcebergQty, pendingType, pendingSide, pendingQuantity | isIsolated, listClientOrderId, newOrderRespType, sideEffectType, selfTradePreventionMode, autoRepayAtCancel, workingClientOrderId, workingTimeInForce, pendingClientOrderId, pendingPrice, pendingStopPrice, pendingTrailingDelta, pendingIcebergQty, pendingTimeInForce | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder\u002Fotoco` (POST) | Margin Account New OTOCO (TRADE) | symbol, workingType, workingSide, workingPrice, workingQuantity, pendingSide, pendingQuantity, pendingAboveType | isIsolated, sideEffectType, autoRepayAtCancel, listClientOrderId, newOrderRespType, selfTradePreventionMode, workingClientOrderId, workingIcebergQty, workingTimeInForce, pendingAboveClientOrderId, pendingAbovePrice, pendingAboveStopPrice, pendingAboveTrailingDelta, pendingAboveIcebergQty, pendingAboveTimeInForce, pendingBelowType, pendingBelowClientOrderId, pendingBelowPrice, pendingBelowStopPrice, pendingBelowTrailingDelta, pendingBelowIcebergQty, pendingBelowTimeInForce | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fmanual-liquidation` (POST) | Margin Manual Liquidation(MARGIN) | type | symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FrateLimit\u002Forder` (GET) | Query Current Margin Order Count Usage (TRADE) | None | isIsolated, symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FallOrderList` (GET) | Query Margin Account's all OCO (USER_DATA) | None | isIsolated, symbol, fromId, startTime, endTime, limit, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FallOrders` (GET) | Query Margin Account's All Orders (USER_DATA) | symbol | isIsolated, orderId, startTime, endTime, limit, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FopenOrderList` (GET) | Query Margin Account's Open OCO (USER_DATA) | None | isIsolated, symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FmyTrades` (GET) | Query Margin Account's Trade List (USER_DATA) | symbol | isIsolated, orderId, startTime, endTime, fromId, limit, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FmyPreventedMatches` (GET) | Query Prevented Matches(USER_DATA) | symbol | preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fapi-key-list` (GET) | Query Special key List(Low Latency Trading)(TRADE) | None | symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Ftransfer` (GET) | Get Cross Margin Transfer History (USER_DATA) | None | asset, type, startTime, endTime, current, size, isolatedSymbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FmaxTransferable` (GET) | Query Max Transfer-Out Amount (USER_DATA) | asset | isolatedSymbol, recvWindow | Yes |\n\n---\n\n## Parameters\n\n### Common Parameters\n\n* **maxLeverage**: Can only adjust 3 , 5 or 10，Example: maxLeverage = 5 or 3 for Cross Margin Classic; maxLeverage=10 for Cross Margin Pro 10x leverage or 20x if compliance allows.\n* **symbol**: \n* **recvWindow**: No more than 60000 (e.g., 5000)\n* **asset**: \n* **symbol**: isolated margin pair\n* **type**: Transfer Type: ROLL_IN, ROLL_OUT\n* **startTime**: Only supports querying data from the past 90 days. (e.g., 1623319461670)\n* **endTime**:  (e.g., 1641782889000)\n* **fromId**: If `fromId` is set, data with `id` greater than `fromId` will be returned. Otherwise, the latest data will be returned. (e.g., 1)\n* **limit**: Limit on the number of data records returned per request. Default: 500; Maximum: 1000. (e.g., 500)\n* **vipLevel**: User's current specific margin data will be returned if vipLevel is omitted (e.g., 1)\n* **coin**: \n* **symbols**: Max 5 symbols can be sent; separated by \",\". e.g. \"BTCUSDT,BNBUSDT,ADAUSDT\"\n* **isolatedSymbol**: isolated symbol\n* **current**: Currently querying page. Start from 1. Default:1 (e.g., 1)\n* **size**: Default:10 Max:100 (e.g., 10)\n* **assets**: List of assets, separated by commas, up to 20\n* **isIsolated**: for isolated margin or not, \"TRUE\", \"FALSE\"\n* **asset**: \n* **isIsolated**: `TRUE` for Isolated Margin, `FALSE` for Cross Margin, Default `FALSE` (e.g., FALSE)\n* **amount**: \n* **type**: `MARGIN`,`ISOLATED`\n* **txId**: `tranId` in `POST \u002Fsapi\u002Fv1\u002Fmargin\u002Floan` (e.g., 1)\n* **tier**: All margin tier data will be returned if tier is omitted\n* **listenKey**: \n* **apiName**: \n* **ip**: Can be added in batches, separated by commas. Max 30 for an API key\n* **publicKey**: 1. If publicKey is inputted it will create an RSA or Ed25519 key.  2. Need to be encoded to URL-encoded format\n* **permissionMode**: This parameter is only for the Ed25519 API key, and does not effact for other encryption methods. The value can be TRADE (TRADE for all permissions) or READ (READ for USER_DATA, FIX_API_READ_ONLY). The default value is TRADE. (e.g., value)\n* **apiName**: \n* **ip**: Can be added in batches, separated by commas. Max 30 for an API key\n* **current**: Currently querying page. Start from 1. Default:1 (e.g., 1)\n* **size**: Default:10, Max:100 (e.g., 10)\n* **isIsolated**: For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\"\n* **orderListId**: Either `orderListId` or `listClientOrderId` must be provided (e.g., 1)\n* **listClientOrderId**: Either `orderListId` or `listClientOrderId` must be provided (e.g., 1)\n* **newClientOrderId**: Used to uniquely identify this cancel. Automatically generated by default (e.g., 1)\n* **orderId**:  (e.g., 1)\n* **origClientOrderId**:  (e.g., 1)\n* **quantity**:  (e.g., 1.0)\n* **limitClientOrderId**: A unique Id for the limit order (e.g., 1)\n* **price**:  (e.g., 1.0)\n* **limitIcebergQty**:  (e.g., 1.0)\n* **stopClientOrderId**: A unique Id for the stop loss\u002Fstop loss limit leg (e.g., 1)\n* **stopPrice**:  (e.g., 1.0)\n* **stopLimitPrice**: If provided, `stopLimitTimeInForce` is required. (e.g., 1.0)\n* **stopIcebergQty**:  (e.g., 1.0)\n* **stopLimitTimeInForce**: Valid values are `GTC`\u002F`FOK`\u002F`IOC`\n* **sideEffectType**: NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY,AUTO_BORROW_REPAY; default NO_SIDE_EFFECT. More info in FAQ (e.g., NO_SIDE_EFFECT)\n* **selfTradePreventionMode**: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE (e.g., NONE)\n* **autoRepayAtCancel**: Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true (e.g., true)\n* **workingType**: Supported values: `LIMIT`, `LIMIT_MAKER`\n* **workingSide**: BUY, SELL\n* **workingClientOrderId**: Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. (e.g., 1)\n* **workingPrice**:  (e.g., 1.0)\n* **workingQuantity**:  (e.g., 1.0)\n* **workingIcebergQty**: This can only be used if `workingTimeInForce` is `GTC`. (e.g., 1.0)\n* **workingTimeInForce**: GTC,IOC,FOK\n* **pendingType**: Supported values: Order Types Note that `MARKET` orders using `quoteOrderQty` are not supported. (e.g., Order Types)\n* **pendingSide**: BUY, SELL\n* **pendingClientOrderId**: Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. (e.g., 1)\n* **pendingPrice**:  (e.g., 1.0)\n* **pendingStopPrice**:  (e.g., 1.0)\n* **pendingTrailingDelta**:  (e.g., 1.0)\n* **pendingQuantity**:  (e.g., 1.0)\n* **pendingIcebergQty**: This can only be used if `pendingTimeInForce` is `GTC`. (e.g., 1.0)\n* **pendingTimeInForce**: GTC,IOC,FOK\n* **workingIcebergQty**: This can only be used if `workingTimeInForce` is `GTC`. (e.g., 1.0)\n* **pendingAboveType**: Supported values: `LIMIT_MAKER`, `STOP_LOSS`, and `STOP_LOSS_LIMIT`\n* **pendingAboveClientOrderId**: Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. (e.g., 1)\n* **pendingAbovePrice**:  (e.g., 1.0)\n* **pendingAboveStopPrice**:  (e.g., 1.0)\n* **pendingAboveTrailingDelta**:  (e.g., 1.0)\n* **pendingAboveIcebergQty**: This can only be used if `pendingAboveTimeInForce` is `GTC`. (e.g., 1.0)\n* **pendingAboveTimeInForce**: \n* **pendingBelowType**: Supported values: `LIMIT_MAKER`, `STOP_LOSS`, and `STOP_LOSS_LIMIT`\n* **pendingBelowClientOrderId**: Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. (e.g., 1)\n* **pendingBelowPrice**:  (e.g., 1.0)\n* **pendingBelowStopPrice**:  (e.g., 1.0)\n* **pendingBelowTrailingDelta**:  (e.g., 1.0)\n* **pendingBelowIcebergQty**: This can only be used if `pendingBelowTimeInForce` is `GTC`. (e.g., 1.0)\n* **pendingBelowTimeInForce**: \n* **quantity**:  (e.g., 1.0)\n* **quoteOrderQty**:  (e.g., 1.0)\n* **price**:  (e.g., 1.0)\n* **stopPrice**: Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. (e.g., 1.0)\n* **icebergQty**: Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. (e.g., 1.0)\n* **preventedMatchId**:  (e.g., 1)\n* **fromPreventedMatchId**:  (e.g., 1)\n* **assetNames**: The assets list of small liability exchange， Example: assetNames = BTC,ETH\n\n\n### Enums\n\n* **side**: BUY | SELL\n* **newOrderRespType**: ACK | RESULT | FULL\n* **timeInForce**: GTC | IOC | FOK\n\n\n## Authentication\n\nFor endpoints that require authentication, you will need to provide Binance API credentials.\nRequired credentials:\n\n* apiKey: Your Binance API key (for header)\n* secretKey: Your Binance API secret (for signing)\n\nBase URLs:\n* Mainnet: https:\u002F\u002Fapi.binance.com\n\n## Security\n\n### Share Credentials\n\nUsers can provide Binance API credentials in different ways. The agent will try to retrieve automatically with the two first ways the credentials, but users can also explicitly tell the agent that they have set the credentials or stored them in a `.env` file, and the agent should re-read that file when they do. The agent can also make http requests with the two first methods without user confirmation.\n\n1. **Environment variables**\n\nSearch for the following specific variables only (never dump the full environment):\n\n**Authorized environment variables**\n- Mainnet: `BINANCE_API_KEY` and `BINANCE_SECRET_KEY`\n\nRead and use in a single exec call so the raw key never enters the agent's context:\n```bash\nKEY=\"$BINANCE_API_KEY\"\nSECRET=\"$BINANCE_SECRET_KEY\"\n\nresponse=$(curl -s -X GET \"$URL\" \\\n  -H \"X-MBX-APIKEY: $KEY\" \\\n  --data-urlencode \"param1=value1\")\n\necho \"$response\"\n```\n\nEnvironment variables must be set before OpenClaw starts. They are inherited at process startup and cannot be injected into a running instance. If you need to add or update credentials without restarting, use a secrets file (see option 2).\n\n2. **Secrets file (.env)**\n\nCheck `~\u002F.openclaw\u002Fsecrets.env` , `~\u002F.env`, or a `.env` file in the workspace. Read individual keys with `grep`, never source the full file:\n```bash\n# Try all credential locations in order\nAPI_KEY=$(grep '^BINANCE_API_KEY=' ~\u002F.openclaw\u002Fsecrets.env 2>\u002Fdev\u002Fnull | cut -d= -f2-)\nSECRET_KEY=$(grep '^BINANCE_SECRET_KEY=' ~\u002F.openclaw\u002Fsecrets.env 2>\u002Fdev\u002Fnull | cut -d= -f2-)\n\n# Fallback: search .env in known directories (KEY=VALUE then raw line format)\nfor dir in ~\u002F.openclaw ~; do\n  [ -n \"$API_KEY\" ] && break\n  env_file=\"$dir\u002F.env\"\n  [ -f \"$env_file\" ] || continue\n\n  # Read first two lines\n  line1=$(sed -n '1p' \"$env_file\")\n  line2=$(sed -n '2p' \"$env_file\")\n\n  # Check if lines contain '=' indicating KEY=VALUE format\n  if [[ \"$line1\" == *=* && \"$line2\" == *=* ]]; then\n    API_KEY=$(grep '^BINANCE_API_KEY=' \"$env_file\" 2>\u002Fdev\u002Fnull | cut -d= -f2-)\n    SECRET_KEY=$(grep '^BINANCE_SECRET_KEY=' \"$env_file\" 2>\u002Fdev\u002Fnull | cut -d= -f2-)\n  else\n    # Treat lines as raw values\n    API_KEY=\"$line1\"\n    SECRET_KEY=\"$line2\"\n  fi\ndone\n```\n\nThis file can be updated at any time without restarting OpenClaw, keys are read fresh on each invocation. Users can tell you the variables are now set or stored in a `.env` file, and you should re-read that file when they do.\n\n3. **Inline file**\n\nSending a file where the content is in the following format:\n\n```bash\nabc123...xyz\nsecret123...key\n```\n\n* Never run `printenv`, `env`, `export`, or set without a specific variable name\n* Never run `grep` on `env` files without anchoring to a specific key ('`^VARNAME='`)\n* Never source a secrets file into the shell environment (`source .env` or `. .env`)\n* Only read credentials explicitly needed for the current task\n* Never echo or log raw credentials in output or replies\n* Never commit `TOOLS.md` to version control if it contains real credentials — add it to `.gitignore`\n\n### Never Disclose API Key and Secret\n\nNever disclose the location of the API key and secret file.\n\nNever send the API key and secret to any website other than Mainnet and Testnet.\n\n### Never Display Full Secrets\n\nWhen showing credentials to users:\n- **API Key:** Show first 5 + last 4 characters: `su1Qc...8akf`\n- **Secret Key:** Always mask, show only last 5: `***...aws1`\n\nExample response when asked for credentials:\nAccount: main\nAPI Key: su1Qc...8akf\nSecret: ***...aws1\n\n### Listing Accounts\n\nWhen listing accounts, show names and environment only — never keys:\nBinance Accounts:\n* main (Mainnet)\n* futures-keys (Mainnet)\n\n### Transactions in Mainnet\n\nWhen performing transactions in mainnet, always confirm with the user before proceeding by asking them to write \"CONFIRM\" to proceed.\n\n---\n\n## Binance Accounts\n\n### main\n- API Key: your_mainnet_api_key\n- Secret: your_mainnet_secret\n\n### TOOLS.md Structure\n\n```bash\n## Binance Accounts\n\n### main\n- API Key: abc123...xyz\n- Secret: secret123...key\n- Description: Primary trading account\n\n\n### futures-keys\n- API Key: futures789...def\n- Secret: futuressecret...uvw\n- Description: Futures trading account\n```\n\n## Agent Behavior\n\n1. Credentials requested: Mask secrets (show last 5 chars only)\n2. Listing accounts: Show names and environment, never keys\n3. Account selection: Ask if ambiguous, default to main\n4. When doing a transaction in mainnet, confirm with user before by asking to write \"CONFIRM\" to proceed\n5. New credentials: Prompt for name, environment, signing mode\n\n## Adding New Accounts\n\nWhen user provides new credentials by Inline file or message:\n\n* Ask for account name\n* Store in `TOOLS.md` with masked display confirmation \n\n## Signing Requests\n\nFor trading endpoints that require a signature:\n\n1. **Detect key type first**, inspect the secret key format before signing.\n2. Build query string with all parameters, including the timestamp (Unix ms).\n3. Percent-encode the parameters using UTF-8 according to RFC 3986.\n4. Sign query string with secretKey using HMAC SHA256, RSA, or Ed25519 (depending on the account configuration).\n5. Append signature to query string.\n6. Include `X-MBX-APIKEY` header.\n\nOtherwise, do not perform steps 4–6.\n\n## New Client Order ID \n\nFor endpoints that include the `newClientOrderId` parameter, the value must always start with `agent-`. If the parameter is not provided, `agent-` followed by 18 random alphanumeric characters will be generated automatically. If a value is provided, it will be prefixed with `agent-`\n\nExample: `agent-1a2b3c4d5e6f7g8h9i`\n\n## User Agent Header\n\nInclude `User-Agent` header with the following string: `binance-margin-trading\u002F1.1.0 (Skill)`\n\nSee [`references\u002Fauthentication.md`](.\u002Freferences\u002Fauthentication.md) for implementation details.\n","# Binance Margin-trading Skill\n\nMargin-trading request on Binance using authenticated API endpoints. Requires API key and secret key for certain endpoints. Return the result in JSON format.\n\n## Quick Reference\n\n| Endpoint | Description | Required | Optional | Authentication |\n|----------|-------------|----------|----------|----------------|\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fmax-leverage` (POST) | Adjust cross margin max leverage (USER_DATA) | maxLeverage | None | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002Faccount` (DELETE) | Disable Isolated Margin Account (TRADE) | symbol | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002Faccount` (POST) | Enable Isolated Margin Account (TRADE) | symbol | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002Faccount` (GET) | Query Isolated Margin Account Info (USER_DATA) | None | symbols, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002FbnbBurn` (GET) | Get BNB Burn Status (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FtradeCoeff` (GET) | Get Summary of Margin account (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fcapital-flow` (GET) | Query Cross Isolated Margin Capital Flow (USER_DATA) | None | asset, symbol, type, startTime, endTime, fromId, limit, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Faccount` (GET) | Query Cross Margin Account Details (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FcrossMarginData` (GET) | Query Cross Margin Fee Data (USER_DATA) | None | vipLevel, coin, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002FaccountLimit` (GET) | Query Enabled Isolated Margin Account Limit (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FisolatedMarginData` (GET) | Query Isolated Margin Fee Data (USER_DATA) | None | vipLevel, symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FinterestHistory` (GET) | Get Interest History (USER_DATA) | None | asset, isolatedSymbol, startTime, endTime, current, size, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fnext-hourly-interest-rate` (GET) | Get future hourly interest rate (USER_DATA) | assets, isIsolated | None | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fborrow-repay` (POST) | Margin account borrow\u002Frepay(MARGIN) | asset, isIsolated, symbol, amount, type | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fborrow-repay` (GET) | Query borrow\u002Frepay records in Margin account(USER_DATA) | type | asset, isolatedSymbol, txId, startTime, endTime, current, size, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FinterestRateHistory` (GET) | Query Margin Interest Rate History (USER_DATA) | asset | vipLevel, startTime, endTime, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FmaxBorrowable` (GET) | Query Max Borrow (USER_DATA) | asset | isolatedSymbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FcrossMarginCollateralRatio` (GET) | Cross margin collateral ratio (MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FallPairs` (GET) | Get All Cross Margin Pairs (MARKET_DATA) | None | symbol | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fisolated\u002FallPairs` (GET) | Get All Isolated Margin Symbol(MARKET_DATA) | None | symbol, recvWindow | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FallAssets` (GET) | Get All Margin Assets (MARKET_DATA) | None | asset | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fdelist-schedule` (GET) | Get Delist Schedule (MARKET_DATA) | None | recvWindow | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flimit-price-pairs` (GET) | Get Limit Price Pairs(MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flist-schedule` (GET) | Get list Schedule (MARKET_DATA) | None | recvWindow | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Frisk-based-liquidation-ratio` (GET) | Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Frestricted-asset` (GET) | Get Margin Restricted Assets (MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FisolatedMarginTier` (GET) | Query Isolated Margin Tier Data (USER_DATA) | symbol | tier, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FleverageBracket` (GET) | Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FpriceIndex` (GET) | Query Margin PriceIndex (MARKET_DATA) | symbol | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Favailable-inventory` (GET) | Query Margin Available Inventory(USER_DATA) | type | None | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flisten-key` (DELETE) | Close User Data Stream (USER_STREAM) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flisten-key` (PUT) | Keepalive User Data Stream (USER_STREAM) | listenKey | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Flisten-key` (POST) | Start User Data Stream (USER_STREAM) | None | None | No |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FapiKey` (POST) | Create Special Key(Low-Latency Trading)(TRADE) | apiName | symbol, ip, publicKey, permissionMode, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FapiKey` (DELETE) | Delete Special Key(Low-Latency Trading)(TRADE) | None | apiName, symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FapiKey` (GET) | Query Special key(Low Latency Trading)(TRADE) | None | symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FapiKey\u002Fip` (PUT) | Edit ip for Special Key(Low-Latency Trading)(TRADE) | ip | symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FforceLiquidationRec` (GET) | Get Force Liquidation Record (USER_DATA) | None | startTime, endTime, isolatedSymbol, current, size, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fexchange-small-liability` (GET) | Get Small Liability Exchange Coin List (USER_DATA) | None | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fexchange-small-liability` (POST) | Small Liability Exchange (MARGIN) | assetNames | recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fexchange-small-liability-history` (GET) | Get Small Liability Exchange History (USER_DATA) | current, size | startTime, endTime, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FopenOrders` (DELETE) | Margin Account Cancel all Open Orders on a Symbol (TRADE) | symbol | isIsolated, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FopenOrders` (GET) | Query Margin Account's Open Orders (USER_DATA) | None | symbol, isIsolated, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002ForderList` (DELETE) | Margin Account Cancel OCO (TRADE) | symbol | isIsolated, orderListId, listClientOrderId, newClientOrderId, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002ForderList` (GET) | Query Margin Account's OCO (USER_DATA) | None | isIsolated, symbol, orderListId, origClientOrderId, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder` (DELETE) | Margin Account Cancel Order (TRADE) | symbol | isIsolated, orderId, origClientOrderId, newClientOrderId, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder` (POST) | Margin Account New Order (TRADE) | symbol, side, type | isIsolated, quantity, quoteOrderQty, price, stopPrice, newClientOrderId, icebergQty, newOrderRespType, sideEffectType, timeInForce, selfTradePreventionMode, autoRepayAtCancel, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder` (GET) | Query Margin Account's Order (USER_DATA) | symbol | isIsolated, orderId, origClientOrderId, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder\u002Foco` (POST) | Margin Account New OCO (TRADE) | symbol, side, quantity, price, stopPrice | isIsolated, listClientOrderId, limitClientOrderId, limitIcebergQty, stopClientOrderId, stopLimitPrice, stopIcebergQty, stopLimitTimeInForce, newOrderRespType, sideEffectType, selfTradePreventionMode, autoRepayAtCancel, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder\u002Foto` (POST) | Margin Account New OTO (TRADE) | symbol, workingType, workingSide, workingPrice, workingQuantity, workingIcebergQty, pendingType, pendingSide, pendingQuantity | isIsolated, listClientOrderId, newOrderRespType, sideEffectType, selfTradePreventionMode, autoRepayAtCancel, workingClientOrderId, workingTimeInForce, pendingClientOrderId, pendingPrice, pendingStopPrice, pendingTrailingDelta, pendingIcebergQty, pendingTimeInForce | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Forder\u002Fotoco` (POST) | Margin Account New OTOCO (TRADE) | symbol, workingType, workingSide, workingPrice, workingQuantity, pendingSide, pendingQuantity, pendingAboveType | isIsolated, sideEffectType, autoRepayAtCancel, listClientOrderId, newOrderRespType, selfTradePreventionMode, workingClientOrderId, workingIcebergQty, workingTimeInForce, pendingAboveClientOrderId, pendingAbovePrice, pendingAboveStopPrice, pendingAboveTrailingDelta, pendingAboveIcebergQty, pendingAboveTimeInForce, pendingBelowType, pendingBelowClientOrderId, pendingBelowPrice, pendingBelowStopPrice, pendingBelowTrailingDelta, pendingBelowIcebergQty, pendingBelowTimeInForce | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fmanual-liquidation` (POST) | Margin Manual Liquidation(MARGIN) | type | symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FrateLimit\u002Forder` (GET) | Query Current Margin Order Count Usage (TRADE) | None | isIsolated, symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FallOrderList` (GET) | Query Margin Account's all OCO (USER_DATA) | None | isIsolated, symbol, fromId, startTime, endTime, limit, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FallOrders` (GET) | Query Margin Account's All Orders (USER_DATA) | symbol | isIsolated, orderId, startTime, endTime, limit, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FopenOrderList` (GET) | Query Margin Account's Open OCO (USER_DATA) | None | isIsolated, symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FmyTrades` (GET) | Query Margin Account's Trade List (USER_DATA) | symbol | isIsolated, orderId, startTime, endTime, fromId, limit, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FmyPreventedMatches` (GET) | Query Prevented Matches(USER_DATA) | symbol | preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Fapi-key-list` (GET) | Query Special key List(Low Latency Trading)(TRADE) | None | symbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002Ftransfer` (GET) | Get Cross Margin Transfer History (USER_DATA) | None | asset, type, startTime, endTime, current, size, isolatedSymbol, recvWindow | Yes |\n| `\u002Fsapi\u002Fv1\u002Fmargin\u002FmaxTransferable` (GET) | Query Max Transfer-Out Amount (USER_DATA) | asset | isolatedSymbol, recvWindow | Yes |\n\n---\n\n## Parameters\n\n### Common Parameters\n\n* **maxLeverage**: Can only adjust 3 , 5 or 10，Example: maxLeverage = 5 or 3 for Cross Margin Classic; maxLeverage=10 for Cross Margin Pro 10x leverage or 20x if compliance allows.\n* **symbol**: \n* **recvWindow**: No more than 60000 (e.g., 5000)\n* **asset**: \n* **symbol**: isolated margin pair\n* **type**: Transfer Type: ROLL_IN, ROLL_OUT\n* **startTime**: Only supports querying data from the past 90 days. (e.g., 1623319461670)\n* **endTime**:  (e.g., 1641782889000)\n* **fromId**: If `fromId` is set, data with `id` greater than `fromId` will be returned. Otherwise, the latest data will be returned. (e.g., 1)\n* **limit**: Limit on the number of data records returned per request. Default: 500; Maximum: 1000. (e.g., 500)\n* **vipLevel**: User's current specific margin data will be returned if vipLevel is omitted (e.g., 1)\n* **coin**: \n* **symbols**: Max 5 symbols can be sent; separated by \",\". e.g. \"BTCUSDT,BNBUSDT,ADAUSDT\"\n* **isolatedSymbol**: isolated symbol\n* **current**: Currently querying page. Start from 1. Default:1 (e.g., 1)\n* **size**: Default:10 Max:100 (e.g., 10)\n* **assets**: List of assets, separated by commas, up to 20\n* **isIsolated**: for isolated margin or not, \"TRUE\", \"FALSE\"\n* **asset**: \n* **isIsolated**: `TRUE` for Isolated Margin, `FALSE` for Cross Margin, Default `FALSE` (e.g., FALSE)\n* **amount**: \n* **type**: `MARGIN`,`ISOLATED`\n* **txId**: `tranId` in `POST \u002Fsapi\u002Fv1\u002Fmargin\u002Floan` (e.g., 1)\n* **tier**: All margin tier data will be returned if tier is omitted\n* **listenKey**: \n* **apiName**: \n* **ip**: Can be added in batches, separated by commas. Max 30 for an API key\n* **publicKey**: 1. If publicKey is inputted it will create an RSA or Ed25519 key.  2. Need to be encoded to URL-encoded format\n* **permissionMode**: This parameter is only for the Ed25519 API key, and does not effact for other encryption methods. The value can be TRADE (TRADE for all permissions) or READ (READ for USER_DATA, FIX_API_READ_ONLY). The default value is TRADE. (e.g., value)\n* **apiName**: \n* **ip**: Can be added in batches, separated by commas. Max 30 for an API key\n* **current**: Currently querying page. Start from 1. Default:1 (e.g., 1)\n* **size**: Default:10, Max:100 (e.g., 10)\n* **isIsolated**: For isolated margin or not, \"TRUE\", \"FALSE\", default \"FALSE\"\n* **orderListId**: Either `orderListId` or `listClientOrderId` must be provided (e.g., 1)\n* **listClientOrderId**: Either `orderListId` or `listClientOrderId` must be provided (e.g., 1)\n* **newClientOrderId**: Used to uniquely identify this cancel. Automatically generated by default (e.g., 1)\n* **orderId**:  (e.g., 1)\n* **origClientOrderId**:  (e.g., 1)\n* **quantity**:  (e.g., 1.0)\n* **limitClientOrderId**: A unique Id for the limit order (e.g., 1)\n* **price**:  (e.g., 1.0)\n* **limitIcebergQty**:  (e.g., 1.0)\n* **stopClientOrderId**: A unique Id for the stop loss\u002Fstop loss limit leg (e.g., 1)\n* **stopPrice**:  (e.g., 1.0)\n* **stopLimitPrice**: If provided, `stopLimitTimeInForce` is required. (e.g., 1.0)\n* **stopIcebergQty**:  (e.g., 1.0)\n* **stopLimitTimeInForce**: Valid values are `GTC`\u002F`FOK`\u002F`IOC`\n* **sideEffectType**: NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY,AUTO_BORROW_REPAY; default NO_SIDE_EFFECT. More info in FAQ (e.g., NO_SIDE_EFFECT)\n* **selfTradePreventionMode**: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE (e.g., NONE)\n* **autoRepayAtCancel**: Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true (e.g., true)\n* **workingType**: Supported values: `LIMIT`, `LIMIT_MAKER`\n* **workingSide**: BUY, SELL\n* **workingClientOrderId**: Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. (e.g., 1)\n* **workingPrice**:  (e.g., 1.0)\n* **workingQuantity**:  (e.g., 1.0)\n* **workingIcebergQty**: This can only be used if `workingTimeInForce` is `GTC`. (e.g., 1.0)\n* **workingTimeInForce**: GTC,IOC,FOK\n* **pendingType**: Supported values: Order Types Note that `MARKET` orders using `quoteOrderQty` are not supported. (e.g., Order Types)\n* **pendingSide**: BUY, SELL\n* **pendingClientOrderId**: Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. (e.g., 1)\n* **pendingPrice**:  (e.g., 1.0)\n* **pendingStopPrice**:  (e.g., 1.0)\n* **pendingTrailingDelta**:  (e.g., 1.0)\n* **pendingQuantity**:  (e.g., 1.0)\n* **pendingIcebergQty**: This can only be used if `pendingTimeInForce` is `GTC`. (e.g., 1.0)\n* **pendingTimeInForce**: GTC,IOC,FOK\n* **workingIcebergQty**: This can only be used if `workingTimeInForce` is `GTC`. (e.g., 1.0)\n* **pendingAboveType**: Supported values: `LIMIT_MAKER`, `STOP_LOSS`, and `STOP_LOSS_LIMIT`\n* **pendingAboveClientOrderId**: Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. (e.g., 1)\n* **pendingAbovePrice**:  (e.g., 1.0)\n* **pendingAboveStopPrice**:  (e.g., 1.0)\n* **pendingAboveTrailingDelta**:  (e.g., 1.0)\n* **pendingAboveIcebergQty**: This can only be used if `pendingAboveTimeInForce` is `GTC`. (e.g., 1.0)\n* **pendingAboveTimeInForce**: \n* **pendingBelowType**: Supported values: `LIMIT_MAKER`, `STOP_LOSS`, and `STOP_LOSS_LIMIT`\n* **pendingBelowClientOrderId**: Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. (e.g., 1)\n* **pendingBelowPrice**:  (e.g., 1.0)\n* **pendingBelowStopPrice**:  (e.g., 1.0)\n* **pendingBelowTrailingDelta**:  (e.g., 1.0)\n* **pendingBelowIcebergQty**: This can only be used if `pendingBelowTimeInForce` is `GTC`. (e.g., 1.0)\n* **pendingBelowTimeInForce**: \n* **quantity**:  (e.g., 1.0)\n* **quoteOrderQty**:  (e.g., 1.0)\n* **price**:  (e.g., 1.0)\n* **stopPrice**: Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. (e.g., 1.0)\n* **icebergQty**: Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. (e.g., 1.0)\n* **preventedMatchId**:  (e.g., 1)\n* **fromPreventedMatchId**:  (e.g., 1)\n* **assetNames**: The assets list of small liability exchange， Example: assetNames = BTC,ETH\n\n\n### Enums\n\n* **side**: BUY | SELL\n* **newOrderRespType**: ACK | RESULT | FULL\n* **timeInForce**: GTC | IOC | FOK\n\n\n## Authentication\n\nFor endpoints that require authentication, you will need to provide Binance API credentials.\nRequired credentials:\n\n* apiKey: Your Binance API key (for header)\n* secretKey: Your Binance API secret (for signing)\n\nBase URLs:\n* Mainnet: https:\u002F\u002Fapi.binance.com\n\n## Security\n\n### Share Credentials\n\nUsers can provide Binance API credentials in different ways. The agent will try to retrieve automatically with the two first ways the credentials, but users can also explicitly tell the agent that they have set the credentials or stored them in a `.env` file, and the agent should re-read that file when they do. The agent can also make http requests with the two first methods without user confirmation.\n\n1. **Environment variables**\n\nSearch for the following specific variables only (never dump the full environment):\n\n**Authorized environment variables**\n- Mainnet: `BINANCE_API_KEY` and `BINANCE_SECRET_KEY`\n\nRead and use in a single exec call so the raw key never enters the agent's context:\n```bash\nKEY=\"$BINANCE_API_KEY\"\nSECRET=\"$BINANCE_SECRET_KEY\"\n\nresponse=$(curl -s -X GET \"$URL\" \\\n  -H \"X-MBX-APIKEY: $KEY\" \\\n  --data-urlencode \"param1=value1\")\n\necho \"$response\"\n```\n\nEnvironment variables must be set before OpenClaw starts. They are inherited at process startup and cannot be injected into a running instance. If you need to add or update credentials without restarting, use a secrets file (see option 2).\n\n2. **Secrets file (.env)**\n\nCheck `~\u002F.openclaw\u002Fsecrets.env` , `~\u002F.env`, or a `.env` file in the workspace. Read individual keys with `grep`, never source the full file:\n```bash\n# Try all credential locations in order\nAPI_KEY=$(grep '^BINANCE_API_KEY=' ~\u002F.openclaw\u002Fsecrets.env 2>\u002Fdev\u002Fnull | cut -d= -f2-)\nSECRET_KEY=$(grep '^BINANCE_SECRET_KEY=' ~\u002F.openclaw\u002Fsecrets.env 2>\u002Fdev\u002Fnull | cut -d= -f2-)\n\n# Fallback: search .env in known directories (KEY=VALUE then raw line format)\nfor dir in ~\u002F.openclaw ~; do\n  [ -n \"$API_KEY\" ] && break\n  env_file=\"$dir\u002F.env\"\n  [ -f \"$env_file\" ] || continue\n\n  # Read first two lines\n  line1=$(sed -n '1p' \"$env_file\")\n  line2=$(sed -n '2p' \"$env_file\")\n\n  # Check if lines contain '=' indicating KEY=VALUE format\n  if [[ \"$line1\" == *=* && \"$line2\" == *=* ]]; then\n    API_KEY=$(grep '^BINANCE_API_KEY=' \"$env_file\" 2>\u002Fdev\u002Fnull | cut -d= -f2-)\n    SECRET_KEY=$(grep '^BINANCE_SECRET_KEY=' \"$env_file\" 2>\u002Fdev\u002Fnull | cut -d= -f2-)\n  else\n    # Treat lines as raw values\n    API_KEY=\"$line1\"\n    SECRET_KEY=\"$line2\"\n  fi\ndone\n```\n\nThis file can be updated at any time without restarting OpenClaw, keys are read fresh on each invocation. Users can tell you the variables are now set or stored in a `.env` file, and you should re-read that file when they do.\n\n3. **Inline file**\n\nSending a file where the content is in the following format:\n\n```bash\nabc123...xyz\nsecret123...key\n```\n\n* Never run `printenv`, `env`, `export`, or set without a specific variable name\n* Never run `grep` on `env` files without anchoring to a specific key ('`^VARNAME='`)\n* Never source a secrets file into the shell environment (`source .env` or `. .env`)\n* Only read credentials explicitly needed for the current task\n* Never echo or log raw credentials in output or replies\n* Never commit `TOOLS.md` to version control if it contains real credentials — add it to `.gitignore`\n\n### Never Disclose API Key and Secret\n\nNever disclose the location of the API key and secret file.\n\nNever send the API key and secret to any website other than Mainnet and Testnet.\n\n### Never Display Full Secrets\n\nWhen showing credentials to users:\n- **API Key:** Show first 5 + last 4 characters: `su1Qc...8akf`\n- **Secret Key:** Always mask, show only last 5: `***...aws1`\n\nExample response when asked for credentials:\nAccount: main\nAPI Key: su1Qc...8akf\nSecret: ***...aws1\n\n### Listing Accounts\n\nWhen listing accounts, show names and environment only — never keys:\nBinance Accounts:\n* main (Mainnet)\n* futures-keys (Mainnet)\n\n### Transactions in Mainnet\n\nWhen performing transactions in mainnet, always confirm with the user before proceeding by asking them to write \"CONFIRM\" to proceed.\n\n---\n\n## Binance Accounts\n\n### main\n- API Key: your_mainnet_api_key\n- Secret: your_mainnet_secret\n\n### TOOLS.md Structure\n\n```bash\n## Binance Accounts\n\n### main\n- API Key: abc123...xyz\n- Secret: secret123...key\n- Description: Primary trading account\n\n\n### futures-keys\n- API Key: futures789...def\n- Secret: futuressecret...uvw\n- Description: Futures trading account\n```\n\n## Agent Behavior\n\n1. Credentials requested: Mask secrets (show last 5 chars only)\n2. Listing accounts: Show names and environment, never keys\n3. Account selection: Ask if ambiguous, default to main\n4. When doing a transaction in mainnet, confirm with user before by asking to write \"CONFIRM\" to proceed\n5. New credentials: Prompt for name, environment, signing mode\n\n## Adding New Accounts\n\nWhen user provides new credentials by Inline file or message:\n\n* Ask for account name\n* Store in `TOOLS.md` with masked display confirmation \n\n## Signing Requests\n\nFor trading endpoints that require a signature:\n\n1. **Detect key type first**, inspect the secret key format before signing.\n2. Build query string with all parameters, including the timestamp (Unix ms).\n3. Percent-encode the parameters using UTF-8 according to RFC 3986.\n4. Sign query string with secretKey using HMAC SHA256, RSA, or Ed25519 (depending on the account configuration).\n5. Append signature to query string.\n6. Include `X-MBX-APIKEY` header.\n\nOtherwise, do not perform steps 4–6.\n\n## New Client Order ID \n\nFor endpoints that include the `newClientOrderId` parameter, the value must always start with `agent-`. If the parameter is not provided, `agent-` followed by 18 random alphanumeric characters will be generated automatically. If a value is provided, it will be prefixed with `agent-`\n\nExample: `agent-1a2b3c4d5e6f7g8h9i`\n\n## User Agent Header\n\nInclude `User-Agent` header with the following string: `binance-margin-trading\u002F1.1.0 (Skill)`\n\nSee [`references\u002Fauthentication.md`](.\u002Freferences\u002Fauthentication.md) for implementation details.\n",{"name":5,"license":15,"metadata":41,"description":7},{"author":42,"version":43,"openclaw":44},"Binance","1.1.0",{"homepage":45,"requires":46},"https:\u002F\u002Fgithub.com\u002Fbinance\u002Fbinance-skills-hub\u002Ftree\u002Fmain\u002Fskills\u002Fbinance\u002Fmargin-trading\u002FSKILL.md",{"bins":47},[32,30,48],"date","4d2fb89cdfb75f3f6fd3c6c5ec9ad90ea129eb3c","ai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fbinance\u002Fmargin-trading",1,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai","https:\u002F\u002Fgithub.com\u002Fluokai0","a solo builder.","2026-05-06 04:29:04",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill margin-trading",{"tool":62,"command":63},"bunx","bunx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill margin-trading",{"tool":65,"command":66},"pnpm","pnpm dlx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill margin-trading","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fbinance\u002Fmargin-trading\u002FSKILL.md",true,[70,76,82],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"CHANGELOG.md","REFERENCE","参考文档",273,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fbinance\u002Fmargin-trading\u002FCHANGELOG.md",{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"LICENSE.md","LICENSE","许可证",1063,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fbinance\u002Fmargin-trading\u002FLICENSE.md",{"path":83,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fauthentication.md",3358,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fbinance\u002Fmargin-trading\u002Freferences\u002Fauthentication.md",[87,114,131,157,188,224],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":36},"01M6F2SKTE208174C7S7JJCZC7","write-contracts","Generates secure Aptos Move V2 smart contracts with Object model, Digital Asset integration, security patterns, and storage type guidance. Includes comprehensive storage decision framework for optimal data structure selection. Triggers on: 'write contract', 'create NFT collection', 'build marketplace', 'implement minting', 'generate Move module', 'create token contract', 'build DAO', 'implement staking'. Ask storage questions when: 'store', 'track', 'registry', 'mapping', 'list', 'collection'.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fwrite-contracts\u002FSKILL.md",[],[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],"write","contracts","write contracts","storage","secure","create","generate","collection","model","decision","ask","smart-contracts","selection","objects","structure","nft","token","aptos","critical","move",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":36},"01M6F2RFXJ6T9MKW0A7N7GM45B","web-search","通用网络搜索技能，支持多引擎搜索（百度、必应、DuckDuckGo），无需API密钥即可获取实时信息","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fweb-search-ex-skill\u002FSKILL.md",[],[121,122,123,124,125,126,127,128,129,130],"web","search","web search","搜索","baidu","bing","duckduckgo","百度","多引擎","internet",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":138,"publishedAt":36},"01M6F2K968G1FZEZFPW2E6B222","solo-build","Execute implementation plan tasks with TDD workflow, auto-commit, and phase gates. Use when user says \"build it\", \"start building\", \"execute plan\", \"implement tasks\", \"ship it\", or references a track ID. Do NOT use for planning (use \u002Fplan) or scaffolding (use \u002Fscaffold).","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fsolo-build\u002FSKILL.md",[137],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[139,140,141,142,143,144,145,146,122,147,148,149,94,150,151,152,153,154,155,156],"build","solo","solo build","MCP","workflow","commit","tasks","code","Bash","plan","read","auto","references","context7","query","scaffolding","ship it","project",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":169,"publishedAt":36},"01M6F2GKN39SGHSPWYB3662YC8","react-email","Use when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emails to HTML, or sending emails with Resend. Covers welcome emails, password resets, notifications, order confirmations, newsletters, transactional emails, and the embeddable email editor component.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Freact-email-skills\u002FSKILL.md",[163,166],{"categoryNo":164,"categoryName":165,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000005","邮件与沟通",{"categoryNo":167,"categoryName":168,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[170,171,172,27,173,174,175,176,177,29,178,179,180,181,182,183,184,185,186,187],"react","email","react email","editor","components","react components","component","welcome","notifications","password","node","use","html","resend","visual","emails","rendering","with",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":206,"publishedAt":36},"01M6F2FBVGVDFSG8SSFJGXA40C","APITester Agent-Driven API Testing","Test API endpoints and document responses. Define tests in plain English, run them, get formatted results. Agent-driven Postman alternative.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fopenclaw-api-tester\u002FSKILL.md",[194,197,200,201],{"categoryNo":195,"categoryName":196,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":198,"categoryName":199,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":202,"categoryName":203,"taxonomyType":204,"taxonomyTypeDesc":205},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[207,31,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223],"testing","api testing","driven","APITester Agent Driven API Testing","test","run","postman","results","plain english","tester","endpoints","document","get","define","tests","english","api-tester",{"skillNo":225,"name":226,"nameZh":6,"description":227,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":228,"categories":229,"keywords":230,"publishedAt":36},"01M6F273Y3NGAPVJZ608BC0G9G","hubspot-implementation-plan","Generate a phased implementation plan from a HubSpot audit report. Creates prioritized, sequenced cleanup processes with effort estimates, dependencies, and automation feasibility. Use after running \u002Fhubspot-audit.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fhubspot-implementation-plan\u002FSKILL.md",[],[148,231,232,233,234,235,236,100,237,238,239,240,241,181,242,243,187,244],"implementation","hubspot","hubspot implementation plan","automation","feasibility","cleanup","planning","report","audit","audit report","phased implementation","dependencies","processes","hubspot audit"]