# Onchain Query API – ERC-20 Token Profile

> Onchain Query API – ERC-20 Token Profile is a paid API for AI agents from chain.cyberwarex.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Returns metadata and live DEX market data for an ERC-20 token contract on a specified EVM chain, including name, symbol, decimals, total supply, and spot pricing.

## Facts

- Endpoint: GET https://chain.cyberwarex.com/token
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-query-api-erc-20-token-profile-d676076f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KIvjtvIocuom1FNyHa-wD

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 onchain-query-api-erc-20-token-profile-d676076f
```

Example prompt: Pull the full token profile for the USDC contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — I want the name, symbol, decimals, total supply, and any live DEX market data.

## When to prefer this

Choose this endpoint when you need ERC-20 token metadata and live DEX market data for a specific contract address on a major EVM chain without managing RPC infrastructure or node keys. Ideal for agents that need deterministic, structured JSON token profiles on-demand at low per-call cost. Prefer over raw RPC calls when you want normalized output including supply and spot price in a single response.

## Known failure modes

- Invalid contract address format (must match ^0x[a-fA-F0-9]{40}$) returns a validation error
- Address is a valid Ethereum address but not an ERC-20 contract on the specified chain returns empty or error response
- Unsupported chain value outside the enum returns a 400 error
- Token has no DEX liquidity pair — market object returns a note instead of price data
- Payment not provided or insufficient (x402 payment required at $0.004 USDC per call)

## How this service works

ERC-20 token profile on any major EVM chain: on-chain metadata (name, symbol, decimals, total supply) read straight from the contract, joined with live DEX market data (USD price, liquidity, 24h volume, 24h change, and the top trading pair with its DEX). Use it to price a token, check liquidity depth before a swap, or resolve an unknown contract address into a real token.

## Output

A JSON object containing the token's name, symbol, contract address, chain, decimals, total supply (human-readable and raw), and a market object with live DEX pricing data — or a note field if no DEX pair exists for the token.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon"
       ],
       "type": "string",
       "default": "base",
       "description": "EVM chain to query."
      },
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "ERC-20 token contract address."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "name": {
       "type": "string"
      },
      "chain": {
       "type": "string"
      },
      "market": {
       "type": "object",
       "description": "Live DEX market data, or {note} when no DEX pair exists."
      },
      "symbol": {
       "type": "string"
      },
      "address": {
       "type": "string"
      },
      "decimals": {
       "type": "integer"
      },
      "total_supply": {
       "type": [
        "number",
        "null"
       ]
      },
      "total_supply_raw": {
       "type": [
        "string",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-query-api-erc-20-token-profile-d676076f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chain.cyberwarex.com](https://www.zero.xyz/host/chain.cyberwarex.com/llms.txt)
