Git Product home page Git Product logo

ethgasstation-api's Introduction

ethgasstation-api

A REST-ish API for ethgasstation data.

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.

Installation

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.

Configuration

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 spawn
  • SETTINGS_FILE: Path to a settings.conf file
  • NODE_ENV: The Node environment variable
  • NO_RATE_LIMIT: Disables rate limiting if set

Usage

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.

ethgasstation-api's People

Contributors

10a7 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.