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

# SVM Transaction Fees & Send Routes

> Inspect route options and fee breakdowns for Solana swaps before submitting them.

## Fee Parameters

Solana transactions support two types of fees:

### Priority Fees (`prioFees`)

Priority fees are paid to validators to prioritize your transaction in the block.

| Property   | Type   | Default | Description                                |
| ---------- | ------ | ------- | ------------------------------------------ |
| `prioFees` | string | `"0"`   | Amount in lamports to pay as priority fees |

**Example:**

<Tabs>
  <Tab title="Socket.IO">
    ```typescript theme={null}
    socket.emit("/svm/buy/transaction", {
      chain: "sol",
      token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
      swapMode: "ExactIn",
      amountIn: "1000000000",
      wallet: "YourSolanaWalletPublicKey",
      prioFees: "100000", // 0.0001 SOL in lamports
    });
    ```
  </Tab>

  <Tab title="HTTP">
    ```typescript theme={null}
    await fetch("https://api.chainworks.co/svm/buy/transaction", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: CHAINWORKS_API_AUTH_TOKEN,
      },
      body: JSON.stringify({
        chain: "sol",
        token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
        swapMode: "ExactIn",
        amountIn: "1000000000",
        wallet: "YourSolanaWalletPublicKey",
        prioFees: "100000", // 0.0001 SOL in lamports
      }),
    });
    ```
  </Tab>
</Tabs>

**Notes:**

* Higher priority fees increase the likelihood of faster inclusion
* Paid regardless of transaction success or failure
* Optional - defaults to `"0"` if not specified

### Bribe Fees (`bribeFees`)

Bribe fees (also called MEV tips) are paid to MEV protection providers (e.g., Jito) to include your transaction in their bundles.

| Property    | Type   | Minimum     | Description                                 |
| ----------- | ------ | ----------- | ------------------------------------------- |
| `bribeFees` | string | `"1000000"` | Amount in lamports to pay as bribe/tip fees |

**Example:**

<Tabs>
  <Tab title="Socket.IO">
    ```typescript theme={null}
    socket.emit("/svm/buy/transaction", {
      chain: "sol",
      token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
      swapMode: "ExactIn",
      amountIn: "1000000000",
      wallet: "YourSolanaWalletPublicKey",
      sendRoute: "Antimev",
      prioFees: "100000",
      bribeFees: "1000000", // 0.001 SOL (minimum)
    });
    ```
  </Tab>

  <Tab title="HTTP">
    ```typescript theme={null}
    await fetch("https://api.chainworks.co/svm/buy/transaction", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: CHAINWORKS_API_AUTH_TOKEN,
      },
      body: JSON.stringify({
        chain: "sol",
        token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
        swapMode: "ExactIn",
        amountIn: "1000000000",
        wallet: "YourSolanaWalletPublicKey",
        sendRoute: "Antimev",
        prioFees: "100000",
        bribeFees: "1000000", // 0.001 SOL (minimum)
      }),
    });
    ```
  </Tab>
</Tabs>

**Notes:**

* Required for `PublicWithNonce`, `Antimev`, and `AntimevWithNonce` routes
* Minimum value is **1,000,000 lamports** (0.001 SOL)
* Provides MEV protection by routing through specialized providers
* Only paid if the transaction lands successfully (for revert-protected routes)

## Send Routes

The `sendRoute` parameter determines how your transaction is submitted to the network.

| Route              | Default | Requires bribeFees | Requires nonceAccount | Description                                   |
| ------------------ | ------- | ------------------ | --------------------- | --------------------------------------------- |
| `Public`           | ✅ Yes   | ❌ No               | ❌ No                  | Standard RPC submission only                  |
| `PublicWithNonce`  | ❌ No    | ✅ Yes              | ✅ Yes                 | RPC + all MEV providers with tip              |
| `Antimev`          | ❌ No    | ✅ Yes              | ❌ No                  | Revert-protected MEV providers only           |
| `AntimevWithNonce` | ❌ No    | ✅ Yes              | ✅ Yes                 | All MEV providers (revert-protected + others) |

