Giter VIP home page Giter VIP logo

crypto-price-checker's Introduction

crypto-price-checker

区块链价格实时获取工具包 Blockchain token price real-time acquisition toolkit

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You will need to have nodejs installed in order to run. You will also need npm but this is installed with nodejs.

Installing

First you will clone or download this repository, then open your favorite text editor, mine is vscode. Then open up the console and do the following command.

npm install

Now you will need to get an api key from cryptocompare for free. All recieve your discord bot token from the discord developer portal. Once you recieve those items put them inside the config.json file.

Running the tests

Try running it now with this simple command inside the console.

node index.js

Use

Para comenzar a utilizar crypto-price.js, simplemente importa el paquete en tu proyecto y llama a las funciones disponibles. Aquí tienes un ejemplo de cómo obtener el precio de Bitcoin (BTC) en dólares estadounidenses (USD):

const getCryptoPrice = require('crypto-price-checker-oooooyoung');

(async () => {
  try {
    const tokenPrice = await getCryptoPrice('BTC');
    console.log(tokenPrice);
  } catch (error) {
    console.error(error);
  }
})();

Deployment

If you would like to run this 24/7 off your personal machine I would reccomend using the free credit given with google cloud, and create a server. You can make sure it runs all the time with a npm package named PM2 which will restart if errors or crashes happen.

Built With

Authors

crypto-price-checker's People

Contributors

nopapername avatar

Watchers

 avatar

Forkers

pansheng777

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.