Git Product home page Git Product logo

api-challenge's Introduction

Install InfluxDB on local machine

https://docs.influxdata.com/influxdb/v0.13/introduction/installation/

Then create the database

curl 'http://localhost:8086/query' --data-urlencode "q=CREATE DATABASE rate"

Run the project

You don't need to install anything. All you need is you have java installed. Then run

./gradlew bootRun

Let it runs for 30 sec to a minute so that it can save some data to the db and then you are ready to test.

Endpoints

http://localhost:8080/rates/average

http://localhost:8080/rates/historical/:time e.g. http://localhost:8080/rates/historical/2016-08-19T15:12:45Z

http://localhost:8080/rates/historical/:time/:exchange e.g. http://localhost:8080/rates/historical/2016-08-19T15:12:45Z/okcoinus

:time - ISO datetime format yyyy-MM-dd'T'HH:mm:ss.SSSZ e.g. 2016-08-19T15:12:45Z 2016-08-19T15:12:42Z -> would round to 2016-08-19T15:12:40Z

:exchange - current available options are: okcoinus bitfinex

Note

Create database

curl 'http://localhost:8086/query' --data-urlencode "q=CREATE DATABASE rate"

Drop database

curl 'http://localhost:8086/query' --data-urlencode "q=DROP DATABASE rate"

API Source Endpoints

https://www.okcoin.com/api/v1/ticker.do?symbol=btc_usd

https://api.bitfinex.com/v1/pubticker/btcusd

api-challenge's People

Contributors

kwongpan avatar

Watchers

Tyson Malchow avatar James Cloos 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.