portfolio-margin-simulator

Simulate Portfolio Margin

Use Portfolio margin simulator to determine your margin requirements and risk levels based on your current portfolio balances. You can also append position details on top of your portfolio specifics to see simulated results.

post/v1/simulate-portfolio-margin

Request

Query parameters

includeExistingboolean
Example:true

Request body

tradingAccountIdstring required

unique trading account ID

Example request

{
  "tradingAccountId": "111000000000001",
  "positions": [
    {
      "symbol": "BTC-USDC-PERP",
      "quantity": "1.0"
    }
  ],
  "orders": [
    {
      "symbol": "BTCUSDC",
      "quantity": "1.0",
      "limitPrice": "10000.0",
      "timeInForce": "GTX"
    }
  ],
  "referencePrices": [
    {
      "symbol": "BTC",
      "price": "12000.0"
    }
  ],
  "priceVolOffsetParams": {
    "cryptoPriceMultipliers": {
      "BTC": 1.2,
      "ETH": 0.9
    },
    "globalCryptoPriceMultiplier": 1.1,
    "volOffset": 0.05
  }
}

Response

OK

collateralUSDstring

total collateral across all assets in this trading account displayed in the reference asset in USD

borrowedUSDstring

total borrowed across all assets in this trading account displayed in the reference asset in USD

initialMarginUSDstring

The minimum margin one must maintain in order to be able to purposefully increase risk

warningMarginUSDstring

The minimum margin when the customer will receive warning via email/notifications over UI

liquidationMarginUSDstring

The minimum value of margin one must maintain in order to avoid liquidation

fullLiquidationMarginUSDstring

The value of margin when full liquidation occurs

defaultedMarginUSDstring

The value of margin when this trading account will be moved into a Defaulted state

liquidityAddonUSDstring

expected market impact of unwinding the portfolio in the case of a liquidation event

marketRiskUSDstring

the worst possible loss on the portfolio based on scenario analysis

Example response

{
  "collateralUSD": "13000.0000",
  "borrowedUSD": "12000.0000",
  "initialMarginUSD": "14000.0000",
  "warningMarginUSD": "15000.0000",
  "liquidationMarginUSD": "16000.0000",
  "fullLiquidationMarginUSD": "17000.0000",
  "defaultedMarginUSD": "18000.0000",
  "liquidityAddonUSD": "19000.0000",
  "marketRiskUSD": "20000.0000"
}

Changes

No recorded changes to this operation across all 1 revision of this API.