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

# Get swap transactions for a DEX pool

> Read every swap in a DEX pool with amounts, prices in USD and wallet addresses, filter by time and page through history with a cursor. Needs a Dev, Pro or Enterprise key.

`GET /networks/{network}/pools/{pool_address}/transactions` returns the swaps in one pool, newest first: who swapped, how much of each token moved, and both tokens' prices in USD at that moment. It needs a Dev, Pro or Enterprise key on `api-pro.dexpaprika.com`, sent as the whole `Authorization` header:

```bash theme={null}
curl -s -H "Authorization: $DEXPAPRIKA_API_KEY" \
  "https://api-pro.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/transactions?limit=1"
```

```json theme={null}
{
  "transactions": [
    {
      "id": "0x2b2ba6fcebb2f35e5d013e4df800ba678fb32fb34864bc4ea5f3c3ddf958c758",
      "log_index": 563,
      "transaction_index": 242,
      "factory_id": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
      "pool_id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
      "chain": "ethereum",
      "sender": "0x60943cb06b76a24431659165c81a03c16f1c325c",
      "recipient": "0x60943cb06b76a24431659165c81a03c16f1c325c",
      "token_0": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "token_0_symbol": "WETH",
      "token_1": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "token_1_symbol": "USDC",
      "amount_0": 179631240716562,
      "amount_1": -452733,
      "volume_0": 0.000179631240716562,
      "volume_1": 0.452733,
      "price_0": 2519.0829818795273,
      "price_1": 0.000396969852598458,
      "price_0_usd": 2520.270127087148,
      "price_1_usd": 1.0034780214669785,
      "created_at_block_number": 26177041,
      "created_at_block_hash": "0x4ab0e3a9de6b0035ba9d3cae5af2594274d2c8acac95c59b888002a1e30f9c98",
      "created_at": "2026-10-12T14:38:47Z",
      "canonical_chain": true
    }
  ],
  "page_info": {
    "limit": 1,
    "page": 1,
    "total_items": 49913,
    "total_pages": 49913
  }
}
```

That swap put 0.00018 WETH into the USDC/WETH pool on Uniswap V3 and took 0.45 USDC out.

***

## Which plan you need

| Caller | What you get |
| - | - |
| No key or free key | `403` with `plan_required` |
| Dev, Pro, Enterprise | Every swap, on `api-pro.dexpaprika.com` |

Without a paid key the same call answers:

```bash theme={null}
curl -s "https://api.dexpaprika.com/networks/ethereum/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/transactions?limit=1"
```

```json theme={null}
{
  "error": "plan_required",
  "tier": "keyless",
  "message": "this endpoint requires a Dev or Pro plan",
  "required_tier": "dev",
  "links": {
    "coupon": "https://dexpaprika.com/api/pricing?coupon=START10",
    "docs": "https://docs.dexpaprika.com/",
    "pricing": "https://dexpaprika.com/api/pricing",
    "register": "https://console.dexpaprika.com"
  }
}
```

