anywhy / pricefeeder

Nibiru's x/oracle pricefeeder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nibiru x/oracle Price Feeder

Submits prices to the nibiru decentralized oracle.

Configuration using .env

Feeder requires the following environment variables to run:

CHAIN_ID="nibiru-localnet-0"
GRPC_ENDPOINT="localhost:9090"
WEBSOCKET_ENDPOINT="ws://localhost:26657/websocket"
FEEDER_MNEMONIC="guard cream sadness conduct invite crumble clock pudding hole grit liar hotel maid produce squeeze return argue turtle know drive eight casino maze host"
EXCHANGE_SYMBOLS_MAP='{"bitfinex": {"ubtc:unusd": "tBTCUSD", "ueth:unusd": "tETHUSD", "uusd:unusd": "tUSTUSD"}}'

Delegating post pricing

In order to be able to delegate the post pricing you need to set the env variable for the validator that delegated you the post pricing:

VALIDATOR_ADDRESS="nibiruvaloper1..."

And from your validator node, you need to delegate responsibilites to the feeder address

nibid tx oracle set-feeder <feeder address> --from validator

Configuring specific exchanges

CoinGecko

Coingecko source allows to use paid api key to get more requests per minute. In order to configure it, you need to set env var:

DATASOURCE_CONFIG_MAP='{"coingecko": {"api_key": "0123456789"}}'

Build

make build-feeder

Run

make run

or to run as a daemon:

make docker-compose up -d price_feeder

About

Nibiru's x/oracle pricefeeder

License:Apache License 2.0


Languages

Language:Go 98.1%Language:Makefile 1.7%Language:Dockerfile 0.2%