List the newest swaps across all makers (paginated)

Returns the newest swaps across all makers, optionally scoped to specific chains via `chainId` (all chains when omitted). Each item is one transaction of one strategy that moved the strategy’s tokens without opening or closing it, in the same shape as a `swap` item of the maker activity feed plus the `maker` that owns the strategy; a transaction that swaps through several strategies yields one item per strategy. Items are ordered newest first by `time`, then chain id, block number, transaction index and strategy, all descending; follow `nextCursor` for older swaps. USD values are reported only for tokens whitelisted for leaderboard pricing and are null for other tokens. Reads live indexed data, so a swap is listed as soon as it is indexed.

GEThttps://api.1inch.com/aqua/v1.0/leaderboard/swaps
Supported on:
EthereumBaseBNB ChainAvalancheZKsyncGnosisOptimismPolygonLineaSonicUnichainRobinhood ChainArbitrum

Parameters

cursor
string query
limit
number query
chainId
array query

Request Body

This request doesn’t have any request body.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const axios = require('axios');

async function httpCall() {
  const url = 'https://api.1inch.com/aqua/v1.0/leaderboard/swaps';

  const config = {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
    },
    params: {
      limit: 10,
    },
    paramsSerializer: {
      indexes: null,
    },
  };

  try {
    const response = await axios.get(url, config);
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
}

Returns

GetLeaderboardSwapsResponseDto object
items
* array
items
LeaderboardSwapDto object
chainId
* number
txHash
* string
app
* string
strategyHash
* string
type
* string (Enum)
open
close
swap
time
* number
balanceChanges
* array
items
BalanceChangeDto object
token
* string
in
* any
allOf[0]
TokenFlowDto object
raw
* string
usd
* number
out
* any
allOf[0]
TokenFlowDto object
raw
* string
usd
* number
fee
*TokenFlowDto object
raw
* string
usd
* number
price
* object
allOf[0]
ActivityPriceDto object
value
* string
usd
* number
quoteSymbol
* string
maker
* string
nextCursor
* string
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  "items": [
    {
      "chainId": 1,
      "txHash": "0x7ceddea4b5d7109e0eeab34ae9473e3e868f04034f60922c51abf731319f0a68",
      "app": "0x111111125421ca6dc452d289314280a0f8842a65",
      "strategyHash": "0x84c02b6ac9dbfb965f0f8f10d4a851d4b30e35cbcf2405bbdc19b8ede8d84118",
      "type": "swap",
      "time": 1705276800,
      "balanceChanges": [
        {
          "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
          "in": {
            "raw": "10000000",
            "usd": 9.99
          },
          "out": {
            "raw": "10000000",
            "usd": 9.99
          },
          "fee": {
            "raw": "10000000",
            "usd": 9.99
          }
        }
      ],
      "price": {
        "value": "2345.67",
        "usd": 2345.67,
        "quoteSymbol": "USDC"
      },
      "maker": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
    }
  ],
  "nextCursor": "eyJjaGFpbklkcyI6bnVsbCwibGFzdFBvc2l0aW9uIjp7InRpbWUiOjE3NjAwMDAwMDAwMDAsImNoYWluSWQiOjEsImJsb2NrTnVtYmVyIjoyMzAwMDAwMCwidHJhbnNhY3Rpb25JbmRleCI6NSwic3RyYXRlZ3lJZCI6IjQyIn19"
}

Did you find what you need?