{
  "openapi": "3.0.1",
  "info": {
    "title": "MEV Risk Scanner - DEX Sandwich + Fee Intel",
    "description": "Per-pair MEV exposure, sandwich-attack rate, and fee-regime classification across 133 chains. Powered by Codex.io.",
    "version": "0.1",
    "x-build-id": "Z5uYeEE4P4VpceY5Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constructive_calm~mev-pair-scanner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constructive_calm-mev-pair-scanner",
        "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/constructive_calm~mev-pair-scanner/runs": {
      "post": {
        "operationId": "runs-sync-constructive_calm-mev-pair-scanner",
        "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/constructive_calm~mev-pair-scanner/run-sync": {
      "post": {
        "operationId": "run-sync-constructive_calm-mev-pair-scanner",
        "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": "What do you want to scan?",
            "enum": [
              "scan-token",
              "scan-pair",
              "discover-mev"
            ],
            "type": "string",
            "description": "Pick the workflow that matches your goal. Each mode uses a different input section below — only fill in the section labelled for the mode you chose.",
            "default": "scan-token"
          },
          "default_evm_chain": {
            "title": "Default chain for bare 0x addresses",
            "enum": [
              "ethereum",
              "base",
              "arbitrum",
              "optimism",
              "polygon",
              "bsc",
              "avalanche",
              "linea",
              "scroll",
              "mantle",
              "blast",
              "zksync",
              "metis",
              "celo",
              "fantom",
              "cronos",
              "moonbeam",
              "moonriver",
              "ronin",
              "sei",
              "monad",
              "hyper-evm"
            ],
            "type": "string",
            "description": "When you paste a bare EVM address (no `chain:` prefix), use this chain. Defaults to ethereum — change to base / arbitrum / etc. if you're scanning a non-Ethereum EVM chain. Solana base58 addresses always auto-detect as solana regardless of this setting.",
            "default": "ethereum"
          },
          "tokens": {
            "title": "Tokens to analyze",
            "type": "array",
            "description": "**Used by mode: Scan a token's top pools.**\n\nOne token per row. Just paste an address — no prefix needed.\n\nQuick-start examples (copy + paste):\n• `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2` (WETH on whichever EVM chain you picked above)\n• `DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263` (BONK on Solana — auto-detected)\n• `EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm` (WIF on Solana)\n\nMixing chains in one run: prefix with `chain:` to override the default — e.g. `base:0x4200000000000000000000000000000000000006`.\n\nThe actor discovers each token's top-volume DEX pools (filtered by liquidity) and scans them.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "max_pairs_per_token": {
            "title": "Top pools per token",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many of each token's most-active pools to scan. Higher = more coverage but more `pair-scanned` events charged.",
            "default": 3
          },
          "pairs": {
            "title": "DEX pool addresses",
            "type": "array",
            "description": "**Used by mode: Scan specific DEX pools.**\n\nOne pool address per row. Same address rules as tokens — bare 0x uses the default EVM chain you picked above; Solana base58 auto-detects; explicit `chain:address` overrides.\n\nQuick-start examples:\n• `0xe0554a476a092703abdb3ef35c80e0d76d32939f` (USDC/WETH Uniswap V3 on Ethereum)\n• `base:0xb2cc224c1c9fee385f8ad6a55b4d94e92359dc59` (WETH/USDC on Base)\n\nUse this when you already know which pool to check (e.g. before placing a large trade).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "discover_chains": {
            "title": "Chains to scan",
            "type": "array",
            "description": "**Used by mode: Discover the most MEV-toxic pools.**\n\nCanonical chain names — one per row. The actor scans each chain's top-volume pools (filtered by liquidity below) and ranks them by MEV risk.\n\nMost active chains for MEV: `ethereum`, `solana`, `base`, `bsc`, `arbitrum`, `optimism`, `polygon`, `avalanche`.\n\n133 chains supported total. Run the actor once to see the full list in the log.",
            "items": {
              "type": "string"
            },
            "default": [
              "ethereum",
              "solana",
              "base"
            ]
          },
          "discover_min_liquidity_usd": {
            "title": "Minimum pool liquidity (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip pools below this liquidity. Default $1M filters out test pools and abandoned tokens. Lower this for memecoin-focused scans, raise for blue-chip-only.",
            "default": 1000000
          },
          "max_results": {
            "title": "Maximum pools in output (hard cap 20)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Total pools returned per run. Each pool fires one `pair-scanned` event ($0.05). Free-tier safety: capped at 20.",
            "default": 5
          },
          "bar_resolution": {
            "title": "Hourly bar granularity",
            "enum": [
              "5",
              "15",
              "60",
              "240",
              "1D"
            ],
            "type": "string",
            "description": "How fine-grained the 24h time-series bars should be. Tighter resolutions surface intraday MEV spikes; coarser ones give a cleaner trend.",
            "default": "60"
          },
          "enable_ai_verdict": {
            "title": "Add AI trader verdict (Gemini Flash)",
            "type": "boolean",
            "description": "Adds a 1-line trader-language verdict per pool — e.g. \"Medium MEV, 24% of fees are MEV, avoid this pool unless using a private mempool.\" Charges an extra `ai-verdict` event ($0.02) per pool returned. Off by default.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}