# TokenGuard Order Book API

> TokenGuard Order Book API is a paid API for AI agents from eltociear-tokenguard.hf.space, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Retrieves order book data (bids/asks) for a specified cryptocurrency trading pair or token via the TokenGuard DeFi analytics platform

## Facts

- Endpoint: POST https://eltociear-tokenguard.hf.space/orderbook
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokenguard-order-book-api-7601d5ed
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IvVhXX6UwwOLjJqFsfCtv

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 tokenguard-order-book-api-7601d5ed -d '<json body>'
```

Example prompt: Pull the current order book for WETH/USDC so I can see the bid-ask spread and depth — I want to know where the major buy and sell walls are sitting right now.

## When to prefer this

Choose this endpoint when you need real-time or near-real-time order book depth data for crypto or DeFi tokens, especially ERC-20 pairs, and you are operating in an agent context where x402 micropayments on Base are acceptable. Prefer it over generic CEX APIs when you need on-chain or DeFi-native order book data at low per-call cost ($0.01 USDC).

## Known failure modes

- Invalid or unsupported token/trading pair returns an error or empty result
- Micropayment failure via x402 protocol prevents request from processing
- Hugging Face Space may be cold-starting, causing latency or timeout
- Sparse on-chain liquidity may return an order book with very few entries
- Missing required parameters in POST body returns a 400-level error

## How this service works

orderbook data for AI agents.

## Output

A JSON response containing the order book for the requested token or trading pair, including arrays of bid and ask entries with price and quantity levels, reflecting current on-chain or aggregated market depth.

## 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": {
     "required": [],
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokenguard-order-book-api-7601d5ed/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from eltociear-tokenguard.hf.space](https://www.zero.xyz/host/eltociear-tokenguard.hf.space/llms.txt)
