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.
portfolio:read Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
chain | enum ("bsc" | "solana" | "hyperevm" | "xlayer" | "monad" | "robinhood" | "arc") | ✓ | Chain whose owned wallets and holdings are queried. |
wallets | string | ✓ | One to fifty comma-separated wallet addresses, all owned by the authenticated user. |
limit | integer | Maximum rows returned in this keyset page. | |
cursor | string | Opaque signed cursor from a preceding page; bound to the user and filters. |
Responses
200 — OK
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ✓ | Response payload. |
data.native_balance | number | null | ✓ | Combined native balance of the requested wallets, or null when the source cannot confirm it. |
data.native_balance_available | boolean | ✓ | Whether the combined native balance is confirmed by source data. |
data.native_position | object | null | ✓ | Aggregated native asset position, or null when no position is available. |
data.native_position.token | string | ✓ | Native asset identifier. |
data.native_position.symbol | string | ✓ | Native asset ticker. |
data.native_position.amount | number | null | ✓ | Native asset amount, or null when unavailable. |
data.native_position.value_usd | number | null | ✓ | Native asset USD value, or null without a usable price. |
data.native_position.value_native | number | null | ✓ | Native asset value in native units, or null when unavailable. |
data.total_unrealized_pnl_usd | number | null | ✓ | Combined unrealized USD PnL, or null when unknown. |
data.total_wallet_value_usd | number | null | ✓ | Combined wallet USD value, or null when prices are unavailable. |
data.total_positions_value_usd | number | null | ✓ | Combined token-position USD value, or null when prices are unavailable. |
data.positions | array<object> | ✓ | One keyset page of aggregated token positions. |
data.positions[].token | string | ✓ | Token contract or mint address. |
data.positions[].symbol | string | ✓ | Token ticker shown by the source. |
data.positions[].name | string | ✓ | Token name shown by the source. |
data.positions[].icon | string | null | ✓ | Token icon URL, or null when unavailable. |
data.positions[].amount | number | null | ✓ | Combined token amount across the requested wallets; null when unavailable. |
data.positions[].value_usd | number | null | ✓ | Current USD value; null when a usable price is unavailable. |
data.positions[].value_native | number | null | ✓ | Current value in chain-native units; null when unavailable. |
data.positions[].price_stale | boolean | ✓ | Whether the source marks the price as stale. |
data.positions[].market_cap_usd | number | null | ✓ | Token market capitalization in USD, or null when unavailable. |
data.positions[].remaining_cost_basis_usd | number | null | ✓ | Remaining USD cost basis, or null when unavailable. |
data.positions[].realized_pnl_usd | number | null | ✓ | Realized USD profit or loss, or null when unavailable. |
data.positions[].unrealized_pnl_usd | number | null | ✓ | Unrealized USD profit or loss, or null when price or basis is unavailable. |
data.positions[].buy_count | number | ✓ | Number of recorded buys for this holding. |
data.positions[].sell_count | number | ✓ | Number of recorded sells for this holding. |
data.positions[].wallet_count | number | null | ✓ | Number of requested wallets holding this token, or null when unavailable. |
meta | object | ✓ | Request id, plus paging fields when this operation is a list. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
meta.next_cursor | string | null | ✓ | Signed keyset cursor. Null when this page is complete. |
meta.source_timestamp | null | ✓ | The upstream source does not expose a snapshot timestamp. |
meta.retrieved_at | string | ✓ | Gateway retrieval time, not a chain snapshot time. |
401 — unauthorized (missing/invalid/revoked/expired Bearer token)
| Field | Type | Required | Description |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable 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. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
403 — insufficient_scope / ip_not_allowed
| Field | Type | Required | Description |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable 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. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
429 — rate_limited (Retry-After response header set)
| Field | Type | Required | Description |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable 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. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
500 — internal_error
| Field | Type | Required | Description |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable 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. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
503 — Upstream business service unavailable.
| Field | Type | Required | Description |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable 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. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | 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"
}
}