$npx -y skills add asterdex/aster-skills-hub --skill aster-api-account-v1Account, balance, positions, leverage, margin type, isolated margin, spot–futures transfer for Aster Futures API v1/v2/v4. Use when reading/updating balance, positions, or transferring. Signed; see aster-api-auth-v1. Prefer user data stream for real-time.
| 1 | # Aster API Account (v1) |
| 2 | |
| 3 | **Base:** https://fapi.asterdex.com. All endpoints **signed**. |
| 4 | |
| 5 | ## Balance and account |
| 6 | |
| 7 | - **GET /fapi/v2/balance** (Weight: 5). No params beyond auth. Returns: see reference. |
| 8 | - **GET /fapi/v4/account** (Weight: 5). Returns: see reference. |
| 9 | |
| 10 | ## Positions |
| 11 | |
| 12 | - **GET /fapi/v2/positionRisk** (Weight: 5). Params: symbol (optional). Returns per-symbol/positionSide; one-way = BOTH, hedge = LONG/SHORT. Fields: see reference. |
| 13 | |
| 14 | ## Leverage and margin type |
| 15 | |
| 16 | - **POST /fapi/v1/leverage** (Weight: 1): symbol, leverage (1–125). Returns leverage, maxNotionalValue, symbol. |
| 17 | - **POST /fapi/v1/marginType** (Weight: 1): symbol, marginType (ISOLATED | CROSSED). Fails if open orders or position exist when changing (see error codes). |
| 18 | |
| 19 | ## Isolated position margin |
| 20 | |
| 21 | - **POST /fapi/v1/positionMargin** (Weight: 1): symbol, positionSide (optional; BOTH or LONG/SHORT in hedge), amount, type (1 = add, 2 = reduce). Only for isolated margin. |
| 22 | - **GET /fapi/v1/positionMargin/history** (Weight: 1): symbol, type (optional), startTime, endTime, limit (default 500). |
| 23 | |
| 24 | ## Transfer (futures ↔ spot) |
| 25 | |
| 26 | - **POST /fapi/v1/asset/wallet/transfer** (Weight: 5): amount, asset, clientTranId (required, unique e.g. within 7 days), kindType (FUTURE_SPOT | SPOT_FUTURE), timestamp. Returns tranId, status. |
| 27 | |
| 28 | ## Position and account mode |
| 29 | |
| 30 | - **GET /fapi/v1/positionSide/dual** (Weight: 30): returns dualSidePosition (true = hedge, false = one-way). |
| 31 | - **POST /fapi/v1/positionSide/dual** (Weight: 1): dualSidePosition "true"|"false". Affects every symbol. |
| 32 | - **GET /fapi/v1/multiAssetsMargin** (Weight: 30): returns multiAssetsMargin. |
| 33 | - **POST /fapi/v1/multiAssetsMargin** (Weight: 1): multiAssetsMargin "true"|"false". Affects every symbol. |
| 34 | |
| 35 | ## Other |
| 36 | |
| 37 | - **GET /fapi/v1/income** (Weight: 30): symbol, incomeType (optional), startTime, endTime, limit (default 100, max 1000). Default 7-day window if no time range. incomeType values: see reference. |
| 38 | - **GET /fapi/v1/leverageBracket** (Weight: 1): symbol optional; notional brackets per symbol. |
| 39 | - **GET /fapi/v1/adlQuantile** (Weight: 5): symbol optional; ADL queue (0–4). |
| 40 | - **GET /fapi/v1/forceOrders** (Weight: 20/50): symbol, autoCloseType (LIQUIDATION | ADL), startTime, endTime, limit (default 50, max 100). |
| 41 | - **GET /fapi/v1/commissionRate** (Weight: 20): symbol required; makerCommissionRate, takerCommissionRate. |
| 42 | - **GET /fapi/v1/remainingOpenableNotionalValue** (Weight: 20): symbol, leverage required; returns remainingOpenableNotionalValue (USDT). |
| 43 | |
| 44 | Payload shapes: [reference.md](reference.md). |