# api2ls.com ERC-20 Token USD Price

> api2ls.com ERC-20 Token USD Price is a paid API for AI agents from api2ls.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns the live USD price of any ERC-20 token by querying on-chain DEX liquidity across major EVM networks

## Facts

- Endpoint: GET https://api2ls.com/api/token-price
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api2ls-com-erc-20-token-usd-price-30a7385e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aiCgt2SdtVEgBnXAsg7Xb

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 api2ls-com-erc-20-token-usd-price-30a7385e
```

Example prompt: What's the current USD price of the token at contract address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base — pull it from on-chain DEX liquidity?

## When to prefer this

Use this endpoint when you need a real-time, on-chain USD price for any ERC-20 token on major EVM networks (Base, Ethereum, Optimism, Arbitrum, Polygon) and want a price derived from actual DEX liquidity rather than a centralized exchange feed. Ideal for DeFi analytics, portfolio valuation, or any agent workflow that must price arbitrary tokens including those not listed on major CEXes.

## Known failure modes

- Token contract address not found on specified chain — returns success:false or error
- Invalid or malformed contract address (non-0x, wrong length) — likely 400 or error response
- Token has no DEX liquidity on the selected chain — price unavailable
- Unsupported chain value — query defaults to base or returns an error
- Network/RPC connectivity issues causing timeout or stale data

## How this service works

Get the live USD price of an ERC-20 token from on-chain DEX liquidity

## Output

A JSON object containing success status, the USD price as a string (e.g. '1.0002'), the token symbol, the queried contract address, the chain, current liquidity in USD, and the timestamp of the price reading.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "EVM network: base (default), ethereum, optimism, arbitrum, or polygon"
      },
      "address": {
       "type": "string",
       "description": "ERC-20 token contract address (0x…)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "priceUsd"
     ],
     "properties": {
      "asOf": {
       "type": "string"
      },
      "chain": {
       "type": "string"
      },
      "symbol": {
       "type": "string"
      },
      "address": {
       "type": "string"
      },
      "success": {
       "type": "boolean"
      },
      "priceUsd": {
       "type": "string"
      },
      "liquidityUsd": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api2ls-com-erc-20-token-usd-price-30a7385e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api2ls.com](https://www.zero.xyz/host/api2ls.com/llms.txt)
