# On-Chain Token Price by Contract Address (DEX/DeFi)

> On-Chain Token Price by Contract Address (DEX/DeFi) is a paid API for AI agents from agent-commerce-factory-jm.austriaeast.cloudapp.azure.com, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-14).

Returns current USD price, market cap, 24h volume, 24h change %, and last-updated timestamp for one or more token contract addresses on a given blockchain.

## Facts

- Endpoint: POST https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/crypto/token-price
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/on-chain-token-price-by-contract-address-dex-defi-2bdae8cc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fzAwfJSL43EiL40E2es5m

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 on-chain-token-price-by-contract-address-dex-defi-2bdae8cc -d '<json body>'
```

Example prompt: What's the current USD price, market cap, and 24h volume for these two Ethereum tokens — contract addresses 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 and 0x6B175474E89094C44Da98b954EedeAC495271d0F?

## When to prefer this

Use this endpoint when you need on-chain price data for DeFi, DEX-listed, or newly listed tokens identified by their contract addresses — especially long-tail tokens not covered by ticker-symbol-based APIs. Prefer this over CoinGecko ticker-based endpoints when you have contract addresses rather than coin IDs, or when dealing with tokens across multiple chains simultaneously.

## Known failure modes

- Token contract address not found on the specified chain — returns null fields for that item
- Invalid or malformed contract address — may return null or error for the affected entry
- Unsupported chain/platform — defaults to ethereum or returns an error
- Rate limiting or upstream data provider outage — may return stale or missing data
- Exceeding 50 contracts per request — rejected at input validation

## Output

An array of per-token objects each containing: contract address, USD price, market cap, 24h volume, 24h price change percentage, and last-updated timestamp. Also includes the resolved platform, a count of results, and cost economics metadata.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "contracts"
     ],
     "properties": {
      "platform": {
       "type": "string",
       "default": "ethereum",
       "description": "Chain / asset platform (e.g. ethereum, base, bsc, polygon, arbitrum, optimism, solana)."
      },
      "contracts": {
       "type": "array",
       "items": {
        "type": "string",
        "maxLength": 120,
        "minLength": 3,
        "description": "Token contract address on the given chain."
       },
       "maxItems": 50,
       "minItems": 1
      },
      "vsCurrency": {
       "type": "string",
       "default": "usd"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "machine",
      "route",
      "items"
     ],
     "properties": {
      "count": {
       "type": "integer"
      },
      "items": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "price": {
          "type": [
           "number",
           "null"
          ]
         },
         "contract": {
          "type": [
           "string",
           "null"
          ]
         },
         "marketCap": {
          "type": [
           "number",
           "null"
          ]
         },
         "volume24h": {
          "type": [
           "number",
           "null"
          ]
         },
         "lastUpdated": {
          "type": [
           "string",
           "null"
          ]
         },
         "change24hPct": {
          "type": [
           "number",
           "null"
          ]
         }
        }
       }
      },
      "route": {
       "type": "string"
      },
      "machine": {
       "type": "string"
      },
      "platform": {
       "type": "string"
      },
      "economics": {
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/on-chain-token-price-by-contract-address-dex-defi-2bdae8cc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-commerce-factory-jm.austriaeast.cloudapp.azure.com](https://www.zero.xyz/host/agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/llms.txt)
