/coin-box

A BTC price calculator

Primary LanguageRuby

KEY BADGE
AUTHOR Jiggy
BUILD STATUS Build Status
MAINTAINABILITY Maintainability
TEST COVERAGE Test Coverage

GRAPHIQL COIN-BOX

This API is A graphql-powered interface running on the ruby on rails framework.

SETUP

  • Ruby version
  • 2.6.0
  • Bundler version
  • 2.1.4
  • System dependencies
  • Once this repository is pulled, run bundle install in the working directory to install the necessary dependencies
  • Database creation
  • Run bin/rails db:create
  • How to run the test suite
  • Run bundle exec rspec spec

USAGE

SAMPLE REQUEST:

{
  calculatePrice(
    type: "sell"
    margin: 0.1
    exchangeRate: 363.5
  ) {
    price
  }
}

SAMPLE RESPONSE:

{
  "data": {
    "calculatePrice": {
      "price": 3260359.46
    }
  }
}