v1

latestOpenAPI 3.0.32026-07-2613529376.3 KB
Collateral Trading

Open Positions

The endpoint returns all open collateral positions for the authenticated account. Each position includes entry price, unrealized PnL, margin allocation, liquidation price, and take-profit/stop-loss configuration. Use the optional market parameter to filter results to a single trading pair.

<Warning> Rate limit: 12000 requests/10 sec. </Warning> <Accordion title="Error Codes"> - `30` - default validation error code (returned when the optional `market` filter is malformed) </Accordion>
post/api/v4/collateral-account/positions/open

Request body

marketstring

Filter by specific market. For example: BTC_USDT

If not specified, returns all open positions.

requeststring

Request signature

nonceinteger

Unique request identifier

Example request

{
  "market": "BTC_USDT",
  "request": "{{request}}",
  "nonce": 1594297865000
}

Response

Successful response - returns array of open positions

positionIdinteger

Unique position identifier

marketstring

Market name

amountstring

Position amount

basePricestring

Base price of position

pnlstring

Realized profit and loss accumulated from partial position closes, in money currency. Zero for newly opened positions that have not been partially closed.

pnlPercentstring

Unrealized profit and loss in percentage

marginstring

Amount of funds in open position money

freeMarginstring

Free funds for trading

fundingstring

Cumulative funding fees paid over the entire lifetime of the position, in money currency. For futures markets (e.g., BTC_PERP and other _PERP pairs), the value is always "0" — futures funding is applied via periodic balance updates rather than being tracked per position.

unrealizedPnlstring

Floating (mark-to-market) unrealized profit and loss in money currency. Updates continuously as the market price changes.

positionSide'LONG' | 'SHORT' | 'BOTH'

Position side

openDatenumber

Date of position opening in Unix timestamp format

modifyDatenumber

Date of position modifying (current event) in Unix timestamp format

liquidationPricestring nullable

Liquidation price according to current state of position

liquidationState'margin_call' | 'liquidation' nullable

State of liquidation

unrealizedFundingstring

Funding fees accrued since the last position state change and not yet realized. For margin positions, the value accumulates continuously and is settled into the funding field when the position state changes (e.g., on partial or full close). For futures markets (BTC_PERP and other _PERP pairs), always "0" — futures funding is applied via periodic balance updates, not tracked per position.

Example response

[
  {
    "positionId": 527,
    "market": "BTC_USDT",
    "amount": "0.1",
    "basePrice": "45658.349",
    "pnl": "-168.42",
    "pnlPercent": "-0.43",
    "margin": "8316.74",
    "freeMargin": "619385.67",
    "funding": "0",
    "unrealizedPnl": "0.0019142920201966",
    "positionSide": "LONG",
    "openDate": 1651568067.789679,
    "modifyDate": 1651568067.789679,
    "tpsl": {
      "takeProfitId": 123,
      "takeProfit": "50000",
      "stopLossId": 124,
      "stopLoss": "35000"
    },
    "unrealizedFunding": "0.0019142920201966"
  }
]