# Leo Shi Market Data API

> Leo Shi Market Data API is a paid API for AI agents from leoshi-blog.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-13).

Returns the current ETH/USD price, latest Base chain block number, and Base RPC health status in a single call

## Facts

- Endpoint: POST https://leoshi-blog.vercel.app/api/market?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/leo-shi-market-data-api-a0193231
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VuhXK4Nl2s7_90Q2jGk_d

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 leo-shi-market-data-api-a0193231 -d '<json body>'
```

Example prompt: What's the current ETH price in USD, the latest block number on Base, and is the Base RPC healthy right now?

## When to prefer this

Choose this endpoint when you need a quick, low-cost combined lookup of ETH/USD price AND Base chain status in a single call. It is ideal for lightweight monitoring agents or DeFi dashboards that need to confirm both market price and blockchain health together without querying multiple data sources separately.

## Known failure modes

- RPC node unavailable — baseRpcHealthy may return false or call may fail
- Price feed outage — ethUsd may be stale or missing
- Network timeout — endpoint may not respond if the Vercel deployment is cold or overloaded
- Invalid/no response body if payment is not processed correctly via x402 protocol

## How this service works

一个人的思考、创作与成长记录。关于生活、技术、商业和一切有趣的事。

## Output

A JSON object containing: ethUsd (current ETH price in USD as a float, e.g. 3500.42), blockNumber (latest block number on the Base chain, e.g. 28123456), and baseRpcHealthy (boolean indicating whether the Base RPC endpoint is operational).

## 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": {
     "properties": {}
    },
    "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",
     "properties": {
      "ethUsd": {
       "type": "number"
      },
      "blockNumber": {
       "type": "integer"
      },
      "baseRpcHealthy": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ethUsd": 3500.42,
  "blockNumber": 28123456,
  "baseRpcHealthy": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/leo-shi-market-data-api-a0193231/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from leoshi-blog.vercel.app](https://www.zero.xyz/host/leoshi-blog.vercel.app/llms.txt)
