area / cryptoswitcher Goto Github PK
View Code? Open in Web Editor NEWA script to switch between mining Bitcoin and any of the other cryptocoins as profitability dictates.
A script to switch between mining Bitcoin and any of the other cryptocoins as profitability dictates.
Restarting cgminer is botchy at best. Most systems can't handle it without crashing.
So I'd suggest you add the option to add/stop/remove pools via API to a currently running cgminer.
The code for this could perhaps be borrowed from psheps ANUBIS project: https://github.com/pshep/ANUBIS
At the moment it favors MNC, which isn't even in the API (http://www.coinchoose.com/api.php). Something seems fishy. According to Coinchoose Worldcoin is atm at 200% profitability of BTC.
<<< Round 818 >>>
time: 2013-07-16 17:22:54
getting data... done
comparing profitabilty...
------------------------------------
Alphacoin: 145 (fee: 2, src: cc)
Argentum: 94 (fee: 2, src: cc)
Mincoin: 162 (fee: 2, src: cc)
EZCoin: 0 (fee: 2, src: --)
Franko: 133 (fee: 2, src: cc)
Luckycoin: 121 (fee: 2, src: cc)
DigitalCoin: 132 (fee: 2, src: cc)
Memecoin: 0 (fee: 2, src: --)
StableCoin: 17 (fee: 2, src: cc)
Krugercoin: 9 (fee: 2, src: cc)
Worldcoin: 138 (fee: 2, src: cc)
Fastcoin: 128 (fee: 2, src: cc)
------------------------------------
=> Best: 160, mining Mincoin
Only using "source=coinchoose" and "source_cryptoswitcher=cryptsy".
Bug report I received via PM on bitcointalk
When it's estimating profitability, it applies the "pool fee" percentage to the nominal bitcoin 100% amount, not the actual coin's profitability....
So for example, let's say it queries coinchoose.com and finds that MEC is currently 200% as profitable as bitcoin. Let's say that I have MEC configured as a pool fee of 5% (2.5% for my pool, and an estimate of 2.5% stale, so I'm losing 5% in total).
Currently, cryptoswitcher would assign this situation a value of 195, whereas it should be 190.
Doesn't seem like PyCryptsy can parse the API response anymore.
Traceback (most recent call last):
File "cryptoSwitcher.py", line 601, in
sellCoinCryptsy(abbreviation)
File "cryptoSwitcher.py", line 227, in sellCoinCryptsy
bal = acct.GetAvailableBalance(coin)
File "./PyCryptsy/PyCryptsy.py", line 106, in GetAvailableBalance
r=self.Query("getinfo", {})
File "./PyCryptsy/PyCryptsy.py", line 71, in Query
raise Exception("unable to decode response")
Exception: unable to decode response
I'm a longtime user of Cryptoswitcher that recently got into operationg mining pools. I would like to add this functionality to a pool. Could you give me some tips?
Would be nice if the CryptoSwitcher could be able to send a value when running a script:
For instance:
DGCscript = "/home/username/switchpool.php 3"
Today Coinotron is unavailable (HTTP 503). The script crash as it seems to expect a 2xx return code with an answer.
It should control the HTTP return code, and fallback to an older value if 4xx or 5xx answer.
Meanwhile thanks for this precious script
Here comes the output of the crash:
<<< Round 1 >>>
time: 2013-05-10 16:06:22
getting data...
Traceback (most recent call last):
File "cryptoSwitcher.py", line 171, in
usock = urllib2.urlopen('https://coinotron.com/coinotron/AccountServlet?action=home')
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 503: Service Temporarily Unavailable
Alphacoin: 171 (fee: 2, src: cc)
Argentum: 74 (fee: 2, src: cc)
Phenixcoin: 248 (fee: 2, src: cc)
Mincoin: 83 (fee: 2, src: cc)
EZCoin: 0 (fee: 2, src: --)
Franko: 44 (fee: 2, src: cc)
Luckycoin: 101 (fee: 2, src: cc)
DigitalCoin: 143 (fee: 2, src: cc)
Megacoin: 130 (fee: 2, src: cc)
Memecoin: 0 (fee: 2, src: --)
StableCoin: 142 (fee: 2, src: cc)
Worldcoin: 121 (fee: 2, src: cc)
As you can see, the script calcs the value 0 for the coins that is changed to LTC only.
2 calcs is needed I guess, first LTC vs BTC price. Then use that to compare the profitability of the new vs LTC only coins.
If you got coin A with profitability 50 and coin B with profitability 51. Will it auto switch to B even if diff is like 700 on that and 0.5 on A?
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.