# Kalshi + Polymarket Scraper — Unified Odds & History (`signalbench/kalshi-polymarket-scraper`) Actor

Scrape Kalshi and Polymarket prediction markets into one normalized feed: questions, implied probabilities, volume, close dates — plus full odds history (candlesticks & price time-series). Pure API, no browser.

- **URL**: https://apify.com/signalbench/kalshi-polymarket-scraper.md
- **Developed by:** [SignalBench](https://apify.com/signalbench) (community)
- **Categories:** News, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 market scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Kalshi + Polymarket Scraper — Unified Prediction Market Odds & History

Scrape **Kalshi** and **Polymarket** prediction markets into **one normalized
schema**: every open market's question, implied probability, volume, liquidity,
close date, and category — plus **full odds history** (Kalshi candlesticks and
Polymarket price time-series). Pure JSON APIs under the hood (**no browser**),
so runs are fast and cheap. Export as **JSON, CSV, Excel, or XML**, or pull
results straight through the Apify API into your app, AI agent, model, or
spreadsheet.

Prediction markets cleared **~$24B/month in volume** (April 2026) and news
organizations cite their odds daily — but there's no public cross-platform API.
This Actor is that missing layer: a **prediction market data** feed and
**probability oracle** for analysts, journalists, researchers, traders, and AI
agents.

> **No per-datapoint games, never charged for failures.** Flat **$2 per 1,000
> items** ($0.002 each) — and one "item" in history mode is a market's **entire
> time-series**, not a point. Failed or empty lookups are never charged.

### Two modes

#### 1. Unified markets feed

All open markets from both platforms in one normalized schema. Kalshi coverage
scans the **full open book** (~65k markets, verified at build time); Polymarket
arrives volume-ranked from its API. With both platforms selected, results are
**ranked within each platform by volume and interleaved**, so you always see both
(a pure cross-platform volume sort would bias toward Polymarket, which reports
volume in USD while Kalshi reports it in contracts). Filter by:

- **Keyword** — "election", "fed", "bitcoin", "world cup"…
- **Category** — Politics, Economics, Sports, Crypto, World… (matches Kalshi
  categories and Polymarket event tags)
- **Minimum volume** — skip dead markets
- **Closing within N days** — only near-resolution markets
- **Platform** — both, Kalshi only, or Polymarket only

**Sort by** one of:

- **Volume** (default) — ranked within each platform and interleaved
- **Closing soon** — soonest-resolving first (global, comparable across platforms)
- **Biggest movers (24h)** — largest YES-price move in either direction first

#### 2. Odds history

Give it Kalshi tickers and/or Polymarket URLs; get each market's price
time-series (daily or hourly, up to 365 days): Kalshi **native OHLC
candlesticks** (open/high/low/close + volume), Polymarket CLOB price points.
*"How did the odds move after the debate?"* — answered in one run.

### Output example (unified feed)

```json
{
    "type": "market",
    "platform": "kalshi",
    "id": "KXNBAFINALS-26-SA",
    "question": "Will the San Antonio win the 2026 Pro Basketball Championship?",
    "url": "https://kalshi.com/markets/kxnbafinals",
    "yesPrice": 0.21,
    "impliedProbabilityPct": 21,
    "bestBid": 0.2,
    "bestAsk": 0.21,
    "spread": 0.01,
    "oneDayChange": -0.03,
    "volume": 75063434,
    "closeTime": "2026-06-22T03:00:00Z",
    "category": "Sports",
    "tags": ["Sports"],
    "scrapedAt": "2026-06-12T20:31:00.000Z"
}
````

### Output example (odds history)

```json
{
    "type": "history",
    "platform": "polymarket",
    "question": "Will Jesus Christ return before 2027?",
    "resolution": "1d",
    "pointCount": 31,
    "points": [
        { "t": "2026-05-14T00:00:18.000Z", "price": 0.0215 },
        { "t": "2026-06-12T20:31:04.000Z", "price": 0.0205 }
    ]
}
```

Each feed item also carries platform-native identifiers (`kalshi.seriesTicker`,
`polymarket.clobTokenIds`, …) so you can chain a feed run straight into a
history run.

### A probability oracle for AI agents (MCP / LangChain)

Apify Actors plug into agents as tools (MCP). Pointed at this Actor, an agent
can answer *"What probability do prediction markets give X?"* with live,
cross-platform odds — and pull the time-series to reason about momentum:

- **MCP** — expose the Actor as an agent tool via Apify's MCP server
- **LangChain / LlamaIndex** — call it as a tool from any framework
- **n8n / Zapier / Make** — scheduled odds snapshots into sheets and alerts; run
  it daily and you accumulate your own odds archive

### Data sources & notes

- Kalshi: official public trade API (`/events`, `/candlesticks`) — no auth
  needed for market data. Prices are decimal dollars (0–1 = implied probability).
- Polymarket: public Gamma + CLOB APIs. Prices 0–1.
- **Volume units differ**: USD on Polymarket, contracts (≈ $1 notional) on
  Kalshi. Figures are platform-reported; the cross-platform volume sort treats
  them as comparable for ranking only.
- Only public market data is accessed — no accounts, no trading, no user data.

### FAQ

**Is there an official cross-platform prediction market API?** No. Kalshi and
Polymarket each have their own APIs with different schemas, auth models, and
quirks (Kalshi's pagination buries real markets under parlay listings; this
Actor handles that). This Actor merges them into one normalized feed.

**How much does it cost?** $0.002 per stored item — **$2 per 1,000**. A history
item is one market's complete series (up to 365 days of points) for the same
$0.002. Failed or empty lookups are never charged. Apify's free $5 monthly
credit covers ~2,500 items.

**How fresh is the data?** Each run fetches live API data. Schedule runs (every
hour, daily…) to build snapshots over time.

**Can I get resolved-market outcomes?** Closed/settled markets are visible in
history mode via their tickers/URLs. A dedicated resolutions & calibration feed
is on the roadmap.

# Actor input Schema

## `mode` (type: `string`):

**Unified markets feed** returns all open markets from both platforms in one normalized schema, sorted by volume. **Odds history** returns the full price time-series for the markets you specify.

## `platform` (type: `string`):

Which platforms to include in the unified feed.

## `keyword` (type: `string`):

Only keep markets whose question or event title contains this text (case-insensitive). E.g. "election", "fed", "bitcoin".

## `category` (type: `string`):

Only keep markets whose category matches (case-insensitive substring), e.g. Politics, Economics, Sports, Crypto, World. Matches the Kalshi category and the Polymarket event tags.

## `minVolume` (type: `integer`):

Only keep markets with at least this much lifetime volume (USD on Polymarket, contracts ≈ notional USD on Kalshi). Useful for skipping dead markets.

## `closingWithinDays` (type: `integer`):

Only keep markets that close within this many days. Leave empty for all open markets.

## `sortBy` (type: `string`):

Order of the unified feed. **Volume** ranks each platform by its own volume and interleaves them (the two volume scales aren't comparable). **Closing soon** and **Biggest movers** are comparable across platforms, so they sort globally.

## `maxItems` (type: `integer`):

Maximum number of items to store. Caps your cost — 1 stored item = 1 charge (a history item is one market's complete time-series).

## `historyTargets` (type: `array`):

Kalshi tickers (e.g. KXELONMARS-99) and/or Polymarket URLs or slugs (e.g. https://polymarket.com/event/will-jesus-christ-return-before-2027). One history item is produced per market.

## `historyDays` (type: `integer`):

How many days of history to fetch, counting back from now.

## `historyResolution` (type: `string`):

Granularity of the time-series. Hourly is best for windows up to ~60 days; daily for longer.

## `proxyConfiguration` (type: `object`):

Apify Proxy, used only as a fallback. Both platforms are open JSON APIs that work best over a direct connection, so the Actor tries direct first and only falls back to this proxy if the direct request is rate-limited. Leave as-is unless you have a reason to change it.

## Actor input object example

```json
{
  "mode": "markets",
  "platform": "both",
  "minVolume": 0,
  "sortBy": "volume",
  "maxItems": 200,
  "historyTargets": [],
  "historyDays": 30,
  "historyResolution": "1d",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items in JSON.

## `resultsCsv` (type: `string`):

All scraped items as a CSV export.

## `viewInConsole` (type: `string`):

Open the run and its dataset in the Apify Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "historyTargets": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("signalbench/kalshi-polymarket-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "historyTargets": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("signalbench/kalshi-polymarket-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "historyTargets": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call signalbench/kalshi-polymarket-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=signalbench/kalshi-polymarket-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Kalshi + Polymarket Scraper — Unified Odds & History",
        "description": "Scrape Kalshi and Polymarket prediction markets into one normalized feed: questions, implied probabilities, volume, close dates — plus full odds history (candlesticks & price time-series). Pure API, no browser.",
        "version": "1.0",
        "x-build-id": "ReWxi3ewdNsR9hH7K"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/signalbench~kalshi-polymarket-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-signalbench-kalshi-polymarket-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/signalbench~kalshi-polymarket-scraper/runs": {
            "post": {
                "operationId": "runs-sync-signalbench-kalshi-polymarket-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/signalbench~kalshi-polymarket-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-signalbench-kalshi-polymarket-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "markets",
                            "history"
                        ],
                        "type": "string",
                        "description": "**Unified markets feed** returns all open markets from both platforms in one normalized schema, sorted by volume. **Odds history** returns the full price time-series for the markets you specify.",
                        "default": "markets"
                    },
                    "platform": {
                        "title": "Platforms",
                        "enum": [
                            "both",
                            "kalshi",
                            "polymarket"
                        ],
                        "type": "string",
                        "description": "Which platforms to include in the unified feed.",
                        "default": "both"
                    },
                    "keyword": {
                        "title": "Keyword filter",
                        "type": "string",
                        "description": "Only keep markets whose question or event title contains this text (case-insensitive). E.g. \"election\", \"fed\", \"bitcoin\"."
                    },
                    "category": {
                        "title": "Category filter",
                        "type": "string",
                        "description": "Only keep markets whose category matches (case-insensitive substring), e.g. Politics, Economics, Sports, Crypto, World. Matches the Kalshi category and the Polymarket event tags."
                    },
                    "minVolume": {
                        "title": "Minimum volume",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep markets with at least this much lifetime volume (USD on Polymarket, contracts ≈ notional USD on Kalshi). Useful for skipping dead markets.",
                        "default": 0
                    },
                    "closingWithinDays": {
                        "title": "Closing within N days",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Only keep markets that close within this many days. Leave empty for all open markets."
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "volume",
                            "closingSoon",
                            "priceMovers"
                        ],
                        "type": "string",
                        "description": "Order of the unified feed. **Volume** ranks each platform by its own volume and interleaves them (the two volume scales aren't comparable). **Closing soon** and **Biggest movers** are comparable across platforms, so they sort globally.",
                        "default": "volume"
                    },
                    "maxItems": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of items to store. Caps your cost — 1 stored item = 1 charge (a history item is one market's complete time-series).",
                        "default": 200
                    },
                    "historyTargets": {
                        "title": "Markets for odds history (for \"Odds history\" mode)",
                        "type": "array",
                        "description": "Kalshi tickers (e.g. KXELONMARS-99) and/or Polymarket URLs or slugs (e.g. https://polymarket.com/event/will-jesus-christ-return-before-2027). One history item is produced per market.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "historyDays": {
                        "title": "History window (days)",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "How many days of history to fetch, counting back from now.",
                        "default": 30
                    },
                    "historyResolution": {
                        "title": "History resolution",
                        "enum": [
                            "1d",
                            "1h"
                        ],
                        "type": "string",
                        "description": "Granularity of the time-series. Hourly is best for windows up to ~60 days; daily for longer.",
                        "default": "1d"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify Proxy, used only as a fallback. Both platforms are open JSON APIs that work best over a direct connection, so the Actor tries direct first and only falls back to this proxy if the direct request is rate-limited. Leave as-is unless you have a reason to change it.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
