Giter VIP home page Giter VIP logo

cryptoboard's People

Contributors

gmanroney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bjm1244 thl2ee

cryptoboard's Issues

Exchange: GDAX

{
  "name": "gdax",
  "docurl": "https://docs.gdax.com/#websocket-feed",
  "wssurl": "wss://ws-feed.gdax.com",
  "pairs": "BTCUSD, LTCUSD, LTCBTC, ETHUSD, ETHBTC, ETCUSD, ETCBTC, BFXUSD, BFXBTC, RRTUSD, RRTBTC, ZECUSD, ZECBTC",
  "active": "N"
}

Start process for exchange using command line options

Going to add ability to send exchange name from command line e.g. server.js hitbtc so the same code can run up exchanges independently. For now options will be
server.js -> do nothing
server.js hitbtc -> do hitbtc
server.js bitfinex -> do bitfinex

Exchange: BINANCE

{
  "name": "binance",
  "docurl": "https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md",
  "wssurl": "wss://stream.binance.com:9443",
  "pairs": "BTCUSD, LTCUSD, LTCBTC, ETHUSD, ETHBTC, ETCUSD, ETCBTC, BFXUSD, BFXBTC, RRTUSD, RRTBTC, ZECUSD, ZECBTC",
  "active": "N"
}

Exchange: BITSTAMP

{
  "name": "bitstamp",
  "docurl": "https://www.bitstamp.net/websocket/",
  "wssurl": "???",
  "pairs": "BTCUSD, LTCUSD, LTCBTC, ETHUSD, ETHBTC, ETCUSD, ETCBTC, BFXUSD, BFXBTC, RRTUSD, RRTBTC, ZECUSD, ZECBTC",
  "active": "N"
}

Exchange: OKEX

{
  "name": "okex",
  "docurl": "https://www.okex.com/ws_getStarted.html",
  "wssurl": "wss://real.okex.com:10440/websocket/okexapi",
  "pairs": "BTCUSD, LTCUSD, LTCBTC, ETHUSD, ETHBTC, ETCUSD, ETCBTC, BFXUSD, BFXBTC, RRTUSD, RRTBTC, ZECUSD, ZECBTC",
  "active": "N"
}

Exchange: HUOBIAPI

{
  "name": "huobiapi",
  "docurl": "https://github.com/huobiapi/API_Docs_en/wiki/WS_General",
  "wssurl": "wss://api.huobi.pro/ws",
  "pairs": "BTCUSD, LTCUSD, LTCBTC, ETHUSD, ETHBTC, ETCUSD, ETCBTC, BFXUSD, BFXBTC, RRTUSD, RRTBTC, ZECUSD, ZECBTC",
  "active": "N"
}

Intermittent bug with BITFINEX exchange feed

Basic function working but it crashes some time after start with the following error:

BITFINEX wss://api.bitfinex.com/ws BTCUSD
BITFINEX wss://api.bitfinex.com/ws LTCUSD
BITFINEX wss://api.bitfinex.com/ws LTCBTC
BITFINEX wss://api.bitfinex.com/ws ETHUSD
BITFINEX wss://api.bitfinex.com/ws ETHBTC
BITFINEX wss://api.bitfinex.com/ws ETCUSD
BITFINEX wss://api.bitfinex.com/ws ETCBTC
BITFINEX wss://api.bitfinex.com/ws BFXUSD
BITFINEX wss://api.bitfinex.com/ws BFXBTC
BITFINEX wss://api.bitfinex.com/ws RRTUSD
BITFINEX wss://api.bitfinex.com/ws RRTBTC
BITFINEX wss://api.bitfinex.com/ws ZECUSD
BITFINEX wss://api.bitfinex.com/ws ZECBTC
Finshed launch
Connected to Redis Server
events.js:160
throw er; // Unhandled 'error' event
^
Error: unexpected server response (429)
at ClientRequest._req.on (/Users/germoroney/Development/cryptoboard/node_modules/ws/lib/WebSocket.js:653:21)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:473:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at TLSSocket.socketOnData (_http_client.js:362:20)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at TLSSocket.Readable.push (_stream_readable.js:134:10)
[nodemon] app crashed - waiting for file changes before starting...

The number of clients connecting to redis to read data were initially thought to be related but this was found to be misleading. Happens with 1, 2 or 3 clients connecting to REDIS.

Error message found in https://github.com/bitfinexcom/bitfinex-api-node seems to be related to BITFINEX service itself ....

Exchange: GEMINI

{
  "name": "gemini",
  "docurl": "https://docs.gemini.com/websocket-api/#market-data",
  "wssurl": "wss://api.gemini.com/v1/marketdata/:symbol",
  "pairs": "BTCUSD, LTCUSD, LTCBTC, ETHUSD, ETHBTC, ETCUSD, ETCBTC, BFXUSD, BFXBTC, RRTUSD, RRTBTC, ZECUSD, ZECBTC",
  "active": "N"
}

Exchange: BITTREX

{
  "name": "bittrex",
  "docurl": "https://www.npmjs.com/package/node.bittrex.api",
  "wssurl": "???",
  "pairs": "BTCUSD, LTCUSD, LTCBTC, ETHUSD, ETHBTC, ETCUSD, ETCBTC, BFXUSD, BFXBTC, RRTUSD, RRTBTC, ZECUSD, ZECBTC",
  "active": "N"
}

Exchange: HITBTC

{
  "name": "hitbtc",
  "docurl": "https://api.hitbtc.com/#socket-market-data",
  "wssurl": "wss://api.hitbtc.com/api/2/ws",
  "pairs": "BTCUSD, LTCUSD, LTCBTC, ETHUSD, ETHBTC, ETCUSD, ETCBTC, BFXUSD, BFXBTC, RRTUSD, RRTBTC, ZECUSD, ZECBTC",
  "active": "N"
}

General Requirements For Each Exchange

  1. Connect to websocket api interface (using native library, if exists);
  2. Read JSON-config file with Redis connection settings as list of symbols (symbo usually consist of coin and currenct);
  3. Subscribe to trade data on given symbols
  4. Push all trades to the Redis to queue named Exchange:Symbol as array of [timestamp, trade_id(if exists), price, amount, side(buy/sell)]
  5. Application will reconnect on connection fail and be optimized for speed / throughput.

Basic analytics on trade records

Analyse records as subscriber from redis and get:

  • Record count by type (buy,sell)
  • Total amount of trade (buy,sell)
  • Average amount of trade (buy,sell)
  • Median amount of trade (buy,sell)
  • Delta between total amount bought and sold

This will be part of the client in addition to the record.

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.