curl -X GET "https://starknet.impulse.avnu.fi/v3/tokens/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8/exchange-tvl"
// Get current TVL distribution for USDC
const tokenAddress = '0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8';
const response = await fetch(
`https://starknet.impulse.avnu.fi/v3/tokens/${tokenAddress}/exchange-tvl`
);
const tvlData = await response.json();
// Display liquidity distribution
const totalTvl = tvlData.reduce((sum, item) => sum + item.valueUsd, 0);
console.log(`Total TVL: $${totalTvl.toLocaleString()}`);
console.log(`Distributed across ${tvlData.length} exchanges:\n`);
tvlData.sort((a, b) => b.valueUsd - a.valueUsd).forEach(item => {
const share = (item.valueUsd / totalTvl) * 100;
const bar = '█'.repeat(Math.floor(share / 2));
console.log(`${item.exchange.padEnd(15)} ${bar} ${share.toFixed(1)}% ($${item.valueUsd.toLocaleString()})`);
});
import requests
import matplotlib.pyplot as plt
token_address = '0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8'
response = requests.get(
f'https://starknet.impulse.avnu.fi/v3/tokens/{token_address}/exchange-tvl'
)
tvl_data = response.json()
# Create pie chart of TVL distribution
exchanges = [item['exchange'] for item in tvl_data]
values = [item['valueUsd'] for item in tvl_data]
total_tvl = sum(values)
plt.pie(values, labels=exchanges, autopct='%1.1f%%')
plt.title(f'TVL Distribution - Total: ${total_tvl:,.0f}')
plt.show()
[
{
"exchange": "JediSwap",
"value": 5234567.89,
"valueUsd": 5235802.45,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "10kSwap",
"value": 3456789.12,
"valueUsd": 3458234.67,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "MySwap",
"value": 2345678.90,
"valueUsd": 2346789.34,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "SithSwap",
"value": 1234567.89,
"valueUsd": 1235432.10,
"date": "2024-02-14T12:00:00Z"
}
]
Markets
Get TVL by Exchanges
Retrieve TVL (Total Value Locked) distribution across exchanges
GET
/
v3
/
tokens
/
{tokenAddress}
/
exchange-tvl
curl -X GET "https://starknet.impulse.avnu.fi/v3/tokens/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8/exchange-tvl"
// Get current TVL distribution for USDC
const tokenAddress = '0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8';
const response = await fetch(
`https://starknet.impulse.avnu.fi/v3/tokens/${tokenAddress}/exchange-tvl`
);
const tvlData = await response.json();
// Display liquidity distribution
const totalTvl = tvlData.reduce((sum, item) => sum + item.valueUsd, 0);
console.log(`Total TVL: $${totalTvl.toLocaleString()}`);
console.log(`Distributed across ${tvlData.length} exchanges:\n`);
tvlData.sort((a, b) => b.valueUsd - a.valueUsd).forEach(item => {
const share = (item.valueUsd / totalTvl) * 100;
const bar = '█'.repeat(Math.floor(share / 2));
console.log(`${item.exchange.padEnd(15)} ${bar} ${share.toFixed(1)}% ($${item.valueUsd.toLocaleString()})`);
});
import requests
import matplotlib.pyplot as plt
token_address = '0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8'
response = requests.get(
f'https://starknet.impulse.avnu.fi/v3/tokens/{token_address}/exchange-tvl'
)
tvl_data = response.json()
# Create pie chart of TVL distribution
exchanges = [item['exchange'] for item in tvl_data]
values = [item['valueUsd'] for item in tvl_data]
total_tvl = sum(values)
plt.pie(values, labels=exchanges, autopct='%1.1f%%')
plt.title(f'TVL Distribution - Total: ${total_tvl:,.0f}')
plt.show()
[
{
"exchange": "JediSwap",
"value": 5234567.89,
"valueUsd": 5235802.45,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "10kSwap",
"value": 3456789.12,
"valueUsd": 3458234.67,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "MySwap",
"value": 2345678.90,
"valueUsd": 2346789.34,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "SithSwap",
"value": 1234567.89,
"valueUsd": 1235432.10,
"date": "2024-02-14T12:00:00Z"
}
]
Overview
Get current or historical TVL data showing how liquidity is distributed across different DEXs and AMMs. Essential for understanding market depth and optimal routing strategies.Request
string
required
Token contract address
string
ISO 8601 date for historical TVL (defaults to current)
Response
string
required
Exchange/DEX name
number
required
TVL in token amount
number
required
TVL in USD value
string
required
ISO 8601 date-time for this TVL snapshot
curl -X GET "https://starknet.impulse.avnu.fi/v3/tokens/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8/exchange-tvl"
// Get current TVL distribution for USDC
const tokenAddress = '0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8';
const response = await fetch(
`https://starknet.impulse.avnu.fi/v3/tokens/${tokenAddress}/exchange-tvl`
);
const tvlData = await response.json();
// Display liquidity distribution
const totalTvl = tvlData.reduce((sum, item) => sum + item.valueUsd, 0);
console.log(`Total TVL: $${totalTvl.toLocaleString()}`);
console.log(`Distributed across ${tvlData.length} exchanges:\n`);
tvlData.sort((a, b) => b.valueUsd - a.valueUsd).forEach(item => {
const share = (item.valueUsd / totalTvl) * 100;
const bar = '█'.repeat(Math.floor(share / 2));
console.log(`${item.exchange.padEnd(15)} ${bar} ${share.toFixed(1)}% ($${item.valueUsd.toLocaleString()})`);
});
import requests
import matplotlib.pyplot as plt
token_address = '0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8'
response = requests.get(
f'https://starknet.impulse.avnu.fi/v3/tokens/{token_address}/exchange-tvl'
)
tvl_data = response.json()
# Create pie chart of TVL distribution
exchanges = [item['exchange'] for item in tvl_data]
values = [item['valueUsd'] for item in tvl_data]
total_tvl = sum(values)
plt.pie(values, labels=exchanges, autopct='%1.1f%%')
plt.title(f'TVL Distribution - Total: ${total_tvl:,.0f}')
plt.show()
[
{
"exchange": "JediSwap",
"value": 5234567.89,
"valueUsd": 5235802.45,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "10kSwap",
"value": 3456789.12,
"valueUsd": 3458234.67,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "MySwap",
"value": 2345678.90,
"valueUsd": 2346789.34,
"date": "2024-02-14T12:00:00Z"
},
{
"exchange": "SithSwap",
"value": 1234567.89,
"valueUsd": 1235432.10,
"date": "2024-02-14T12:00:00Z"
}
]
Was this page helpful?
⌘I