Coder Social home page Coder Social logo

bittrex-coins-lookup's Introduction

bittrex-coins-lookup

Simple Nodejs 8 application to look crypto currencies in real time through the terminal using the Bittrex api.

requirements

  • Nodejs 8+ installed
  • Bittrex API key and secret(NEVER put it in your code and commit, instead use environments variables locally)

Usage

You'll need to set the api key and secret as environment variable. To know how to generate API keys, take a look on the documentation.

BE AWARE: To use this API you just need the API keys to have READ permissions, It's NOT recommended giving the api keys Sell/Trade permission(at least not using this project).

By default, the script looks the market "USDT-BTC". To run just do:

  • npm install
  • API_KEY=YOUR_API_SECRET_KEY_HERE API_SECRET=YOUR_API_SECRET_KEY_HERE npm start

If you want to look at a different market, you need to set 2 environment variables: BASE_COIN and COIN. Here is an example looking the "BTC-ETH" market:

  • API_KEY=YOUR_API_SECRET_KEY_HERE API_SECRET=YOUR_API_SECRET_KEY_HERE BASE_COIN=BTC COIN=ETH npm start

Output and logs

Whenever you start running the script it'll create a folder logs and a file named as 'YOUR_BASE_COIN-YOUR_COIN' where you can check easily the whole logs.

the console will also show something like:

Analyzing Market: USDT-BTC
Your Balance: 1378.50038308 BTC
Starting cronjob to Look up your BTC balance every minute...
Current BTC value(last fills average):8265 USDT
YOUR estimated balance Value : 11393305.67 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8271.398367955 USDT
BTC UP BY 0.07741522%
YOUR estimated balance Value : 11402125.82 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8277.79673591 USDT
BTC UP BY 0.07735534%
YOUR estimated balance Value : 11410945.97 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8288.89336794 USDT
BTC UP BY 0.13405297%
YOUR estimated balance Value : 11426242.68 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8299.98999997 USDT
BTC UP BY 0.13387350%
YOUR estimated balance Value : 11441539.39 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8299.98999997 USDT
YOUR estimated balance Value : 11441539.39 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8299.99999998 USDT
BTC UP BY 0.00012048%
YOUR estimated balance Value : 11441553.18 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8299.99999999 USDT
BTC UP BY 0.00000000%
YOUR estimated balance Value : 11441553.18 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8299.99999998 USDT
BTC DOWN BY 0.00000000%
YOUR estimated balance Value : 11441553.18 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8299.98999997 USDT
BTC DOWN BY 0.00012048%
YOUR estimated balance Value : 11441539.39 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Current BTC value(last fills average):8299.996666616666 USDT
BTC UP BY 0.00008032%
YOUR estimated balance Value : 11441548.58 USDT (1378.50038308 BTC)
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Errors

If you just try to run npm start, you might notice the following error:

TypeError: Cannot read property 'sigBytes' of undefined

It happens because you tried to run the script without the API_KEY and API_SECRET setup. The library(node-bittrex-api) we're using does not allow starting connections without the api key and secret.

bittrex-coins-lookup's People

Contributors

marcogbarcellos avatar

Watchers

 avatar  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.