All Projects → dang1412 → ccex-api

dang1412 / ccex-api

Licence: other
Cryptocurrency exchanges realtime api wrapper

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ccex-api

Cryptofeed
Cryptocurrency Exchange Websocket Data Feed Handler
Stars: ✭ 643 (+2117.24%)
Mutual labels:  coinbase, bitfinex, binance
Trading Indicator
provide trading technical indicator values based on data of almost crypto currency exchanges
Stars: ✭ 31 (+6.9%)
Mutual labels:  coinbase, bitfinex, binance
Nescience-Indexing-CLI
Nescience Software & Capital Rebalancing Tool
Stars: ✭ 26 (-10.34%)
Mutual labels:  coinbase, bitfinex, binance
Crypto vba
An Excel/VBA project to communicate with various cryptocurrency exchanges APIs
Stars: ✭ 103 (+255.17%)
Mutual labels:  coinbase, bitfinex, binance
add-tradingview-alerts-tool
Automated entry of TradingView alerts for bot trading tools such as 3Commas, Alertatron, CryptoHopper, etc.
Stars: ✭ 467 (+1510.34%)
Mutual labels:  coinbase, tradingview, binance
Krypto Trading Bot
Self-hosted crypto trading bot (automated high frequency market making) written in C++
Stars: ✭ 2,589 (+8827.59%)
Mutual labels:  coinbase, bitfinex, binance
Crypto Trading Bot
Cryptocurrency trading bot in javascript for Bitfinex, Bitmex, Binance, FTX, Bybit ... (public edition)
Stars: ✭ 1,089 (+3655.17%)
Mutual labels:  coinbase, bitfinex, binance
Exchanges Php
This is a virtual currency SDK that brings together multiple exchanges
Stars: ✭ 134 (+362.07%)
Mutual labels:  coinbase, bitfinex, binance
Coinpricebar
💰 Cryptocurrency prices on MacBook Touch Bar
Stars: ✭ 290 (+900%)
Mutual labels:  coinbase, binance
Gitbitex Spot
An Open Source Cryptocurrency Exchange
Stars: ✭ 320 (+1003.45%)
Mutual labels:  coinbase, bitfinex
Blankly
🚀 💸 Easily build, backtest and deploy your algo in just a few lines of code. Trade stocks, cryptos, and forex across exchanges w/ one package.
Stars: ✭ 1,456 (+4920.69%)
Mutual labels:  coinbase, binance
Crypto Signal
Github.com/CryptoSignal - #1 Quant Trading & Technical Analysis Bot - 3,100+ stars, 900+ forks
Stars: ✭ 3,690 (+12624.14%)
Mutual labels:  coinbase, binance
BitView
A crypto portfolio written in Flutter. It supports Binance, Bittrex, HitBTC, Coinbase, Coinbase Pro and Mercatox
Stars: ✭ 50 (+72.41%)
Mutual labels:  coinbase, binance
Crypto Rl
Deep Reinforcement Learning toolkit: record and replay cryptocurrency limit order book data & train a DDQN agent
Stars: ✭ 328 (+1031.03%)
Mutual labels:  coinbase, bitfinex
CoinTaxman
Calculate your taxes from cryptocurrency gains
Stars: ✭ 110 (+279.31%)
Mutual labels:  coinbase, binance
My Token
📈Track token prices of your favorite exchanges in terminal!
Stars: ✭ 141 (+386.21%)
Mutual labels:  bitfinex, binance
Ccxws
WebSocket client for 38 cryptocurrency exchanges
Stars: ✭ 341 (+1075.86%)
Mutual labels:  coinbase, binance
CryptoTickerBot
A .NET Core program to fetch ticker data from various crypto exchange websites.
Stars: ✭ 30 (+3.45%)
Mutual labels:  coinbase, binance
Xchange.js
Bitcoin and Altcoin exchange api aggregator / wrapper
Stars: ✭ 74 (+155.17%)
Mutual labels:  coinbase, bitfinex
Cassandre Trading Bot
Cassandre makes it easy to create your Java crypto trading bot. Our Spring boot starter takes care of exchange connections, accounts, orders, trades, and positions.
Stars: ✭ 120 (+313.79%)
Mutual labels:  coinbase, binance

CircleCI Build Status

ccex-api

Cryptocurrency exchanges client api wrapper.

Features

