Examples
import axios from 'axios';
const API_URL = 'https://pro.circular.fi/v2/lookups';
const API_KEY = 'your-api-key'; // Replace with your key
const params = {
addresses: [
'So11111111111111111111111111111111111111112',
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
'LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo',
'675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8',
'CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C'
]
};
async function getOptimalLookups() {
try {
const res = await axios.get(API_URL, {
headers: {
'Content-Type': 'application/json',
'x-api-key': API_KEY
},
params
});
console.log('Optimal Lookups:', res.data);
} catch (e) {
console.error('Error:', e?.response?.data || e.message);
}
}
getOptimalLookups();Last updated