# SignalHarness Trades-to-Candles Converter

> SignalHarness Trades-to-Candles Converter is a paid API for AI agents from signalharness.ai, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-13).

Converts raw trade tick data into OHLCV candlestick (bar) data for a specified time period

## Facts

- Endpoint: POST https://signalharness.ai/api/agent/services/trades_to_candles/invoke
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/signalharness-trades-to-candles-converter-6f5b3688
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MfM95HoQ-_9ZDmS4QaqgX

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 signalharness-trades-to-candles-converter-6f5b3688 -d '<json body>'
```

Example prompt: Take this list of raw trades and convert them into 5-minute OHLCV candlestick bars so I can run technical analysis on them.

## When to prefer this

Choose this endpoint when you have raw trade tick data (individual buy/sell events) and need to aggregate them into OHLCV candlestick bars for charting, backtesting, or technical analysis. Prefer this over pre-built chart data APIs when you have custom or non-standard trade data sources (e.g., on-chain DEX trades, proprietary execution logs) that aren't available via standard market data providers.

## Known failure modes

- Invalid or malformed trade_candle_request JSON string returns an error
- Input exceeds 65536 character limit causes rejection
- Empty or too-short input (below 2 characters) is rejected
- Payment failure or insufficient USDC balance prevents execution
- Malformed trade records with missing timestamps or prices may produce warnings or incomplete candles

## How this service works

Explore 330 pay-per-call x402 API services and 27 agent-native digital products, with Base USDC pricing, secure Polar checkout, and free discovery.

## Output

Returns a JSON object containing generated OHLCV candlestick data, a list of any warnings encountered during aggregation, the service ID, and an evidence scope indicator. Also includes a full receipt with payment details, request and execution IDs, network info, latency metrics, and a SHA-256 hash of the result for verification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "trade_candle_request": {
   "type": "string",
   "maxLength": 65536,
   "minLength": 2
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "replay": false,
  "result": {
   "warnings": [
    "Output covers only supplied trades and interval boundaries."
   ],
   "service_id": "trades_to_candles",
   "evidence_scope": "caller_supplied_data",
   "generated_candles": "{\"candles\":[{\"close\":\"11\",\"high\":\"11\",\"low\":\"10\",\"open\":\"10\",\"timestamp_ms\":1699999980000,\"trade_count\":2,\"volume\":\"5\"}],\"interval_ms\":60000}"
  },
  "status": "succeeded",
  "receipt": {
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "usage": [],
   "status": "succeeded",
   "network": "eip155:8453",
   "artifacts": [],
   "endedAtMs": 0,
   "latencyMs": 0,
   "paymentId": "example-payment",
   "receiptId": "example-receipt",
   "requestId": "example-request",
   "serviceId": "trades_to_candles",
   "executionId": "example-execution",
   "startedAtMs": 0,
   "amountAtomic": "15000",
   "resultSha256": "0894933bcddaf53ee690e45fe57c904fb9e5ee0139f97da61643e5e586451702",
   "serviceVersion": "1.0.0",
   "settlementReference": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "artifacts": [],
  "requestId": "example-request",
  "executionId": "example-execution"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/signalharness-trades-to-candles-converter-6f5b3688/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from signalharness.ai](https://www.zero.xyz/host/signalharness.ai/llms.txt)
