https://github.com/reecepbcups/exports-api
An easy API to get historical data without an archive node
https://github.com/reecepbcups/exports-api
airdrops cosmos interchain
Last synced: about 2 months ago
JSON representation
An easy API to get historical data without an archive node
- Host: GitHub
- URL: https://github.com/reecepbcups/exports-api
- Owner: Reecepbcups
- Created: 2023-07-24T16:02:50.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T15:15:59.000Z (over 1 year ago)
- Last Synced: 2025-02-16T02:14:52.546Z (4 months ago)
- Topics: airdrops, cosmos, interchain
- Language: TypeScript
- Homepage: https://exports-api.reece.sh
- Size: 71.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# exports-api
An easy API to get historical data without an archive node.**Pairs with** https://github.com/Reecepbcups/cosmos-state-exporter
## Setup
```bash
git clone [email protected]:Reecepbcups/exports-api.git && cd exports-api
cp custom-types.example.json custom-types.json # and modify as needed
# install node if you have not already
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install v20.5.0# install nodemon
npm install -g nodemon# enter into a screen / tmux session (or created a systemd service)
screen -S exports-api -dm bash -c "npm i && npm run dev && exec bash"# schedule: clear decompressed exports to save space
# (( match the path to .env DECOMPRESSED_ROOT_PATH ))
sudo crontab -e
# 0 0 * * * rm -rf /home/user/path/decompressed_exports/*```
## View
```json
{
"chains": {
"Available": "/chains"
},
"routes": {
"All Heights": "/:chain/heights",
"Valid Types": "/:chain/types",
"Download Archive": "/:chain/download/:height"
},
"general": {
"Account Info": "/:chain/:height/auth",
"All Stakers": "/:chain/:height/staking",
"Balances": "/:chain/:height/bank",
"Supply": "/:chain/:height/supply"
},
"specific": {
"Validators Shares": "/:chain/:height/validators",
"Specific Delegations": "/:chain/:height/delegations/:valoper_address",
"User Specific": "/:chain/:height/:type/:address"
}
}
```
*NOTE* :height can be any numerical value within the /heights endpoint OR "latest" for the latest height