Launch App
AI Strategy Import4 min read

AI Strategy Format

Use any AI assistant to generate valid trading pipeline JSON and import it directly into the Strategy Builder.

Note

This file is optimized for AI. Paste the downloaded .md file into your AI chat and use it as context.

65+ Nodes
Full trading node catalog
24+ Rules
Lint validation rules
Markdown
AI-optimized format
~50 KB
Fits in a single paste

How It Works

Step 1: Get the Schema

- Click Download Schema to save the full node catalog and lint rules as a `.md` file. [icon:download]

Step 2: Paste into AI

- Open your AI assistant (ChatGPT, Claude, Gemini) and paste the schema file as context. [icon:clipboard]

Step 3: Describe Your Strategy

- Tell the AI what you want to trade. It will generate a valid pipeline JSON using the schema. [icon:message-circle]

Step 4: Import into Strategy Builder

- Copy the JSON, open Strategy Builder, click Import, and paste. Validation runs automatically. [icon:upload]

Download Schema

Pipeline JSON Structure

A pipeline is a JSON object with this shape:

typescript
interface Pipeline {
  id: string;           // UUID
  userId: string;       // UUID
  name: string;         // Strategy name
  description: string;  // Strategy description
  nodes: Node[];        // Array of pipeline nodes
  connections: Connection[]; // Array of port connections
  parameters: Record<string, unknown>; // Global parameters
  version: string;      // Schema version
  status: "draft";      // Always "draft" for imports
  createdAt: string;    // ISO 8601 timestamp
  updatedAt: string;    // ISO 8601 timestamp
}

Each node has:

typescript
interface Node {
  id: string;            // Unique node ID (UUID)
  type: string;          // Node type from catalog (e.g., "rsi", "sma_crossover")
  position: { x: number; y: number }; // Canvas position
  parameters: Record<string, unknown>; // Node-specific parameters
  inputs: Port[];        // Input ports
  outputs: Port[];       // Output ports
}

interface Port {
  id: string;
  name: string;
  dataType: string;      // OHLCV, TIMESERIES, SIGNAL, ORDER, etc.
  required: boolean;
}

Each connection links an output port to an input port:

typescript
interface Connection {
  id: string;            // Unique connection ID (UUID)
  source: { nodeId: string; portId: string };
  target: { nodeId: string; portId: string };
}

Example: RSI Crossover Strategy

A simple strategy that buys when RSI crosses above 30 and sells when RSI crosses below 70:

json
{
  "id": "example-rsi-crossover",
  "userId": "your-user-id",
  "name": "RSI Crossover Strategy",
  "description": "Buy when RSI crosses above 30, sell when RSI crosses below 70",
  "nodes": [
    {
      "id": "node-1",
      "type": "ohlcv_data",
      "position": { "x": 100, "y": 200 },
      "parameters": { "exchange": "binance", "symbol": "BTC/USDT", "timeframe": "1h" },
      "inputs": [],
      "outputs": [
        { "id": "ohlcv", "name": "OHLCV", "dataType": "OHLCV" }
      ]
    },
    {
      "id": "node-2",
      "type": "rsi",
      "position": { "x": 400, "y": 200 },
      "parameters": { "period": 14 },
      "inputs": [
        { "id": "ohlcv", "name": "OHLCV", "dataType": "OHLCV", "required": true }
      ],
      "outputs": [
        { "id": "rsi", "name": "RSI", "dataType": "NUMBER" }
      ]
    },
    {
      "id": "node-3",
      "type": "threshold_signal",
      "position": { "x": 700, "y": 100 },
      "parameters": { "upperThreshold": 70, "lowerThreshold": 30 },
      "inputs": [
        { "id": "input", "name": "Input", "dataType": "NUMBER", "required": true }
      ],
      "outputs": [
        { "id": "signal", "name": "Signal", "dataType": "SIGNAL" }
      ]
    },
    {
      "id": "node-4",
      "type": "signal_to_order",
      "position": { "x": 1000, "y": 100 },
      "parameters": { "orderType": "market", "quantity": 0.01 },
      "inputs": [
        { "id": "signal", "name": "Signal", "dataType": "SIGNAL", "required": true }
      ],
      "outputs": [
        { "id": "order", "name": "Order", "dataType": "ORDER" }
      ]
    }
  ],
  "connections": [
    {
      "id": "conn-1",
      "source": { "nodeId": "node-1", "portId": "ohlcv" },
      "target": { "nodeId": "node-2", "portId": "ohlcv" }
    },
    {
      "id": "conn-2",
      "source": { "nodeId": "node-2", "portId": "rsi" },
      "target": { "nodeId": "node-3", "portId": "input" }
    },
    {
      "id": "conn-3",
      "source": { "nodeId": "node-3", "portId": "signal" },
      "target": { "nodeId": "node-4", "portId": "signal" }
    }
  ],
  "parameters": {},
  "version": 1,
  "status": "draft",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

Tips for AI Generation

Prompting tips

Keep imports in draft mode

- Always set `status` to `"draft"` so the pipeline opens safely in Strategy Builder. icon:shield-check

Use real node types

- Only reference node types from the schema because imports validate every node type. icon:box

Connect every required input

- Any input port marked `required: true` must already be wired before import. icon:clipboard

Match data types exactly

- Only connect compatible port types, such as `OHLCV` output to `OHLCV` input. icon:code

Give the AI the full schema

- Download the full schema reference so the AI sees every node, parameter, and valid range. icon:download