# Pool Transaction API

> Returns recent swap transactions from specified PiperX pool addresses. > Supports real-time monitoring of on-chain trading activity for analytics and debugging.

**Overview**\
Use this endpoint to fetch recent swap transactions from specified pools. This is helpful for analyzing trading activity and user behavior in real time.

***

#### Endpoint

<mark style="color:blue;background-color:purple;">**`[GET]`**</mark>  `https://piperxdb.piperxprotocol.workers.dev/api/piperxapi/recentSwaps`&#x20;

***

#### Request Body

```json
{
  "pairAddresses": [
    "0x4a170A20Dd1ff838C99d49Ac18b517a339206E83"
  ]
}
```

\
**Example Request**

```json
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"pairAddresses": ["0x4a170A20Dd1ff838C99d49Ac18b517a339206E83"]}' \
  https://piperxdb.piperxprotocol.workers.dev/api/piperxapi/recentSwaps

```

**Example Response**

```json
{
  "tokenSwaps": [
    {
      "timestamp": "1740996085000000",
      "token0Amount": "29425453054133087415",
      "token1Amount": "200000000",
      "zeroForOne": false,
      "amountUSD": "200000000",
      "account": {
        "id": "0xd49eeafa6bdbcc551f462c5a582959a9b7a2efdb"
      }
    },
    {
      "timestamp": "1740996059000000",
      "token0Amount": "10005484788346883",
      "token1Amount": "67988",
      "zeroForOne": false,
      "amountUSD": "67988",
      "account": {
        "id": "0x7e093ba1474b79481f9b87d66c99a819f25e82e2"
      }
    }
  ]
}
o
```

`amountUSD` has 6 decimals.
