Service layer to create new API endpoints for EOS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
services force usage of usjon Nov 21, 2018
.gitignore Implementation of get_currency_balances Nov 6, 2018
docker-compose.yaml Added optional get_actions handler that can split requests Nov 20, 2018 Script to automatically create config files Nov 19, 2018


The APIs provided here are still in flux based on feedback being provided by the developer community.

For a list of API methods enabled by this project, please refer to the API Request/Response Examples wiki.


A global config file exists as ./config/.env and each API method has it's own individual config that lives in ./config/[method_name]/.env. The global file is loaded first, followed by the individual methods file, allowing each method to also override global variables for specific use-cases. These files are loaded as environmental variables and set on the specific containers for each method.

These files are not part of the git repository - but an example of each file with all possible variables exists in each folder as .env.example.

Since these files are required to exist for the containers to operate, a simple bash script has been created to automate the creation process. This file can be run from the root directory of this project.

sh ./

This script will initialize (or reinitialize) all of the various files within ./config with their default values and override any existing configuration.


This entire repository is designed to be run easily under Docker using docker-compose. With both Docker and docker-compose installed, clone this repository, enter the folder and run:

docker network create -d bridge --subnet --gateway eosio_api_network
docker-compose build
docker-compose up -d

The processes specified in the docker-compose.yaml file will be automatically configured and started.

From within the same project folder, you can tail the logs via:

docker-compose logs -f --tail="200"


Each API service will bind to a different IP address on the localhost, which can then be used via a proxy to redirect specific API requests to these new services.

  • /v1/api/get_available_endpoints runs on port 8900
  • /v1/chain/get_currency_balances runs on port 8901
  • /v1/chain/get_accounts runs on port 8902
  • /v1/chain/get_blocks runs on port 8903

nginx configuration

Within an nginx server block, simply add a new entry that redirects to the new local API service.

For example, to run the new get_currency_balances API, add a new location entry to the server block of your host:

location /v1/api/get_available_endpoints$ {

location /v1/chain/get_currency_balances$ {

location /v1/chain/get_accounts$ {

location /v1/chain/get_blocks$ {