Compare plans on [pricing](https://dexpaprika.com/api/pricing) and manage your key in [console.dexpaprika.com](https://console.dexpaprika.com).

**On the free tier**, [pool details](/tutorials/pool-details) gives you the totals these swaps add up to: buys, sells, swap count and USD volume over 5m, 15m, 30m, 1h, 6h and 24h, with no key.

***

## Reading a swap

| Field | Meaning |
| - | - |
| `id`, `log_index` | Transaction hash and the position of the swap event in its block. One transaction can hold several swaps, so the pair identifies a swap |
| `sender`, `recipient` | Wallets or contracts on each side of the swap |
| `token_0`, `token_1` and their `_symbol` | The pool's two tokens |
| `amount_0`, `amount_1` | Signed raw amounts, from the pool's side: positive went into the pool, negative came out |
| `volume_0`, `volume_1` | The same amounts without the sign, in whole tokens |
| `price_0`, `price_1` | Each token's price in units of the other |
| `price_0_usd`, `price_1_usd` | Each token's USD price at the time of the swap |
| `created_at`, `created_at_block_number` | When the swap happened |

**Which way did it go?** The token with a negative amount left the pool, so that is what the trader bought. In the example `amount_1` is negative: the trader sold WETH for USDC. The `buys` and `sells` that [pool details](/tutorials/pool-details) reports count swaps the same way, from the pool's base token: a buy takes the base token out of the pool.

**What was it worth?** `volume_0 * price_0_usd`, or the same for token 1.

***

## Parameters

| Parameter | What it does |
| - | - |
| `limit` | Swaps per response, 1 to 100, default 10 |
| `page` | Page number from 1 to 100 |
| `cursor` | Continue from a swap: pass `next_cursor` from the previous response |
| `from`, `to` | Only swaps at or after `from` and at or before `to`: `-1h`, Unix seconds, RFC3339 or a date |

`page` stops at 100: `page=101` answers `400`. To read further back, switch to `cursor`. A response to a `cursor` request carries `next_cursor` instead of `page_info`, and following it keeps going past where `page` stops.

***

## The last hour of swaps in Python

This script reads every swap in the last hour, classifies each as a buy or a sell of the pool's base token, and lists the largest. One request for the pool, then one per 100 swaps:

```python theme={null}
import os
import requests

# A Dev, Pro or Enterprise key. Free keys and keyless calls get 403.
API = os.environ.get("DEXPAPRIKA_API", "https://api-pro.dexpaprika.com")
HEADERS = {"Authorization": os.environ["DEXPAPRIKA_API_KEY"]}

network = "ethereum"
pool_address = "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"  # USDC/WETH, Uniswap V3


def get(path, **params):
    r = requests.get(f"{API}{path}", headers=HEADERS, params=params, timeout=30)
    r.raise_for_status()
    return r.json()


pool = get(f"/networks/{network}/pools/{pool_address}")
base = pool["base_token_id"]

swaps, page = [], 1
while True:
    data = get(f"/networks/{network}/pools/{pool_address}/transactions",
               **{"from": "-1h", "limit": 100, "page": page})
    swaps += data["transactions"]
    if page >= data["page_info"]["total_pages"]:
        break
    page += 1


def side(tx):
    base_amount = tx["amount_0"] if tx["token_0"] == base else tx["amount_1"]
    return "buy" if base_amount < 0 else "sell"


def usd(tx):
    return tx["volume_0"] * tx["price_0_usd"]


buys = [tx for tx in swaps if side(tx) == "buy"]
print(f"{len(swaps)} swaps in the last hour: {len(buys)} buys, {len(swaps) - len(buys)} sells")
print(f"buy volume ${sum(map(usd, buys)):,.0f}, total ${sum(map(usd, swaps)):,.0f}\n")
for tx in sorted(swaps, key=usd, reverse=True)[:3]:
    print(f"{tx['created_at']}  {side(tx):<4}  ${usd(tx):>12,.0f}  {tx['sender']}")
```

```text theme={null}
327 swaps in the last hour: 190 buys, 137 sells
buy volume $1,469,755, total $2,685,555

2026-10-12T14:38:35Z  buy   $      89,251  0x854abc33363a71781186d80c32ee092ce6a757ab
2026-10-12T14:23:59Z  buy   $      74,105  0xbdb3ba9ffe392549e1f8658dd2630c141fdf47b6
2026-10-12T14:38:23Z  buy   $      66,535  0x51c72848c68a965f66fa7a88855f9f7784502a7f
```

Output from 12 October 2026, on a Pro key.

The counts match the `1h` window of [pool details](/tutorials/pool-details) for the same pool, give or take the swaps that landed between the two calls: pool details read 189 buys and 134 sells a minute earlier.

***

## Things to know

**Use `next_cursor`, not the last `id`.** A `cursor` includes the swap it names. Passing the `id` of the last swap you already have returns that swap again as the first row; `next_cursor` points at the next one.

**Raw amounts overflow JavaScript numbers.** `amount_0` and `amount_1` are integers in the token's smallest unit, and an 18-decimal token easily passes 2^53. `JSON.parse` rounds them silently. Use `volume_0` and `volume_1`, or a JSON parser that keeps big integers.

**`total_pages` can be larger than you can reach.** It counts every matching swap, while `page` stops at 100. Bound the range with `from` and `to`, or walk it with `cursor`.

**Each response costs one credit**, whatever the `limit`, so ask for 100 at a time. See [credit usage](/knowledge-base/credit-usage).

**For a live feed, stream instead of polling.** The [transactions stream](/streaming/transactions-streaming) pushes each swap as it happens, on the same plans.

***

## Where to go next

* [Pool details](/tutorials/pool-details): the windowed totals, on every plan
* [Transactions stream](/streaming/transactions-streaming): the same swaps, live
* [Pool transactions reference](/api-reference/pools/get-transactions-of-a-pool-on-a-network-paging-can-be-used-up-to-100-pages)
* [Pricing](https://dexpaprika.com/api/pricing), [console.dexpaprika.com](https://console.dexpaprika.com) and [docs home](https://docs.dexpaprika.com)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.