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

# Transactions

> Paginated swap feed with chain and protocol filters

## Endpoint

```
GET /leokit/explorer/transactions
```

No authentication required.

## Request

| Parameter  | Type   | Required | Description                                                               |
| ---------- | ------ | -------- | ------------------------------------------------------------------------- |
| `cursor`   | string | No       | ISO timestamp from a previous `next_cursor`. Returns rows older than this |
| `limit`    | number | No       | Page size, 1–100. Default `50`                                            |
| `chain`    | string | No       | Filter by source or destination chain (e.g. `ETH`, `BTC`)                 |
| `protocol` | string | No       | Filter by protocol slug (e.g. `thorchain`)                                |

## Response

```json theme={null}
{
  "data": [
    /* up to `limit` ExplorerTransaction objects, newest first */
  ],
  "next_cursor": "2026-04-28T11:42:18.000Z",
  "has_more": true
}
```

| Field         | Description                                                                       |
| ------------- | --------------------------------------------------------------------------------- |
| `data`        | Array of `ExplorerTransaction` (see [overview](/api-reference/explorer/overview)) |
| `next_cursor` | Pass to next request as `cursor` to fetch the next page. `null` when exhausted    |
| `has_more`    | `true` if more rows exist after this page                                         |

## Errors

| Status | Description            |
| ------ | ---------------------- |
| `500`  | Supabase query failure |

## Pagination Pattern

```javascript theme={null}
let cursor = null;
do {
  const url = new URL("https://api.leokit.dev/leokit/explorer/transactions");
  url.searchParams.set("limit", "100");
  if (cursor) url.searchParams.set("cursor", cursor);

  const { data, next_cursor, has_more } = await fetch(url).then(r => r.json());
  for (const tx of data) handle(tx);

  cursor = next_cursor;
} while (cursor && has_more);
```

## Examples

```bash theme={null}
# Latest 50
curl "https://api.leokit.dev/leokit/explorer/transactions"

# Filter to BTC source/destination, 20 per page
curl "https://api.leokit.dev/leokit/explorer/transactions?chain=BTC&limit=20"

# Filter to Chainflip
curl "https://api.leokit.dev/leokit/explorer/transactions?protocol=chainflip"

# Next page
curl "https://api.leokit.dev/leokit/explorer/transactions?cursor=2026-04-28T11:42:18.000Z"
```


## OpenAPI

````yaml /api-reference/openapi.json GET /explorer/transactions
openapi: 3.0.3
info:
  title: Leokit API
  version: 1.0.0
  description: API reference for Leokit
servers:
  - url: https://api.leokit.dev
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /explorer/transactions:
    get:
      summary: Paginated swap feed
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: chain
          in: query
          schema:
            type: string
        - name: protocol
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Page of transactions plus pagination info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExplorerTransactionsResponse'
      security:
        - {}
components:
  schemas:
    ExplorerTransactionsResponse:
      type: object
      required:
        - data
        - has_more
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ExplorerTransaction'
        next_cursor:
          type: string
          format: date-time
          nullable: true
        has_more:
          type: boolean
    ExplorerTransaction:
      type: object
      required:
        - id
        - tx_hash
        - from_asset
        - to_asset
        - from_address
        - to_address
        - volume_usd
        - protocol
        - swap_date
      properties:
        id:
          type: string
        tx_hash:
          type: string
        from_asset:
          type: string
        to_asset:
          type: string
        from_address:
          type: string
        to_address:
          type: string
        volume_usd:
          type: number
        protocol:
          type: string
        swap_date:
          type: string
          format: date-time
        from_symbol:
          type: string
        to_symbol:
          type: string
        from_chain:
          type: string
        to_chain:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Api-Key
      description: 'Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4'

````