{
  "openapi": "3.0.1",
  "info": {
    "title": "Prediction Market Arbitrage: Kalshi vs Polymarket vs PredictIt",
    "description": "Find risk-free arbitrage between Kalshi, Polymarket and PredictIt: the same question where YES on one venue plus NO on the other costs under $1 after fees. Matched markets, both hedge prices, net profit and return, plus the YES-price gap. Keyless.",
    "version": "0.1",
    "x-build-id": "p13xUoKbWiHfRaTY4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapemint~prediction-market-odds-comparison/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapemint-prediction-market-odds-comparison",
        "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/scrapemint~prediction-market-odds-comparison/runs": {
      "post": {
        "operationId": "runs-sync-scrapemint-prediction-market-odds-comparison",
        "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/scrapemint~prediction-market-odds-comparison/run-sync": {
      "post": {
        "operationId": "run-sync-scrapemint-prediction-market-odds-comparison",
        "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": {
          "onlyArbitrage": {
            "title": "Only arbitrage",
            "type": "boolean",
            "description": "Only pairs where buying YES on one venue and NO on the other costs less than $1 after fees, with both books quoted on both sides.",
            "default": false
          },
          "minNetReturnPct": {
            "title": "Minimum net return (%)",
            "minimum": 0,
            "type": "integer",
            "description": "With Only arbitrage: skip opportunities returning less than this after fees.",
            "default": 0
          },
          "venues": {
            "title": "Venues to compare",
            "type": "array",
            "description": "Which prediction markets to pull and match against each other. Pick at least two. PredictIt is US politics only and publishes no volume figures, so volume filters do not apply to it.",
            "items": {
              "type": "string",
              "enum": [
                "kalshi",
                "polymarket",
                "predictit"
              ],
              "enumTitles": [
                "Kalshi",
                "Polymarket",
                "PredictIt"
              ]
            },
            "default": [
              "kalshi",
              "polymarket",
              "predictit"
            ]
          },
          "searchQueries": {
            "title": "Topics / keywords (optional)",
            "type": "array",
            "description": "Only compare markets whose question mentions one of these, e.g. president, minister, Trump, election, Fed, mayor. Works best on named-entity event markets (elections, geopolitics, courts) where the venues list the same yes/no question. Leave empty to compare the most-traded markets on every selected venue.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minSpreadPct": {
            "title": "Min YES-price gap (percentage points)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only return pairs where the two venues' YES prices differ by at least this many points. 0 returns every matched pair; raise it to surface only real gaps (arbitrage-style).",
            "default": 0
          },
          "minMatchScore": {
            "title": "Min match confidence (0-1)",
            "type": "string",
            "description": "How strict the cross-venue question match must be (token overlap). 0.5 is a good default; raise toward 0.7 for high-precision pairs, lower toward 0.4 for more (noisier) matches.",
            "default": "0.5"
          },
          "minKalshiVolume": {
            "title": "Min Kalshi volume (contracts)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip Kalshi markets with lifetime volume below this before matching.",
            "default": 0
          },
          "minPolymarketVolume24h": {
            "title": "Min Polymarket 24h volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip Polymarket markets with 24h volume below this before matching.",
            "default": 0
          },
          "poolPerVenue": {
            "title": "Markets scanned per venue",
            "minimum": 50,
            "maximum": 10000,
            "type": "integer",
            "description": "Markets read per venue before matching. Kalshi lists ~9 markets per event, so 4,000 covers roughly 450 Kalshi events. Up to 10,000.",
            "default": 4000
          },
          "maxPairs": {
            "title": "Max matched pairs per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on matched pairs returned. Controls total cost.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}