ccxt / ccxt

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
https://docs.ccxt.com
MIT License
33.08k stars 7.55k forks source link

Where to find the `crypto-watchdog` example? #6831

Closed 8ball030 closed 4 years ago

8ball030 commented 4 years ago

Hi guys,

Just a quick one!

I am trying to find the example script is features in the GIF on the examples page.

It has a caption of "crypto-watchdog" However, I cant seem to find that within the example scripts!

Thanks for the help :)

kroitor commented 4 years ago

Hi!

I did it in a very quick and dirty manner, and it works by first making a ton of charts, adding a screenshot on every candle – the gif is then compiled from those screenshots. You will need to keep it running for a few hours to be able to make an animation from 1m candles, since the framerate is the same as your candle timeframe. The gif makes it look like it is quick, yet collecting the live historical data for the chart will take some time (the animation actually covers a couple of hours, if you watch the time in the upper right corner).

Apart from the charting script itself you will also need to setup a tool to make screenshots from the console in an automated fashion, every minute (or every timeframe period, depending on the details of your chart).

I've uploaded the actual charting snippet here: https://gist.github.com/kroitor/56e454223d4ee82e1b45d66e744825b3

The technique for making the charts and screenshots with Blessed and GetWindowId is explained here: https://github.com/ccxt/ccxt/issues/989

↑ Obviously, the screenshot capability depends on your OS. In my case it was MacOS. A different OS may require a different setup.

Unfortunately, I can't share the full repo, since it was a quick and dirty example, not something we would like to show off (it wasn't intended to be used "as is" because it depends on your setup). So, you will want to check the above links and compile/restore it for your use case from those resources.

Let me know if that does not answer the question.

8ball030 commented 4 years ago

Kroiter, Thanks that was just want I needed. :)

I have got it running, and I will be making some tweeks to it.

I think this is my favourite line of; // dirty highlight hack, as formatting is not supported by asciichart (for now) Tipped you some BAT and again thanks for your insanely fast support!

kroitor commented 4 years ago

@8ball030

I think this is my favourite line of;

)))

Tipped you some BAT and again thanks for your insanely fast support!

Sorry, what was the destination address? Just to make sure that you didn't send it to outer space ))

8ball030 commented 4 years ago

image You are not using the brave browser Igor! :) Get yourself signed up on this link! https://brave.com/bal831 If you then register for the brave creators, People can literally tip directly from Github by clicking the Tip button next to any comment by you as so; image Dont get hugely excited as I havent made you rich, Just grabbed you a coffee :P

kroitor commented 4 years ago
Screen Shot 2020-04-23 at 00 12 55

Tbh I don't want to send my personal data to them, this is why we have the addresses for tips on our main page here: