Cosmos chains endpoints for CMC & Coingecko, etc
Edit config.py with LCD & DENOM Customize endpoints if necessary
## Install python deps. pip3 install flask flask_cors requests
python3 calculated_metrics.py
python3 endpoints-server.py
### Create the systemd for the Webserver:
cd $HOME
echo "[Unit]
Description=endpoints-server Script
After=network-online.target
[Service]
User=${USER}
ExecStart=$(which python3) /home/raul/cosmos-api-endpoints/endpoints-server.py
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
" >endpoints-server.service
Enable and activate the endpoints-server
service.
sudo mv endpoints-server.service /lib/systemd/system/
sudo systemctl enable endpoints-server.service && sudo systemctl start endpoints-server.service
Check the logs to see if everything is working correct:
sudo journalctl -fu endpoints-server -o cat
### Create the systemd for the Calculate Engine:
cd $HOME
echo "[Unit]
Description=endpoints-calculate Script
After=network-online.target
[Service]
User=${USER}
ExecStart=$(which python3) /home/raul/cosmos-api-endpoints/calculated_values.py
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
" >endpoints-calculate.service
Enable and activate the endpoints-calculate
service.
sudo mv endpoints-calculate.service /lib/systemd/system/
sudo systemctl enable endpoints-calculate.service && sudo systemctl start endpoints-calculate.service
Check the logs to see if everything is working correct:
sudo journalctl -fu endpoints-calculate -o cat