# Phantom API — X Layer Token Balances

> Phantom API — X Layer Token Balances is a paid API for AI agents from phantom-api-omega.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-16).

Returns token balances for a given wallet address on the X Layer (OKX) blockchain network, optionally filtered by specific contract addresses

## Facts

- Endpoint: POST https://phantom-api-omega.vercel.app/api/xlayer/token/balances
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/phantom-api-x-layer-token-balances-f500c8d2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_x-BhOe8bjxePk8Ru_9VPv

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability phantom-api-x-layer-token-balances-f500c8d2 -d '<json body>'
```

Example prompt: Can you look up all the token balances for wallet address 0xAbCd1234... on the X Layer network, and specifically check how much of the token at contract 0x5678Ef90... they hold?

## When to prefer this

Use this endpoint when you need fast, pay-per-call token balance lookups specifically on the X Layer (OKX) network without maintaining your own RPC node. Prefer it over general-purpose blockchain RPCs when you want a simple REST API interface rather than raw JSON-RPC calls, and when querying a portfolio of specific tokens for a given wallet. It is ideal for lightweight agents that need on-demand balance checks without subscription overhead.

## Known failure modes

- Invalid or malformed owner wallet address returns an error or empty result
- Unknown contract addresses return zero balance or are omitted
- X Layer network congestion or RPC unavailability may cause timeouts
- Non-checksum Ethereum addresses may be rejected
- Empty contractAddresses array may return all tokens or require at least one entry depending on implementation

## How this service works

Lightning-fast access to blockchain data, smart contract insights, and Web3 infrastructure across 57+ networks. Pay-per-call via x402.

## Output

Returns a list of token balances associated with the queried wallet address on the X Layer network. Each entry typically includes the token contract address, token symbol or name, raw and/or formatted balance amounts, and decimals. If contract addresses are specified, results are filtered to only those tokens.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "owner": {
   "type": "string"
  },
  "contractAddresses": {
   "type": "array",
   "items": {
    "type": "string"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/phantom-api-x-layer-token-balances-f500c8d2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from phantom-api-omega.vercel.app](https://www.zero.xyz/host/phantom-api-omega.vercel.app/llms.txt)
