> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aioka.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Zapier / n8n Signal

> Compact signal payload for Zapier and n8n automation workflows.

## Overview

The Zapier / n8n signal endpoint delivers a compact, flat JSON payload designed for
automation platform polling. Use it to build Zaps or n8n workflows that trigger on new
AIOKA verdicts — without writing any code.

**Tier:** Basic (\$49/mo) 🔒
**Cache TTL:** 60 seconds (server-side)
**Rate limit:** Basic 1,000/day, 30/min. Pro 10,000/day, 100/min.

***

## Response Fields

| Field           | Type   | Description                                                                                                         |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| `id`            | string | SHA-256\[:16] of `ruling:ruled_at`. Changes every time the verdict changes — use this as Zapier's deduplication key |
| `verdict`       | string | Judiciary ruling: `STRONG_BUY` / `BUY` / `ACCUMULATE` / `HOLD` / `REDUCE` / `SELL` / `STRONG_SELL` / `PENDING`      |
| `confidence`    | float  | Judiciary composite confidence 0–100                                                                                |
| `regime`        | string | Current HMM market regime                                                                                           |
| `dark_pool`     | int    | Dark Pool composite score 0–100                                                                                     |
| `rsi`           | float  | BTC 1H RSI(14). 0 if unavailable                                                                                    |
| `ema_200`       | float  | BTC 1H EMA(200). 0 if unavailable                                                                                   |
| `btc_price`     | float  | Live BTC spot price. 0 if unavailable                                                                               |
| `ghost_status`  | string | Ghost Trader status: `WAITING` or `IN_POSITION`                                                                     |
| `timestamp`     | string | ISO 8601 datetime with Prague timezone offset, e.g. `2026-04-24T10:00:00+02:00`                                     |
| `readable_time` | string | Human-readable Prague CEST/CET time, e.g. `24 Apr 2026, 10:00 CEST`                                                 |

***

## Zapier Quick Start

