# x4o2 StonkFun OHLCV Candles

> x4o2 StonkFun OHLCV Candles is a paid API for AI agents from stonk.x4o2.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-31).

Returns exact-market OHLCV candlestick data for a Solana SPL token in quote units, with resolutions from 1 minute to 1 day

## Facts

- Endpoint: GET https://stonk.x4o2.com/v1/tokens/:mint/candles?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x4o2-stonkfun-ohlcv-candles-875c12f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fUhxYG8UKmcw7Wyxx7Kp2

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 x4o2-stonkfun-ohlcv-candles-875c12f6
```

Example prompt: Pull the last 100 hourly OHLCV candles for Solana token mint So11111111111111111111111111111111111111112 on pool 7XawhbbxtsRcQA8KTkHT9f9nc6d69UwqCDh6U5EEbEmX with USDC as the quote mint.

## When to prefer this

Choose this endpoint when you need exact on-chain OHLCV price data for a specific Solana token on a specific pool and quote pair, particularly for charting, backtesting, or monitoring price action at resolutions from 1 minute to 1 day. It is ideal for DeFi analytics agents working with Solana SPL tokens that need precise candlestick data in quote units rather than estimated or aggregated cross-exchange prices.

## Known failure modes

- Missing required pool address returns an error since pool is required for candle queries
- Missing or invalid quoteMint returns an error as it is required for candle resolution
- Invalid mint address format causes a 4xx error
- Requested resolution not in enum (1m, 5m, 15m, 1h, 4h, 1d) causes validation failure
- Limit exceeding 1000 is rejected
- Coverage may be partial or history incomplete for newly listed tokens
- busy flag set to true indicates data is still being ingested and candles may be incomplete
- Payment failure (non-payment of 0.001 USDC via x402) results in 402 response

## How this service works

Exact-market OHLCV in quote units; 1m through 1d

## Output

Returns a JSON object containing an array of OHLCV candle objects for the specified token and pool, along with the resolution, pool address, quote mint, currency, coverage metadata (from/to timestamps, retention days, history completeness, ordering, partial flag), a busy flag indicating data-loading state, data source, USD quote price, fetch timestamp, and server time.

## 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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "mint"
     ],
     "properties": {
      "mint": {
       "type": "string",
       "description": "Exact Solana token mint"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "res": {
       "enum": [
        "1m",
        "5m",
        "15m",
        "1h",
        "4h",
        "1d"
       ],
       "type": "string",
       "default": "5m",
       "description": "Candle resolution"
      },
      "pool": {
       "type": "string",
       "description": "Exact pool address; required for candles"
      },
      "limit": {
       "type": "integer",
       "default": 300,
       "maximum": 1000,
       "minimum": 1,
       "description": "Candle count"
      },
      "before": {
       "type": "integer",
       "minimum": 1,
       "description": "Exclusive candle bucket upper bound, Unix seconds"
      },
      "quoteMint": {
       "type": "string",
       "description": "Exact quote mint; required for ranking or candles"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": [
      "object",
      "null"
     ],
     "properties": {
      "data": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "res": {
         "type": [
          "string",
          "null"
         ]
        },
        "busy": {
         "type": [
          "boolean",
          "null"
         ]
        },
        "mint": {
         "type": [
          "string",
          "null"
         ]
        },
        "pool": {
         "type": [
          "string",
          "null"
         ]
        },
        "source": {
         "type": [
          "string",
          "null"
         ]
        },
        "candles": {
         "type": [
          "array",
          "null"
         ],
         "items": {
          "type": [
           "object",
           "null"
          ]
         }
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x4o2-stonkfun-ohlcv-candles-875c12f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stonk.x4o2.com](https://www.zero.xyz/host/stonk.x4o2.com/llms.txt)
