{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Whale & Smart Money Tracker",
    "description": "Track Polymarket whale trades, top holders and smart-money wallets (Data API v2). Each trade shows market, outcome, side, USD size, wallet PnL, win rate, smart-money tier and new/adding/exit labels. Schedule with onlyNewSinceLastRun for whale alerts. Data only, not financial advice.",
    "version": "0.1",
    "x-build-id": "StPQwG2nrrTFwHFH9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/donzely~polymarket-whale-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-donzely-polymarket-whale-tracker",
        "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/donzely~polymarket-whale-tracker/runs": {
      "post": {
        "operationId": "runs-sync-donzely-polymarket-whale-tracker",
        "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/donzely~polymarket-whale-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-donzely-polymarket-whale-tracker",
        "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": [
              "largeTrades",
              "topHolders",
              "walletProfile",
              "smartMoney"
            ],
            "type": "string",
            "description": "What to return. Large trades: recent trades above minTradeUsd. Top holders: biggest holders of the given markets. Profile wallets: PnL, win rate, open positions and recent trades of given wallets. Smart money: top leaderboard wallets and their latest trades."
          },
          "minTradeUsd": {
            "title": "Minimum trade size (USD)",
            "type": "integer",
            "description": "Only trades worth at least this much (shares × price). Default 10,000 for large trades and 500 for smart money."
          },
          "lookbackHours": {
            "title": "Look back (hours)",
            "type": "integer",
            "description": "How far back to look for trades (large trades and smart money modes).",
            "default": 24
          },
          "markets": {
            "title": "Markets (optional)",
            "type": "array",
            "description": "Polymarket URLs (https://polymarket.com/event/...), event or market slugs, Gamma event ids or 0x condition ids. Required for topHolders; narrows largeTrades.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (optional)",
            "type": "array",
            "description": "Polymarket tag slugs, e.g. politics, sports, crypto, esports, geopolitics, finance, tech, culture. Tracks the 20 most active events of each category.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Search terms such as \"bitcoin\", \"trump\" or \"fed\". Matching active events are tracked.",
            "items": {
              "type": "string"
            }
          },
          "side": {
            "title": "Side",
            "enum": [
              "ANY",
              "BUY",
              "SELL"
            ],
            "type": "string",
            "description": "Only buys or only sells.",
            "default": "ANY"
          },
          "onlySmartMoney": {
            "title": "Only smart-money wallets",
            "type": "boolean",
            "description": "Keep only trades/holders whose wallet is tiered SMART_MONEY (all-time realized PnL ≥ $25k with ≥ 55% win rate, or ≥ $250k).",
            "default": false
          },
          "wallets": {
            "title": "Wallets (walletProfile mode)",
            "type": "array",
            "description": "0x wallet addresses, polymarket.com/profile/0x… URLs or polymarket.com/@username URLs.",
            "items": {
              "type": "string"
            }
          },
          "leaderboardPeriod": {
            "title": "Leaderboard period",
            "enum": [
              "day",
              "week",
              "month",
              "all"
            ],
            "type": "string",
            "description": "Smart money mode: leaderboard window.",
            "default": "month"
          },
          "leaderboardCategory": {
            "title": "Leaderboard category",
            "type": "string",
            "description": "overall, politics, sports, crypto, esports, finance, culture, tech, ...",
            "default": "overall"
          },
          "leaderboardSortBy": {
            "title": "Rank by",
            "enum": [
              "PNL",
              "VOLUME"
            ],
            "type": "string",
            "description": "Rank wallets by profit or by volume.",
            "default": "PNL"
          },
          "topWallets": {
            "title": "Number of top wallets",
            "type": "integer",
            "description": "Smart money mode: how many leaderboard wallets to follow.",
            "default": 20
          },
          "smartMoneyOutput": {
            "title": "Smart money output",
            "enum": [
              "trades",
              "wallets"
            ],
            "type": "string",
            "description": "One row per recent trade of the top wallets, or one profile row per wallet.",
            "default": "trades"
          },
          "tradesPerWallet": {
            "title": "Trades per wallet",
            "type": "integer",
            "description": "Recent trades fetched per wallet (smart money and wallet profiles).",
            "default": 10
          },
          "holdersPerOutcome": {
            "title": "Holders per outcome",
            "type": "integer",
            "description": "topHolders mode: how many holders per outcome (Yes/No).",
            "default": 20
          },
          "maxItems": {
            "title": "Max results",
            "type": "integer",
            "description": "Maximum rows returned (and charged).",
            "default": 100
          },
          "enrichWallets": {
            "title": "Enrich wallets (PnL, win rate, tier)",
            "type": "boolean",
            "description": "Add each wallet's all-time PnL, win rate, volume and smart-money tier.",
            "default": true
          },
          "detectPositionChange": {
            "title": "Detect new vs adding position",
            "type": "boolean",
            "description": "Label each trade NEW_POSITION, ADDING, REDUCING or FULL_EXIT from the wallet's own fill history.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new trades since last run",
            "type": "boolean",
            "description": "Return only trades not returned by the previous run with the same filters. Schedule the actor every few minutes for whale alerts.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID (optional)",
            "type": "string",
            "description": "Separate change-detection history for otherwise identical inputs."
          },
          "maxRunMinutes": {
            "title": "Soft time limit (minutes)",
            "type": "integer",
            "description": "The run stops gracefully after this time and keeps what it found.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed normally: the Polymarket APIs are public."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}