<Steps>
  <Step title="Get your API key">
    Generate a Basic-tier key at `POST /v1/keys/generate` or upgrade at [aioka.io/pricing](https://aioka.io/pricing).
  </Step>

  <Step title="Create a Schedule trigger">
    In Zapier, create a new Zap with **Schedule by Zapier** → every **5 minutes**.
  </Step>

  <Step title="Add HTTP Request action">
    Add an **HTTP by Zapier** action:

    * **Method:** `GET`
    * **URL:** `https://api.aioka.io/v1/integrations/zapier/signal`
    * **Headers:** `X-API-Key: YOUR_KEY`
  </Step>

  <Step title="Add a Filter for new verdicts">
    Add a **Filter by Zapier** step:

    * **Only continue if** `id` **does not equal** the previous `id`

    Store the previous `id` in a Zapier Storage by Zapier step or use the built-in
    deduplication on the `id` field — it changes every time the verdict changes.
  </Step>

  <Step title="Post to Slack or Telegram">
    Add a final action — **Slack** or **Telegram**:

    * Message body: `AIOKA Verdict: {{verdict}} ({{confidence}}% confidence) — {{readable_time}}`
  </Step>
</Steps>

***

## n8n Quick Start

Import the ready-made n8n workflow template:

1. Download [n8n-workflow.json](/integrations/n8n-workflow.json)
2. Open n8n → **Workflows** → **Import from File**
3. Set the `X-API-Key` credential in the **HTTP Request** node
4. Activate the workflow

See the full [n8n setup guide](/integrations/n8n) for step-by-step screenshots.

***

## Example Response

```json theme={null}
{
  "id": "a1b2c3d4e5f6a7b8",
  "verdict": "ACCUMULATE",
  "confidence": 76.8,
  "regime": "LOW_VOLATILITY",
  "dark_pool": 65,
  "rsi": 49.5,
  "ema_200": 76196.0,
  "btc_price": 77882.0,
  "ghost_status": "WAITING",
  "timestamp": "2026-04-24T10:00:00+02:00",
  "readable_time": "24 Apr 2026, 10:00 CEST"
}
```

***

## Deduplication Strategy

The `id` field is a SHA-256\[:16] fingerprint of `f"{ruling}:{ruled_at}"`. It is stable
across the 60-second cache window and changes the instant a new verdict is issued.

**Zapier:** Set up a **Filter** action that compares `id` to the previous stored value.
Only continue when they differ.

**n8n:** Use the built-in **IF node** with `={{$json.id}} !== {{$node["Set"].json.lastId}}`.

***

## Error Responses

| Status | Error                  | Cause                                    |
| ------ | ---------------------- | ---------------------------------------- |
| `401`  | `missing_api_key`      | No `X-API-Key` header                    |
| `401`  | `invalid_api_key`      | Key not found or inactive                |
| `403`  | `tier_required`        | Free tier key — Basic or higher required |
| `429`  | `daily_limit_exceeded` | Daily quota exhausted                    |
| `429`  | `rate_limit_exceeded`  | Per-minute burst exceeded                |


## OpenAPI

````yaml GET /v1/integrations/zapier/signal
openapi: 3.1.0
info:
  title: AIOKA Intelligence API
  description: |

    ## AI-powered crypto market intelligence

    AIOKA Intelligence API provides real-time access to our AI Council verdicts,
    market signals, regime detection, and Ghost Trader entry signals.

    ### Tiers
    - **Free**: 100 calls/day — Verdict + Regime
    - **Basic** ($49/mo): 1,000 calls/day — + Signals
    - **Pro** ($199/mo): 10,000 calls/day — + Council + Ghost

    ### Authentication
    Pass your API key in the `X-API-Key` header:

    ```
    X-API-Key: aik_free_xxxxxxxxxxxx
    ```

    ### Get your API key
    `POST /v1/keys/generate` (free tier, no credit card)
  contact:
    name: AIOKA Support
    url: https://docs.aioka.io/
    email: api@aioka.io
  license:
    name: Commercial
    url: https://aioka.io/terms
  version: 1.0.0
servers:
  - url: https://api.aioka.io
    description: Production — AIOKA Intelligence API
security: []
paths:
  /v1/integrations/zapier/signal:
    get:
      tags:
        - Integrations
      summary: Zapier / n8n Signal
      description: >-
        Compact signal payload for Zapier and n8n automation workflows.


        Use `id` as the Zapier deduplication key — it changes every time the
        verdict

        changes, so your Zap only triggers on new rulings.


        The `timestamp` field is ISO 8601 with Prague TZ offset so it renders

        correctly in Zapier, Slack, and Telegram without reformatting.


        **Tier:** Basic ($49/mo) 🔒

        **Cache TTL:** 60 seconds (server-side)

        **Rate limit:** Basic 1,000/day, 30/min. Pro 10,000/day, 100/min.


        ### Response fields

        | Field | Type | Description |

        |-------|------|-------------|

        | `id` | string | Deduplication key — changes on every new verdict |

        | `verdict` | string | Judiciary ruling (STRONG_BUY / BUY / ACCUMULATE /
        HOLD / REDUCE / SELL / STRONG_SELL / PENDING) |

        | `confidence` | float | Judiciary composite confidence 0-100 |

        | `regime` | string | Current HMM regime |

        | `dark_pool` | int | Dark Pool composite score 0-100 |

        | `rsi` | float | BTC 1H RSI(14) |

        | `ema_200` | float | BTC 1H EMA(200) |

        | `btc_price` | float | Live BTC spot price |

        | `ghost_status` | string | `WAITING` or `IN_POSITION` |

        | `timestamp` | string | ISO 8601 with Prague TZ offset |

        | `readable_time` | string | Human-readable Prague CEST/CET time |


        ### Quick start

        1. Create a Zap with **Schedule by Zapier** (every 5 minutes)

        2. HTTP by Zapier: `GET
        https://api.aioka.io/v1/integrations/zapier/signal`
           Header: `X-API-Key: YOUR_KEY`
        3. Filter: only continue when `id` differs from the stored value

        4. Slack / Telegram: post the `verdict` + `readable_time`
      operationId: get_zapier_signal_v1_integrations_zapier_signal_get
      responses:
        '200':
          description: Latest AIOKA signal bundle for automation workflows.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZapierSignalResponse'
        '401':
          description: Invalid or missing API key
        '403':
          description: Basic tier or higher required
        '429':
          description: Rate limit exceeded (daily or per-minute)
      security:
        - APIKeyHeader: []
components:
  schemas:
    ZapierSignalResponse:
      properties:
        id:
          type: string
          title: Id
          description: >-
            SHA-256[:16] fingerprint of ruling+ruled_at. Changes each time the
            verdict changes — use this as Zapier's deduplication key.
        verdict:
          type: string
          title: Verdict
          description: >-
            Judiciary ruling (STRONG_BUY / BUY / ACCUMULATE / HOLD / REDUCE /
            SELL / STRONG_SELL / PENDING).
        confidence:
          type: number
          title: Confidence
          description: Judiciary composite confidence 0-100.
        regime:
          type: string
          title: Regime
          description: >-
            Current market regime (BULL_TRENDING / HIGH_VOLATILITY /
            LOW_VOLATILITY / ...).
        dark_pool:
          type: integer
          title: Dark Pool
          description: Dark Pool composite score 0-100.
        rsi:
          type: number
          title: Rsi
          description: BTC 1H RSI(14). 0 if unavailable.
        ema_200:
          type: number
          title: Ema 200
          description: BTC 1H EMA(200). 0 if unavailable.
        btc_price:
          type: number
          title: Btc Price
          description: Live BTC spot price. 0 if unavailable.
        ghost_status:
          type: string
          title: Ghost Status
          description: Ghost Trader status (WAITING / IN_POSITION).
        timestamp:
          type: string
          title: Timestamp
          description: >-
            ISO 8601 datetime with Prague timezone offset, e.g.
            '2026-04-24T10:00:00+02:00'.
        readable_time:
          type: string
          title: Readable Time
          description: Human-readable Prague CEST/CET time, e.g. '24 Apr 2026, 10:00 CEST'.
      type: object
      required:
        - id
        - verdict
        - confidence
        - regime
        - dark_pool
        - rsi
        - ema_200
        - btc_price
        - ghost_status
        - timestamp
        - readable_time
      title: ZapierSignalResponse
      description: >-
        Signal payload for Zapier and n8n automation workflows.


        Key differences from the Pine Script endpoint (Sprint 229):

        - ``id``            — SHA-256 fingerprint of verdict+timestamp; changes
        on
                              every new ruling, enabling Zapier deduplication.
        - ``timestamp``     — ISO 8601 with Prague TZ offset (e.g. +02:00)
        rather
                              than Unix epoch, so Zapier can display the time directly.
        - ``readable_time`` — Human-readable Prague CEST/CET string for Telegram
        /
                              Slack message bodies, e.g. "24 Apr 2026, 10:00 CEST".
      example:
        btc_price: 77882
        confidence: 76.8
        dark_pool: 65
        ema_200: 76196
        ghost_status: WAITING
        id: a1b2c3d4e5f6a7b8
        readable_time: 24 Apr 2026, 10:00 CEST
        regime: LOW_VOLATILITY
        rsi: 49.5
        timestamp: '2026-04-24T10:00:00+02:00'
        verdict: ACCUMULATE
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: 'Your AIOKA Intelligence API key (format: aik_{tier}_{random})'
      in: header
      name: X-API-Key

````