Get strategy activity feed
Returns a paginated activity feed for a single strategy identified by `(chainId, maker, app, strategyHash)`. Each item is one transaction classified as `open` (strategy shipped), `close` (strategy docked) or `swap`, with the per-token net incoming/outgoing flow. Items are ordered by `(blockNumber, transactionIndex)` per the `sort` query param.
Supported on: Ethereum Base BNB Chain Unichain Robinhood Chain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon Linea Sonic
Parameters
chainId
* number (Enum)pathEVM chain id
maker
* string pathMaker wallet address
app
* string pathApplication contract address that manages the strategy
strategyHash
* string pathKeccak-256 hash of the strategy (0x-prefixed 32-byte hex)
sort
string (Enum)queryOrdering of activities by `(blockNumber, transactionIndex)`
cursor
string queryPagination cursor from the `nextCursor` field of the previous response; omit to start from the first page
limit
number queryMaximum number of activities to return per page
Request Body
This request doesn’t have any request body.
JavaScript
Copy
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
const axios = require('axios');
async function httpCall() {
const url =
'https://api.1inch.com/aqua/v1.0/strategies/activity/{chainId}/{maker}/{app}/{strategyHash}';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
limit: 100,
},
paramsSerializer: {
indexes: null,
},
};
try {
const response = await axios.get(url, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
Paginated page of strategy activities with cursors for adjacent pages
items
* array Page of strategy activities, ordered by `(blockNumber, transactionIndex)` per the `sort` param
items
StrategyActivityDto object Single strategy activity: open, close, or swap with balance changes and price
chainId
* number EVM chain id
txHash
* string Transaction hash of the activity
type
* string (Enum)Activity type: `open` (strategy shipped), `close` (strategy docked) or `swap`
open
close
swap
time
* number Block timestamp of the transaction as Unix seconds (UTC)
balanceChanges
* array Per-token net balance changes within the transaction; for a `close` the final strategy balances released at the dock, reported as outgoing flow
items
BalanceChangeDto object Per-token net balance change within a transaction
token
* string Token address involved in the change
in
* any Net amount of the token received by the strategy in this transaction
allOf[0]
TokenFlowDto object Token amount flow, raw and in USD
raw
* string Raw token amount (integer string in base units, no decimals)
usd
* number USD value of the amount; null when no USD price is indexed for the token at that block
out
* any Net amount of the token sent by the strategy in this transaction
allOf[0]
TokenFlowDto object Token amount flow, raw and in USD
raw
* string Raw token amount (integer string in base units, no decimals)
usd
* number USD value of the amount; null when no USD price is indexed for the token at that block
fee
*TokenFlowDto object Token amount flow, raw and in USD
raw
* string Raw token amount (integer string in base units, no decimals)
usd
* number USD value of the amount; null when no USD price is indexed for the token at that block
price
* object Execution price of the transaction (quote token per one base token); null when the transaction is not a two-token exchange or token data is unavailable
allOf[0]
ActivityPriceDto object Execution price of a transaction (quote per base) with USD value
value
* string Human-readable execution price of the transaction (quote token per one base token)
usd
* number USD value of one base token at the transaction block; null when the quote token is unpriced
quoteSymbol
* string Symbol of the quote token
total
* number Approximate total number of activities for the strategy, independent of the page slice and sort. Served from a short-lived cache, so it can briefly lag `items` after new activity or a chain reorg; rely on `nextCursor`, not `total`, to detect the end of the list
nextCursor
* string Opaque cursor to pass as `cursor` query param to fetch the next page; null when there are no more results
prevCursor
* string Opaque cursor for the previous page; null when on the first page
JSON
Copy
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
{
"items": [
{
"chainId": 1,
"txHash": "0x7ceddea4b5d7109e0eeab34ae9473e3e868f04034f60922c51abf731319f0a68",
"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"
}
}
],
"total": 1234,
"nextCursor": "eyJjaGFpbklkIjoxLCJtYWtlciI6IjB4MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsImFwcCI6IjB4MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMiIsInN0cmF0ZWd5SGFzaCI6IjB4MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMyIsInNvcnQiOiJhc2MiLCJsYXN0QmxvY2tOdW1iZXIiOjIwMTIzNDU2LCJsYXN0VHJhbnNhY3Rpb25JbmRleCI6NSwiZGlyZWN0aW9uIjoibmV4dCJ9",
"prevCursor": "eyJjaGFpbklkIjoxLCJtYWtlciI6IjB4MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsImFwcCI6IjB4MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMiIsInN0cmF0ZWd5SGFzaCI6IjB4MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMyIsInNvcnQiOiJhc2MiLCJsYXN0QmxvY2tOdW1iZXIiOjIwMTIwMDAwLCJsYXN0VHJhbnNhY3Rpb25JbmRleCI6MiwiZGlyZWN0aW9uIjoicHJldiJ9"
}