v1

latestOpenAPI 3.0.02026-07-2471143147.5 KB
Portfolio

Get portfolio details with order

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.

post/v1/portfolio/detail-preview

Request body

market_idinteger

Market ID (uint16)

size_stepsinteger

Order size in steps (uint32)

price_ticksinteger

Order price in ticks (uint24, max 16777215)

sideinteger

Order side: 0=Buy, 1=Sell

post_onlyboolean
reduce_onlyboolean
stp_modeinteger

Self-trade prevention: 0=ExpireMaker, 1=ExpireTaker, 2=ExpireBoth

order_typeinteger

Order type: 0=Market, 1=Limit

time_in_forceinteger

Time-in-force: 0=GTC, 1=GTT, 2=FOK, 3=IOC

builder_idinteger

Optional builder ID (uint16, 0 = none)

client_order_idstring uint64

Optional client order ID (uint64, 0 = none)

ttl_unitsinteger

Optional TTL units for GTT orders (uint16, 0 = none)

builder_fee_bpsinteger

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.

Example request

{
  "client_order_id": "0",
  "permit": {
    "account": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "signer": "0x1234567890123456789012345678901234567890",
    "nonce_anchor": "0"
  }
}

Response

A successful response.

accountstring
maker_feenumber float
taker_feenumber float