curl -X POST "https://starknet.impulse.avnu.fi/v3/tokens/prices" \
-H "Content-Type: application/json" \
-d '{
"tokens": [
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"
]
}'
// Fetch prices for multiple tokens
const tokens = [
'0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7', // ETH
'0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8', // USDC
'0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d' // STRK
];
const response = await fetch(
'https://starknet.impulse.avnu.fi/v3/tokens/prices',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ tokens })
}
);
const prices = await response.json();
// Display prices
prices.forEach(price => {
console.log(`Token: ${price.address.slice(0, 10)}...`);
console.log(` Starknet USD: $${price.starknetMarket.usd.toFixed(2)}`);
if (price.globalMarket) {
console.log(` Global USD: $${price.globalMarket.usd.toFixed(2)}`);
}
console.log(` Decimals: ${price.decimals}`);
});
import requests
tokens = [
'0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7', # ETH
'0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8', # USDC
'0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d' # STRK
]
response = requests.post(
'https://starknet.impulse.avnu.fi/v3/tokens/prices',
json={'tokens': tokens}
)
prices = response.json()
# Calculate portfolio value using Starknet prices
portfolio_value = sum(
price['starknetMarket']['usd'] * holdings.get(price['address'], 0)
for price in prices
)
[
{
"address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"decimals": 18,
"starknetMarket": {
"usd": 2435.50
},
"globalMarket": {
"usd": 2436.12
}
},
{
"address": "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
"decimals": 6,
"starknetMarket": {
"usd": 1.0002
},
"globalMarket": {
"usd": 1.0001
}
},
{
"address": "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
"decimals": 18,
"starknetMarket": {
"usd": 2.35
},
"globalMarket": {
"usd": 2.34
}
}
]
Tokens Prices
Get Current Prices
Fetch real-time prices for multiple tokens with Global and Starknet data
POST
/
v3
/
tokens
/
prices
curl -X POST "https://starknet.impulse.avnu.fi/v3/tokens/prices" \
-H "Content-Type: application/json" \
-d '{
"tokens": [
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"
]
}'
// Fetch prices for multiple tokens
const tokens = [
'0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7', // ETH
'0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8', // USDC
'0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d' // STRK
];
const response = await fetch(
'https://starknet.impulse.avnu.fi/v3/tokens/prices',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ tokens })
}
);
const prices = await response.json();
// Display prices
prices.forEach(price => {
console.log(`Token: ${price.address.slice(0, 10)}...`);
console.log(` Starknet USD: $${price.starknetMarket.usd.toFixed(2)}`);
if (price.globalMarket) {
console.log(` Global USD: $${price.globalMarket.usd.toFixed(2)}`);
}
console.log(` Decimals: ${price.decimals}`);
});
import requests
tokens = [
'0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7', # ETH
'0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8', # USDC
'0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d' # STRK
]
response = requests.post(
'https://starknet.impulse.avnu.fi/v3/tokens/prices',
json={'tokens': tokens}
)
prices = response.json()
# Calculate portfolio value using Starknet prices
portfolio_value = sum(
price['starknetMarket']['usd'] * holdings.get(price['address'], 0)
for price in prices
)
[
{
"address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"decimals": 18,
"starknetMarket": {
"usd": 2435.50
},
"globalMarket": {
"usd": 2436.12
}
},
{
"address": "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
"decimals": 6,
"starknetMarket": {
"usd": 1.0002
},
"globalMarket": {
"usd": 1.0001
}
},
{
"address": "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
"decimals": 18,
"starknetMarket": {
"usd": 2.35
},
"globalMarket": {
"usd": 2.34
}
}
]
Overview
Returns current prices for up to 50 tokens in a single request. Provides both global market prices (from CoinGecko) and Starknet-specific on-chain prices, enabling accurate price comparisons across markets.Request Body
array
required
Array of token contract addresses (1-50 tokens)
Response
Returns an array ofTokenPriceV3Dto objects.
string
required
Token contract address
integer
required
Token decimals
object
required
On-chain Starknet market price
Show properties
Show properties
number
required
Current price in USD on Starknet
object
Global market price (from CoinGecko, when available)
Show properties
Show properties
number
required
Current global price in USD
curl -X POST "https://starknet.impulse.avnu.fi/v3/tokens/prices" \
-H "Content-Type: application/json" \
-d '{
"tokens": [
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"
]
}'
// Fetch prices for multiple tokens
const tokens = [
'0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7', // ETH
'0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8', // USDC
'0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d' // STRK
];
const response = await fetch(
'https://starknet.impulse.avnu.fi/v3/tokens/prices',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ tokens })
}
);
const prices = await response.json();
// Display prices
prices.forEach(price => {
console.log(`Token: ${price.address.slice(0, 10)}...`);
console.log(` Starknet USD: $${price.starknetMarket.usd.toFixed(2)}`);
if (price.globalMarket) {
console.log(` Global USD: $${price.globalMarket.usd.toFixed(2)}`);
}
console.log(` Decimals: ${price.decimals}`);
});
import requests
tokens = [
'0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7', # ETH
'0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8', # USDC
'0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d' # STRK
]
response = requests.post(
'https://starknet.impulse.avnu.fi/v3/tokens/prices',
json={'tokens': tokens}
)
prices = response.json()
# Calculate portfolio value using Starknet prices
portfolio_value = sum(
price['starknetMarket']['usd'] * holdings.get(price['address'], 0)
for price in prices
)
[
{
"address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"decimals": 18,
"starknetMarket": {
"usd": 2435.50
},
"globalMarket": {
"usd": 2436.12
}
},
{
"address": "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
"decimals": 6,
"starknetMarket": {
"usd": 1.0002
},
"globalMarket": {
"usd": 1.0001
}
},
{
"address": "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
"decimals": 18,
"starknetMarket": {
"usd": 2.35
},
"globalMarket": {
"usd": 2.34
}
}
]
Price Comparison
The V3 endpoint provides both Starknet on-chain prices and global market prices. This allows you to:
- Detect arbitrage opportunities between Starknet and centralized exchanges
- Display the most relevant price for your use case
- Identify price discrepancies for trading strategies
Was this page helpful?
⌘I