API Reference v1
Get API Key API Key

GET /v1/positions

Aggregated holdings and PnL across owned wallets

Requires portfolio:read. Every requested wallet must belong to the authenticated user; mixed owned/foreign requests fail rather than silently dropping a wallet. Native balance null/available=false means no native row was provided. Price-dependent USD/PnL fields are null when unavailable; zero is a measured zero. Totals describe the complete requested wallet set while positions contains one keyset page. Pages are not a frozen snapshot.

Required scope: portfolio:read

Query parameters

FieldTypeRequiredDescription
chainenum ("bsc" | "solana" | "hyperevm" | "xlayer" | "monad" | "robinhood" | "arc")✓Chain whose owned wallets and holdings are queried.
walletsstring✓One to fifty comma-separated wallet addresses, all owned by the authenticated user.
limitintegerMaximum rows returned in this keyset page.
cursorstringOpaque signed cursor from a preceding page; bound to the user and filters.

Responses

200 — OK

FieldTypeRequiredDescription
dataobject✓Response payload.
data.native_balancenumber | null✓Combined native balance of the requested wallets, or null when the source cannot confirm it.
data.native_balance_availableboolean✓Whether the combined native balance is confirmed by source data.
data.native_positionobject | null✓Aggregated native asset position, or null when no position is available.
data.native_position.tokenstring✓Native asset identifier.
data.native_position.symbolstring✓Native asset ticker.
data.native_position.amountnumber | null✓Native asset amount, or null when unavailable.
data.native_position.value_usdnumber | null✓Native asset USD value, or null without a usable price.
data.native_position.value_nativenumber | null✓Native asset value in native units, or null when unavailable.
data.total_unrealized_pnl_usdnumber | null✓Combined unrealized USD PnL, or null when unknown.
data.total_wallet_value_usdnumber | null✓Combined wallet USD value, or null when prices are unavailable.
data.total_positions_value_usdnumber | null✓Combined token-position USD value, or null when prices are unavailable.
data.positionsarray<object>✓One keyset page of aggregated token positions.
data.positions[].tokenstring✓Token contract or mint address.
data.positions[].symbolstring✓Token ticker shown by the source.
data.positions[].namestring✓Token name shown by the source.
data.positions[].iconstring | null✓Token icon URL, or null when unavailable.
data.positions[].amountnumber | null✓Combined token amount across the requested wallets; null when unavailable.
data.positions[].value_usdnumber | null✓Current USD value; null when a usable price is unavailable.
data.positions[].value_nativenumber | null✓Current value in chain-native units; null when unavailable.
data.positions[].price_staleboolean✓Whether the source marks the price as stale.
data.positions[].market_cap_usdnumber | null✓Token market capitalization in USD, or null when unavailable.
data.positions[].remaining_cost_basis_usdnumber | null✓Remaining USD cost basis, or null when unavailable.
data.positions[].realized_pnl_usdnumber | null✓Realized USD profit or loss, or null when unavailable.
data.positions[].unrealized_pnl_usdnumber | null✓Unrealized USD profit or loss, or null when price or basis is unavailable.
data.positions[].buy_countnumber✓Number of recorded buys for this holding.
data.positions[].sell_countnumber✓Number of recorded sells for this holding.
data.positions[].wallet_countnumber | null✓Number of requested wallets holding this token, or null when unavailable.
metaobject✓Request id, plus paging fields when this operation is a list.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.
meta.next_cursorstring | null✓Signed keyset cursor. Null when this page is complete.
meta.source_timestampnull✓The upstream source does not expose a snapshot timestamp.
meta.retrieved_atstring✓Gateway retrieval time, not a chain snapshot time.

401 — unauthorized (missing/invalid/revoked/expired Bearer token)

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

403 — insufficient_scope / ip_not_allowed

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

429 — rate_limited (Retry-After response header set)

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

500 — internal_error

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

503 — Upstream business service unavailable.

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.
Example request
curl -X GET "https://api.apm.fun/v1/positions" \
  -H "Authorization: Bearer apm_live_<prefix>.<secret>"
Example response 200
{
  "data": {
    "native_balance": null,
    "native_balance_available": true,
    "native_position": {
      "token": "string",
      "symbol": "string",
      "amount": null,
      "value_usd": null,
      "value_native": null
    },
    "total_unrealized_pnl_usd": null,
    "total_wallet_value_usd": null,
    "total_positions_value_usd": null,
    "positions": [
      {
        "token": "string",
        "symbol": "string",
        "name": "string",
        "icon": null,
        "amount": null,
        "value_usd": null,
        "value_native": null,
        "price_stale": true,
        "market_cap_usd": null,
        "remaining_cost_basis_usd": null,
        "realized_pnl_usd": null,
        "unrealized_pnl_usd": null,
        "buy_count": 0,
        "sell_count": 0,
        "wallet_count": null
      }
    ]
  },
  "meta": {
    "request_id": "cfg_8f2a1c9b",
    "next_cursor": null,
    "source_timestamp": null,
    "retrieved_at": "2026-01-15T09:30:00Z"
  }
}