{
  "openapi": "3.0.1",
  "info": {
    "title": "Solana DEX Scraper — Raydium + Orca Dev-Grade Swap Stream",
    "description": "Extract normalized swap events from Solana's largest spot DEXes: Raydium AMM v4 and Orca Whirlpool. Per-swap rows with signer, mints, amounts, USD pricing, and fee data. Built for MEV/arb bot devs, copy-trading systems, and on-chain analytics. Bring your own RPC. No login required.",
    "version": "0.1",
    "x-build-id": "a9FVW7fe8uSL6WPbZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhorex~solana-dex-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhorex-solana-dex-scraper",
        "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/zhorex~solana-dex-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zhorex-solana-dex-scraper",
        "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/zhorex~solana-dex-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zhorex-solana-dex-scraper",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "swaps_by_token",
              "swaps_by_wallet",
              "swaps_by_pool",
              "recent_swaps",
              "pool_metadata"
            ],
            "type": "string",
            "description": "What slice of DEX data to extract.",
            "default": "swaps_by_token"
          },
          "rpcUrl": {
            "title": "Solana RPC URL",
            "type": "string",
            "description": "Solana JSON-RPC endpoint. The public default (api.mainnet-beta.solana.com) is heavily rate-limited and is for testing only. For production volumes plug in your own Helius, QuickNode, or Triton URL. Leave empty to use the public default."
          },
          "tokenMint": {
            "title": "Token Mint Address",
            "type": "string",
            "description": "SPL token mint (base58). Required for 'swaps_by_token' mode. Example: USDC = EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
          },
          "walletAddress": {
            "title": "Wallet Address",
            "type": "string",
            "description": "Solana wallet (base58). Required for 'swaps_by_wallet' mode."
          },
          "poolAddress": {
            "title": "Pool Address",
            "type": "string",
            "description": "Pool program account (base58). Required for 'swaps_by_pool' and 'pool_metadata' modes."
          },
          "dexes": {
            "title": "DEXes to include",
            "uniqueItems": true,
            "type": "array",
            "description": "Which DEX programs to scan. Defaults to both supported DEXes.",
            "items": {
              "type": "string",
              "enum": [
                "raydium_v4",
                "orca_whirlpool"
              ],
              "enumTitles": [
                "Raydium AMM v4",
                "Orca Whirlpool"
              ]
            },
            "default": [
              "raydium_v4",
              "orca_whirlpool"
            ]
          },
          "fromSlot": {
            "title": "From Slot",
            "minimum": 0,
            "type": "integer",
            "description": "Start slot, inclusive. Optional. If omitted with no fromTimestamp, scans most-recent activity."
          },
          "toSlot": {
            "title": "To Slot",
            "minimum": 0,
            "type": "integer",
            "description": "End slot, inclusive. Optional. Default: current slot."
          },
          "fromTimestamp": {
            "title": "From Timestamp (ISO 8601)",
            "type": "string",
            "description": "Start time, e.g. '2026-05-01T00:00:00Z'. Alternative to fromSlot. Slot-based filtering wins if both set."
          },
          "toTimestamp": {
            "title": "To Timestamp (ISO 8601)",
            "type": "string",
            "description": "End time, e.g. '2026-05-02T00:00:00Z'."
          },
          "minAmountUsd": {
            "title": "Minimum Swap Size (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Filter out swaps below this USD notional. Requires includeUsdPrices to be enabled. Default: 0 (no filter).",
            "default": 0
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on records returned by the run.",
            "default": 1000
          },
          "includeUsdPrices": {
            "title": "Include USD Prices",
            "type": "boolean",
            "description": "Fetch USD prices for input/output tokens at swap time using Jupiter Price API. Adds latency; disable for raw on-chain data only.",
            "default": true
          },
          "commitment": {
            "title": "Commitment Level",
            "enum": [
              "confirmed",
              "finalized"
            ],
            "type": "string",
            "description": "Solana confirmation level. 'confirmed' is fast; 'finalized' is safest. 'processed' is not supported (reorg risk).",
            "default": "confirmed"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}