Skip to content

Iphytech/btc_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1757470 · Mar 10, 2020

History

4 Commits
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 10, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 9, 2020

Repository files navigation

How to use

Clone the repo https://github.com/Iphytech/btc_calculator.git to your computer

change to the project directory

NB: There is no database (because we ain't going to make use of it).

go to the terminal and run bundle or bundle install

We are making use of Net::HTTP for the restful api calls - Read more about it here (https://apidock.com/ruby/Net/HTTP)

And we are consuming data from Coindesk APi endpoint

Start the project and test what we have built

rails s or rails server

Then open your browser and type http://localhost:3000/graphiql

sample request

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

sample response

{
  "data": {
    "calculatePrice": {
      "price": 2937074.4355499996
    }
  }
} 

NB: If you encounter this error message when serving the app Your Yarn packages are out of date!

Please run yarn install --check-files to update.

About

A simple BTC to NGN calculator built with ruby and graphql.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published