tiagosiebler / TriangularArbitrage

Detect triangular arbitrage opportunities within Binance price tickers
566 stars 174 forks source link

TypeError: exchange.WS.onAllTickerStream is not a function #60

Closed GestaltzerfaIl closed 4 years ago

GestaltzerfaIl commented 4 years ago

Hi, I've been getting this error, not sure how to solve it. Any ideas?

TypeError: exchange.WS.onAllTickerStream is not a function at Object.CurrencyCore.startAllTickerStream (/home/test/TriangularArbitrage/lib/CurrencyCore.js:342:60) at CurrencyCore.init (/home/test/TriangularArbitrage/lib/CurrencyCore.js:21:16) at module.exports (/home/test/TriangularArbitrage/lib/BotCore.js:41:48) at /home/test/TriangularArbitrage/index.js:86:27 at DBCore.startupDB (/home/test/TriangularArbitrage/lib/DBCore.js:5:12) at Object. (/home/test/TriangularArbitrage/index.js:71:24) at Module._compile (internal/modules/cjs/loader.js:1123:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10) at Module.load (internal/modules/cjs/loader.js:972:32) at Function.Module._load (internal/modules/cjs/loader.js:872:14)

ghost commented 4 years ago

The script itself is out of date. The binance API was changed a few months ago.

ghost commented 4 years ago

The editor did a good job at the start, even if there were some calculation errors.

It is not an arbitration bot, just a tool to display opportunities. I modified it to become one, and frankly it works pretty well, but don't expect the Jackpot;

GestaltzerfaIl commented 4 years ago

I see, that's unfortunate. I just wanted to use it like how you described it, a tool to display opportunities.

ghost commented 4 years ago

I just tested, in "testmod" mode it displays the information well.

Good .. They are false, but the script still works.

Capture

ghost commented 4 years ago

In " conf.ini " -> useMongo=false

In Files " .keys-template " rename to " .keys "

Use NodeJS Lasted version

npm install npm start

And it's Good :)

tiagosiebler commented 4 years ago

The editor did a good job at the start, even if there were some calculation errors.

It is not an arbitration bot, just a tool to display opportunities. I modified it to become one, and frankly it works pretty well, but don't expect the Jackpot;

I've not dabbled with this project for a while, but if you have improvements you wish to contribute for demonstrative purposes, I'll happily review any pull requests. Even if just for the "displaying opportunities" aspect of this.

ghost commented 4 years ago

I will see to extract the calculation system for you. The bot part, it bothers me a bit to share it freely, because after many tests, it is for single use.

Two people using the bot has the effect of cutting profits in half, which is not "top". Capture

We changed it well, and you did a great job at the start. "Respect".

I'm going to see the improvements for you and send this to you.

tiagosiebler commented 4 years ago

I will see to extract the calculation system for you. The bot part, it bothers me a bit to share it freely, because after many tests, it is for single use.

Two people using the bot has the effect of cutting profits in half, which is not "top". Capture

We changed it well, and you did a great job at the start. "Respect".

I'm going to see the improvements for you and send this to you.

Thanks TAKX, I totally understand about sharing the trading part of this - you don't have to share that, for obvious reasons. My suggestion was purely on the display part of this where you've found things that were broken or outdated and have quick contributions to add, so others can still use this as a learning tool or for displaying the state of these tickers.

Hope this has helped you make some profits either way!

GestaltzerfaIl commented 4 years ago

In " conf.ini " -> useMongo=false

In Files " .keys-template " rename to " .keys "

Use NodeJS Lasted version

npm install npm start

And it's Good :)

Already tried this on 3 different machines(Two are on Ubuntu 16.04.06, and on a Win10 64bit) and I still get the same error.

NodeJS version is 12.6.2, also tried it on 14.0.0, still the same error.

I also get this error everytime I install but I use: $ rm -rf package-lock.json node_modules $ npm install to make it work.

npm WARN tarball tarball data for binance@https://github.com/tiagosiebler/binance/tarball/master (sha512-rzD0wqWQl8PeeJ0fu6yggVi5IYRH0ovj3mSO6kxpHiA9WSI9zgf926E0ztS6DrRldSFzJCpAS4AO9y/0b2iNXA==) seems to be corrupted. Trying one more time. npm WARN tarball tarball data for binance@https://github.com/tiagosiebler/binance/tarball/master (sha512-rzD0wqWQl8PeeJ0fu6yggVi5IYRH0ovj3mSO6kxpHiA9WSI9zgf926E0ztS6DrRldSFzJCpAS4AO9y/0b2iNXA==) seems to be corrupted. Trying one more time. npm ERR! code EINTEGRITY npm ERR! Verification failed while extracting binance@https://github.com/tiagosiebler/binance/tarball/master: npm ERR! Verification failed while extracting binance@https://github.com/tiagosiebler/binance/tarball/master: npm ERR! sha512-rzD0wqWQl8PeeJ0fu6yggVi5IYRH0ovj3mSO6kxpHiA9WSI9zgf926E0ztS6DrRldSFzJCpAS4AO9y/0b2iNXA== integrity checksum failed when using sha512: wanted sha512-rzD0wqWQl8PeeJ0fu6yggVi5IYRH0ovj3mSO6kxpHiA9WSI9zgf926E0ztS6DrRldSFzJCpAS4AO9y/0b2iNXA== but got sha512-RkRSxVtksTXaPbM7f9dWZQPhxgz+kzoOYcditCVF9gYkq561PqpTguQrYhE0Ivs4PcUQPZKggonEkZv9qfy8zQ==. (62267 bytes)

daryl552007 commented 4 years ago

I am having the same issue with TwatKnight .

@TAKXInvest can you share to us that version you modified that is working?

thanks

avaxtasulta commented 4 years ago

Same problem here. @TAKXInvest could you possibly give us the modified files without the bot module?

fvsgit commented 4 years ago

Same issue here

tiagosiebler commented 4 years ago

Better late than never! Fixed the onAllTickerStream error and stripped some old logic out.

avaxtasulta commented 4 years ago

@tiagosiebler thanks :) works like a charm now! going to spend the day using my complete lack of coding skills to try figure out how to automatically place trades on the top result haha. if anyone can help with some code snippets to copy and paste it would be much appreciated! cheers again for your work :)

tiagosiebler commented 4 years ago

@tiagosiebler thanks :) works like a charm now! going to spend the day using my complete lack of coding skills to try figure out how to automatically place trades on the top result haha. if anyone can help with some code snippets to copy and paste it would be much appreciated! cheers again for your work :)

best way to learn and improve! Just be careful, the math definitely needs a review so caution is definitely advised. This uses the "all symbols" tickers for bid/ask prices, so there may also be a tiny amount of lag between real price and what the ticker says.