# crypto-exchange-interface

> Interface to access market data from all of the major crypto exchanges using a simple API.

Latest version **1.0.3** (published 2018-01-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install crypto-exchange-interface
pnpm add crypto-exchange-interface
yarn add crypto-exchange-interface
bun add crypto-exchange-interface
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-01-02 |
| First published | 2018-01-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | texas_delaney |

## Links

- npm: https://www.npmjs.com/package/crypto-exchange-interface
- npm.io page: https://npm.io/package/crypto-exchange-interface

## Dependencies (4)

- [request](https://npm.io/package/request.md) ^2.83.0
- [whatwg-fetch](https://npm.io/package/whatwg-fetch.md) ^2.0.3
- [babel-register](https://npm.io/package/babel-register.md) ^6.26.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.2

## Recent versions

- 1.0.3 (latest) — 2018-01-02
- 1.0.2 — 2018-01-02
- 1.0.1 — 2018-01-02
- 1.0.0 — 2018-01-02

## README

# Node-Crypto-Exchange-Interface
Interface to access market data from all of the major crypto exchanges using a simple API.


Gives access to the bid/ask spread for a given currency pair with the following exchanges:

- Binance
- Bitfinex
- Bittrex
- Bitstamp
- Ccex
- Cryptopia
- Gdax
- Gemini
- Hitbtc
- Itbit
- Kraken
- Liqui
- Novaexchange
- Poloniex
- Shapeshifter
- Yobit

## use:

Tickers must be in format SYMBOL_BASE e.g. ETH_BTC, XVG_BTC, XMR_BTC

Install `npm i crypto-exchange-interface --save`

```javascript
import CEI from 'crypto-exchange-interface'


let cei = new CEI

cei.getSpread("ETH_BTC").then(res => {
  console.log(res)

  /* returns
  {
    Binance: { askPrice: '0.06294600', bidPrice: '0.06292800' },
    Bitfinex: { askPrice: 0.0627, bidPrice: 0.062698 },
    Bittrex: { askPrice: 0.062769, bidPrice: 0.06270013 },
    Bitstamp: { askPrice: '0.06268002', bidPrice: '0.06262001' },
    Ccex: { askPrice: 0.0618989, bidPrice: 0.06030929 },
    Cryptopia: { askPrice: 0.06304302, bidPrice: 0.06298877 },
    Gdax: { askPrice: '0.06253', bidPrice: '0.06252' },
    Gemini: { askPrice: '0.06289', bidPrice: '0.06239' },
    Hitbtc: { askPrice: '0.062843', bidPrice: '0.062801' },
    Kraken: { askPrice: '0.062500', bidPrice: '0.062160' },
    Liqui: { askPrice: 0.06289371, bidPrice: 0.06255235 },
    Novaexchange: { askPrice: '0.05289999', bidPrice: '0.04925145' },
    Poloniex: { askPrice: '0.06269997', bidPrice: '0.06269297' },
    Shapeshifter: { askPrice: '0.06256733', bidPrice: '0.06256733' },
    Yobit: { askPrice: 0.0629, bidPrice: 0.06282082 }
  }
  */
})
```

---
_Source: https://npm.io/package/crypto-exchange-interface · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
