Skip to content

hydroscan/hydroscan-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 7, 2020
a888265 · Jan 7, 2020
Jan 7, 2020
Apr 2, 2019
Nov 19, 2019
Feb 28, 2019
Feb 19, 2019
Mar 8, 2019
Mar 28, 2019
Mar 6, 2019
Oct 21, 2019
Nov 19, 2019
Jun 18, 2019
Feb 28, 2019
Sep 2, 2019
Dec 14, 2019
May 20, 2019
Nov 20, 2019
Nov 26, 2019
Nov 26, 2019

Repository files navigation

HydroScan API

CircleCI Go Report Card Docker Cloud Automated build Docker Cloud Build Status Uptime Robot status

The HydroScan backend built with Go. Collects data about Hydro Protocol exchanges and provides methods for a client to consume the data.

Components

Cron

A scheduler to pull a variety of data about running Exchanges, including current token price, trade volume, etc.

Server

Provides an API for the HydroScan client to query for data.

Requirements

  • Go version >= 1.11
  • Postgres
  • Redis

Getting Started

  1. Clone this repo to somewhere outside of GOPATH
  2. Copy .config.sample.yml to .config.yml and Set valid urls for Postgres and Redis
  3. Install the dependencies:
go mod download

If you get an error like this:

go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules'

It means you have cloned the repo inside GOPATH. To solve this, you can try cloning this repo to somewhere outside of GOPATH. Alternatively, if you want to work in your GOPATH:

$ export GO111MODULE=on    # manually active module mode

Run Cron

go run ./cmd/cron/cron.go

Run API Server

go run ./cmd/server/server.go    # Started on port 8080 by default

Contributing

  1. Fork it (https://github.com/hydroscan/hydroscan-api/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Releases

No releases published

Packages

No packages published