# Gloom Market Bars API

> Gloom Market Bars API is a paid API for AI agents from api.gloom.sh, paid per call via x402, $0.12/call, status unknown (last checked 2026-11-01).

Fetches OHLCV-style market bar data (price and volume) for one or more stock symbols

## Facts

- Endpoint: GET https://api.gloom.sh/v1/market/bars?utm_source=zero.xyz
- Price: $0.12/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gloom-market-bars-api-df3a1408
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZvGdR9HfojaMcXj8lMtHT

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 gloom-market-bars-api-df3a1408
```

Example prompt: Pull the latest market bar data for AAPL and MSFT from Gloom — I need the price and volume for each.

## When to prefer this

Choose this endpoint when you need lightweight price and volume bar data for specific stock tickers, especially within an AI agent workflow that can handle per-call micropayments via x402. Prefer this over heavyweight financial data providers when you need a simple, cost-effective GET call for equity market bars without complex authentication setup.

## Known failure modes

- Missing required 'symbols' query parameter returns an error
- Invalid or unrecognized ticker symbol may return empty data array
- Payment failure (insufficient USDC balance) blocks the request under x402 protocol
- Rate limiting if too many symbols are requested at once
- Network timeout for very broad symbol queries

## How this service works

Gloom is a free, open-source finance terminal for desktop and TUI with charts, news, filings, portfolios, alerts, and plugins.

## Output

Returns a JSON array of market bar objects, each containing the symbol, date, price, volume, a derived flag, and publishedAt timestamp. Example: {"data":[{"date":"2026-09-14","symbol":"AAPL","values":{"price":105.82,"volume":2069454},"derived":false,"observedAt":null,"publishedAt":"2026-09-14"}]}

## 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": [
      "symbols"
     ],
     "properties": {
      "symbols": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "date": "2026-09-14",
    "symbol": "AAPL",
    "values": {
     "price": 105.82,
     "volume": 2069454
    },
    "derived": false,
    "observedAt": null,
    "publishedAt": "2026-09-14"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gloom-market-bars-api-df3a1408/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gloom.sh](https://www.zero.xyz/host/api.gloom.sh/llms.txt)