These features are supported with all major exchanges

  • Public realtime api.
  • Public rest api.
  • Support for both Nodejs and Browser (Webpack, React, Angular...see samples below) environments.
  • Modular structure make sure you include minimum code as you need (especially for client side application).
  • Option to bypass cors request problem in browser with proxy.
  • More to come: Tradingview realtime datafeed, private rest api with api/secret key...

Prequisite

  • Using crypto to sign private request requrie node 10.
  • This library is built on top of Typescript and Rxjs (v6). All async functions will return an observable stream so familiar with Rxjs would be an advantage but basically using stream .subscribe((data) => {/**/}) method should be sufficient. You can also easily turn an one-time-complete observable (rest API request) into promise using .toPromise() to be used with async await.

Sample

Supported Exchanges

Binance, Bitbank, Bitfinex, Coinbase

id/docs homepage version origin country
Binance binance Binance * API China
Bitbank bitbank Bitbank * API Japan
Bitfinex bitfinex Bitfinex 2 API British Virgin Islands
Coinbase coinbase Coinbase * API US

Roadmap (TODO)

Task Date Status
Binance Private User Data Stream 2018/09
Binance Private Api 2018/12
Bitbank, Bitifnex, Coinbase private stream 2019/Q1
Huobi, Okex 2019/Q1
More exchanges 2019/Q2
Python and Go version 2019/Q3, Q4

Usage

This library is designed to be usable in both nodejs and browser (with frontend framework like Angular, React, Vue..., with bundle tools like Webpack or Rollup having typescript configured, the umd javascript file coming later) environments.

When used in browser environment, the browser must support for native

Installation

npm i --save ccex-api

Simple use

import { BinanceApi } from 'ccex-api/exchanges/binance;

const binanceApi = new BinanceApi();

binanceApi.fetchTicker$('btc_usdt').subscribe(ticker => console.log(ticker));
binanceApi.ticker$('btc_usdt').subscribe(ticker => console.log(ticker));
setTimeout(() => { binanceApi.stopTicker('btc_usdt') }, 5000);

Or you can include only the part that you need

import { BitbankCandlestick } from 'ccex-api/exchanges/bitbank/candlestick;

const bitbankCandlestick = new BitbankCandlestick();
bitbankCandlestick.getApproximateHistoryPrice('btc_jpy', 1526917534904, 1).subscribe(price => console.log(price));

Api

Basically all exchanges have these following unified, generalized api implemented.

api params return value desctiption
exchangeInfo ExchangeInfo
markets string[] All supported markets (pair)
representativeMarkets string[] Major supported markets (used for test purpose)
supportFeatures SupportFeatures
fetchTicker$ pair: string Observable<Ticker> api request for ticker
ticker$ pair: string Observable<Ticker> realtime ticker stream
stopTicker pair: string stop realtime ticker stream
fetchTrades$ pair: string Observable<Trade> api request for trade
trade$ pair: string Observable<Trade> realtime trade stream
stopTrade pair: string stop realtime trade stream
fetchOrderbook$ pair: string Observable<Orderbook> api request for orderbook
orderbook$ pair: string Observable<Orderbook> realtime orderbook stream
stopOrderbook pair: string stop realtime orderbook stream
fetchCandleStickRange$ pair: string
minutesFoot: number
start: number
end: number
Observable<CandleStick[]> api request for candlestick
lastCandle$ pair: string
minutesFoot: number
lastCandle: CandleStick
Observable<CandleStick> Realtime candlestick stream, calculated from an initial lastCandle and realtime trade stream.
This function is useful in implementing Tradingview datafeed

Besides, an exchange may have more specific functions, it depends on exchange provided features and implementation. In that case, specific guide for that exchange will be located at exchanges/{exchange}/README.md (TODO)

Contribution guide

In order to add a new exchange, simply clone folder src/exchanges/sample, rename, implement functions and include appropiate tests for sub-modules (ticker, orderbook...) and some internal functions.

Finally make sure the exchange sample pass predefined test by running

npm run test sample

If you find a bug or anything should be added to fit your need, please create issue. This is still in very early stage so any feedback would be much appreciated.

Test

We can test all or 1 specific exchange. Note that a realtime test can fail by timeout according to server data stream coming late.

Test all

npm run test

Test specific exchanage

npm run test binance
npm run test bitbank

Dependencies

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].