Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baldator/vega-fees
A Golang batch to store Vega fees data into a PostgreSQL database and a Grafana dashboard to display data.
https://github.com/baldator/vega-fees
grafana vega-protocol
Last synced: about 1 month ago
JSON representation
A Golang batch to store Vega fees data into a PostgreSQL database and a Grafana dashboard to display data.
- Host: GitHub
- URL: https://github.com/baldator/vega-fees
- Owner: baldator
- License: mit
- Created: 2021-06-26T12:15:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-04T21:24:56.000Z (over 3 years ago)
- Last Synced: 2024-10-15T16:21:53.118Z (3 months ago)
- Topics: grafana, vega-protocol
- Language: Go
- Homepage:
- Size: 1020 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# VEGA fees Dashboard
The aim of the project is to provide a dashboard displaying Vega network fees.## Requirements
In order to your it locally you would need:
- A Grafana instance (cloud or selfhosted);
- A PostgreSQL instance to store data;
## How to run it
Customize the configuration file according to your environment.
### Configuration file
Here is an example configuration file:
```yaml
# Vega parameters
GrpcNodeUrl: "n07.testnet.vega.xyz:3002"
Debug: true # if true will log all query before executing them# DB parameters
DBHost: "MyDBHost"
DBUser: "MyDBUser"
DBPassword: "MyDBPassword"
DBName: "MyDBName"
DBdebug: true# Klines parameters
Pairs:
- BTCUSDT
- EURUSDT
- USDTDAI
- USDCUSDT
```
### Command line parameters
The script is modular and functions can be selected using command line parameters. Available features are:
- createDB: creates the database schema;
- feesUpdate: scrapes fees using Vega gRPC API;
- klinesUpdate: scrapes assets to USD conversion rates from Binance;
- candleUpdate: scrapes 15min candles using Vega gRPC API;## Grafana configuration
On Grafana, you would need to perform the following steps:
- Import the [GraphQL datasource pluging](https://grafana.com/grafana/plugins/fifemon-graphql-datasource/)
- Create a GraphQL datasource pointing to [Vega API endpoint](https://lb.testnet.vega.xyz/query)
- Create a PostgreSQL datasource pointing to your PostgreSQL instance
- Import dashboards using sources in the grafana folder of this repository
## Architecture
![Infra schema](https://github.com/baldator/vega-fees/blob/master/doc/Vega-fees.png?raw=true)## Database backup
A daily backup is triggered by a GitHub action (dbBackup.yaml) on a daily basis. The DB backup is stored on GitHub as artifact.# About Vega
[Vega](https://vega.xyz) is a protocol for creating and trading derivatives on a fully decentralised network. The network, secured with proof-of-stake, will facilitate fully automated, end-to-end margin trading and execution of complex financial products. Anyone will be able to build decentralised markets using the protocol.Read more at [https://vega.xyz](https://vega.xyz).
# Hack.Money 2021
![hackmoney logo](https://github.com/baldator/vega-fees/blob/master/doc/hackMoney.png?raw=true)
The project has been submitted to Hack.Money 2021 hackathon.