API 参考文档 v1
获取 API Key 获取 Key

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.

所需 Scope: portfolio:read

查询参数

字段类型必填说明
chainenum ("bsc" | "solana" | "hyperevm" | "xlayer" | "monad" | "robinhood" | "arc")✓Chain whose owned wallets and holdings are queried.
tokenstringOptional token contract or mint address to include its balance.
limitintegerMaximum rows returned in this keyset page.
cursorstringOpaque signed cursor from a preceding page; bound to the user and filters.

响应

200 — OK

字段类型必填说明
dataarray<object>✓Response payload.
data[].wallet_idstring✓Owned wallet address on the selected chain.
data[].namestring✓User-visible wallet name.
data[].statusenum ("available" | "unavailable")✓Wallet availability in the account directory.
data[].native_balancenumber | null✓Native-chain balance in displayed units; null when the source cannot confirm it.
data[].native_balance_availableboolean✓Whether native_balance is confirmed by the source rather than a missing-row or legacy zero default.
data[].token_balancenumber | null✓Requested token balance in displayed units; null when no token was requested or its row is absent.
data[].token_balance_availableboolean✓Whether token_balance is confirmed by an indexed token row.
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)

字段类型必填说明
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

字段类型必填说明
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)

字段类型必填说明
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

字段类型必填说明
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.

字段类型必填说明
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.
请求示例
curl -X GET "https://api.apm.fun/v1/balances" \
  -H "Authorization: Bearer apm_live_<prefix>.<secret>"
响应示例 200
{
  "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"
  }
}