# market2000.xyz Pattern Machine Raw

> market2000.xyz Pattern Machine Raw is a paid API for AI agents from market2000.xyz, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Returns raw historical analog windows (dates, closes, similarity scores) for a ticker's price pattern, without computing forward-return statistics — optimized for high-volume scanning.

## Facts

- Endpoint: GET https://market2000.xyz/get_patterns_raw
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/market2000-xyz-pattern-machine-raw-2c0a5592
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7kxco6WTynLKfq85jnMMH

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 market2000-xyz-pattern-machine-raw-2c0a5592
```

Example prompt: Find the 5 closest historical price pattern analogs for AAPL from January 2 to March 1, 2024 using Euclidean distance on daily bars — I just need the raw matched dates, closes, and similarity scores, not the forward return stats.

## When to prefer this

Choose this endpoint over /get_patterns when you need raw analog windows at the lowest cost ($0.05/call) and do not need forward-return statistics computed. Ideal for high-volume scanning pipelines, batch screening, or when downstream logic will compute its own forward analytics. Use /get_patterns if you need full forward-return distributions already computed.

## Known failure modes

- Invalid or unknown ticker symbol returns an error or empty matches
- end_date not greater than start_date returns a validation error
- Insufficient price history for the requested timeframe results in no matches or sparse results
- Invalid metric value (not 'l1' or 'l2') causes a parameter error
- Very short date windows may not produce k distinct matches
- Rate limiting or payment failure returns a 402 or 429 error

## How this service works

An origin the crawlers already index. We count what AI agents try to buy, what they are refused, and what the AI companies take without sending anyone back. Sold per call in USDC.

## Output

A ranked list of up to k historical analog windows, each containing: an array of bar dates, an array of closing prices, a normalized similarity score (lower = closer match), the total return of the query window, and a human-readable description label for the match.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "ticker",
      "start_date",
      "end_date"
     ],
     "properties": {
      "k": {
       "type": "integer",
       "description": "Number of analog patterns to return (default 3)"
      },
      "wrap": {
       "type": "boolean",
       "description": "Allow circular search (default true)"
      },
      "metric": {
       "enum": [
        "l1",
        "l2"
       ],
       "type": "string",
       "description": "Distance metric"
      },
      "ticker": {
       "type": "string",
       "description": "Asset symbol (e.g. AAPL, BTC-USD, SPY)"
      },
      "end_date": {
       "type": "string",
       "description": "Query window end, exclusive (YYYY-MM-DD)"
      },
      "timeframe": {
       "type": "string",
       "description": "Bar size: 1d, 1h, 30m, 15m, etc."
      },
      "start_date": {
       "type": "string",
       "description": "Query window start, inclusive (YYYY-MM-DD)"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "matches"
     ],
     "properties": {
      "matches": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "dates",
         "closes",
         "similarity",
         "query_return",
         "description"
        ],
        "properties": {
         "dates": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Bar timestamps for the matched window"
         },
         "closes": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "description": "Closing prices for the matched window"
         },
         "similarity": {
          "type": "number",
          "description": "Normalized distance score (lower = closer match)"
         },
         "description": {
          "type": "string",
         
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "matches": [
   {
    "dates": [
     "2020-01-15 00:00:00",
     "2020-01-16 00:00:00",
     "2020-01-17 00:00:00"
    ],
    "closes": [
     156.23,
     157.81,
     158.4
    ],
    "similarity": 0.082,
    "description": "AAPL pattern match 1",
    "query_return": 0.043
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/market2000-xyz-pattern-machine-raw-2c0a5592/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market2000.xyz](https://www.zero.xyz/host/market2000.xyz/llms.txt)
