gtklocker / bittrex-orderbook Goto Github PK
View Code? Open in Web Editor NEWFollow the bittrex.com orderbook in real time
Follow the bittrex.com orderbook in real time
Hello,
How can I detect a disconnection of the websocket?
Is it only a single websocket for all streams or multiple websockets?
Thanks
Any chance of support bittrex v3 coming up soon?
To reproduce:
app/package.json
{
"dependencies": {
"bittrex-orderbook": "2.0.5",
"react": "16.2.0",
"react-dom": "16.2.0",
"react-scripts": "1.0.17"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build"
}
}
app/src/index.js
import { render } from 'react-dom';
render(null, document.getElementById('root'));
// ..
const Book = require('bittrex-orderbook');
const book = new Book();
book
.market('USDT-BTC')
.on('bidUpdate', market => console.log('bids', market.bids.top(5)));
book
.market('USDT-BTC')
.on('askUpdate', market => console.log('asks', market.asks.top(5)));
app/public/index.html
<div id="root"></div>
cd app && yarn && yarn start
or cd app && npm i && npm start
i get this error,
my code=>
const BittrexOrderBook = require('bittrex-orderbook');
const bit = new BittrexOrderBook;
bit.market('BTC-XRP').on('bidUpdate', (market) => {
console.log('XRP bids', market.bids.top(5));
});
bit.market('BTC-XRP').on('askUpdate', (market) => {
console.log('XRP asks', market.asks.top(5));
});
bit.market('BTC-ETH').on('bidUpdate', (market) => {
console.log('ETH bids', market.bids.top(5));
});
bit.market('BTC-ETH').on('askUpdate', (market) => {
console.log('ETH asks', market.asks.top(5));
});
Today I started to get the following error:
Error Message: Negotiate Unknown
Exception: undefined
Error Data: 503
Even the demo code provided throws the same error.
const BittrexOrderBook = require('bittrex-orderbook');
const bit = new BittrexOrderBook;
bit.market('BTC-XMR').on('bidUpdate', (market) => {
console.log('XMR bids', market.bids.top(5));
});
bit.market('BTC-ETH').on('askUpdate', (market) => {
console.log('ETH asks', market.asks.top(5));
});
hi,
is this project in progress?
cos it dosent work for me
I'm using your library and it seems it has no reconnection functionality with restarting orderbook stream. Do you plan to add it, or could you suggest what should be updated if I will implement it on my own?
Hello.
I can't seem to be able to disconnect the websocket after I get the data I need. I've looked in the files but couldn't not find a way. Is there anything I am missing ?
We want to allow subscribing to multiple markets concurrently. This will require some API changes, detailed below:
bit = new BittrexOrderBook(market)
to bit = new BittrexOrderBook([market])
.OrderBook
.bit.followMarket(market)
bit.unfollowMarket(market)
askUpdate
we have to know which market it refers to:
bit.on('askUpdate', (market) => { console.log(market.getTopAsk(...)); })
.id
or .name
property so that we can differentiate between them.bit.getMarket('BTC-XMR').on('askUpdate', (market) => { console.log(market.getTopAsk(...)); })
cc @askmike
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.