{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket & Kalshi Odds - Matched Markets & Price Gaps",
    "description": "See where Polymarket and Kalshi disagree. Pulls live odds, volume and liquidity from both, matches the same question with a confidence score, and shows the price gap and movers since your last run. Not financial advice. $0.001 per market, $0.003 per gap.",
    "version": "1.0",
    "x-build-id": "NIfml1Eg4jQprtn8R"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~polymarket-kalshi-odds/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-polymarket-kalshi-odds",
        "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/that_red_bird~polymarket-kalshi-odds/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-polymarket-kalshi-odds",
        "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/that_red_bird~polymarket-kalshi-odds/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-polymarket-kalshi-odds",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only markets whose question, event title or category contains one of these words, e.g. 'fed', 'bitcoin', 'election', 'nba'. Leave empty for all markets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Kalshi categories",
            "type": "array",
            "description": "Optional. Keep only Kalshi markets in these categories, e.g. 'Politics', 'Economics', 'Financials', 'Climate and Weather', 'Sports'. Polymarket has no category field, so use keywords for it. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minVolume": {
            "title": "Min volume",
            "minimum": 0,
            "type": "integer",
            "description": "Skip thin markets. Polymarket volume is in US dollars, Kalshi volume is in contracts (each contract pays $1 at most). 0 = no filter.",
            "default": 1000
          },
          "minGapPts": {
            "title": "Min price gap (points)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "A matched pair is reported only when the two venues' YES prices differ by at least this many percentage points. 3 means 3 points, for example 62% against 59%.",
            "default": 3
          },
          "minMatchConfidence": {
            "title": "Min match confidence (0-100)",
            "minimum": 40,
            "maximum": 100,
            "type": "integer",
            "description": "How sure the title and date matcher must be that two markets ask the same question. 80 is a good balance. Lower finds more pairs but with more false matches; always read both markets' rules.",
            "default": 80
          },
          "minProbabilityPct": {
            "title": "Ignore extremes (percent)",
            "minimum": 0,
            "maximum": 49,
            "type": "integer",
            "description": "Skip pairs where both venues price the outcome below this percent or above 100 minus this percent. Removes long-shot noise like 0.1% against 0.4%. 0 = keep everything.",
            "default": 3
          },
          "includeMarkets": {
            "title": "Include market rows",
            "type": "boolean",
            "description": "Also deliver the biggest markets of each venue with price, bid/ask, volume, liquidity and end date (one row per market, billed per row). Turn off to receive only price gaps and movers.",
            "default": true
          },
          "maxMarketsPerVenue": {
            "title": "Market rows per venue",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "How many market rows to deliver for each venue, biggest volume first. Does not limit how many markets are scanned for matching.",
            "default": 25
          },
          "scanDepth": {
            "title": "Markets scanned per venue",
            "minimum": 100,
            "maximum": 3000,
            "type": "integer",
            "description": "How many active markets to read from each venue for matching. More markets means more matches but a slower run. Polymarket is read biggest volume first.",
            "default": 1000
          },
          "trackMovers": {
            "title": "Track movers since last run",
            "type": "boolean",
            "description": "Remember each market's price in a key-value store and flag markets that moved since your previous run. The first run has nothing to compare with, so it shows no movers.",
            "default": true
          },
          "moverMinPts": {
            "title": "Mover threshold (points)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "A market counts as a mover when its YES price changed by at least this many percentage points since the last run.",
            "default": 5
          },
          "maxMovers": {
            "title": "Max extra mover rows",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Largest movers that are not already in the market rows are added as extra rows, up to this number.",
            "default": 20
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store that remembers prices between runs. Use a different name for each separate watchlist or schedule.",
            "default": "polymarket-kalshi-odds-state"
          },
          "webhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional. A Slack, Discord, Make or Zapier webhook. When a run finds price gaps or movers, one message with the top results is posted. Leave empty for no alert.",
            "default": ""
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}