{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Trades Scraper & Whale Monitor - Wallets, Positions",
    "description": "Polymarket Trades, one row per fill: time, market, outcome, side, price, shares, USD amount, wallet, tx hash, URL. Filter by market, event, wallet, side or minimum USD. Monitoring returns only trades new since the last run, for whale alerts. Also lists a wallet's open positions.",
    "version": "0.1",
    "x-build-id": "EhapglWMNtBNXW0lw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~polymarket-trades-whale-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-polymarket-trades-whale-monitor",
        "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/neverempty~polymarket-trades-whale-monitor/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-polymarket-trades-whale-monitor",
        "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/neverempty~polymarket-trades-whale-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-polymarket-trades-whale-monitor",
        "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": {
          "dataType": {
            "title": "What to return",
            "enum": [
              "trades",
              "positions"
            ],
            "type": "string",
            "description": "trades = one row per trade (fill). positions = one row per open position held by each wallet listed under Wallets.",
            "default": "trades"
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Markets to read, one per line: a market slug, a 0x condition id, or a polymarket.com market address (polymarket.com/event/<event>/<market>). An event address or event slug is read as the whole event. Leave empty for every market. A slug Polymarket does not know comes back as a free row that says so.",
            "items": {
              "type": "string"
            }
          },
          "events": {
            "title": "Events",
            "type": "array",
            "description": "Events to read (an event groups several markets), one per line: an event slug, a numeric event id, or a polymarket.com/event/<event> address. Trades from every market of the event are returned.",
            "items": {
              "type": "string"
            }
          },
          "wallets": {
            "title": "Wallets",
            "type": "array",
            "description": "Wallet addresses to follow, one per line: 0x followed by 40 hex characters (the address in a polymarket.com/profile/0x… link, which can also be pasted). Leave empty for every wallet. Required for positions. User names are not accepted.",
            "items": {
              "type": "string"
            }
          },
          "minUsd": {
            "title": "Minimum amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Trades: only trades of at least this many dollars (shares × price), filtered by Polymarket itself, for example 10000 for whale trades. Positions: only positions currently worth at least this much. Leave empty for no minimum."
          },
          "side": {
            "title": "Side",
            "enum": [
              "ANY",
              "BUY",
              "SELL"
            ],
            "type": "string",
            "description": "Trades only: BUY, SELL or both, from the point of view of the wallet in the row.",
            "default": "ANY"
          },
          "tradedWithinHours": {
            "title": "Traded within the last (hours)",
            "minimum": 1,
            "maximum": 26280,
            "type": "integer",
            "description": "Trades only: stop at trades older than this many hours. Leave empty for no time limit (reading then stops at Max rows). Not used in monitoring mode, which reads back to the previous run by itself."
          },
          "maxResults": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many rows (newest trades first; largest positions first). In monitoring mode: the most new trades to return in one run, oldest first; the rest are returned by the next run.",
            "default": 1000
          },
          "monitoringMode": {
            "title": "Monitoring mode (only trades new since the last run)",
            "type": "boolean",
            "description": "Trades only. The first run with a given set of filters saves a starting point and returns no trade (free). Each later run with the same filters returns only the matching trades that appeared since the previous run. Schedule it hourly with a minimum amount to get whale trades as they happen. A run that finds nothing new is charged one small scan check.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Reset monitoring memory",
            "type": "boolean",
            "description": "Forget the saved starting point for these filters before the run, so this run becomes a first run again.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}