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

# Spot Trading

> How spot trading on DFlow works: request an order, sign, submit

Swap any SPL token on Solana through the Trading API.

DFlow charges **no protocol fee** on spot trades, and you can add your own [platform fee](/spot/trading/platform-fees) on top. Spot trades are imperative: your app sends the trade parameters to DFlow, and DFlow returns a fully constructed transaction for you to sign and submit.

## Features

* **[Best execution](/spot/jit-routing)**: JIT routing re-optimizes your route at execution time, so you get the best available price even as liquidity shifts.
* **[Live market data](/spot/trading/market-data-streams)**: The quote stream pushes top-of-book prices, and the book stream pushes ten levels of depth. Use them to build live tickers and order books without polling.
* **[Gasless swaps](/spot/trading/sponsored-swaps)**: Your app can sponsor users' transaction fees, so they trade without holding SOL for gas.
* **Composable transactions**: Each call to the order endpoint returns a transaction, so you can bundle it with your own instructions and run them atomically.
* **Fine-grained control**: Optional parameters cover [slippage](/spot/trading/slippage-tolerance), [priority fees](/spot/trading/priority-fees), and [venue restrictions](/spot/liquidity-venues), so you decide how each order routes and lands.

## How it works

```mermaid theme={null}
flowchart LR
  A[Request /order] --> B[Sign transaction]
  B --> C[Submit to RPC]
  C --> D[Confirm status]
```

1. The app requests an order from the [`/order`](/resources/trading-api/order/order) endpoint with input mint, output mint, and amount, plus optional parameters like slippage, platform fees, priority fees, and venue restriction.
2. The user signs the returned transaction.
3. The app submits it to a Solana RPC and confirms status.

<Note>
  DFlow also offers an **intent-based declarative** trade flow via [`GET /intent`](/resources/trading-api/declarative/quote) for stronger sandwich protection. The majority of builders stay on `/order`; `/intent` is the opt-in for apps where sandwich exposure matters more than transaction composability. Token-2022 mints are not supported on `/intent`.
</Note>
