This API is an Express-based middleware layer for the ethgasstation oracle.
You can view 10a7's working copy tracking master/unstable at gasstation.etheria.io. Do not rely on this endpoint for production usage, as it will break. For the stable and canonical ETH Gas Station implementation, always visit ethgasstation.info.
To run:
npm install
node app.js
A Dockerfile is included for deployment as well. To run the Docker image:
docker build -t ethgasstation-api .
docker run -p 8080:8080 ethgasstation-api
This will expose and forward port 8080 from the image. Note that the docker image runs in production mode by default.
The primary way to configure the API is with the settings.conf file. You may see the default settings file at settings.docker.conf, which is used by the docker pipeline.
Specific options may also be overridden by environment variables. These are:
PORT
: The port the server runs on (default 8080)WORKER_PROCESSES
: Number of worker processes to spawnSETTINGS_FILE
: Path to a settings.conf fileNODE_ENV
: The Node environment variableNO_RATE_LIMIT
: Disables rate limiting if set
API Documentation for the v1 API is in docs/v1.md
. v0 API was an original
proof of concept and will be deprecated, as the current ETH Gas Station backend
no longer produces JSON files by default.