import fetch from'node-fetch';// Define the API endpointconsturl="https://api.andromedaprotocol.io/v1/tokenomics/history?limit=1";// Fetch data from the APIfetch(url).then(response => {if (!response.ok) {thrownewError(`HTTP error! status: ${response.status}`); }returnresponse.json(); }).then(data => {// Check if the result array exists and has at least one elementif (data.result &&data.result.length>0) {constcirculatingSupply=data.result[0].circulating_supply;console.log(circulatingSupply); } else {console.log('No result data found'); } }).catch(error => {console.error('Error fetching data:', error); });
import requests# Define the API endpointurl ="https://api.andromedaprotocol.io/v1/tokenomics/history?limit=1"# Fetch data from the APIresponse = requests.get(url)# Check if the request was successfulif response.status_code ==200: data = response.json()# Check if the result array exists and has at least one elementif'result'in data andlen(data['result'])>0: circulating_supply = data['result'][0]['circulating_supply']print(circulating_supply)else:print('No result data found')else:print(f"Failed to retrieve data: {response.status_code}")
Wallets
Track known wallets for big activity & enhance security through community monitoring.
import fetch from'node-fetch';// Define the API endpointconsturl="https://api.andromedaprotocol.io/v1/tokenomics/wallets";// Fetch data from the APIfetch(url).then(response => {if (!response.ok) {thrownewError(`HTTP error! status: ${response.status}`); }returnresponse.json(); }).then(data => {// Check if the result array exists and has at least one elementif (data.result &&data.result.length>0) {// Sort wallets by balance in descending order and get the top 5consttopHolders=data.result.sort((a, b) =>b.balance -a.balance).slice(0,5);topHolders.forEach((holder, index) => {console.log(`${index +1}. Address: ${holder.address}, Balance: ${holder.balance}`); }); } else {console.log('No wallets data found'); } }).catch(error => {console.error('Error fetching data:', error); });
import requests# Define the API endpointurl ="https://api.andromedaprotocol.io/v1/tokenomics/wallets"# Fetch data from the APIresponse = requests.get(url)# Check if the request was successfulif response.status_code ==200: data = response.json()# Check if the result array exists and has at least one elementif'result'in data andlen(data['result'])>0: top_holders =sorted(data['result'], key=lambdax: x['balance'], reverse=True)[:5]for i, holder inenumerate(top_holders, 1):print(f"{i}. Address: {holder['address']}, Balance: {holder['balance']}")else:print('No wallets data found')else:print(f"Failed to retrieve data: {response.status_code}")
Vesting Emissions
Get real-time vesting emission rates & project token releases for the next 2 years.
You can define the timestamp to get the emission rate for at the end of the URL as seen below.
Get vesting emission per second for the timestamp 1731055818196.
import fetch from'node-fetch';// Define the API endpoint with the timestampconsturl="https://api.andromedaprotocol.io/v1/tokenomics/vesting-emission?timestamp=1731055818196";// Fetch data from the APIfetch(url).then(response => {if (!response.ok) {thrownewError(`HTTP error! status: ${response.status}`); }returnresponse.json(); }).then(data => {// Check if 'vesting_emission_per_second' key exists in the dataif (data.vesting_emission_per_second) {constvestingEmissionPerSecond=data.vesting_emission_per_second;console.log(`Vesting Emission Per Second: ${vestingEmissionPerSecond}`); } else {console.log('No vesting emission per second data found'); } }).catch(error => {console.error('Error fetching data:', error); });
import requests# Define the API endpoint with the timestampurl ="https://api.andromedaprotocol.io/v1/tokenomics/vesting-emission?timestamp=1731055818196"# Fetch data from the APIresponse = requests.get(url)# Check if the request was successfulif response.status_code ==200: data = response.json()# Check if 'vesting_emission_per_second' key exists in the dataif'vesting_emission_per_second'in data: vesting_emission_per_second = data['vesting_emission_per_second']print(f"Vesting Emission Per Second: {vesting_emission_per_second}")else:print('No vesting emission per second data found')else:print(f"Failed to retrieve data: {response.status_code}")