The routes that require a `nonceAccount` need a durable nonce account you own. Build one with [Create Nonce Account Transaction](/svm/transactions#create-nonce-account-transaction), sign it, and submit it before using its address here.

### `Public` (Default)

The simplest route - sends your transaction through the standard public RPC only.

<Tabs>
  <Tab title="Socket.IO">
    ```typescript theme={null}
    socket.emit("/svm/buy/transaction", {
      chain: "sol",
      token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
      swapMode: "ExactIn",
      amountIn: "1000000000",
      wallet: "YourSolanaWalletPublicKey",
      sendRoute: "Public",
      prioFees: "100000",
    });
    ```
  </Tab>

  <Tab title="HTTP">
    ```typescript theme={null}
    await fetch("https://api.chainworks.co/svm/buy/transaction", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: CHAINWORKS_API_AUTH_TOKEN,
      },
      body: JSON.stringify({
        chain: "sol",
        token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
        swapMode: "ExactIn",
        amountIn: "1000000000",
        wallet: "YourSolanaWalletPublicKey",
        sendRoute: "Public",
        prioFees: "100000",
      }),
    });
    ```
  </Tab>
</Tabs>

### `PublicWithNonce`

Sends through both public RPC and all MEV providers with a tip.

<Tabs>
  <Tab title="Socket.IO">
    ```typescript theme={null}
    socket.emit("/svm/buy/transaction", {
      chain: "sol",
      token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
      swapMode: "ExactIn",
      amountIn: "1000000000",
      wallet: "YourSolanaWalletPublicKey",
      sendRoute: "PublicWithNonce",
      prioFees: "100000",
      bribeFees: "1000000",
      nonceAccount: "YourNonceAccountPublicKey",
    });
    ```
  </Tab>

  <Tab title="HTTP">
    ```typescript theme={null}
    await fetch("https://api.chainworks.co/svm/buy/transaction", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: CHAINWORKS_API_AUTH_TOKEN,
      },
      body: JSON.stringify({
        chain: "sol",
        token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
        swapMode: "ExactIn",
        amountIn: "1000000000",
        wallet: "YourSolanaWalletPublicKey",
        sendRoute: "PublicWithNonce",
        prioFees: "100000",
        bribeFees: "1000000",
        nonceAccount: "YourNonceAccountPublicKey",
      }),
    });
    ```
  </Tab>
</Tabs>

### `Antimev`

Sends exclusively through revert-protected MEV providers (e.g., Jito bundles).

<Tabs>
  <Tab title="Socket.IO">
    ```typescript theme={null}
    socket.emit("/svm/buy/transaction", {
      chain: "sol",
      token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
      swapMode: "ExactIn",
      amountIn: "1000000000",
      wallet: "YourSolanaWalletPublicKey",
      sendRoute: "Antimev",
      prioFees: "100000",
      bribeFees: "1000000",
    });
    ```
  </Tab>

  <Tab title="HTTP">
    ```typescript theme={null}
    await fetch("https://api.chainworks.co/svm/buy/transaction", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: CHAINWORKS_API_AUTH_TOKEN,
      },
      body: JSON.stringify({
        chain: "sol",
        token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
        swapMode: "ExactIn",
        amountIn: "1000000000",
        wallet: "YourSolanaWalletPublicKey",
        sendRoute: "Antimev",
        prioFees: "100000",
        bribeFees: "1000000",
      }),
    });
    ```
  </Tab>
</Tabs>

**Best for:** High-value swaps where you want MEV protection and bribe fees only paid on success.

### `AntimevWithNonce`

Sends through all MEV providers (both revert-protected and non-revert-protected).

<Tabs>
  <Tab title="Socket.IO">
    ```typescript theme={null}
    socket.emit("/svm/buy/transaction", {
      chain: "sol",
      token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
      swapMode: "ExactIn",
      amountIn: "1000000000",
      wallet: "YourSolanaWalletPublicKey",
      sendRoute: "AntimevWithNonce",
      prioFees: "100000",
      bribeFees: "1000000",
      nonceAccount: "YourNonceAccountPublicKey",
    });
    ```
  </Tab>

  <Tab title="HTTP">
    ```typescript theme={null}
    await fetch("https://api.chainworks.co/svm/buy/transaction", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: CHAINWORKS_API_AUTH_TOKEN,
      },
      body: JSON.stringify({
        chain: "sol",
        token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
        swapMode: "ExactIn",
        amountIn: "1000000000",
        wallet: "YourSolanaWalletPublicKey",
        sendRoute: "AntimevWithNonce",
        prioFees: "100000",
        bribeFees: "1000000",
        nonceAccount: "YourNonceAccountPublicKey",
      }),
    });
    ```
  </Tab>
</Tabs>

**Best for:** Maximizing MEV protection coverage across all providers.
