spotbit
spotbit copied to clipboard
Code donation
For a couple of years i ran "lovac", the "low volume accumulator". https://twitter.com/lovac27152702 It was a (flask based) stacking app which used the bitstamp API to get prices, place Marketorders on a (daily) basis and, especially proud: a buy-the-dip feature. So the app could detect a drop in price and even show it graphically. I shut it down some month ago and i'm now happy to donate the code if anyone is interested: https://gitlab.com/lovac/lovac-app The code used SQLAlchemy and, for the statistical things pandas.
Here are some places in the code which might be interesting:
- testing whether the price is dipping via specific Bollingerbands: https://gitlab.com/lovac/lovac-app/-/blob/master/tests/lovac_services_tickerdata_tests.py#L56
- Various methods to import csv-data-files into the DB: https://gitlab.com/lovac/lovac-app/-/blob/master/lovac/tickerdata/init.py (i used https://bitcoincharts.com/charts/chart.json for that)
- The statistics for the bollinger-bands: https://gitlab.com/lovac/lovac-app/-/blob/master/lovac/tickerdata/statistics.py
- THe graphical representation took me some time. If that's a request at some point in time, i might be able to set it up again:
The red bubble represented the buy-the-dip. The bigger the bubble was, the more it bought.
Feel free to close this issue but maybe you find it interesting. Also happy to answer any questions or setup a call.
This looks interesting. In particular, I'd like to see some of the price graph stuff you have.
I tried taking a look at it https://gitlab.com/lovac/lovac-app but I'm getting a 404? Did it get deleted there?
Oh, sorry, now it's visible. The graphing is based on d3 (version 4, current is 7.x). I copied it from one of the brushing examples which i can't no longer find. Today i'd probably took this one: https://d3-graph-gallery.com/graph/line_brushZoom.html
Here is the meat of it: https://gitlab.com/lovac/lovac-app/-/blob/master/lovac/templates/ticker.html#L95
Data is injected in line 94/95
The maintenance of that project took too much effort for me especially the dependencies. That's the reason i gave up and there also in the meantime lot of better stackingsats alternatives on the market. It might not be that easy to get it to run without some changes.