{
  "openapi": "3.0.1",
  "info": {
    "title": "Solana DEX Trades & Order Flow - Swap Tape, Whales, Snipers",
    "description": "Solana DEX trades and order flow per token over any time window: swap tape, buy/sell volume in SOL and USD, net flow, unique buyers/sellers, whales, first buyers and snipers, wallet aggregation. Built in Rust. $0.01 per report.",
    "version": "0.1",
    "x-build-id": "XDAHaxq6vASylMPHD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/offgrid-labs~solana-dex-order-flow/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-offgrid-labs-solana-dex-order-flow",
        "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/offgrid-labs~solana-dex-order-flow/runs": {
      "post": {
        "operationId": "runs-sync-offgrid-labs-solana-dex-order-flow",
        "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/offgrid-labs~solana-dex-order-flow/run-sync": {
      "post": {
        "operationId": "run-sync-offgrid-labs-solana-dex-order-flow",
        "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": [
          "tokenMints"
        ],
        "properties": {
          "tokenMints": {
            "title": "Token mint addresses",
            "type": "array",
            "description": "One Solana token mint per line (pump.fun, PumpSwap, Raydium, Meteora, Orca...). Each token gets its own report. Max 25. Example: 9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump.",
            "items": {
              "type": "string"
            }
          },
          "windowMinutes": {
            "title": "Time window (minutes)",
            "minimum": 1,
            "maximum": 10080,
            "type": "integer",
            "description": "Analyse swaps from the last N minutes (up to 7 days). Example: 60 = last hour; 1440 = last day.",
            "default": 60
          },
          "maxTrades": {
            "title": "Max trades per token",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Newest swaps to decode per token. If the window holds more, the report's coverage.truncated is true. Example: 2000.",
            "default": 1000
          },
          "whaleThresholdUsd": {
            "title": "Whale trade threshold (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Trades at or above this USD value are flagged as whale trades. 0 = off. Example: 5000.",
            "default": 1000
          },
          "includeTrades": {
            "title": "Save the swap tape (trade rows)",
            "type": "boolean",
            "description": "One row per decoded swap (charged per trade row).",
            "default": true
          },
          "includeWallets": {
            "title": "Save wallet aggregation rows",
            "type": "boolean",
            "description": "One row per wallet active in the window (charged per wallet row).",
            "default": true
          },
          "maxWallets": {
            "title": "Max wallet rows per token",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Top wallets by USD volume. Example: 100.",
            "default": 50
          },
          "minWalletVolumeUsd": {
            "title": "Min wallet volume (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only wallets with at least this buy+sell volume in the window. Example: 100.",
            "default": 0
          },
          "includeEarlyBuyers": {
            "title": "Detect first buyers & snipers (pump.fun tokens)",
            "type": "boolean",
            "description": "Reads the token's launch transactions from its bonding curve and lists the first buyers, flagging buys within N slots of creation as snipers.",
            "default": true
          },
          "earlyBuyersCount": {
            "title": "First buyers to list",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many first distinct buyers to report. Example: 20.",
            "default": 20
          },
          "sniperSlots": {
            "title": "Sniper window (slots)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "A buy within this many slots of the create slot (~0.4 s per slot) counts as a sniper. The creator is never flagged.",
            "default": 2
          },
          "maxLaunchScanPages": {
            "title": "Launch history pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pages of 1,000 signatures to walk back to reach a token's creation. Older/busier tokens may need more (report shows launchScanTruncated).",
            "default": 5
          },
          "maxPools": {
            "title": "Pools to scan per token",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Besides the pump.fun curve, scan the top N pools by liquidity (found via the DexScreener public API). Example: 3.",
            "default": 3
          },
          "scanMintHistory": {
            "title": "Also scan the mint's own history",
            "type": "boolean",
            "description": "Pools and the pump.fun curve hold almost all swaps; the mint address history is mostly transfers. Enable to also scan it (slower, catches swaps on unlisted pools). Always on when no pool is found.",
            "default": false
          },
          "rpcUrl": {
            "title": "Solana RPC URL (optional, secret)",
            "type": "string",
            "description": "Your own Solana JSON-RPC endpoint (Helius, Triton, QuickNode, your node...). Stored encrypted and never logged. Empty = the public mainnet endpoint, which is rate-limited (about 3 requests/s), so large runs are slow."
          },
          "maxRequestsPerSecond": {
            "title": "Max RPC requests per second",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Throttle for your RPC plan. 0 = automatic (3/s on the public endpoint, 10/s on a custom URL). The public endpoint is always capped at 3.5/s.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}