Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makerdao/setzer-mcd
https://github.com/makerdao/setzer-mcd
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/makerdao/setzer-mcd
- Owner: makerdao
- License: gpl-3.0
- Created: 2019-02-28T22:39:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T13:55:35.000Z (about 1 year ago)
- Last Synced: 2024-04-06T09:34:20.919Z (7 months ago)
- Language: Shell
- Homepage:
- Size: 315 KB
- Stars: 4
- Watchers: 13
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-smart-contract-development - MCD Setzer
- awesome-dapptools - MCD Setzer
README
# Setzer MCD
Query USD price feeds
## Usage
```
Usage: setzer []
or: setzer --helpCommands:
help Print help about setzer or one of its subcommands
pairs List all supported pairs
price Show price(s) for a given asset or pair
sources Show price sources for a given asset or pair
test Test all price feeds
```## Installation
Dependencies:
* GNU [bc](https://www.gnu.org/software/bc/)
* [curl](https://curl.haxx.se/download.html)
* GNU [datamash](https://www.gnu.org/software/datamash/)
* GNU `date`
* [jshon](http://kmkeen.com/jshon/)
* GNU `timeout`Install via make:
* `make link` - link setzer into `/usr/local`
* `make install` - copy setzer into `/usr/local`
* `make uninstall` - remove setzer from `/usr/local`## Configuration
* `SETZER_CACHE` - Cache directory (default: ~/.setzer)
* `SETZER_CACHE_EXPIRY` - Cache expiry (default: 60) seconds
* `SETZER_TIMEOUT` - HTTP request timeout (default: 10) seconds## wstETH pair requirement
Due to process of pulling details from mainnet for getting price information.
You need to set `ETH_RPC_URL` environemnt variable. By default it will point to `http://127.0.0.1:8545`.Example of usage:
```bash
export ETH_RPC_URL="https://mainnet.infura.io/v3/fac98e56ea7e49608825dfc726fab703"
```### Fx/Exchangerates API Key
Since latest changes in Exchangerates API, now it requires API key.
To set API Key for this exchange you can use `EXCHANGERATES_API_KEY` env variable.Example:
```bash
$ EXCHANGERATES_API_KEY=your_api_key setzer fx krwusd
```