# OneSource Deepstate Trade Tape

> OneSource Deepstate Trade Tape is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns the on-chain trade history (tape) for a specific Deepstate order book market, sorted newest first, with full execution details per trade.

## Facts

- Endpoint: GET https://api.onesource.io/deepstate/v1/trades/:book
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-deepstate-trade-tape-f760cb71
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FIzHNraSybaN7vnmjU5JR

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 onesource-deepstate-trade-tape-f760cb71
```

Example prompt: Pull the last 50 trades from the Deepstate ETH-USDC book so I can see recent fill prices, who was maker vs taker, and the transaction hashes.

## When to prefer this

Use this endpoint when you need granular, on-chain trade execution data for a specific Deepstate order book, including maker/taker addresses, raw token amounts, gas costs, and transaction hashes. It is the authoritative source for Deepstate market tape and supports cursor-based pagination for historical analysis. Prefer it over general Ethereum log queries when you want pre-parsed, human-readable trade records rather than raw event logs.

## Known failure modes

- Invalid or unknown book identifier returns an error or empty result
- limit out of range (must be 1–500) returns a validation error
- before value of 0 or invalid integer causes a bad request
- Payment not attached (x402 protocol) causes a 402 Payment Required response
- Network or RPC timeout yields a 5xx error
- Book with no trades returns an empty trades array

## How this service works

Deepstate, the on-chain order-book exchange on Robinhood Chain. Trade tape for a market, newest first.

## Output

Returns a paginated list of trade objects for the specified book, each containing: execution side (bid/ask), price (decimal and raw), base and quote token amounts, maker and taker addresses, transaction hash, block number and hash, timestamp, gas used, fee amount and recipient, market session label, finality status, and attribution. Also returns book metadata (id, slug, label, base/quote token info) and a next_before cursor for pagination.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "book"
     ],
     "properties": {
      "book": {
       "type": "string"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "maximum": 500,
       "minimum": 1
      },
      "before": {
       "type": "integer",
       "minimum": 0
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "trades": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "side": {
          "type": "string"
         },
         "price": {
          "type": "number"
         },
         "book_id": {
          "type": "string"
         },
         "finality": {
          "type": "string"
         },
         "gas_used": {
          "type": "integer"
         },
         "order_id": {
          "type": "string"
         },
         "price_raw": {
          "type": "string"
         },
         "timestamp": {
          "type": "integer"
         },
         "base_token": {
          "type": "string"
         },
         "block_hash": {
          "type": "string"
         },
         "book_label": {
          "type": "string"
         },
         "attribution": {
          "type": "string"
         },
         "match_event": {
          "type": "string"
         },
         "quote_token": {
          "type": "string"
         },
         "block_number": {
          "type": "integer"
         },
         "fee_recipient": {
          "type": "string"
         },
         "is_bid_token0": {
          "type": "boolean"
         },
         "maker_address": {
          "type": "string"
         },
         "taker_address": {
          "type": "string"
         },
         "fee_amount_raw": {
          "type": "string"
         },
         "market_session": {
          "type": "string"
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onesource-deepstate-trade-tape-f760cb71/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
