Binance Portfolio Margin Pro Program API details
1. uniMMR and Portfolio Margin Pro 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 Portfolio Margin Pro Program | { "code":-21001, "msg": "invalid request: request ID is not a Portfolio Margin Account" } |
2. Portfolio Margin Pro Bankruptcy Loan
- Portfolio Margin Pro Bankruptcy Loan Record
Field | Description |
asset | Loan asset by default (USDT) |
amount | Portfolio Margin Pro 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 Portfolio Margin Bankruptcy Loan | { "error code": -21004, "msg":"No outstanding pmLoan" } |
- Portfolio Margin Pro 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 Portfolio Margin Pro Bankruptcy Loan | { "error code": -21005, "msg":"No enough USDT to repay pmLoan" } |
The user’s Portfolio Margin Pro Bankruptcy Loan repayment is in process | { "error code": -21006, "msg":"Had pmLoan repayment in process" } |
The user failed to repay the Portfolio Margin Pro Bankruptcy Loan since liquidation was in process | { "error code": -21007, "msg":"Post fail since liquidation is in process" } |
3. 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. Additional Portfolio Margin Pro 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":"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” } |
5. Portfolio Margin Pro Current Account Information
Field | Description |
maxWithdrawAmountUSD | The maximum amount that can be transferred out of the Portfolio Margin Pro Account in USD (as per the estimated conversion value)* |
maxWithdrawAmount | The maximum amount that can be transferred out of the Portfolio Margin Pro Account* |
Name | Type | Mandatory |
asset | STRING | YES |
recvWindow | LONG | NO |
Response Type | Response Content |
Normal Response | { "maxWithdrawAmountUSD": "25347.92083245", // Portfolio Margin maximum virtual amount for transfer out in USD "asset": "BTC", // asset name "maxWithdrawAmount": "1.33663654", // maximum amount for transfer out } |
6. Portfolio Margin Pro 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 } ] |
7. Portfolio Margin Pro 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 } ] } |
8. Portfolio Margin Pro Tiered Collateral Rate (MARKET_DATA)
Name | Type | Mandatory |
recvWindow | LONG | NO |
timestamp | LONG | YES |
Response Type | Response Content |
Normal Response | { "asset": "USDT", "collateralInfo": [ { "tierFloor": "0", "tierCap": "30000000", "collateralRate": "1" }, { "tierFloor": "30000000", "tierCap": "99999999999", "collateralRate": "0.95" } ], "asset":"BNB", "collateralInfo": [ { "tierFloor": "0", "tierCap": "2000000", "collateralRate": "1" }, { "tierFloor": "2000000", "tierCap": "4000000", "collateralRate": "0.95" }, { "tierFloor": "4000000", "tierCap": "99999999999", "collateralRate": "0.90" } ] } |