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.
Parameters
Request Body
This request doesn’t have any request body.
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
{
"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"
}