GET /v1/balances
Wallet balances on one chain
Requires portfolio:read. Every owned wallet of the selected chain appears, including wallets with no balance row. Native balance null/available=false means no source row, an unavailable EVM RPC result, or an ambiguous legacy zero default on a chain without RPC fallback. A reported native zero is an observed EVM zero; a real Solana zero is indistinguishable from a missing row and is conservatively reported unknown. Token balance null/available=false means no token was requested or the indexed row was absent; the full server also projects an absent token row as zero, so a real zero cannot be confirmed by this source. Values reflect the server numeric projection, not lossless on-chain integer units. Keyset pages are not a frozen snapshot.
portfolio:read 查询参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
chain | enum ("bsc" | "solana" | "hyperevm" | "xlayer" | "monad" | "robinhood" | "arc") | ✓ | Chain whose owned wallets and holdings are queried. |
token | string | Optional token contract or mint address to include its balance. | |
limit | integer | Maximum rows returned in this keyset page. | |
cursor | string | Opaque signed cursor from a preceding page; bound to the user and filters. |
响应
200 — OK
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
data | array<object> | ✓ | Response payload. |
data[].wallet_id | string | ✓ | Owned wallet address on the selected chain. |
data[].name | string | ✓ | User-visible wallet name. |
data[].status | enum ("available" | "unavailable") | ✓ | Wallet availability in the account directory. |
data[].native_balance | number | null | ✓ | Native-chain balance in displayed units; null when the source cannot confirm it. |
data[].native_balance_available | boolean | ✓ | Whether native_balance is confirmed by the source rather than a missing-row or legacy zero default. |
data[].token_balance | number | null | ✓ | Requested token balance in displayed units; null when no token was requested or its row is absent. |
data[].token_balance_available | boolean | ✓ | Whether token_balance is confirmed by an indexed token row. |
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)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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.
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
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. |
curl -X GET "https://api.apm.fun/v1/balances" \
-H "Authorization: Bearer apm_live_<prefix>.<secret>" {
"data": [
{
"wallet_id": "cfg_8f2a1c9b",
"name": "string",
"status": "available",
"native_balance": null,
"native_balance_available": true,
"token_balance": null,
"token_balance_available": true
}
],
"meta": {
"request_id": "cfg_8f2a1c9b",
"next_cursor": null,
"source_timestamp": null,
"retrieved_at": "2026-01-15T09:30:00Z"
}
}