Perpetuals API

Open positions in one perpetual-futures market

The positions currently open in ONE perpetual-futures market, keyed by trading symbol. Answers who is exposed and on which side, not what a token is worth.

GET/api/external/perps/perps-market-positions/{symbol}

What it returns

Every open position on ONE leveraged derivatives market, across every trading account — entry/mark price, size, leverage, unrealized PnL and cumulative funding, one row per position. Chainless — symbol is a market ticker (e.g. "BTC"), not a token mint or contract address, and no chain applies. An unrecognised symbol returns 400 naming exactly that, rather than a blank 404. Use GET /perps/perps-markets to discover a real one.

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-market-positions/<symbol>"
Parameters
ParameterDescription
sort_by

query · string · optional

Which field to sort positions by. Defaults to when the position was opened.position_valueopen_time
sort_type

query · string · optional

Sort direction. Defaults to descending.ascdesc
offset

query · integer · optional

0-based row offset. An offset past the market's last open position answers an empty list.
limit

query · integer · optional

How many rows to return. Defaults to 10; this endpoint caps it at 50.
symbol

path · string · required

A coin ticker, e.g. "BTC" — the asset the market is on, not a token mint or contract address, and not scoped to 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 in one perpetual-futures market
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