# Market Data Previous Close (OHLC) — x402atlas

> Market Data Previous Close (OHLC) — x402atlas is a paid API for AI agents from marketdata.use.x402atlas.com, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-15).

Returns the previous trading day's OHLC bar (open, high, low, close, volume) for stocks, crypto, forex, or options by ticker symbol.

## Facts

- Endpoint: GET https://marketdata.use.x402atlas.com/prev-close
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/market-data-previous-close-ohlc-x402atlas-f133ec15
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A062wZNaywd45gW6MjJEP

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 market-data-previous-close-ohlc-x402atlas-f133ec15
```

Example prompt: What was AAPL's open, high, low, close, and volume from the previous trading day? Pull the previous-close OHLC bar for the stock ticker AAPL.

## When to prefer this

Use this endpoint when you need a quick, single-record summary of where an asset ended the most recent trading session — ideal for daily portfolio snapshots, morning briefings, overnight move detection, or seeding technical indicators. Prefer this over full historical bar endpoints when you only need the last completed session, not a time series.

## Known failure modes

- Invalid or unknown ticker returns a 404 or empty result
- Market holidays or weekends may shift the 'previous day' back further than expected
- Crypto tickers missing the X: prefix may return no results
- Network or payment errors (402 payment required if USDC payment fails)
- Malformed ticker prefix returns an error response

## How this service works

Previous trading day OHLC bar for stocks, crypto, forex and options — yesterday's open/high/low/close and volume by ticker.

## Output

A single OHLC record for the prior trading day containing the open, high, low, and close prices plus volume, date, and the vwap for the requested ticker. Crypto uses the X: prefix (e.g. X:BTCUSD), forex uses C: (e.g. C:EURUSD), stocks use bare tickers.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "ticker"
     ],
     "properties": {
      "ticker": {
       "type": "string",
       "description": "Asset-prefixed ticker, e.g. AAPL, X:BTCUSD, C:EURUSD"
      },
      "adjusted": {
       "type": "boolean",
       "default": true,
       "description": "Adjust for splits"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "queried_at",
      "ticker",
      "adjusted",
      "candle"
     ],
     "properties": {
      "candle": {
       "type": "object",
       "required": [
        "time",
        "open",
        "high",
        "low",
        "close",
        "volume",
        "vwap",
        "transactions"
       ],
       "properties": {
        "low": {
         "type": "number"
        },
        "high": {
         "type": "number"
        },
        "open": {
         "type": "number"
        },
        "time": {
         "type": "string",
         "format": "date-time",
         "description": "Bar start timestamp."
        },
        "vwap": {
         "type": "number",
         "description": "Volume-weighted average price."
        },
        "close": {
         "type": "number"
        },
        "volume": {
         "type": "number"
        },
        "transactions": {
         "type": "integer",
         "description": "Number of upstream transactions in the bar."
        }
       },
       "description": "Previous trading day's OHLCV bar."
      },
      "ticker": {
       "type": "string",
       "description": "Echo of the requested ticker."
      },
      "adjusted": {
       "type": "boolean",
       "description": "Whether the price is split-adjusted."
      },
      "queried_at": {
       "type": "string",
       "format": "date-time",
       "description": "UTC timestamp when this bridge queried the upstream."
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "candle": {
   "low": 209.5,
   "high": 212.4,
   "open": 210.1,
   "time": "2026-07-02T00:00:00Z",
   "vwap": 211.2,
   "close": 211.8,
   "volume": 51000000,
   "transactions": 480000
  },
  "ticker": "AAPL",
  "adjusted": true,
  "queried_at": "2026-07-06T12:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/market-data-previous-close-ohlc-x402atlas-f133ec15/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from marketdata.use.x402atlas.com](https://www.zero.xyz/host/marketdata.use.x402atlas.com/llms.txt)
