Skip to main content

Perps DMA API

The Perps DMA (Direct Market Access) API provides endpoints for managing perpetual futures positions, leverage, margin modes, and Portfolio Margin accounts.

Key Features

  • Position Management: View open positions across exchanges
  • Leverage Control: Set and query leverage per symbol
  • Margin Mode: Switch between cross and isolated margin
  • Funding History: Track funding rate payments
  • Realized PnL: View closed position profits/losses
  • Portfolio Margin: Binance PM balance and collection endpoints

Supported Exchanges


POST /order-execution/execution/leverage

Set leverage for a symbol on futures/perp markets.

Authentication

Requires a valid API key whose user has the trader or admin role.

Request Body (JSON)

  • exchange_account_id (string, required): The exchange account UUID
  • symbol (string, required): Trading pair in perp format (e.g., “BTC/USDT:USDT”)
  • leverage (number, required): Leverage value (e.g., 1, 5, 10, 20, 50, 100)
  • market_type (string, optional): swap or future. Default: swap

Request Example

Response Example


GET /order-execution/execution/leverage

Get current leverage and margin mode for a symbol.

Query Parameters

  • exchange_account_id (string, required): The exchange account UUID
  • symbol (string, required): Trading pair (e.g., “BTC/USDT:USDT”)
  • market_type (string, optional): swap or future. Default: swap

Request Example

Response Example


POST /order-execution/execution/margin-mode

Set margin mode (cross or isolated) for a symbol.

Request Body (JSON)

  • exchange_account_id (string, required): The exchange account UUID
  • symbol (string, required): Trading pair (e.g., “BTC/USDT:USDT”)
  • margin_mode (string, required): cross or isolated
  • market_type (string, optional): swap or future. Default: swap

Request Example

Response Example


GET /order-execution/execution/positions

Fetch open positions from exchange (futures/perp only).

Query Parameters

  • exchange_account_id (string, required): The exchange account UUID
  • symbol (string, optional): Filter by symbol
  • market_type (string, optional): swap or future. Default: swap

Request Example

Response Example


GET /order-execution/execution/funding-history

Fetch funding rate payments for perpetual futures.

Query Parameters

  • exchange_account_id (string, required): The exchange account UUID
  • symbol (string, optional): Filter by symbol
  • since (number, optional): Start timestamp in milliseconds
  • limit (number, optional): Max number of records
  • market_type (string, optional): swap or future. Default: swap

Request Example

Response Example


GET /order-execution/execution/realized-pnl

Fetch realized PnL for perpetual futures positions.

Query Parameters

  • exchange_account_id (string, required): The exchange account UUID
  • symbol (string, optional): Filter by symbol
  • since (number, optional): Start timestamp in milliseconds
  • limit (number, optional): Max number of records
  • market_type (string, optional): swap or future. Default: swap

Request Example

Response Example


Portfolio Margin Endpoints (Binance)

Portfolio Margin is a unified margin system that combines cross margin, USDⓈ-M Futures, and COIN-M Futures into a single account with portfolio-based risk calculations.

GET /order-execution/execution/portfolio-margin/balance

Get Portfolio Margin balance from Binance PAPI. Returns detailed breakdown of:
  • Cross Margin: Total, free, locked, borrowed, interest
  • USDⓈ-M Futures: Wallet balance, unrealized PnL
  • COIN-M Futures: Wallet balance, unrealized PnL

Query Parameters

  • exchange_account_id (string, required): The exchange account UUID (must be a Binance PM account)

Request Example

Response Example


GET /order-execution/execution/portfolio-margin/account

Get Portfolio Margin account info from Binance PAPI. Returns raw PAPI balance and UM account data.

Query Parameters

  • exchange_account_id (string, required): The exchange account UUID (must be a Binance PM account)

Request Example

Response Example


POST /order-execution/execution/portfolio-margin/auto-collection

Trigger auto-collection for Portfolio Margin account. Transfers all positive balances from USDⓈ-M and COIN-M Futures Wallets to Cross Margin Wallet.
BNB in USDⓈ-M Futures Wallet will NOT be transferred.

Request Body (JSON)

  • exchange_account_id (string, required): The exchange account UUID (must be a Binance PM account)

Request Example

Response Example


POST /order-execution/execution/portfolio-margin/asset-collection

Trigger asset-specific collection for Portfolio Margin account. Transfers a specific asset from Futures Account to Margin account.
BNB transfer is NOT supported.

Request Body (JSON)

  • exchange_account_id (string, required): The exchange account UUID (must be a Binance PM account)
  • asset (string, required): Asset to transfer (e.g., “USDT”, “BTC”)

Request Example

Response Example


Portfolio Margin Notes

What is Portfolio Margin?

Portfolio Margin is a margin system that calculates margin requirements based on the overall risk of your portfolio, rather than individual positions. This typically results in lower margin requirements compared to traditional isolated margin.

Key Concepts

Setting Up Portfolio Margin

To use Portfolio Margin endpoints, your Binance account must:
  1. Have Portfolio Margin enabled on Binance (requires manual application)
  2. Be registered in Renesis with portfolio_margin: true
  3. Meet Binance’s minimum equity requirements ($100,000+ in some regions)

PAPI Endpoints Used

These endpoints call Binance’s Portfolio Margin API (PAPI):