Perpetuals API

Open positions held by one perpetual-futures account

The positions currently open for ONE perpetual-futures trading account, keyed by address with no chain. Derivatives exposure, never token balances.

GET/api/external/perps/perps-trader-positions/{address}

What it returns

Every position ONE trading account currently holds open, on any market, on the leveraged derivatives venue this family covers — entry/mark price, size, leverage, unrealized PnL and cumulative funding, one row per position. address is not a wallet on any of this API's six chains. A malformed address returns 400 naming exactly that.

Chains

This endpoint is not tied to a chain: it takes no chain in its request.

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/perps/perps-trader-positions/<address>"
Parameters
ParameterDescription
address

path · string · required

The address of a trading account on the leveraged derivatives venue this endpoint covers — not a wallet on any chain this API otherwise supports.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of Open positions held by one perpetual-futures account
FieldTypeDescription
positionsobject[]
positions[].traderstring | nullThe trading-account address that holds this position. On perps-market-positions this identifies WHICH of many accounts; on perps-trader-positions it is always null — the account is already the request's own subject, never echoed back as if it were new data.
positions[].traderFirstTradeAtnumber | nullUnix seconds of the account's first recorded trade on this venue.
positions[].symbolstring | nullThe market ticker this position is on, e.g. "BTC".
positions[].leverageTypestring | nullMargin mode, e.g. "isolated" or "cross".
positions[].leverageValuenumber | nullConfigured leverage multiplier on this position.
positions[].maxLeveragenumber | nullMaximum leverage allowed for this market at the time of the snapshot.
positions[].entryPricenumber | nullAverage entry price of the open position.
positions[].markPricenumber | nullCurrent mark price used for PnL and liquidation calculations.
positions[].liquidationPricenumber | nullEstimated liquidation price, when available.
positions[].marginUsedUsdnumber | nullMargin currently assigned to this position, USD.
positions[].positionValueUsdnumber | nullCurrent notional value of the open position, USD.
positions[].roenumber | nullReturn on equity for this position, when this endpoint provides it.
positions[].sizenumber | nullSigned position size. Positive = net long exposure; negative = net short exposure.
positions[].unrealizedPnlUsdnumber | nullCurrent unrealized profit and loss, USD.
positions[].cumulativeFundingSinceOpenUsdnumber | nullCumulative funding paid or received since the position was opened, USD.
positions[].cumulativeFundingSinceChangeUsdnumber | nullCumulative funding paid or received since the last position size change, USD.
positions[].openedAtnumber | nullUnix seconds when the current position was opened.

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key