Skip to content

Commit

Permalink
christian-patch (#8)
Browse files Browse the repository at this point in the history
* comment out hitbtc source

* addition of query

---------

Co-authored-by: Christian-MK <[email protected]>
  • Loading branch information
Christian-MK and Christian-MK authored Apr 16, 2024
1 parent e262e1c commit 9e55092
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ 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.
Expand All @@ -56,6 +58,7 @@ 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 {
Expand All @@ -69,9 +72,26 @@ eg
}
}
```

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.


### Submitting a Query

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:

```sh
dist/gofer_linux_amd64_v1/gofer data ADA/USD -o orcfax
```

Any number of {quote}/{base} queries can be listed and executed together.

#### Signing

It is possible to sign the checksums and binaries associated with a release but
Expand Down
2 changes: 1 addition & 1 deletion config/config-gofer.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ gofer {
origin "kraken" { query = "ADA/USD" }
origin "kucoin_prices_simple" { query = "ADA/USD" }
origin "bitfinex_simple" { query = "ADA/USD" }
origin "hitbtc" { query = "ADA/USD" }
// origin "hitbtc" { query = "ADA/USD" } re-add later
}
}

Expand Down

0 comments on commit 9e55092

Please sign in to comment.