Giter VIP home page Giter VIP logo

coins's Introduction

Coins

Pricing-service

This service is responsible for fetching USD prices for 3 tokens (BTC, ETH, USDT) every minute from Coinmarketcap API and storing them locally.

this service exposes a grpc endpoint so clients can request coins prices.

Client-Service

This service is responsible for fetching USD prices for 3 tokens (BTC, ETH, USDT) every minute from Pricing-service API and printing it the stdout.

Usage

clone the repo and run make this will get all dependencies and build the 2 binaries

after running this u will see server and client binary

just run the binaries and see the output

if needed server adders and api-key can be change via flags just run --help if needed client adders can be change via flags just run --help

Output

the client out put will look like:

INFO[2580] BTC: 18854.566030, 18842.675561, -0.06%      
INFO[2580] ETH: 1427.584936, 1426.820354, -0.05%        
INFO[2580] USDT: 1.000098, 1.000102, 0.00%            

Note

Make sure the server is running at the same time to get the desired output.

coins's People

Contributors

aviscode avatar

Watchers

 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.