Open eternauta1337 opened 4 years ago
I have created a script that uses synthetix-data
and calls snx.holders
in order to obtain the SNX stakers with collateral less than 2500 SNX (and more than 1 in order to eliminate tiny balances). I am attaching the script here so you can urn it locally first.
const snxData = require('synthetix-data'); // common js
snxData.snx.holders().then(holders => {
const newData = holders
.filter(({ collateral }) => collateral <= 2500 && collateral >= 1)
.map(({ address, collateral }) => ({
address: address,
collateral: collateral,
}));
console.log(newData);
});
In order to run the script above successfully, I have modified the synthetix-data
module locally to return all the available results. You can sue instead the max
parameter in this way snxData.snx.holders({ max: 10000 })
and also play with the asc/desc param locally.
use synthetix-data requirements: