Returns token price change by interval for a list of tokens
Supported on: Ethereum Base Solana BNB Chain Gnosis Optimism Polygon Linea Sonic Unichain Arbitrum Avalanche ZKsync
Parameters
chain
* number pathChain id of network
Request Body
tokenAddresses
* array Addresses of token contracts
items
string interval
* string (Enum)Time interval for price change
5m
10m
15m
30m
50m
1h
2h
3h
4h
6h
12h
24h
2d
3d
7d
14d
15d
30d
60d
90d
365d
max
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
27
28
29
30
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/token-details/v1.0/prices/change/{chain}';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
tokenAddresses: [
'0x111111111117dC0aa78b770fA6A738034120C302',
'0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984',
],
interval: '24h',
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
400
404
500
items
TokenListPriceChangeResponseDto object tokenAddress
* string Token contract address
inUSD
* number Price change in USD
inPercent
* number Price change as a percentage
JSON
Copy
1
2
3
4
5
6
7
8
[
{
"tokenAddress": "0x111111111117dc0aa78b770fa6a738034120c302",
"inUSD": 0.05,
"inPercent": 2.5
}
]