portfolio-margin-simulator
Simulate Portfolio Margin in Bulk
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. This endpoint supports running multiple simulations at the same time.
post/v1/bulk-simulate-portfolio-margin
Request
- Base URLhttps://api.exchange.bullish.com/trading-api
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
includeExistingboolean
Example:true
When true, includes existing portfolio positions in the simulation. Defaults to false
Request body
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
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.