A set of tools that can be used to run data collectors for oracle networks. Original source from ChronicleLabs and updated to provide price-feed data according to Orcfax's collector format.
A tool to fetch and calculate reliable asset prices.
see: Gofer CLI Readme
Goreleaser is required. Once installed, users can run a command such as:
make gofer-snapshot
Release builds can be made using:
make gofer-release
Releases are currently managed by the GitHub release action in this repository.
The oracle suite comes packaged with a number of api sources which can be leveraged. The desired combination of these sources, the data requeested from each, and the minimum number of responses are set within the config-gofer.hcl file.
Additional api sources must be added along with parameters for how responses will be passed into json.
eg
origin "coinbase" {
type = "tick_generic_jq"
url = "https://api.pro.coinbase.com/products/$${ucbase}-$${ucquote}/ticker"
jq = "{price: .price, time: .time, volume: .volume}"
}
Then sources can be grouped into a data_model
and the min_values
for
publication set; the min establishes how many sources must be included in a
publication.
The Orcfax system requires that a minimum of 3 sources participate in each publication in order to triangulate the data being reported.
eg
data_model "ADA/USD" {
median {
min_values = 3
origin "bitstamp" { query = "ADA/USD" }
origin "coinbase" { query = "ADA/USD" }
origin "kraken" { query = "ADA/USD" }
origin "kucoin_prices_simple" { query = "ADA/USD" }
origin "bitfinex_simple" { query = "ADA/USD" }
origin "hitbtc" { query = "ADA/USD" }
}
}
It is advisable to group more than the minimum necessary sources within the data model in order to provide contingencies for when api sources fail.
Once the config file is parameterized, users will need to rebuild using make gofer-snapshot
.
By appending the binary=
output (eg dist/gofer_linux_amd64_v1/gofer
), users
can now utiilize gofer commands. Given the example above, users can query their
configured sources, and pass their responses into json, by using the following:
dist/gofer_linux_amd64_v1/gofer data ADA/USD -o orcfax
Any number of {quote}/{base} queries can be listed and executed together.
It is possible to sign the checksums and binaries associated with a release but
this is still in testing. A GPG signature is required. Currently the process
is configured to select an [email protected]
signing key.
To create a key follow the instructions on running:
gpg --full-generate-key
The GitHub documentation provides useful information about generating a GPG key.