---
title: "Get portfolio details with order"
method: POST
path: "/v1/portfolio/detail-preview"
tags: ["Portfolio"]
---

# Get portfolio details with order

`POST /v1/portfolio/detail-preview`

Get portfolio details with a hypothetical order applied. This endpoint simulates the impact of placing an order on your portfolio without actually executing it. Useful for pre-trade risk assessment.

## Request body

- ApiPlaceOrderRequest
  - `market_id` integer — Market ID (uint16)
  - `size_steps` integer — Order size in steps (uint32)
  - `price_ticks` integer — Order price in ticks (uint24, max 16777215)
  - `side` integer — Order side: 0=Buy, 1=Sell
  - `post_only` boolean
  - `reduce_only` boolean
  - `stp_mode` integer — Self-trade prevention: 0=ExpireMaker, 1=ExpireTaker, 2=ExpireBoth
  - `order_type` integer — Order type: 0=Market, 1=Limit
  - `time_in_force` integer — Time-in-force: 0=GTC, 1=GTT, 2=FOK, 3=IOC
  - `builder_id` integer — Optional builder ID (uint16, 0 = none)
  - `client_order_id` string, uint64 — Optional client order ID (uint64, 0 = none)
  - `ttl_units` integer — Optional TTL units for GTT orders (uint16, 0 = none)
  - `permit` ApiPermitParams — Permit parameters for v3 authenticated operations. Client signs EIP-712 VerifyWitness; server builds byte-packed permit suffix. Uses bitmap nonces for replay protection.
    - `account` string — Account address (hex)
    - `signer` string — Signer address (hex)
    - `nonce_anchor` string, uint64 — Permit nonce anchor (uint48)
    - `nonce_bitmap_index` integer — Permit nonce bitmap index (uint8, 0-255)
    - `deadline` integer — Permit deadline (unix timestamp)
    - `signature` string, byte — EIP-2098 compact signature (64 bytes: r + yParityAndS) or standard 65-byte (r+s+v)
  - `builder_fee_bps` integer — Per-order builder fee in parts per million, denominator 1e6 (uint16, 0 = none). 100 = 1 bps = 0.01%. 10 = 0.1 bps. Must not exceed the user-signed max for this builder (see ApproveBuilderFee). Setting this non-zero changes the signed action hash: builder_fee_bps must be encoded as an extra uint16 word right after builder_id (which is always part of the hash) and before client_order_id/ttl_units. Leave at 0 to use the hash layout without that word.

## Response `200`

A successful response.

- ApiGetPortfolioDetailsWithOrderResponse
  - `account` string
  - `summary` ApiPortfolioSummary
    - `collateral_margin_balance` string
    - `cross_margin_balance` string
    - `margin_usage` string
    - `account_leverage` string
    - `in_liquidation` boolean
    - `free_collateral` string
    - `total_account_value` string
    - `total_notional` string
    - `usdc_balance` string
    - `total_unrealized_pnl` string
    - `total_initial_margin` string
    - `total_maintenance_margin` string
    - `realized_pnl` string
    - `margin_health` string
    - `unsettled_usdc` string
    - `total_isolated_order_reserve` string
    - `risk_level` string
  - `positions` ApiPosition[]
    - `size` string
    - `quote_amount` string
    - `last_funding_payment` string
    - `margin_mode` integer
    - `side` integer
    - `isolated_usdc_balance` string
    - `market_id` string, uint64
    - `market_name` string
    - `avg_entry_price` string
    - `mark_price` string
    - `leverage` string
    - `unrealized_pnl` string
    - `liquidation_price` string
    - `initial_margin_requirement` string
    - `maintenance_margin_requirement` string
    - `margin_balance` string
    - `quote_balance` string
    - `in_isolated_liquidation` boolean
    - `index_price` string
    - `free_isolated_usdc_balance` string
    - `adl_price` string
  - `maker_fee` number, float
  - `taker_fee` number, float

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/rise/apis/risex-rest-api.md) · [All operations](https://skmtc.net/rise/apis/risex-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rise/risex-rest-api/revisions/194af8339c0d/schema)
