# DIA Crypto Oracle – Asset Price Lookup

> DIA Crypto Oracle – Asset Price Lookup is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-24).

Returns the current USD price, 24h volume, yesterday's price, and metadata for a cryptocurrency asset using DIA oracle data

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/finance/dia-crypto-oracle?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dia-crypto-oracle-asset-price-lookup-07ebf41d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u8OC7WL4sCz4dPLByn9VD

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 dia-crypto-oracle-asset-price-lookup-07ebf41d
```

Example prompt: What's the current USD price of BTC according to the DIA oracle, along with yesterday's price and 24-hour trading volume?

## When to prefer this

Use this endpoint when you need a pay-per-call, no-signup crypto price from a publicly auditable oracle (DIA) without committing to a subscription. Ideal for AI agents that need spot prices for BTC, ETH, SOL, or other major assets on an ad-hoc basis. Prefer over subscription oracles when usage is infrequent or when decentralized, on-chain-verifiable price provenance matters.

## Known failure modes

- Invalid or unknown ticker symbol returns an error or empty result
- DIA oracle data may be delayed or temporarily unavailable for low-liquidity assets
- Missing required 'symbol' query parameter causes a 400-level error
- Network or upstream DIA API outage results in a failed call (not charged)

## How this service works

DIA crypto price oracle: current USD price for one asset symbol (e.g. BTC, ETH), yesterday's price and volume, from DIA's public quotation endpoint.

## Output

A JSON object containing the asset's full name, ticker symbol, current USD price, yesterday's USD price, 24-hour trading volume in USD, the originating blockchain, a timestamp for when the price was checked and last updated, and a link to the DIA data source.

## 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": [
      "symbol"
     ],
     "properties": {
      "symbol": {
       "type": "string",
       "description": "Asset ticker, e.g. BTC, ETH, SOL"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "Bitcoin",
  "source": "https://api.diadata.org/v1/quotation/BTC",
  "symbol": "BTC",
  "priceUsd": 81544.94349749477,
  "checkedAt": "2026-10-23T09:36:15.538Z",
  "updatedAt": "2026-10-23T09:35:59Z",
  "blockchain": "Bitcoin",
  "priceYesterdayUsd": 81704.79336332159,
  "volumeYesterdayUsd": 10279767496.56837
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dia-crypto-oracle-asset-price-lookup-07ebf41d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
