# Vybe Solana Analytics API – Pyth Price Feed OHLC Candles

> Vybe Solana Analytics API – Pyth Price Feed OHLC Candles is a paid API for AI agents from x402-api.vybenetwork.xyz, paid per call via x402, $0.009/call, status unknown (last checked 2026-09-28).

Returns OHLC candlestick data for a specified Pyth oracle price feed on Solana, with configurable time range and resolution

## Facts

- Endpoint: POST https://x402-api.vybenetwork.xyz/v4/oracle/pyth/pricefeeds/%7BpriceFeedAddress%7D/candles?utm_source=zero.xyz
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vybe-solana-analytics-api-pyth-price-feed-ohlc-candles-dd9de2f2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N_L2Ot7D4rUunN1LqrdhY

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 vybe-solana-analytics-api-pyth-price-feed-ohlc-candles-dd9de2f2 -d '<json body>'
```

Example prompt: Can you pull hourly OHLC candle data for the Pyth SOL/USD price feed (address: H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG) from January 1, 2024 to January 31, 2024, using 1h resolution, and return the first 50 candles?

## When to prefer this

Use this endpoint when you need structured OHLC candlestick price data sourced from Pyth oracle price feeds on Solana, especially for DeFi charting, backtesting, or price analysis. Prefer this over generic token price APIs when you need high-frequency oracle-grade data with configurable resolution (1h, 1d, 1w, etc.) and gap elimination for continuous charting.

## Known failure modes

- Invalid or non-existent priceFeedAddress returns 404 or empty dataset
- Malformed resolution string returns 400 bad request
- timeStart after timeEnd returns empty or error response
- Payment not provided or insufficient USDC results in 402 Payment Required
- Requesting too large a time range or limit may result in truncated or paginated results
- Invalid unix timestamp format causes 400 error

## How this service works

Read access to Solana on-chain data — tokens, wallets, markets, prices, trades, transfers. No API key, no signup. Pay in USDC per request with the x402 protocol; the per-route price is declared in `x-payment-info`. WebSocket streaming uses prepaid credits.

## Output

Returns an array of OHLC (open, high, low, close) candlestick records for the specified Pyth price feed, each timestamped and aligned to the requested resolution. Close-to-open gaps can optionally be eliminated for cleaner charting.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "priceFeedAddress"
 ],
 "properties": {
  "page": {
   "type": "integer",
   "description": "Pagination offset"
  },
  "limit": {
   "type": "integer",
   "description": "Limit of the number of records to return"
  },
  "timeEnd": {
   "type": "integer",
   "description": "End time of the data to return (unix timestamp)"
  },
  "timeStart": {
   "type": "integer",
   "description": "Start time of the data to return (unix timestamp)"
  },
  "resolution": {
   "type": "string",
   "description": "Resolution of the data. Possible values: 1h, 1d, 1w, 1m, 1y, or a string parseable to seconds"
  },
  "priceFeedAddress": {
   "type": "string",
   "description": "The public key identifying the Pyth price feed account"
  },
  "eliminateCloseToOpenGaps": {
   "type": "boolean",
   "description": "Eliminate gaps between candles by using previous close as next open. Default is true."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "$ref": "#/components/schemas/PythPriceOhlcReturn"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vybe-solana-analytics-api-pyth-price-feed-ohlc-candles-dd9de2f2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-api.vybenetwork.xyz](https://www.zero.xyz/host/x402-api.vybenetwork.xyz/llms.txt)
