Giter Site home page Giter Site logo

coinranking / exchanges Goto Github PK

View Code? Open in Web Editor NEW
119.0 7.0 52.0 21.28 MB

An open source JavaScript library for fetching tickers from cryptocurrency exchanges

Home Page: https://coinranking.com

License: MIT License

JavaScript 100.00%
cryptocurrencies cryptocurrency crypto altcoin bitcoin ethereum coin exchanges decentralized dex

exchanges's Introduction

code-style Commitizen friendly npm (scoped) codecov

Exchanges πŸ“‰πŸ“ˆ

A JavaScript library for getting up to date cryptocurrency exchange tickers.

Getting started

  1. Node.js 14.0 or higher is required
  2. Install using NPM

Installation

Coinranking Exchanges is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 14.0 or higher is required.

Installation is done using the npm install command:

npm i @coinranking/exchanges

Usage

List all supported drivers

const exchanges = require('@coinranking/exchanges');

console.log(exchanges.list());

Get the tickers of a specific exchange

const { Binance } = require('@coinranking/exchanges');

const driver = new Binance();

driver
  .fetchTickers()
  .then((tickers) => {
    console.log(tickers);
  });

Development

Getting started

Install dependencies

npm install

Usage

List all supported drivers

node lib/cli.js list

Get the tickers of a specific exchange

node lib/cli.js tickers [name of the exchange]
Flags
Name Flag Description
Record -R, --record Record the requests, and save them as fixtures.
API Key -k, --key For passing down an API key when the driver requires one. When used in combination with the -R flag the key will be masked in the fixtures.

Documentation

See the documentation for more information.

Contributing

Bug reports and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Adding an exchange

  1. Add a new driver (see the examples)
  2. Add the driver alphabetically to drivers/index.js
  3. Add a new fixture (use the record option of the CLI 'tickers' command)

Single API calls are highly preferred. When adding an exchange be aware of the base and quote. A driver should at least support base, quote, close and baseVolume or quoteVolume. And optionally open, high, low, ask, bid, baseName, baseReference, quoteName and quoteReference.

Listing requirements

Before we approve your pull request, we’d like to review the exchange and check if it meets our listing requirements.

Ticking off all the boxes? Cool! Send us your listing request at [email protected] and include your daily trading volume + a link to your platform. We will then review your exchange ASAP.

Examples

  • Driver basis: Shows the basic setup of a driver, which can be used as the starting point for new ones.
  • Driver with API key: Shows how to set up a driver that uses an API which requires a key.

Conventions

  1. Airbnb JavaScript Style Guide
  2. Conventional commits

Links

Reach out to us

Other

License

MIT

exchanges's People

Contributors

abdul avatar corgiswap avatar dependabot-preview[bot] avatar dependabot[bot] avatar mariannegdg avatar markjkooistra avatar mrmikeo avatar nchaintrade avatar nickpater avatar riccardoparrello avatar romitkarmakar avatar sajcics avatar semantic-release-bot avatar wouthoekstra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

exchanges's Issues

Integration: [exchange name]

Exchange name
Provide the name of the exchange.

Website
Provide the website link of the exchange.

API endpoint
Provide a link to an API endpoint to fetch all market tickers. The endpoint must at least contain a 'last price' (or 'close price') and 'trading volume'.

API documentation
Provide a link to the API documentation of the exchange.

Integration: [exchange name]

Exchange name
Provide the name of the exchange.

Website
Provide the website link of the exchange.

API endpoint
Provide a link to an API endpoint to fetch all market tickers. The endpoint must at least contain a 'last price' (or 'close price') and 'trading volume'.

API documentation
Provide a link to the API documentation of the exchange.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Why no bybit driver?

Hi Guys,

Excellent job thus far but quick question, Why no bybit driver? I know this is not too hard to add but one would have assumed it would be a default given the volume bybit turnsover?

Thanks.

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.