> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Raptor Swap API Overview

> Use Raptor's hosted Swap API for quotes and swaps — no client to run. Self-host the binary only if you need your own instance.

<Note>
  **Public Beta** — Join [Discord](https://discord.gg/JH2e9rR9fc) for support queries.
  Raptor is currently free to use with no rate limits.
</Note>

## How to use Raptor

**You do not need to run a Raptor client or server.** Call Solana Tracker's hosted API from your app, backend, or bot — get quotes, build swap transactions, sign them in the user's wallet, and send them back. No binary and no RPC setup to operate.

<Info>
  **Hosted API (recommended for most integrations)**

  * **HTTP:** `https://raptor-beta.solanatracker.io`
  * **WebSocket:** `wss://raptor-beta.solanatracker.io`

  Start with the [Swap API guide](/guides/swap-api) for the full flow and copy-paste examples. Use the [HTTP API reference](/raptor/http/get-swap-quote) and [WebSocket section below](#websocket) for every endpoint.
</Info>

<CardGroup cols={2}>
  <Card title="Swap API guide" icon="book-open" href="/guides/swap-api">
    Step-by-step: quote → build → sign → send. Works with curl, fetch, and WebSockets.
  </Card>

  <Card title="Send transactions" icon="send" href="/raptor/transactions">
    Submit signed swaps and track confirmation status.
  </Card>
</CardGroup>

<Note>
  **Self-host (optional)** — Only if you want your own Raptor instance. Binary release: [GitHub](https://github.com/solanatracker/raptor-binary). CLI flags and environment variables are documented [below](#self-hosting-optional).
</Note>

***

## Endpoints

Raptor's basic flow is simple: get a quote, build a transaction, sign it with the user's wallet, send it, then track status.

### Swap

| Endpoint                      | Description                                                                                                                                  |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /quote`                  | Get the expected output amount and route before building a transaction                                                                       |
| `POST /swap`                  | Build complete swap transactions with priority fee calculation, compute budget overrides, optional SOL tips, and destination account support |
| `POST /swap-instructions`     | Build swap instructions only (without transaction wrapper)                                                                                   |
| `POST /quote-and-swap`        | Combined quote and swap in single request with optional tips, fee config, and transaction tuning (optional feature)                          |
| `POST /send-transaction`      | Send transactions via Yellowstone Jet TPU with automatic resending and confirmation tracking                                                 |
| `GET /transaction/:signature` | Track sent transaction status, latency, and parsed events                                                                                    |

### Analytics

| Endpoint      | Description                                                              |
| ------------- | ------------------------------------------------------------------------ |
| `GET /health` | Health check with detailed status (pools, cache, Yellowstone connection) |

***

## WebSocket

| Feature            | Details                                                                                                               |
| ------------------ | --------------------------------------------------------------------------------------------------------------------- |
| `/stream`          | Real-time quote streaming with subscription management                                                                |
| `/stream/swap`     | Real-time streaming swap quotes with pre-built transactions (ready to sign), including tip support                    |
| Slot-based updates | Automatic quote recalculation on pool state changes                                                                   |
| Inactivity resend  | `/stream/swap` re-sends the latest swap transaction after 10 slots without an update to help avoid transaction expiry |

***

<Info>
  **Program ID - Mainnet:** `RaptorD5ojtsqDDtJeRsunPLg6GvLYNnwKJWxYE4m87`
</Info>

## Supported DEXs

### Raydium

* Raydium AMM
* Raydium CLMM
* Raydium CPMM
* Raydium LaunchLab/Launchpad

### Meteora

* Meteora DLMM
* Meteora Dynamic AMM
* Meteora DAMM (Dynamic AMM V2)
* Meteora Curve
* Meteora DBC (Dynamic Bonding Curve)

### Orca

* Whirlpool (legacy)
* Whirlpool V2

### Bonding Curves

* Pump.fun
* Pumpswap
* Heaven (Buy/Sell)
* MoonIt (Buy/Sell)
* Boopfun (Buy/Sell)

### PropAMM

* Humidifi
* Tessera
* Solfi V1/V2
* AlphaQ
* ZeroFi
* BisonFi
* GoonFi V2

### Other

* FluxBeam
* PancakeSwap V3

***

## Routing

### Multi-Hop

* Up to 4-hop routes for optimal pricing
* Route-aware slippage calculation (accounts for multi-hop risk)
* DEX-specific routing preferences
* Pool filtering by address lists
* Mint allowlists via txt files
* Direct-only route mode (`onlyDirectRoutes` / `maxHops=1`)
* Circular arbitrage option

### Slippage

* Dynamic slippage based on volatility and route complexity
* Route-aware multi-hop slippage adjustment
* Manual slippage override (numeric or `"dynamic"`)
* Minimum output amount calculation with slippage protection

### Platform Fees

* Fee taken from input OR output tokens
* Configurable fee basis points (up to 10%)
* Fee wallet specification
* Extra charge on positive slippage
* Automatic fee adjustment in quotes and swaps

### Tips & Transaction Controls

* Optional native SOL tips via `tipAccount` and `tipLamports`
* Transaction version selection (`V0` or `LEGACY`)
* Compute unit price override (`computeUnitPriceMicroLamports`)
* Compute unit limit override (`computeUnitLimit`)
* Maximum priority fee caps (`maxPriorityFee`)
* Optional destination token account override (`destinationTokenAccount`)

***

## Priority Fees

### Dynamic Calculation

* Route-specific priority fee calculation
* DEX-specific fee adjustments
* Recent fee data tracking (slots tracked, total fees)
* Maximum fee caps and overrides

### Priority Levels

| Level                 | Use Case            |
| --------------------- | ------------------- |
| `Min` / `Low`         | Cost-saving         |
| `Auto` / `Medium`     | Recommended default |
| `High` / `VeryHigh`   | Speed priority      |
| `Turbo` / `UnsafeMax` | Maximum speed       |

***

## Transaction Management

### Yellowstone Jet TPU

* Transaction sending
* Automatic resending with slot alignment
* Multiple identity support (4 default, configurable)

### Tracking

* Real-time status monitoring (`pending` / `confirmed` / `failed` / `expired`)
* Latency measurement (send to confirm)
* Parsed Raptor program events
* Raw transaction storage
* Automatic cleanup

### Rate Limiting

* Configurable RPS (uses few RPC calls generally)

***

## Self-hosting (optional)

The sections below apply only when you run the [Raptor binary](https://github.com/solanatracker/raptor-binary) yourself. If you use the hosted API above, you can ignore CLI flags and environment variables.

### CLI flags

### Help & Version

```
-h, --help       Show help message
-v, --version    Show version information
```

### Pool Indexer

```
--no-pool-indexer          Disable pool indexer client (Yellowstone only)
--skip-pool-indexer-wait   Skip startup wait for pool indexer sync readiness
```

### Routing Filters

```
--include-dexes <DEXES>    Only include these DEXes (comma-separated)
--exclude-dexes <DEXES>    Exclude these DEXes (comma-separated)
--include-mints-file <PATH>  Only use pools touching mints in this txt file
--include-pools-file <PATH>  Only use pools listed in this txt file
```

### Allowlist File Format

Both `--include-mints-file` and `--include-pools-file` expect a plain text file with one pubkey per line.

Example:

```text theme={null}
So11111111111111111111111111111111111111112
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
# comments are allowed
```

* Empty lines are ignored
* `#` starts a comment
* Mint allowlists keep any pool where either `token_a` or `token_b` matches a listed mint
* Pool allowlists keep only the exact listed pool addresses
* If used together with DEX filters, both filters apply

### Performance

```
--workers <N>              Number of worker threads (default: CPU cores)
--low-memory               Enable low-memory mode with automatic cache clearing
--memory-limit <MB>        Memory limit in MB (default: 80% of system RAM)
```

### Feature Toggles

```
--enable-arbitrage         Enable circular arbitrage (same input/output mint)
-s, --enable-quote-and-swap    Enable the /quote-and-swap endpoint
--rpc-rate-limit <N>       Limit RPC calls to N per second (default: unlimited)
--enable-yellowstone-jet   Enable Yellowstone Jet TPU sender for /send-transaction
--enable-websocket         Enable WebSocket streaming quotes at /stream
```

### Yellowstone Jet TPU

```
--jet-identity <PATH>      Path to identity keypair for Jet TPU (optional)
--jet-identities <N>       Number of random identities for Jet (default: 4)
--tx-cache-ttl <SECS>      Transaction cache TTL in seconds (default: 30)
--tx-pending-expiry <SECS> Pending transaction expiry in seconds (default: 120)
```

***

## Request Options

Common swap-building fields supported by `POST /swap`, `POST /quote-and-swap`, and `/stream/swap` subscriptions include:

* `dexes` — comma-separated DEX allowlist
* `pools` — comma-separated pool allowlist
* `maxHops` — maximum route depth (1-4)
* `onlyDirectRoutes` — force direct routes only
* `feeAccount`, `feeBps`, `feeFromInput`, `chargeBps` — platform fee controls
* `priorityFee`, `maxPriorityFee` — dynamic or fixed priority fee control
* `computeUnitPriceMicroLamports`, `computeUnitLimit` — compute budget overrides
* `txVersion`, `asLegacyTransaction` — transaction format controls
* `tipAccount`, `tipLamports` — optional SOL tip transfer
* `destinationTokenAccount` — custom output destination token account

***

## Environment Variables

### CLI Flag Equivalents

| Variable                 | Flag                       |
| ------------------------ | -------------------------- |
| `NO_POOL_INDEXER`        | `--no-pool-indexer`        |
| `SKIP_POOL_INDEXER_WAIT` | `--skip-pool-indexer-wait` |
| `INCLUDE_DEXES`          | `--include-dexes`          |
| `EXCLUDE_DEXES`          | `--exclude-dexes`          |
| `INCLUDE_MINTS_FILE`     | `--include-mints-file`     |
| `INCLUDE_POOLS_FILE`     | `--include-pools-file`     |
| `WORKER_THREADS`         | `--workers`                |
| `ENABLE_ARBITRAGE`       | `--enable-arbitrage`       |
| `ENABLE_QUOTE_AND_SWAP`  | `--enable-quote-and-swap`  |
| `RPC_RATE_LIMIT`         | `--rpc-rate-limit`         |
| `ENABLE_YELLOWSTONE_JET` | `--enable-yellowstone-jet` |
| `JET_IDENTITY`           | `--jet-identity`           |
| `JET_NUM_IDENTITIES`     | `--jet-identities`         |
| `TX_CACHE_TTL_SECS`      | `--tx-cache-ttl`           |
| `TX_PENDING_EXPIRY_SECS` | `--tx-pending-expiry`      |
| `ENABLE_WEBSOCKET`       | `--enable-websocket`       |
| `LOW_MEMORY_MODE`        | `--low-memory`             |
| `MEMORY_LIMIT_MB`        | `--memory-limit`           |

### Additional Variables

| Variable               | Description                                   |
| ---------------------- | --------------------------------------------- |
| `RPC_URL`              | Solana RPC endpoint                           |
| `YELLOWSTONE_ENDPOINT` | Yellowstone gRPC endpoint                     |
| `YELLOWSTONE_TOKEN`    | Yellowstone auth token (optional)             |
| `BIND_ADDR`            | Server bind address (default: `0.0.0.0:8080`) |
