# market2000.xyz OHLC Time Series Pattern Matching

> market2000.xyz OHLC Time Series Pattern Matching is a paid API for AI agents from market2000.xyz, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Finds historical OHLC candlestick patterns in a stock's price history that most closely match a recent query period, returning similarity scores and associated returns.

## Facts

- Endpoint: GET https://market2000.xyz/get_patterns_ohlc
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/market2000-xyz-ohlc-time-series-pattern-matching-92a66a9a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9FK9BVb8-1FHnz-Z3Eh3-

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-ohlc-time-series-pattern-matching-92a66a9a
```

Example prompt: Find the top historical OHLC patterns in AAPL that most closely match its price action from January 2nd to March 1st 2024, using a daily timeframe, and show me the similarity scores and what returns followed each match.

## When to prefer this

Use this endpoint when you need to identify historical price patterns in OHLC stock data that resemble a current or recent period — ideal for quantitative analysts, trading agents, or financial research workflows that need data-driven historical analogs rather than subjective chart reading. Prefer this over general market data APIs when the goal is time-series similarity matching with return attribution.

## Known failure modes

- Invalid or unknown ticker symbol returns an error or empty pattern list
- End date before start date causes a request error
- Timeframe not supported by the endpoint returns a validation error
- Insufficient price history for the given ticker or date range
- Payment not processed or x402 USDC transaction fails, blocking the response

## 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 JSON object containing the ticker, date range, timeframe, and an array of matching historical patterns. Each pattern includes open/high/low/close price arrays, the dates of the match, a similarity score (lower = more similar), a pattern ID, a description, and the return that followed that historical pattern. Also includes the query period's return for reference.

## 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": [
      "ticker",
      "start_date",
      "end_date",
      "timeframe",
      "query_return",
      "patterns"
     ],
     "properties": {
      "ticker": {
       "type": "string"
      },
      "end_date": {
       "type": "string"
      },
      "patterns": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "pattern_id",
         "dates",
         "opens",
         "highs",
         "lows",
         "closes",
         "similarity",
         "query_return",
         "description"
        ],
        "properties": {
         "lows": {
          "type": "array",
          "items": {
           "type": "number"
          }
         },
         "dates": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "highs": {
          "type": "array",
          "ite
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ticker": "AAPL",
  "end_date": "2024-03-01",
  "patterns": [
   {
    "lows": [
     154.9,
     156.1,
     157
    ],
    "dates": [
     "2020-01-15 00:00:00",
     "2020-01-16 00:00:00",
     "2020-01-17 00:00:00"
    ],
    "highs": [
     157.3,
     158.2,
     159.1
    ],
    "opens": [
     155.1,
     156.8,
     157.5
    ],
    "closes": [
     156.23,
     157.81,
     158.4
    ],
    "pattern_id": 1,
    "similarity": 0.082,
    "description": "AAPL pattern match 1",
    "query_return": 0.043
   }
  ],
  "timeframe": "1d",
  "start_date": "2024-01-02",
  "query_return": 0.043
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/market2000-xyz-ohlc-time-series-pattern-matching-92a66a9a/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)
