Binance Classic Portfolio Margin Program API details
1. uniMMR and Classic Portfolio Margin Account Status
Field | Description |
uniMMR | Unified Margin Maintenance margin ratio |
accountEquity | Unified margin account equity, in USD |
actualEquity | Unified margin account actual equity (without collateral rate) in USD |
accountMaintMargin | Unified Margin Maintenance Margin, the required margin for open position and loan, in USD |
accountStatus | Unified Margin Account current status: "NORMAL", "MARGIN_CALL", "SUPPLY_MARGIN", "REDUCE_ONLY", "ACTIVE_LIQUIDATION", "FORCE_LIQUIDATION", "BANKRUPTED" |
Name | Type | Mandatory |
recvWindow | LONG | NO |
timestamp | LONG | YES |
Response Type | Response Content |
Normal Response | { "uniMMR": "1.87987800", "accountEquity": "122607.35137903", "actualEquity": "142607.35137903", "accountMaintMargin": "23.72469206", "accountStatus": "NORMAL" } |
When the account hasnât enabled the Classic Portfolio Margin Program | { "code":-21001, "msg": "invalid request: request ID is not a Classic Portfolio Margin Account" } |
2. Classic Portfolio Margin Bankruptcy Loan
- Classic Portfolio Margin Bankruptcy Loan Record
Field | Description |
asset | Loan asset by default (USDT) |
amount | Classic Portfolio Margin bankruptcy loan amount in USDT |
Name | Type | Mandatory |
recvWindow | LONG | NO |
timestamp | LONG | YES |
Response Type | Response Content |
Normal Response | { "asset": "USDT", "amount": "579.45", } |
The user doesnât have any Classic Portfolio Margin Bankruptcy Loan | { "error code": -21004, "msg":"No outstanding pmLoan" } |
- Classic Portfolio Margin Bankruptcy Loan Repayment
Name | Type | Mandatory |
recvWindow | LONG | NO |
timestamp | LONG | YES |
Response Type | Response Content |
Normal Response | { "tranId": 58203331886213504 } |
The userâs Spot Wallet doesnât have enough USDT to repay the Classic Portfolio Margin Bankruptcy Loan | { "error code": -21005, "msg":"No enough USDT to repay pmLoan" } |
The userâs Classic Portfolio Margin Bankruptcy Loan repayment is in process | { "error code": -21006, "msg":"Had pmLoan repayment in process" } |
The user failed to repay the Classic Portfolio Margin Bankruptcy Loan since liquidation was in process | { "error code": -21007, "msg":"Post fail since liquidation is in process" } |
3. Classic Portfolio Margin Collateral Rate (MARKET_DATA)
Field | Description |
asset | Collateral asset type |
collateralRate | Corresponding collateral rate |
Response Type | Response Content |
Normal Response | { "asset": "USDT", "collateralRate": "1.0000", } |
4. Classic Portfolio Margin Notional Limits Value per Symbol (MARKET_DATA)
Field | Description |
Symbol | Symbol |
notionalLimit | Classic Portfolio Margin Notional Limit in USDT |
Name | Type | Mandatory |
symbol | STRING | NO |
Response Type | Response Content |
Normal Response | { "notionalLimits": [ // Classic Portfolio Margin notional limit { "symbol": "BTCUSDT", // Symbol "notionalLimit": "100000000" // Classic Portfolio Margin Notional Limit in USDT }, { "symbol": "ETHUSDT", "notionalLimit": "20000000" }, ] } |
Name | Type | Mandatory |
symbol | STRING | NO |
pair | STRING | NO |
Response Type | Response Content |
Normal Response | { "notionalLimits": [ // Classic Portfolio Margin notional limit { "symbol": "BTCUSD_PERP", // Symbol "pair": "BTCUSD", // Pair " notionalLimit": "500" // Classic Portfolio Margin Notional Limit in coin }, { "symbol": "BTCUSD_220624", "pair": "BTCUSD", " notionalLimit": "200" } ] } |
5. Additional Classic Portfolio Margin Program API Exceptions
Client Status | Response Content |
If the user transfers assets from the Margin Wallet to the Futures Wallet | /sapi/v1/asset/transfer: { "error code": -21002, "msg":"Classic Portfolio Margin Account doesn't support transfer from margin to futuresâ } |
If the margin assets failed to retrieve in time | /sapi/v1/margin/maxTransferable /sapi/v1/asset/transfer /sapi/v1/margin/transfer /sapi/v1/future/transfer { "error code": -21003, "msg":"fail to retrieve margin assetsâ } |
If the margin assets are not updated by the system in time | /sapi/v1/margin/maxBorrowable/sapi/v1/margin/loan /sapi/v1/margin/order with MARGIN_BUY { "error code": -21003, "msg":"fail to retrieve margin assetsâ } |
6. Classic Portfolio Margin Current Account Information
Field | Description |
maxWithdrawAmountUSD | The maximum amount that can be transferred out of the Classic Portfolio Margin Account in USD (as per the estimated conversion value)* |
maxWithdrawAmount | The maximum amount that can be transferred out of the Classic Portfolio Margin Account* |
Name | Type | Mandatory |
asset | STRING | YES |
recvWindow | LONG | NO |
Response Type | Response Content |
Normal Response | { "maxWithdrawAmountUSD": "25347.92083245", // Classic Portfolio Margin maximum virtual amount for transfer out in USD "asset": "BTC", // asset name "maxWithdrawAmount": "1.33663654", // maximum amount for transfer out } |
7. Classic Portfolio Margin Interest History (USER_DATA)
Name | Type | Mandatory |
asset | STRING | NO |
startTime | LONG | NO |
endTime | LONG | NO |
size | LONG | Default:10 Max:100 |
recvWindow | LONG | NO |
timestamp | LONG | YES |
Response Type | Response Content |
Normal Response | [ { "asset": "USDT", "interest": "0.00000604", "principal": "0.04902887", "interestRate": "0.00012329", "type": "UM_NEGATIVE_BALANCE", "interestAccruedTime": 1678924800000 } ] |
8. Classic Portfolio Margin Interest Rate (USER_DATA)
Name | Type | Mandatory |
asset | STRING | NO |
recvWindow | LONG | NO |
timestamp | LONG | YES |
Response Type | Response Content |
Normal Response | [ { "asset": "USDT", "dailyInterest": "0.00012329", //daily interest rate "yearlyInterest": "0.045" //annual interest rate } ] } |