Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: area on April 10, 2013, 07:00:30 AM



Title: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 10, 2013, 07:00:30 AM
What is CryptoSwitcher?
You've heard about these altcoins, and none have them have taken your fancy; you think they're all clones and destined to failure. You think BTC is the one true way, and are still mining it. The altcoins aren't useless to you. Many of them are more profitable to mine short-term than BTC if you just sell them at the market price.

How can I used it?
The source is available at https://github.com/area/CryptoSwitcher. Clone it, and then edit the cryptoswitcher.config.sample file as it instructs in the comments. If you wish to use BTC-E, you will need to edit the 'key.sample' file to contain your API key, and move it to 'key'. The README included should be a bit more comprehensive than the instructions here. If you already have scripts to start and stop mining, then setup should be easy for you.

How does it work?
The actual maths is done by the websites:

http://dustcoin.com/mining (http://dustcoin.com/mining)
http://coinchoose.com (http://coinchoose.com)
http://fizzisist.com (http://fizzisist.com) (Vanity address mining only - down at the moment?)

This is just a wrapper to use the above sites to pick the most appropriate mining activity for your hardware, and make sure that it's doing the right thing for you. It's written in Python, and uses scripts (which the end-user must write, in the language of their choice; some samples are included) to stop other miners and launch the appropriate one.

Isn't this a terrible idea?
Maybe. I honestly haven't decided whether coin-hopping is a bad thing long term. The consequences of wide-spread adoption that I can think of are:
  • This would tie the value of all alt-coins to BTC.
  • It would cause massive difficulty spikes as retargets happen, causing mining an alt-coin to become less profitable and hoppers to mine elsewhere. The dedicated miners on that coin are then left with a much higher difficulty than they should have, and struggle to find blocks. We have seen this happen already with TRC, which is still struggling to deal with the aftermath

The closest parallel to this I can think of is pool-hopping. However, pool-hopping eventually brought about good - nearly all hoppable pools eventually moved from proportional payouts to an unhoppable payout scheme (e.g. DGM), and pool hopping died as an art, despite the best efforts of P4Man and others. I feel like the same should happen here; if an alt-coin is unable to convince people of its merits such that it is mined regardless of profitability compared to mining the more accepted BTC - or is unable to deal with the consequences of not doing so - then perhaps it doesn't deserve to succeed.

I think this is probably the most contentious issue with this project, and is probably going to get worse as BTC difficulty continues to rise with the advent of ASICs, and people with outdated hardware look to put it to use. I welcome input on this particular aspect.

Features
  • Support for both Dustcoin and Coinchoose, and all the coins they list (though only one site may be used at a time)
  • Takes merged mining into account if you say its available
  • Will automatically sell coins for BTC on BTC-E and/or Vircurex if you choose.

Todo
  • Vircurex support
  • Use both Dustcoin and Coinchoose at the same time?
  • Use the CGMiner API to switch between coins with the same hashing algorithm in one CGminer instance. If a user were to allow remote API access, then this could in theory be provided as a service, without the user having to run the script themselves.
  • Monitor miners for dead pools.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on April 10, 2013, 11:58:16 AM
Very good work.  I am about to test this out!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Simran on April 10, 2013, 12:21:26 PM
What is CryptoSwitcher?
You've heard about these altcoins, and none have them have taken your fancy; you think they're all clones and destined to failure. You think BTC is the one true way, and are still mining it. The altcoins aren't useless to you. Many of them are more profitable to mine short-term than BTC if you just sell them at the market price.

How can I used it?
The source is available at https://github.com/area/CryptoSwitcher. Clone it, and then edit the cryptoswitcher.config.sample file as it instructs in the comments. If you wish to use BTC-E, you will need to edit the 'key.sample' file to contain your API key, and move it to 'key'. The README included should be a bit more comprehensive than the instructions here. If you already have scripts to start and stop mining, then setup should be easy for you.

How does it work?
The actual maths is done by the websites:

Dustcoin (http://'http://dustcoin.com/mining')
Coinchoose (http://'http://coinchoose.com')
Fizzisist (http://'http://fizzisist.com/') (Vanity address mining only - down at the moment?)

This is just a wrapper to use the above sites to pick the most appropriate mining activity for your hardware, and make sure that it's doing the right thing for you. It's written in Python, and uses scripts (which the end-user must write, in the language of their choice; some samples are included) to stop other miners and launch the appropriate one.

Isn't this a terrible idea?
Maybe. I honestly haven't decided whether coin-hopping is a bad thing long term. The consequences of wide-spread adoption that I can think of are:
  • This would tie the value of all alt-coins to BTC.
  • It would cause massive difficulty spikes as retargets happen, causing mining an alt-coin to become less profitable and hoppers to mine elsewhere. The dedicated miners on that coin are then left with a much higher difficulty than they should have, and struggle to find blocks. We have seen this happen already with TRC, which is still struggling to deal with the aftermath

The closest parallel to this I can think of is pool-hopping. However, pool-hopping eventually brought about good - nearly all hoppable pools eventually moved from proportional payouts to an unhoppable payout scheme (e.g. DGM), and pool hopping died as an art, despite the best efforts of P4Man and others. I feel like the same should happen here; if an alt-coin is unable to convince people of its merits such that it is mined regardless of profitability compared to mining the more accepted BTC - or is unable to deal with the consequences of not doing so - then perhaps it doesn't deserve to succeed.

I think this is probably the most contentious issue with this project, and is probably going to get worse as BTC difficulty continues to rise with the advent of ASICs, and people with outdated hardware look to put it to use. I welcome input on this particular aspect.

Features
  • Support for both Dustcoin and Coinchoose, and all the coins they list (though only one site may be used at a time)
  • Takes merged mining into account if you say its available
  • Will automatically sell coins for BTC on BTC-E if you choose

Todo
  • Vircurex support
  • Use both Dustcoin and Coinchoose at the same time?
  • Use the CGMiner API to switch between coins with the same hashing algorithm in one CGminer instance. If a user were to allow remote API access, then this could in theory be provided as a service, without the user having to run the script themselves.


If this uses Scrypt and SHA-256, how do you switch between them in the miner files?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Ilocans on April 10, 2013, 01:03:10 PM
Hi,
Good idea :)
However, Error 404 for https://github.com/area/CryptoSwitcher
The 3 links to Dustoin, Coinchoose and Fizzsist does not work


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 10, 2013, 01:08:37 PM
If this uses Scrypt and SHA-256, how do you switch between them in the miner files?

The sample scripts I've included are for Bitcoin and Litecoin, and show how this is done. In short, if we are mining BTC and the script decides to switch to LTC, litecoin.sh is run. The first thing that litecoin.sh does is close all instances of CGMiner using the CGMiner API. It then sets the clocks correctly for LTC mining, and only then does it spool up a new instance of CGminer, mining the desired coin, making sure that API access is enabled for future switching. Each script you write and use (i.e. beyond the litecoin.sh and bitcoin.sh files included) should do roughly the same thing.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on April 10, 2013, 01:14:38 PM
Hi,
Good idea :)
However, Error 404 for https://github.com/area/CryptoSwitcher
The 3 links to Dustoin, Coinchoose and Fizzsist does not work

Comes up here - all of them.  Is your internet okay?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 10, 2013, 01:17:55 PM
Hi,
Good idea :)
However, Error 404 for https://github.com/area/CryptoSwitcher
The 3 links to Dustoin, Coinchoose and Fizzsist does not work

Comes up here - all of them.  Is your internet okay?

The first post had errors in the URLs for those three (I'm too used to BBCode), which I have now corrected.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 11, 2013, 06:11:28 AM
Fizzisist seems to be back up, but is now returning 'null' for profitability, which I had never seen before. I have pushed an update that handles this gracefully.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: bajanboost on April 11, 2013, 08:24:10 AM
It would be nice if you included a pool failover for each coin.

For example if the profitability was showing litecoin and my rigs switched to that, then if a pool is dead / failing, the rig will switch pools.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 11, 2013, 08:28:35 AM
It would be nice if you included a pool failover for each coin.

For example if the profitability was showing litecoin and my rigs switched to that, then if a pool is dead / failing, the rig will switch pools.

Agreed, I've been thinking about this too and looking into the CGminer API. For now, I can only recommend you have backup pools in your CGminer configuration files, but I realise that for the more exotic coins that's probably easier said than done.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: skeeterskeeter on April 12, 2013, 01:22:36 AM
I would love to try this, but I barely can get these old ass 5830's working on windows, linux I couldn't get a good OpenCL.

Would love to see if it ever gets thrown into a good 'ol exe


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: celkaris on April 12, 2013, 01:28:06 AM
you guys realize that if this gets popular enough, every single coin out there will put its difficulty so high that the profitability indicator will never go green again, leading to miners leaving the chain, finally killing all those coins ?

you'll just waste electricity (unless you already planned to dump every single coin as soon as it's received, and forget about those altcoins when they're completely dead, but i'd bet you won't find buyers once those indicators turns red)

:)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on April 12, 2013, 01:41:54 AM
you guys realize that if this gets popular enough, every single coin out there will put its difficulty so high that the profitability indicator will never go green again, leading to miners leaving the chain, finally killing all those coins ?



And then the difficulty will go back down :)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: fcmatt on April 12, 2013, 01:42:03 AM
you guys realize that if this gets popular enough, every single coin out there will put its difficulty so high that the profitability indicator will never go green again, leading to miners leaving the chain, finally killing all those coins ?

you'll just waste electricity (unless you already planned to dump every single coin as soon as it's received, and forget about those altcoins when they're completely dead, but i'd bet you won't find buyers once those indicators turns red)

:)


More likely they will hop around and gets less due to pool design now days which reward steady miners.
Or profitability will even out for all of them making it pointless.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: celkaris on April 12, 2013, 02:02:36 AM
you guys realize that if this gets popular enough, every single coin out there will put its difficulty so high that the profitability indicator will never go green again, leading to miners leaving the chain, finally killing all those coins ?



And then the difficulty will go back down :)

if nobody mines it (10 miners with 500Mh/s each means nobody once diff is really high) there's no chance diff goes down any time soon :)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: bajanboost on April 12, 2013, 04:23:33 AM
It would be nice if you included a pool failover for each coin.

For example if the profitability was showing litecoin and my rigs switched to that, then if a pool is dead / failing, the rig will switch pools.

Agreed, I've been thinking about this too and looking into the CGminer API. For now, I can only recommend you have backup pools in your CGminer configuration files, but I realise that for the more exotic coins that's probably easier said than done.

It can be done. I have seen pool switching scripts - Allow your users to update a single config file:

Litecoin Pools:
pool1 - notroll.in -u -p
pool2 - etc etc

Bitcoin Pools:

etc etc...

Following simple logic, allow a user to update his config with all pools he wants - then set triggers

example:

failconnect () //if failure to connect after 60 seconds, switch pool
highstale () //if high stale rate then drop pool

Thoughts?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 12, 2013, 07:37:56 AM
It would be nice if you included a pool failover for each coin.

For example if the profitability was showing litecoin and my rigs switched to that, then if a pool is dead / failing, the rig will switch pools.

Agreed, I've been thinking about this too and looking into the CGminer API. For now, I can only recommend you have backup pools in your CGminer configuration files, but I realise that for the more exotic coins that's probably easier said than done.

It can be done. I have seen pool switching scripts - Allow your users to update a single config file:

Litecoin Pools:
pool1 - notroll.in -u -p
pool2 - etc etc

Bitcoin Pools:

etc etc...

Following simple logic, allow a user to update his config with all pools he wants - then set triggers

example:

failconnect () //if failure to connect after 60 seconds, switch pool
highstale () //if high stale rate then drop pool

Thoughts?

I would prefer to keep that sort of configuration in the CGminer config files that people probably already have. In addition, you have to restart CGminer to switch from an Scrypt coin to a SHA256 coin, unless I'm missing something drastic in the API, so this is unable to be done purely with a single CGminer instance and the API. I think I know how I want to approach this.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: bajanboost on April 15, 2013, 08:46:53 AM
How will this work with something like BAMT? https://bitcointalk.org/index.php?topic=65915.0


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Oknocaps on April 15, 2013, 12:09:47 PM
Looks neat, will try whenever I get home.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on April 15, 2013, 01:36:55 PM
How will this work with something like BAMT? https://bitcointalk.org/index.php?topic=65915.0

I'd think so, as long as you install python (which might already be installed in BAMT).


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on April 17, 2013, 01:36:18 AM
Bounty for anyone that gets this to work with Vircurex to automatically convert back to BTC...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 17, 2013, 10:18:52 AM
Bounty for anyone that gets this to work with Vircurex to automatically convert back to BTC...

A blind bounty, you say. Well, whatever you think the changes I've just pushed are worth... :)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on April 18, 2013, 03:10:06 PM
Nice!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: glendall on April 18, 2013, 03:31:13 PM
Sweet app, nice work... !

Btw, are there any Freicoin exchanges though? I haven't come across this coin much. .. 


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on April 18, 2013, 03:45:28 PM
Yes - there is one at cryponit.  See my site (in my signature).


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 20, 2013, 07:33:29 AM
Anyone interested in making a Cryptonit API wrapper for Python? :)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Dali99 on April 20, 2013, 06:26:38 PM
Could anyone help me with setting it up?
I can't find the dependencies and where to put them


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 20, 2013, 07:17:53 PM
Could anyone help me with setting it up?
I can't find the dependencies and where to put them

Which OS, and what have you tried so far? What errors do you get?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Dali99 on April 20, 2013, 09:18:30 PM
Could anyone help me with setting it up?
I can't find the dependencies and where to put them

Which OS, and what have you tried so far? What errors do you get?
Windows 7 home Premium
C:\Users\Daniel\Documents\GitHub\CryptoSwitcher>cryptoSwitcher.py
Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\GitHub\CryptoSwitcher\cryptoSwitcher.py", line
 5, in <module>
    import numpy as np
  File "C:\Users\Daniel\Documents\GitHub\CryptoSwitcher\numpy\__init__.py", line
 127, in <module>
    raise ImportError(msg)
ImportError: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python intepreter from there.


thanks!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 21, 2013, 12:03:12 AM
Could anyone help me with setting it up?
I can't find the dependencies and where to put them

Which OS, and what have you tried so far? What errors do you get?
Windows 7 home Premium
C:\Users\Daniel\Documents\GitHub\CryptoSwitcher>cryptoSwitcher.py
Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\GitHub\CryptoSwitcher\cryptoSwitcher.py", line
 5, in <module>
    import numpy as np
  File "C:\Users\Daniel\Documents\GitHub\CryptoSwitcher\numpy\__init__.py", line
 127, in <module>
    raise ImportError(msg)
ImportError: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python intepreter from there.


thanks!

I'm afraid I'm not a Windows person (for mining, anyway). Is there an equivalent of pip for Windows, does someone else know?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on April 28, 2013, 05:38:05 PM
Feathercoin now supported for those using CoinChoose.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: davidkassa on April 30, 2013, 04:49:19 PM
This is pretty cool. I was just thinking of doing the exact same thing. I'll have to dig in (and possibly contribute) once I get time.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 02, 2013, 07:31:30 AM
Again, thanks to a CoinChoose update, MinCoin has now joined the party.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: juhakall on May 04, 2013, 02:12:36 AM
This might be really useful, I'm tired of checking the charts every day to decide myself. I already have my own scripts to switch configs and restart all rigs, so it sounds like a simple plug-n-play job! That auto-selling feature sounds especially interesting. I guess auto-withdrawal is not supported yet? ;D

EDIT: There are config options gkeypersec for vanity mining speed and ghashpersec for BTC mining speed, but no option for LTC mining speed. Is the default 1MH/s -> 1kH/s ratio assumed?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Caesar V on May 04, 2013, 02:29:39 AM
This is so awesome!!  ;D

Really can't wait for my rig to arrive now.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 04, 2013, 05:08:04 AM
This might be really useful, I'm tired of checking the charts every day to decide myself. I already have my own scripts to switch configs and restart all rigs, so it sounds like a simple plug-n-play job! That auto-selling feature sounds especially interesting. I guess auto-withdrawal is not supported yet? ;D

EDIT: There are config options gkeypersec for vanity mining speed and ghashpersec for BTC mining speed, but no option for LTC mining speed. Is the default 1MH/s -> 1kH/s ratio assumed?

Neither exchange supports auto-withdrawal via the API, so I don't see that feature being implemented soon, I'm afraid.

The default 1MH/s -> 1kH/s ratio is assumed (by virtue of this assumption being made by dustcoin and CoinChoose), but if that is drastically wrong for you, you can include additional fees to penalise Scrypt coins the appropriate amount. So if you get 700MH/s with SHA256, but only 600MH/s with Scrypt coins, you would include an additional fee of 1-(600/700) = 0.14 on Scrypt coins.



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 06, 2013, 08:34:46 AM
With thanks to open5443 on GitHub, the latest round of updates supports using Dustcoin and Coinchoose at the same time, and CHNCoin has also joined the party.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on May 08, 2013, 12:25:12 AM
Anyone got this working on Win7 yet?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 08, 2013, 07:55:13 AM
Anyone got this working on Win7 yet?

I would like to know this too, and if there is anything that could be done to make it easier to run on Windows, I'd look into it.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: LittleDigger on May 08, 2013, 08:20:40 AM
Anyone got this working on Win7 yet?

I would like to know this too, and if there is anything that could be done to make it easier to run on Windows, I'd look into it.

Yes It's working on my Win 7 64 setup.. ;D Heres all the hassles I had.. ::)

1 You can't use python 3.3.. Use Python 2.7.4 (has urllib 2 ) http://www.python.org/download/releases/2.7.4/ (http://www.python.org/download/releases/2.7.4/)

2 Remember to set your path to python 27 (Instructions : http://www.youtube.com/watch?v=ddpYVA-7wq4  (http://www.youtube.com/watch?v=ddpYVA-7wq4) )

3 You need to install beautifulsoup4-4.0.0b10 (later version didn't work)
http://www.crummy.com/software/BeautifulSoup/bs4/download/4.0/ (http://www.crummy.com/software/BeautifulSoup/bs4/download/4.0/)

4 You need to install simplejson https://github.com/simplejson/simplejson (https://github.com/simplejson/simplejson)

5 You need to install Numpy from the appropiate executable found only here : http://www.lfd.uci.edu/~gohlke/pythonlibs/ (http://www.lfd.uci.edu/~gohlke/pythonlibs/)

6 You need to download pyvircurex-master.zip and btce-api-master.zip and drop their files into the appropiate folders in the cryptoswitcher directory.

Then, if you have changed the cryptoswitcher.config to read batchfiles like the supplied bitcoin.bat, it works like a dream.

Happy geeking  ;)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: LittleDigger on May 08, 2013, 08:48:15 AM
Could anyone help me with setting it up?
I can't find the dependencies and where to put them

If you do the first two steps (install python 2.7.4 and set the path), then, to install a module, you open up the command line, change to the modules directory ( the directory with the file setup.py in it), and type "python setup.py install"

Note in my last post I gave links to the modules that worked for me. The Numpy modules are executables.. you just run them. They are for Intel and Amd chips and 32 and 64 bit windows, so be sure to get the right one


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 09, 2013, 07:43:44 AM
BitBar and BBQCoin added to Cryptoswitcher. SolidCoin removed.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Taxidermista on May 09, 2013, 08:41:31 AM
BitBar and BBQCoin added to Cryptoswitcher. SolidCoin removed.

Maybe you'd be interested in supporting this site: http://www.coinwarz.com/cryptocurrency (http://www.coinwarz.com/cryptocurrency)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 09, 2013, 08:44:13 AM
BitBar and BBQCoin added to Cryptoswitcher. SolidCoin removed.

Maybe you'd be interested in supporting this site: http://www.coinwarz.com/cryptocurrency (http://www.coinwarz.com/cryptocurrency)

Why would this be of interest to you? It has fewer coins than dustcoin or Coinchoose, no API and no additional information. Unless you think that both dustcoin and Coinchoose are calculating things incorrectly, I can't see a reason.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Taxidermista on May 09, 2013, 08:51:59 AM
BitBar and BBQCoin added to Cryptoswitcher. SolidCoin removed.

Maybe you'd be interested in supporting this site: http://www.coinwarz.com/cryptocurrency (http://www.coinwarz.com/cryptocurrency)

Why would this be of interest to you? It has fewer coins than dustcoin or Coinchoose, no API and no additional information. Unless you think that both dustcoin and Coinchoose are calculating things incorrectly, I can't see a reason.

As a backup or to check proper values. Sometimes the diff values at these sites are lagging (minutes or even hours).


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on May 09, 2013, 12:01:21 PM
It is good as backup, but i noticed the pricing / difficulty lags in general on this new site.  It does look like the difficulty issue you reported on mine was fixed (and was based on a temporary outage of the blockexplorer).  I am added in a few additional redundacies to account for blockexplorer outages so I don't expect my stats to lag more than a minute or so.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on May 09, 2013, 12:02:10 PM
BitBar and BBQCoin added to Cryptoswitcher. SolidCoin removed.

Keep up the good work.  All these coins are making me dizzy!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 09, 2013, 01:42:49 PM
BitBar and BBQCoin added to Cryptoswitcher. SolidCoin removed.

Keep up the good work.  All these coins are making me dizzy!

Yeah, same here. I've tweaked how the config file is read now though, which will make it easier for me to add additional coins (thought it was hardly difficult as it was, just tedious. It's much harder for you :P


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on May 09, 2013, 01:51:00 PM
Well - not that hard if I have a blockexplorer, clear understanding on block reward, a pretty icon and an exchange :)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: krzynek1 on May 10, 2013, 02:10:24 PM
I've just starting using cryptoswitcher and I think it's awesome

One problem though, the moment when coinotron website went down, cryptoswitcher can't launch and this error pops up:

https://i.imgur.com/PwVEUyg.png

I see in error message that coinotron is mentioned, so I deleted this site from cryptoSwitcher.config but still same error occurs  :-\


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 10, 2013, 02:37:16 PM
I've just starting using cryptoswitcher and I think it's awesome

One problem though, the moment when coinotron website went down, cryptoswitcher can't launch and this error pops up:

I see in error message that coinotron is mentioned, so I deleted this site from cryptoSwitcher.config but still same error occurs  :-\

A fix for this issue has been pushed by open5443 to the GitHub repository. If you git pull, then you will get the update.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: krzynek1 on May 10, 2013, 05:56:18 PM
thanks, just updated

would you explain to me why you are choose such fees values?

Quote
[Fees]
feebtc = -1
feeltc = 4
feeppc = 7
feenvc = 0
feetrc = 12
feebte = 0
feebqc = 0
feefrc = 0
feeftc = 4
feemnc = 0
feecnc = 0
feebtb = 0


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 10, 2013, 06:21:44 PM
would you explain to me why you are choose such fees values?

No real reason as far as I'm aware, I'm afraid. You should alter them to appropriate values for you, based on the pools and exchanges you are using, as well as your opinion on different coins (e.g. If you don't trust BTB, give it a large fee).

Vircurex seems to be down, incidentally.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: drlukacs on May 10, 2013, 06:51:53 PM
Vircurex seems to be down, incidentally.

It has been compromised:

https://bitcointalk.org/index.php?topic=201262.0


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: krzynek1 on May 10, 2013, 07:26:18 PM
thanks for clarification


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: scotjam on May 11, 2013, 01:46:36 AM

5 You need to install Numpy from the appropiate executable found only here : http://www.lfd.uci.edu/~gohlke/pythonlibs/ (http://www.lfd.uci.edu/~gohlke/pythonlibs/)

I was getting the below error when trying to launch, but subsequently realised I had installed the MTL version of Numpy. When I installed the correct version all worked well.

Many thanks for this software - it looks really great (although I'm just starting)

Best

scotjam

Error message:
Traceback (most recent call last):
  File "cryptoSwitcher.py", line 5, in <module>
    import numpy as np
  File "C:\Python27\lib\site-packages\numpy\__init__.py", line 171, in <module>
    import random
  File "C:\Python27\lib\site-packages\numpy\random\__init__.py", line 99, in <module>
    from mtrand import *
ImportError: DLL load failed: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: scotjam on May 11, 2013, 09:46:35 AM

I was getting the below error when trying to launch, but subsequently realised I had installed the MTL version of Numpy. When I installed the correct version all worked well.


Actually, I spoke too soon - it turns out I get the error message:
"C:\Users\user\Downloads\CryptoSwitcher-master>python cryptoSwitcher.py




<<< Round 1 >>>
time: 2013-05-11 03:05:36
getting data... done
decoding data... done
comparing profitabilty...
------------------------------------
   Litecoin: 125  (fee:  4, src: cc)
FeatherCoin:  66  (fee:  4, src: cc)
    Bitcoin: 100  (fee: -1, src: cc)
------------------------------------
=> Best: 121, mining Litecoin
=> Switching to Litecoin (running litecoin.bat)
Traceback (most recent call last):
  File "cryptoSwitcher.py", line 324, in <module>
    sellCoinBTCE(abbreviation, authedAPI)
  File "cryptoSwitcher.py", line 118, in sellCoinBTCE
    r = tradeapi.getInfo()
  File "./btce-api/btceapi\trade.py", line 145, in getInfo
    return TradeAccountInfo(self._post(params))
  File "./btce-api/btceapi\trade.py", line 134, in _post
    % (params["method"], result.get(u'error')))
Exception: getInfo call failed with error: invalid nonce parameter; 100 100"

In the API keys section of BTC-E, both "info" and "trade" are ticked for the relevant key

my "key" file contains:
[key]
[secret]
100


Therefore I don't understand why it says "100 100" rather than just "100" in the error message (or why there is an error at all...)

Any thoughts as to what might be the cause?

Many thanks

scotjam



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 11, 2013, 09:50:37 AM
Replace the '100' in your key file with '101'. Basically, you've already used the '100' nonce, which has to be a continually increasing number. If you use it twice, then you get this error.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on May 12, 2013, 04:32:26 PM
It doesn't seem to take merged mining into account. Unless I'm missing something...

I have the following settings set:

mmNMC = True

but when it does the calculations it seems to ignore that NameCoin is at 6.5%. Shouldn't it add the merged mining coins to the value of BTC to get the base line? When it runs for me, BTC is at 100%, and any coin at 101% or greater gets selected.

Am I missing something?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: MrWizard on May 12, 2013, 04:36:10 PM
It doesn't seem to take merged mining into account. Unless I'm missing something...

I have the following settings set:

mmNMC = True

but when it does the calculations it seems to ignore that NameCoin is at 6.5%. Shouldn't it add the merged mining coins to the value of BTC to get the base line? When it runs for me, BTC is at 100%, and any coin at 101% or greater gets selected.

Am I missing something?
Your missing the latest version.  It fixes that bug.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on May 12, 2013, 04:53:02 PM
I pulled the latest master.zip from https://github.com/area/CryptoSwitcher and it is the same cryptoSwitcher.py file I'm currently using.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 12, 2013, 04:54:03 PM
I pulled the latest master.zip from https://github.com/area/CryptoSwitcher and it is the same cryptoSwitcher.py file I'm currently using.

The name of the variable in the config file has changed from 'mmNMC' to 'minenmc' to bring it in line with the other coins, regardless of their merged mining status.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: MrWizard on May 12, 2013, 04:55:10 PM
I pulled the latest master.zip from https://github.com/area/CryptoSwitcher and it is the same cryptoSwitcher.py file I'm currently using.
The .config file has changed as well to fix this bug. As area alludes to.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: scotjam on May 12, 2013, 07:27:54 PM
Replace the '100' in your key file with '101'. Basically, you've already used the '100' nonce, which has to be a continually increasing number. If you use it twice, then you get this error.

Many thanks area - sorry for being so clueless on this!

All more or less running well now. I did run into another problem (detailed below) but suspect it's just a server issue. Would be great if it could fail gracefully (i.e. retry) rather than quitting, but it's not a huge issue.

Cheers

scotjam

Latest issue:
###############################################################################
#           LTC      FTC      BTC                                             #
# Median:     0 |      0 |    101                                             #
# Time:    0:00 |   0:00 |  19:15                                             #
# Total Median:  101                                                          #
# Total Time:  19:15                                                          #
###############################################################################

Going to sleep...
Seconds remaining: 1


<<< Round 232 >>>
time: 2013-05-12 16:55:54
getting data... done
decoding data... done
comparing profitabilty...
------------------------------------
   Litecoin:  98  (fee:  4, src: cc)
FeatherCoin:  46  (fee:  4, src: cc)
    Bitcoin: 100  (fee: -1, src: cc)
------------------------------------
=> Best: 101, mining Bitcoin
Error while attempting to parse JSON response: No JSON object could be decoded
Response: '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gatewa
y</h1></center>\r\n<hr><center>cloudflare-nginx</center>\r\n</body>\r\n</html>\r\n'
Traceback (most recent call last):
  File "cryptoSwitcher.py", line 324, in <module>
    sellCoinBTCE(abbreviation, authedAPI)
  File "cryptoSwitcher.py", line 118, in sellCoinBTCE
    r = tradeapi.getInfo()
  File "./btce-api/btceapi\trade.py", line 145, in getInfo
    return TradeAccountInfo(self._post(params))
  File "./btce-api/btceapi\trade.py", line 128, in _post
    result = common.makeJSONRequest("/tapi", headers, encoded_params)
  File "./btce-api/btceapi\common.py", line 57, in makeJSONRequest
    raise e
ValueError: No JSON object could be decoded


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on May 16, 2013, 03:51:44 PM
These sites that you are using for tracking the numbers, work great for everything but TerraCoin. Could you make the TRC check in the script, instead of using the sites data on TRC?

I'm not a Python coder, but here is what I'm using the check it in my scripts:

   $TRC_Block_Reward = 20
   $TRC_Diff = Number(BinaryToString(InetRead('http://cryptocoinexplorer.com:3750/chain/Terracoin/q/getdifficulty')))
   $BTC_Block_Reward = 25
   $BTC_Diff = Number(BinaryToString(InetRead('http://blockexplorer.com/q/getdifficulty')))
   $BTC_TRC = Number(_Get_Last_Sell_BTCe('https://btc-e.com/api/2/trc_btc/ticker'))
   $a = $TRC_Block_Reward / $TRC_Diff
   $b = $BTC_Block_Reward / $BTC_Diff
   $TRC_Profit = int(($a / $b * $BTC_TRC) * 100)
   Return $TRC_Profit



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Praxis on May 16, 2013, 03:57:45 PM
Since most pools are PPLNS I don't see this as profitable... maybe if you switch between PPS?
I just mine ONE coin, a coin I believe in, long term. It's a much better idea than changing upon every fluctuation and losing shares.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on May 16, 2013, 04:08:24 PM
Since most pools are PPLNS I don't see this as profitable... maybe if you switch between PPS?
I just mine ONE coin, a coin I believe in, long term. It's a much better idea than changing upon every fluctuation and losing shares.
Most pools I'm a part of finish multiple rounds before I end up switching to a mine a different coin. The whole point of this great app is the ability to check and see which coins will bring you the most $$$ for your effort.

You are free to mine with your hardware however you want, and I'll do the same.

But as far as not being as profitable as picking one coin and only one coin, I think we will just have to disagree.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: juhakall on May 16, 2013, 04:33:07 PM
Since most pools are PPLNS I don't see this as profitable... maybe if you switch between PPS?
I just mine ONE coin, a coin I believe in, long term. It's a much better idea than changing upon every fluctuation and losing shares.

Looks like you have misunderstood PPLNS (in a very common way), if you indeed believe that randomly hopping on/off a PPLNS pool would decrease your expected payout per share there.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 17, 2013, 08:30:57 AM
These sites that you are using for tracking the numbers, work great for everything but TerraCoin. Could you make the TRC check in the script, instead of using the sites data on TRC?

I'd very much prefer not treating any coins as special cases. My understanding is that TRC changes every block, and so sites like Coinchoose do a moving average of the difficulty so that you're not jumping on and off repeatedly. I understand why this might not be desirable. I'll think about it, but I think it is unlikely that it will be implemented.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 20, 2013, 01:22:41 PM
Worldcoin added.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on May 25, 2013, 02:17:44 PM
Area, thank you very much for Cryptoswitcher.   If you are open to suggestions, I believe Cryptoswitcher could use some default error handling.   Sometimes I get errors and the program crashes - and some of the errors should not be fatal.

I suggest adding functionality to append to a log file.   


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on May 25, 2013, 02:22:06 PM
Area, thank you very much for Cryptoswitcher.   If you are open to suggestions, I believe Cryptoswitcher could use some default error handling.   Sometimes I get errors and the program crashes - and some of the errors should not be fatal.

I suggest adding functionality to append to a log file.   

By the way, I would like to help you maintain the code in the future... just need to get my git authentication set up properly so I could push changes into your master branch.  I tried the other day and got an error.

I'm new to using Git, I used to use Subversion.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 25, 2013, 02:25:31 PM
Area, thank you very much for Cryptoswitcher.   If you are open to suggestions, I believe Cryptoswitcher could use some default error handling.   Sometimes I get errors and the program crashes - and some of the errors should not be fatal.

I suggest adding functionality to append to a log file.    

By the way, I would like to help you maintain the code in the future... just need to get my git authentication set up properly so I could push changes into your master branch.  I tried the other day and got an error.

I'm new to using Git, I used to use Subversion.

Fork it on GitHub, push to your personal repository, and start submitting pull requests. If I like what I see, it's very likely I'll give you rights on the main repository (I have already given one other person rights).

What errors are you getting? There's error handling when sites are down, and everything else should work :/ A log file is a fine idea though.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on May 25, 2013, 02:39:33 PM
The error I'm getting is

Exception: getInfo call failed with error: invalid nonce parameter.


I have Cryptoswitcher loaded on a config server and a couple mining rigs pointing to the config server.   Maybe it is a problem with multiple instances of Cryptoswitcher trying to access the key file at the same time.  It happens when the btce-api is called (line 121 in cryptoswitcher.py)

However, that log file functionality would prevent Cryptoswitcher from crashing if the error occurs.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on May 25, 2013, 04:13:49 PM
The error I'm getting is

Exception: getInfo call failed with error: invalid nonce parameter.


I have Cryptoswitcher loaded on a config server and a couple mining rigs pointing to the config server.   Maybe it is a problem with multiple instances of Cryptoswitcher trying to access the key file at the same time.  It happens when the btce-api is called (line 121 in cryptoswitcher.py)

However, that log file functionality would prevent Cryptoswitcher from crashing if the error occurs.

Yep, using two instances of Cryptoswitcher using the same key file is going to run you into difficulty. As a short-term fix, you can create a new API key on BTCE for each instance of Cryptoswitcher, and then make multiple copies of Cryptoswitcher.py. In each copy of Cryptoswither.py, change the keyfile used on line 149 to a separate instance of the key file.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: spoid on May 31, 2013, 11:12:18 PM
http://www.nerve.com/files/uploads/entertainment/2010/10/john-nash.jpg

but if we all go for the blonde...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: BTCsckr on June 01, 2013, 11:41:37 PM
Wow bter has autotrade API now  :D


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on June 02, 2013, 07:12:04 PM
Wow bter has autotrade API now  :D

It somewhat frustrating to use, because ltc_btc is a currency pair, but btc_ltc isn't. It needs a wrapper built around it like the btce-api python wrapper which takes that sort of thing into account.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 03, 2013, 12:49:39 AM
Did anyone have an issue activating the Vircurex API for their account?  My settings never save when I try.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: peonminer on June 03, 2013, 04:18:48 PM
sub'd


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 04, 2013, 03:17:01 AM
Wow bter has autotrade API now  :D

It somewhat frustrating to use, because ltc_btc is a currency pair, but btc_ltc isn't. It needs a wrapper built around it like the btce-api python wrapper which takes that sort of thing into account.

Crypsty will be coming with API soon.  Got email reply from BigVern


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: riku2015 on June 04, 2013, 02:24:47 PM
nice! i was about to do something like this also, but no need ill use this when cryptsy will be available to script :))


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: The_Catman on June 04, 2013, 07:53:52 PM
Luckycoin, Nibble, Phenixcoin, and Franko have been added. As well as some minor cosmetic changes.

I'll mention Junkcoin, Powercoin, and Royalcoinv were added awhile ago as well, since it doesn't seem to have been announced here.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 05, 2013, 12:33:47 AM
Wow bter has autotrade API now  :D

It somewhat frustrating to use, because ltc_btc is a currency pair, but btc_ltc isn't. It needs a wrapper built around it like the btce-api python wrapper which takes that sort of thing into account.

Fellahs, Cryptsy API is now available.  


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on June 05, 2013, 11:28:42 PM
Is there anyone actively working on these api wrappers?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on June 06, 2013, 02:36:34 PM
Request for new feature:

can you add a trade multiplier variable? Let me explain, as I'm not sure it is self evident.

If I'm reading the code right, it gets the current highest bid and then puts a sell order at that price. I'm looking for a variable that defaults to '1.0', which would be your standard behaviour. However,

if you set the variable to 1.01, then if the current high bid for WDC is .000152 then it would set the sell order to .00015352

I think this would help prevent the constant dive in prices, or at least allow those that want to use it to not contribute, and we can set a default 'up sell' value.

Thoughts?



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on June 06, 2013, 02:41:45 PM
Request for new feature:

can you add a trade multiplier variable? Let me explain, as I'm not sure it is self evident.

If I'm reading the code right, it gets the current highest bid and then puts a sell order at that price. I'm looking for a variable that defaults to '1.0', which would be your standard behaviour. However,

if you set the variable to 1.01, then if the current high bid for WDC is .000152 then it would set the sell order to .00015352

I think this would help prevent the constant dive in prices, or at least allow those that want to use it to not contribute, and we can set a default 'up sell' value.

Thoughts?


This seems like a pretty good idea to me.

EDIT: Added, under 'Misc' as 'tradeMultiplier'. The default value is 1, in order to not change the current behaviour, but I feel like setting this to 1.01 as the default value might be a good idea once people are aware of it.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 07, 2013, 11:13:05 AM
another feature request , not a brainy as Jazkal


It looks like if you mine over 10 coins the summary screen get's jacked up.   How about updating the bottom of the screen log summary from 1-d vector display to 2-d, adding a row dimension.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 08, 2013, 07:05:17 PM
Anybody having issues with profitability calculations in CS as of 6/8/13.   All of a sudden all my profitability calculations are zero


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on June 08, 2013, 09:16:08 PM
Might be because CoinChoose is down?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 09, 2013, 12:46:46 AM
Might be because CoinChoose is down?
Right bro.  Didn't notice.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: SNAZ31 on June 09, 2013, 02:17:27 PM
Man i wish I understood what the hell you guys are going on about! lol I would love to use something like this but I don't have the first clue how to go about it... It hurts my brain to even think about learning it! took me long enough to get cgminer to bloomin work! And still have the occasional issue with it now lol...

Good luck to you all though, after the asics have arrived alt coins are even more important to us gpu miners!

Hopefully one day someone will make a noob friendly version of this! :)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on June 09, 2013, 03:21:07 PM
CoinChoose is back up.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on June 15, 2013, 02:57:03 AM
Have you seen this?

https://github.com/Zeuxis27/mcxnowapi



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 17, 2013, 06:38:57 PM
Looks like Cryptsy's trading API is now documented (https://www.cryptsy.com/pages/api).  A blob of PHP at the end is provided as an example.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 17, 2013, 10:37:05 PM
Looks like Cryptsy's trading API is now documented (https://www.cryptsy.com/pages/api).  A blob of PHP at the end is provided as an example.

I have a minimal Python binding up:

https://github.com/salfter/PyCryptsy

I'm now looking into getting CryptoSwitcher to use it.


Title: Re: [ANN] CryptoSwitcher - Now with Cryptsy support
Post by: salfter on June 18, 2013, 05:24:26 AM
I have a minimal Python binding up:

https://github.com/salfter/PyCryptsy

I'm now looking into getting CryptoSwitcher to use it.

Here's my first stab at it...waiting to build up enough coins for it to trigger:

https://github.com/salfter/CryptoSwitcher

PyCryptsy seems to have worked well enough for a couple of YAC-to-BTC exchanges earlier.  Integration was fairly simple; I designed it to work similarly with the Vircurex integration that had been done earlier.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on June 18, 2013, 07:33:17 AM
I have a minimal Python binding up:

https://github.com/salfter/PyCryptsy

I'm now looking into getting CryptoSwitcher to use it.

Here's my first stab at it...waiting to build up enough coins for it to trigger:

https://github.com/salfter/CryptoSwitcher

PyCryptsy seems to have worked well enough for a couple of YAC-to-BTC exchanges earlier.  Integration was fairly simple; I designed it to work similarly with the Vircurex integration that had been done earlier.

This looks great, and I've merged it into CryptoSwitcher. I've also adjusted the TradeMultiplier to a default of 1.01, given the race-to-the-bottom nature of Cryptsy. To sell your altcoins for the highest price you can right now, return this to 1 in the config file.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 18, 2013, 06:40:01 PM
Here's my first stab at it...waiting to build up enough coins for it to trigger:

https://github.com/salfter/CryptoSwitcher

PyCryptsy seems to have worked well enough for a couple of YAC-to-BTC exchanges earlier.  Integration was fairly simple; I designed it to work similarly with the Vircurex integration that had been done earlier.

This looks great, and I've merged it into CryptoSwitcher. I've also adjusted the TradeMultiplier to a default of 1.01, given the race-to-the-bottom nature of Cryptsy. To sell your altcoins for the highest price you can right now, return this to 1 in the config file.

Looks like it's trading on Cryptsy...one LTC-to-BTC trade went through; another is pending. 

It would be nice if their API provided a way to cash out your BTC to your wallet. I'd rather keep my coin in a wallet under my control.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: barwizi on June 19, 2013, 05:31:55 AM
anyone wanna help me get going?  i need to write the first scrypt script


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: pytel on June 19, 2013, 10:52:55 AM
Hi,
when i try to run cryptoswitcher i get this error:
<<< Round 1 >>>
time: 2013-06-17 14:57:24
getting data... done
comparing profitabilty...
------------------------------------
    Bitcoin: 103  (fee:  0, src: cc)
FeatherCoin: 134  (fee:  2, src: cc)
DigitalCoin: 142  (fee:  2, src: cc)
  TerraCoin: 119  (fee:  2, src: cc)
    Devcoin:   0  (fee:  0, src: cc)
   Litecoin: 117  (fee:  0, src: cc)
     IXCoin:   0  (fee:  0, src: cc)
   NameCoin:   2  (fee:  0, src: cc)
------------------------------------
=> Best: 140, mining DigitalCoin
=> Switching to DigitalCoin (running dgcoin.sh)
Traceback (most recent call last):
  File "cryptoSwitcher.py", line 566, in <module>
    subprocess.Popen(coins[bestcoin].command)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Can someone help me?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: peonminer on June 19, 2013, 07:05:49 PM
OP, please add Cryptsy to the auto sell option of CryptoSwitcher!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 19, 2013, 08:22:09 PM
OP, please add Cryptsy to the auto sell option of CryptoSwitcher!

I've already done that. (https://bitcointalk.org/index.php?topic=172121.msg2506273#msg2506273) My changes were merged into this project's GitHub repo, so

Code:
cd CryptoSwitcher && git pull

should bring you up to date.  Check cryptoSwitcher.config.sample for updated options.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 19, 2013, 08:23:56 PM
Hi,
when i try to run cryptoswitcher i get this error:
<<< Round 1 >>>
time: 2013-06-17 14:57:24
getting data... done
comparing profitabilty...
------------------------------------
    Bitcoin: 103  (fee:  0, src: cc)
FeatherCoin: 134  (fee:  2, src: cc)
DigitalCoin: 142  (fee:  2, src: cc)
  TerraCoin: 119  (fee:  2, src: cc)
    Devcoin:   0  (fee:  0, src: cc)
   Litecoin: 117  (fee:  0, src: cc)
     IXCoin:   0  (fee:  0, src: cc)
   NameCoin:   2  (fee:  0, src: cc)
------------------------------------
=> Best: 140, mining DigitalCoin
=> Switching to DigitalCoin (running dgcoin.sh)
Traceback (most recent call last):
  File "cryptoSwitcher.py", line 566, in <module>
    subprocess.Popen(coins[bestcoin].command)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Can someone help me?

Does dgcoin.sh exist?  It doesn't ship with CryptoSwitcher; you'll have to create it yourself.  Assuming that it does, you might want to enter it in cryptoSwitcher.config as ./dgcoin.sh, just to be safe.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on June 19, 2013, 10:33:47 PM
Man, salfer, you're on the ball, both here and over on GitHub. I've given you commit rights to the main repo.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: jgm_coin on June 20, 2013, 05:35:23 AM
Hey thanks for the great collection.  I hope to learn more about python scripting by reading this work.

I'm getting an error that my config file is wrong from line 108 of cryptoswitcher.py - I know this cannot be true since I did in fact edit the config file. 

I suspect I am using the wrong version of python (which has happened several times in the past). What version of python should be used with cryptoswitcher?  I'm using python 3.3

Thanks in advance for any help.

Best wishes,
Jgmcoin


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: heartofalion on June 20, 2013, 06:28:21 AM
Looking through all of this, the only issue I am having ATM is finding where to set the ammount sell triggers for Cryptsy

I also am not seeing memecoin, megacoin, fastcoin...etc Is there a way i can add them myself?

EDIT::::: Nevermind i figured out how to add other coins :)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: pytel on June 20, 2013, 10:39:16 AM
Hi,
when i try to run cryptoswitcher i get this error:
<<< Round 1 >>>
time: 2013-06-17 14:57:24
getting data... done
comparing profitabilty...
------------------------------------
    Bitcoin: 103  (fee:  0, src: cc)
FeatherCoin: 134  (fee:  2, src: cc)
DigitalCoin: 142  (fee:  2, src: cc)
  TerraCoin: 119  (fee:  2, src: cc)
    Devcoin:   0  (fee:  0, src: cc)
   Litecoin: 117  (fee:  0, src: cc)
     IXCoin:   0  (fee:  0, src: cc)
   NameCoin:   2  (fee:  0, src: cc)
------------------------------------
=> Best: 140, mining DigitalCoin
=> Switching to DigitalCoin (running dgcoin.sh)
Traceback (most recent call last):
  File "cryptoSwitcher.py", line 566, in <module>
    subprocess.Popen(coins[bestcoin].command)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Can someone help me?

Does dgcoin.sh exist?  It doesn't ship with CryptoSwitcher; you'll have to create it yourself.  Assuming that it does, you might want to enter it in cryptoSwitcher.config as ./dgcoin.sh, just to be safe.

Yes, it exists and have the right rights and added in cryptoconfig


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: cokeman0 on June 20, 2013, 01:52:44 PM
Anyone gotten this working under windows.

I get this error:

Traceback (most recent call last):
  File "cryptoSwitcher.py", line 13, in <module>
    from PyCryptsy import PyCryptsy
  File "./PyCryptsy/PyCryptsy.py", line 25, in <module>
    import pycurl
ImportError: No module named pycurl


I have tried to install pycurl, but I keep getting errors, is there anyone that has a curl (that pycurl works with) that will share ?



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 20, 2013, 04:00:13 PM
Anyone gotten this working under windows.

I get this error:

Traceback (most recent call last):
  File "cryptoSwitcher.py", line 13, in <module>
    from PyCryptsy import PyCryptsy
  File "./PyCryptsy/PyCryptsy.py", line 25, in <module>
    import pycurl
ImportError: No module named pycurl

I have tried to install pycurl, but I keep getting errors, is there anyone that has a curl (that pycurl works with) that will share ?

I usually work with Linux, but am working on getting Python on Windows to the point where it'll run CryptoSwitcher.  In the meantime, you might give the PyCurl builds on this page a shot:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Edit: Confirmed working with the following configuration on Windows 7 Professional for AMD64:

Python 2.7.5 (install with default options)
   http://www.python.org/download/releases/2.7.5/

setuptools
   https://pypi.python.org/pypi/setuptools/0.7.4#windows
   open administrator command prompt, then install with
Code:
python ez_setup.py
   
pip, PyCurl, NumPy, simplejson
   http://www.lfd.uci.edu/~gohlke/pythonlibs/
   
Make sure c:\Python27 and c:\Python27\Scripts are in your PATH, then open an administrator command prompt and install beautifulsoup4:

Code:
pip install beautifulsoup4

urllib2 appears to be part of the base Python install, so with everything above installed, CryptoSwitcher should fire up.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: evilscoop on June 20, 2013, 04:02:09 PM
nice, ill have to try this on the pi


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: jgm_coin on June 20, 2013, 05:47:03 PM
Anyone got this working on Win7 yet?

I would like to know this too, and if there is anything that could be done to make it easier to run on Windows, I'd look into it.

Yes It's working on my Win 7 64 setup.. ;D Heres all the hassles I had.. ::)

1 You can't use python 3.3.. Use Python 2.7.4 (has urllib 2 ) http://www.python.org/download/releases/2.7.4/

2 Remember to set your path to python 27 (Instructions : http://www.youtube.com/watch?v=ddpYVA-7wq4  )

3 You need to install beautifulsoup4-4.0.0b10 (later version didn't work)
http://www.crummy.com/software/BeautifulSoup/bs4/download/4.0/

4 You need to install simplejson https://github.com/simplejson/simplejson

5 You need to install Numpy from the appropiate executable found only here : http://www.lfd.uci.edu/~gohlke/pythonlibs/

6 You need to download pyvircurex-master.zip and btce-api-master.zip and drop their files into the appropiate folders in the cryptoswitcher directory.

Then, if you have changed the cryptoswitcher.config to read batchfiles like the supplied bitcoin.bat, it works like a dream.

Happy geeking  ;)


To the author:  these dependencies are not clear from your github - please update when you have time



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 20, 2013, 07:23:24 PM
Now that I have CryptoSwitcher running on Windows, I have it set up for altcoin mining with my Jalapeños.  Altcoin mining with ASICs is a bit more limited as not many of them use the same sha256d proof-of-work as Bitcoin, but I have CryptoSwitcher set up to switch between Bitcoin and Freicoin.  Terracoin and PPCoin might also be worth setting up. I had my Jalapeños aimed at Coinotron's FRC pool for an hour or so this morning for testing...kicked their hashrate up by 50% and found a block.  ;D


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: heartofalion on June 20, 2013, 08:37:42 PM
Salfter, mine is up and running on windows but the auto sell function doesnt seem to be working. I have PyCrptsy.py in the appropriate folder and have put my api keys in the config file and set the ones i want to sell to true, although it doesnt seem to be selling? Is there a certain amount of coins you need before it will sell? Or am i missing something.

Thanks!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on June 20, 2013, 08:47:54 PM
Now that I have CryptoSwitcher running on Windows, I have it set up for altcoin mining with my Jalapeños.  Altcoin mining with ASICs is a bit more limited as not many of them use the same sha256d proof-of-work as Bitcoin, but I have CryptoSwitcher set up to switch between Bitcoin and Freicoin.  Terracoin and PPCoin might also be worth setting up. I had my Jalapeños aimed at Coinotron's FRC pool for an hour or so this morning for testing...kicked their hashrate up by 50% and found a block.  ;D
Jumping between coins, I found that you need to find a PPS pool, or mine solo. Just an FYI. For the lower hash diff CrapCoins out there, it isn't as important, but you won't be mining those with the Japs.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on June 20, 2013, 08:49:52 PM

After adding in the pycurl mentioned in an above post I was able to verify that the BTC-e and Cryptsy trading is working.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 20, 2013, 09:09:55 PM
Salfter, mine is up and running on windows but the auto sell function doesnt seem to be working. I have PyCrptsy.py in the appropriate folder and have put my api keys in the config file and set the ones i want to sell to true, although it doesnt seem to be selling? Is there a certain amount of coins you need before it will sell? Or am i missing something.

Thanks!
I was able to get the auto switching working with LittleDigger's guide. But I never got the auto selling features to work on Windows.

Has anyone else gotten that to work on Windows?

I've not had it on altcoins long enough for it to kick in, though it just switched over to Terracoin a bit ago.  We'll see what happens over the next several hours or so.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jazkal on June 21, 2013, 05:16:20 AM
https://github.com/Zeuxis27/mcxnowapi
Did this one not have what you need?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: jgm_coin on June 21, 2013, 04:22:33 PM

After adding in the pycurl mentioned in an above post I was able to verify that the BTC-e and Cryptsy trading is working.


I did have successful cryptsy trading but the software crashes if it can't access cryptsy when the site is down for any reason.  I'm going to try to fix this.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Mr.V on June 22, 2013, 11:43:40 PM
Now that I have CryptoSwitcher running on Windows, I have it set up for altcoin mining with my Jalapeños.  Altcoin mining with ASICs is a bit more limited as not many of them use the same sha256d proof-of-work as Bitcoin, but I have CryptoSwitcher set up to switch between Bitcoin and Freicoin.  Terracoin and PPCoin might also be worth setting up. I had my Jalapeños aimed at Coinotron's FRC pool for an hour or so this morning for testing...kicked their hashrate up by 50% and found a block.  ;D
Jumping between coins, I found that you need to find a PPS pool, or mine solo. Just an FYI. For the lower hash diff CrapCoins out there, it isn't as important, but you won't be mining those with the Japs.

What happens if your not on a PPS pool when constantly switching between coins? do you not get paid for what you put in?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: heartofalion on June 23, 2013, 02:27:39 AM
Salfter, mine is up and running on windows but the auto sell function doesnt seem to be working. I have PyCrptsy.py in the appropriate folder and have put my api keys in the config file and set the ones i want to sell to true, although it doesnt seem to be selling? Is there a certain amount of coins you need before it will sell? Or am i missing something.

Thanks!
I was able to get the auto switching working with LittleDigger's guide. But I never got the auto selling features to work on Windows.

Has anyone else gotten that to work on Windows?

I've not had it on altcoins long enough for it to kick in, though it just switched over to Terracoin a bit ago.  We'll see what happens over the next several hours or so.

Just wanted to say that it successfully auto sold for me. I have turned off the feature though because I discovered i prefer to set my own price. The auto sell features does work on windows, but as someone else said if there is an issue with cryptsy the software crashes. I had that happen to.

Salfter if I had coins to spare I'd donate, your software gives me piece of mind while I'm at work. One thing I'd like is to be able to specify different cgminer.confs to use for each coin. I only say this because I added back up pools to the .conf file incase the pool the .bat tried connecting too was unavailable but this forces me to choose one coin. I'd like to be able to create multiple conf files for use with each coin so if a primary pool isnt up it still uses a backup pool that is still for the most profitable coin at the time.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: BTCsckr on June 23, 2013, 04:03:26 AM
Salfter, mine is up and running on windows but the auto sell function doesnt seem to be working. I have PyCrptsy.py in the appropriate folder and have put my api keys in the config file and set the ones i want to sell to true, although it doesnt seem to be selling? Is there a certain amount of coins you need before it will sell? Or am i missing something.

Thanks!
I was able to get the auto switching working with LittleDigger's guide. But I never got the auto selling features to work on Windows.

Has anyone else gotten that to work on Windows?

I've not had it on altcoins long enough for it to kick in, though it just switched over to Terracoin a bit ago.  We'll see what happens over the next several hours or so.

Just wanted to say that it successfully auto sold for me. I have turned off the feature though because I discovered i prefer to set my own price. The auto sell features does work on windows, but as someone else said if there is an issue with cryptsy the software crashes. I had that happen to.

Salfter if I had coins to spare I'd donate, your software gives me piece of mind while I'm at work. One thing I'd like is to be able to specify different cgminer.confs to use for each coin. I only say this because I added back up pools to the .conf file incase the pool the .bat tried connecting too was unavailable but this forces me to choose one coin. I'd like to be able to create multiple conf files for use with each coin so if a primary pool isnt up it still uses a backup pool that is still for the most profitable coin at the time.

You can use backup pools with a cgminer config bat like this "C:\cgminer\cgminer --scrypt -o stratum+tcp://stratum.give-me-ltc.com:3334 -u x -p x -o stratum+tcp://stratum.give-me-ltc.com:3333 -u x -p x -o http://us-pool.give-me-ltc.com:8080 -u x -p x -o http://eu-pool.give-me-ltc.com:8080 -u x -p x -o http://pool.give-me-ltc.com:8080 -u x -p x --failover-only" for each coin


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: heartofalion on June 23, 2013, 05:12:51 AM
Salfter, mine is up and running on windows but the auto sell function doesnt seem to be working. I have PyCrptsy.py in the appropriate folder and have put my api keys in the config file and set the ones i want to sell to true, although it doesnt seem to be selling? Is there a certain amount of coins you need before it will sell? Or am i missing something.

Thanks!
I was able to get the auto switching working with LittleDigger's guide. But I never got the auto selling features to work on Windows.

Has anyone else gotten that to work on Windows?

I've not had it on altcoins long enough for it to kick in, though it just switched over to Terracoin a bit ago.  We'll see what happens over the next several hours or so.

Just wanted to say that it successfully auto sold for me. I have turned off the feature though because I discovered i prefer to set my own price. The auto sell features does work on windows, but as someone else said if there is an issue with cryptsy the software crashes. I had that happen to.

Salfter if I had coins to spare I'd donate, your software gives me piece of mind while I'm at work. One thing I'd like is to be able to specify different cgminer.confs to use for each coin. I only say this because I added back up pools to the .conf file incase the pool the .bat tried connecting too was unavailable but this forces me to choose one coin. I'd like to be able to create multiple conf files for use with each coin so if a primary pool isnt up it still uses a backup pool that is still for the most profitable coin at the time.

You can use backup pools with a cgminer config bat like this "C:\cgminer\cgminer --scrypt -o stratum+tcp://stratum.give-me-ltc.com:3334 -u x -p x -o stratum+tcp://stratum.give-me-ltc.com:3333 -u x -p x -o http://us-pool.give-me-ltc.com:8080 -u x -p x -o http://eu-pool.give-me-ltc.com:8080 -u x -p x -o http://pool.give-me-ltc.com:8080 -u x -p x --failover-only" for each coin

Thank you so much!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 23, 2013, 01:09:25 PM
I have a minimal Python binding up:

https://github.com/salfter/PyCryptsy

I'm now looking into getting CryptoSwitcher to use it.

Here's my first stab at it...waiting to build up enough coins for it to trigger:

https://github.com/salfter/CryptoSwitcher

PyCryptsy seems to have worked well enough for a couple of YAC-to-BTC exchanges earlier.  Integration was fairly simple; I designed it to work similarly with the Vircurex integration that had been done earlier.

This looks great, and I've merged it into CryptoSwitcher. I've also adjusted the TradeMultiplier to a default of 1.01, given the race-to-the-bottom nature of Cryptsy. To sell your altcoins for the highest price you can right now, return this to 1 in the config file.


I'm using the TradeMultiplier of 1.01 and it works great.  Thanks.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 23, 2013, 01:11:00 PM
First of all thanks to salfter for all the hard work to code PyCrypsty --  bitcoins coming your way.  

PyCrypsty was working great until an error occurred around line 222 in Cryptoswithcer caused by line 80 in PyCrypsty.   Error   "Unbound Local Error: local variable 'mkt_id' referenced before assignment.

This error causes a fatal error in Cryptoswitcher.   After this fatal error occurs when you try to run Cryptoswitcher again, BTC-E Api returns "invalid noonce parameter".   I think the error caused by PyCrypsty causes the Cryptoswitcher to exit without saving the incremented noonce value to the BTC-E key file.

I think there needs to be error handling in Cryptoswitcher around line 581 and 593 to prevent submodules from causing fatal errors in Cryptoswitcher.

Error Below:

Traceback (most recent call last):
  File "F:\Users\CryptoSwitcher\cryptoSwitcher.py", line 593, in <module
>
    sellCoinCryptsy(abbreviation)
  File "F:\Users\CryptoSwitcher\cryptoSwitcher.py", line 222, in sellCoi
nCryptsy
    acct.CreateSellOrder(coin, "BTC", bal, acct.GetBuyPrice(coin, "BTC")*tradeMu
ltiplier)
  File "./PyCryptsy/PyCryptsy.py", line 84, in GetBuyPrice
    r=self.Query("marketorders", {"marketid": self.GetMarketID(src, dest)})
  File "./PyCryptsy/PyCryptsy.py", line 80, in GetMarketID
    return mkt_id
UnboundLocalError: local variable 'mkt_id' referenced before assignment


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 24, 2013, 08:16:40 PM
Salfter if I had coins to spare I'd donate, your software gives me piece of mind while I'm at work. One thing I'd like is to be able to specify different cgminer.confs to use for each coin.

You can do that with the script (or batch file) you use to start the miner for each coin:

Code:
cgminer --config=cgminer.conf.bitcoin ...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 24, 2013, 08:18:13 PM
First of all thanks to salfter for all the hard work to code PyCrypsty --  bitcoins coming your way.  

PyCrypsty was working great until an error occurred around line 222 in Cryptoswithcer caused by line 80 in PyCrypsty.   Error   "Unbound Local Error: local variable 'mkt_id' referenced before assignment.

This error causes a fatal error in Cryptoswitcher.   After this fatal error occurs when you try to run Cryptoswitcher again, BTC-E Api returns "invalid noonce parameter".   I think the error caused by PyCrypsty causes the Cryptoswitcher to exit without saving the incremented noonce value to the BTC-E key file.

I think there needs to be error handling in Cryptoswitcher around line 581 and 593 to prevent submodules from causing fatal errors in Cryptoswitcher.

Error Below:

Traceback (most recent call last):
  File "F:\Users\CryptoSwitcher\cryptoSwitcher.py", line 593, in <module
>
    sellCoinCryptsy(abbreviation)
  File "F:\Users\CryptoSwitcher\cryptoSwitcher.py", line 222, in sellCoi
nCryptsy
    acct.CreateSellOrder(coin, "BTC", bal, acct.GetBuyPrice(coin, "BTC")*tradeMu
ltiplier)
  File "./PyCryptsy/PyCryptsy.py", line 84, in GetBuyPrice
    r=self.Query("marketorders", {"marketid": self.GetMarketID(src, dest)})
  File "./PyCryptsy/PyCryptsy.py", line 80, in GetMarketID
    return mkt_id
UnboundLocalError: local variable 'mkt_id' referenced before assignment

Yeah, there's probably not as much exception handling as there should be.  I'm looking into it.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 24, 2013, 08:45:17 PM
First of all thanks to salfter for all the hard work to code PyCrypsty --  bitcoins coming your way.  

PyCrypsty was working great until an error occurred around line 222 in Cryptoswithcer caused by line 80 in PyCrypsty.   Error   "Unbound Local Error: local variable 'mkt_id' referenced before assignment.

This error causes a fatal error in Cryptoswitcher.   After this fatal error occurs when you try to run Cryptoswitcher again, BTC-E Api returns "invalid noonce parameter".   I think the error caused by PyCrypsty causes the Cryptoswitcher to exit without saving the incremented noonce value to the BTC-E key file.

mkt_id comes back null (or "None," as Python calls it) if a currency trading pair can't be found on Cryptsy (whether due to a communication error or because that pair isn't traded).  PyCryptsy now catches this condition in its helper methods and should respond in a less-crashy manner.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 24, 2013, 09:02:45 PM
Quick note on updating: to make sure PyCryptsy gets updated, you might need to do this:

Code:
cd CryptoSwitcher && git pull && git submodule update


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: moroz on June 25, 2013, 07:47:54 AM
I found that the best way to switch pools is through cgminer API. If you have your GPUs highly overclocked, they don't really want to start every cgminer restart. With API there is no need to restart cgminer instance, unless you are switching between scrypt and sha256.
An example of adding a pool:
echo -n "addpool|stratum+tcp://stratum.give-me-ftc.com:3333,mylogin,mypass" | nc 127.0.0.1 4028


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on June 25, 2013, 08:28:50 AM
I found that the best way to switch pools is through cgminer API. If you have your GPUs highly overclocked, they don't really want to start every cgminer restart. With API there is no need to restart cgminer instance, unless you are switching between scrypt and sha256.
An example of adding a pool:
echo -n "addpool|stratum+tcp://stratum.give-me-ftc.com:3333,mylogin,mypass" | nc 127.0.0.1 4028

This man is on the money; and I've been toying with the best way to implement this. This is most of a script you should use for this sort of approach, but requires pools being doubled between the .conf file and this bash script depending on whether the script is starting CGminer or just switching the pools. I'd like to avoid this if possible.

Code:
#!/bin/bash
#Replace this script with one of your own.
METH=$(echo -n "coin" | nc 127.0.0.1 4028 | sed 's/.*Hash Method=\([a-z0-9]*\),.*/\1/')
echo $METH
#Kill vanityminer - inelegant, but works
killall oclvanityminer
if [ $METH == 'scrypt' ]
then
#Send the quit command to any cgminer instances running
echo "{\"command\":\"quit\"}" | nc 127.0.0.1 4028
#Start Bitcoin mining with API access enabled for the above command in the future
export DISPLAY=:0
#Set clocks
aticonfig --od-setclocks=930,300 --adapter=1
aticonfig --od-setclocks=850,300 --adapter=0
screen -dm ./../cgminer/cgminer -c ~/.cgminer/bitcoin.conf  --auto-fan --api-network --api-listen --api-allow W:127.0.0.1
else
#We can just modify the pools
#Remove old pools until one left (the active one)
NPOOLS=$(echo -n "config" | nc 127.0.0.1 4028| sed 's/.*Pool Count=\([0-9]*\),.*/\1/')
echo $NPOOLS
for i in $(seq $NPOOLS -1 0)
do
echo -n "removepool|$i" | nc 127.0.0.1 4028| sed 's/.*Pool Count=\([0-9]*\),.*/\1/'
done
#Add new pools
echo -n "addpool|stratum+tcp://stratum.give-me-ftc.com:3333,mylogin,mypass" | nc 127.0.0.1 4028
#Switch to first new pool
echo -n "switchpool|1" | nc 127.0.0.1 4028
#
#Remove last old pool
echo -n "removepool|0" | nc 127.0.0.1 4028

fi



Sorry I've not been keeping tabs on Cryptoswitcher so much the last week or two - I've had other commitments, which are sadly more pressing, overtake me.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: heartofalion on June 25, 2013, 07:49:24 PM
Is there a way to implement that in windows? Sorry I'm not good with creating batch files.

Also coinChoose has gotten rid of alot of coins? Can we use a different source for the data?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: erpbridge on June 25, 2013, 08:11:48 PM
Yeah, Coinchoose just dropped over half the coins they were offering since this morning... need to pick a different provider because a lot of the coins that have even been on top the past few days, like Phenixcoin, Argentum, and others were deleted from coinchoose.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on June 25, 2013, 08:26:17 PM
Yeah, Coinchoose just dropped over half the coins they were offering since this morning... need to pick a different provider because a lot of the coins that have even been on top the past few days, like Phenixcoin, Argentum, and others were deleted from coinchoose.

They'll come back. They get removed if the exchanges go down.

Is there a way to implement that in windows? Sorry I'm not good with creating batch files.

Also coinChoose has gotten rid of alot of coins? Can we use a different source for the data?

I am not a Windows man, I'm afraid.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: BTCsckr on June 26, 2013, 03:54:35 AM
After Cryptsy DDoS i´m getting this error

Traceback (most recent call last):
  File "C:\Mineria\CryptoSwitcher\cryptoSwitcher.py", line 600, in <module>
    sellCoinCryptsy(abbreviation)
  File "C:\Mineria\CryptoSwitcher\cryptoSwitcher.py", line 226, 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

anybody else with the same problem?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 26, 2013, 04:24:55 AM
After Cryptsy DDoS i´m getting this error

Traceback (most recent call last):
  File "C:\Mineria\CryptoSwitcher\cryptoSwitcher.py", line 600, in <module>
    sellCoinCryptsy(abbreviation)
  File "C:\Mineria\CryptoSwitcher\cryptoSwitcher.py", line 226, 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

anybody else with the same problem?

When I first logged into Cryptsy after the DDoS, I was redirected to a page with a captcha. I'm guessing the same thing is happening with API access.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on June 26, 2013, 12:15:38 PM
After Cryptsy DDoS i´m getting this error

Traceback (most recent call last):
  File "C:\Mineria\CryptoSwitcher\cryptoSwitcher.py", line 600, in <module>
    sellCoinCryptsy(abbreviation)
  File "C:\Mineria\CryptoSwitcher\cryptoSwitcher.py", line 226, 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

anybody else with the same problem?

When I first logged into Cryptsy after the DDoS, I was redirected to a page with a captcha. I'm guessing the same thing is happening with API access.

Yes, same problem  here


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on June 26, 2013, 01:02:41 PM
Yeah, Coinchoose just dropped over half the coins they were offering since this morning... need to pick a different provider because a lot of the coins that have even been on top the past few days, like Phenixcoin, Argentum, and others were deleted from coinchoose.

They'll come back. They get removed if the exchanges go down.

Is there a way to implement that in windows? Sorry I'm not good with creating batch files.

Also coinChoose has gotten rid of alot of coins? Can we use a different source for the data?

I am not a Windows man, I'm afraid.

Yes, it was the DDoS on the exchanges that removed the currencies as I couldn't get pricing.  All are back.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 26, 2013, 04:39:15 PM
After Cryptsy DDoS i´m getting this error

  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

anybody else with the same problem?

When I first logged into Cryptsy after the DDoS, I was redirected to a page with a captcha. I'm guessing the same thing is happening with API access.

Yes, same problem  here

...and it's still there.  Trying to pull up Cryptsy with either Lynx or Links just comes back with an error from Incapsula.  "Protecting" an API URL with a captcha that can't be answered by services that use the API is a Bad Idea.  The mining rig running CryptoSwitcher is headless; getting a graphical browser running so I can answer the stupid captcha will entail installing NX, a window manager, and Firefox; that's going to take some time, and even after all that there's still no guarantee that CryptoSwitcher will work again.  >:(

I've put a request in with Cryptsy support:

Quote
Can Incapsula be set to not block API calls?  With the example code at https://www.cryptsy.com/pages/api, an exception is thrown:

Code:
PHP Fatal error:  Uncaught exception 'Exception' with message 'Invalid data received, please make sure connection is working and requested API exists' in /home/salfter/cryptsy-test.php:42
Stack trace:
#0 /home/salfter/cryptsy-test.php(46): api_query('getinfo')
#1 {main}
  thrown in /home/salfter/cryptsy-test.php on line 42

Fatal error: Uncaught exception 'Exception' with message 'Invalid data received, please make sure connection is working and requested API exists' in /home/salfter/cryptsy-test.php:42
Stack trace:
#0 /home/salfter/cryptsy-test.php(46): api_query('getinfo')
#1 {main}
  thrown in /home/salfter/cryptsy-test.php on line 42

This is what's being returned by Cryptsy on the API call:

Code:
<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><iframe src="/_Incapsula_Resource?CWUDNSAI=23_93E7E369&incident_id=133000030648118832-1915414908464594998&edet=12&cinfo=44e01eb7c753810585000000" frameborder=0 width="100%" height="100%" marginheight="0px" marginwidth="0px">Request unsuccessful. Incapsula incident ID: 133000030648118832-1915414908464594998</iframe></html>

It's also broken CryptoSwitcher as a consequence, if Cryptsy is enabled.

For the time being, if you disable auto-trading with Cryptsy, CryptoSwitcher will continue to work.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 26, 2013, 08:02:06 PM
I've put a request in with Cryptsy support...for the time being, if you disable auto-trading with Cryptsy, CryptoSwitcher will continue to work.

BigVern asked me for my IP address so it could be whitelisted.  For those of you who are auto-trading through Cryptsy, I'd recommend sending a request to support@cryptsy.com that your public IP address be whitelisted.  Once that was done, CryptoSwitcher was back to business as usual.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: BTCsckr on June 26, 2013, 11:44:58 PM
I've put a request in with Cryptsy support...for the time being, if you disable auto-trading with Cryptsy, CryptoSwitcher will continue to work.

BigVern asked me for my IP address so it could be whitelisted.  For those of you who are auto-trading through Cryptsy, I'd recommend sending a request to support@cryptsy.com that your public IP address be whitelisted.  Once that was done, CryptoSwitcher was back to business as usual.
That would be a short-term solution since my ip is dynamic as it is for most of the people, don´t think BigVern will whitelist an ip range so i can autotrade after my modem restarts and change my ip


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 27, 2013, 12:15:54 AM
That would be a short-term solution since my ip is dynamic as it is for most of the people, don´t think BigVern will whitelist an ip range so i can autotrade after my modem restarts and change my ip

The better long-term solution would be to remove the anti-DDoS protection from at least the API pages. Only users have access to them anyway, and if somebody is abusing the service, it should be easy to identify the perp and whack him with the banhammer. Unfortunately, there's not much I can do to work around it.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on June 28, 2013, 05:51:46 PM
I am willing to pay a bounty for someone to send me an image of their BAMT miner with cryptoswitcher... PM me for more details!

The last time I looked into BAMT, wasn't it hopelessly out-of-date? It was last updated more than a year ago, and the site that hosted it is down.  You'd most likely need to update the ATI drivers and cgminer (at a minimum). If you're already doing that, it seems that starting with a newer base system and putting on the latest software would be the better way to go.

I'm somewhat partial to Gentoo. You can get a system running from a stage3 tarball fairly quickly, and about the only ebuilds you would need to add to start mining are ati-drivers and cgminer.  Portage has ati-drivers ebuilds available, and I have ebuilds for cgminer (and a bunch of other Bitcoin- and altcoin-related packages) at https://github.com/salfter/portage. (Portage also has cgminer ebuilds, but their latest is 2.7.4.  My newest is 3.3.1.)

That said, maybe there's an opportunity to start with something like the SystemRescueCD (http://www.sysresccd.org/) (a bootable Gentoo-based system you can put on recordable media or a USB flashstick) and make a BAMT replacement out of it.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on June 30, 2013, 12:02:57 PM
I reckon you need to make your shell scripts executable? i.e. chmod +x pxc.sh


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: skyhigh2004 on July 01, 2013, 04:40:53 AM
Hey guys I have been trying to get this running for a few hours now and I can't for the life of me figure out what I am missing here.  I keep getting this error message:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd c:\cryptoswitcher

c:\CryptoSwitcher>python cryptoswitcher.py
ERROR: Cannot read source from config file.

c:\CryptoSwitcher>cryptoswitcher.py
ERROR: Cannot read source from config file.

c:\CryptoSwitcher>

I followed the steps in this thread and have everything installed correctly to my knowledge.  Here is my cryptoswitcher.config file:

Code:
# -------------------------------------------------#
# Cryptocurrency mining switcher config file       #
# TipJar (BTC): 1NhathL6LpcgofDnHELSS6Hej6kU9xrVgp #
# Author: area                                     #
# -------------------------------------------------#


################################################################################
[MineCoins]

# Enable the coins you want to mine here.
mineAMC = False
mineARG = False
mineBQC = False
mineBTB = False
mineBTC = False
mineCNC = False
mineDGC = True
mineELC = False
mineEZC = False
mineFRC = False
mineFRK = False
mineFST = False
mineFTC = True
mineHYC = False
mineLKY = True
mineLTC = True
mineMEM = True
mineMNC = False
mineNBL = False
mineNVC = False
minePPC = False
minePXC = True
mineTRC = False
mineWDC = True

# Listed against LTC only (currently unusable by CS)
mineDBL = False
mineGLD = False
mineJKC = False
mineRYC = False

# No data available from sources
mineBTE = False
minePWC = False
mineMEC = False
mineYAC = False

# BTC Merged mining coins. Will be added to Bitcoin profitibilty when enabled.
mineDVC = False
mineIXC = False
mineNMC = False

# Enable to mine vanity addresses.
mineVANITY = False


################################################################################
[Scripts]

# You should have scripts that stop all other forms of mining, set all necesary
#  environment variables, and start mining the appropriate coin.

# Examples included are 'litecoin.sh.sample' and 'bitcoin.sh.sample'.
# Any coins you aren't mining you can just leave blank.
# For Windows you can use bat-files, eg "BTCscript = bitcoin.bat".
AMCscript =
ARGscript =
BQCscript =
BTBscript =
BTCscript = bitcoin.bat
BTEscript =
CNCscript =
DBLscript =
DGCscript = dgc-ftc-skyhighmining.bat
ELCscript =
EZCscript =
FRCscript =
FRKscript =
FSTscript =
FTCscript = ftc-skyhighmining.bat
GLDscript =
HYCscript =
JKCscript =
LKYscript = lcky-ltc-skyhighmining.bat
LTCscript = ltc-skyhighmining.bat
MECscript = mec-ltc-skyhighmining.bat
MEMscript = meme-ftc-skyhighmining.bat
MNCscript =
NBLscript =
NVCscript =
PPCscript =
PWCscript =
PXCscript = phnx-ltc-skyhighmining.bat
RYCscript =
TRCscript =
WDCscript = wdc-ftc-skyhighmining.bat
YACscript =

VANITYscript =


################################################################################
[Fees]

# Set specific fees for every coin (in percent).
# The fee simply adds to the profitability before calculating the most profitable coin.
# Negative values are also allowed, they increase the profitability.
feeAMC = 0
feeARG = 0
feeBQC = 0
feeBTB = 0
feeBTC = 1.5
feeBTE = 0
feeCNC = 0
feeDBL = 0
feeDGC = 15
feeELC = 0
feeEZC = 0
feeFRC = 0
feeFRK = 0
feeFST = 0
feeFTC = 5
feeGLD = 0
feeHYC = 0
feeJKC = 0
feeLKY = 5
feeLTC = 5
feeMEC = 5
feeMEM = 5
feeMNC = 0
feeNBL = 0
feeNVC = 0
feePPC = 0
feePWC = 0
feePXC = 5
feeRYC = 0
feeTRC = 0
feeWDC = 15
feeYAC = 0


################################################################################
[Data-Source]

# Source list for determining mining profitability.
# The first entry in the source list has the highest priority and is used first.
# If the site is down or a certain coin is not found the next source is used.
# Available sources: cryptoswitcher, coinotron, coinchoose, dustcoin
source=coinchoose, coinotron, dustcoin, cryptoswitcher

# If using CryptoSwitcher as a source, list markets to source prices from.
# Difficulty is acquired from coinchoose and cryptocoinexplorer.
# Available sources: btce, bter, vircurex, cryptsy
source_cryptoswitcher=cryptsy, btce, bter, vircurex

# Hashrates used in calculations when using CryptoSwitcher as a source.
# Measured in hashes per second. Can be acquired by testmining with cgminer.
# sha256 is used by Bitcoin etc. while scrypt is used by Litecoin etc.
hashrate_sha256=5800000
hashrate_scrypt=5800000


################################################################################
[Misc]

# Idle Time (in minutes) between two checks of coin profitability.
idletime = 5

# Gigahash per second you can output doing normal BTC mining.
ghashpersec = 0.7

# Gigakeys per second you can output doing vanity address mining.
gkeypersec = 0.05

# Trade multiplier - if not 1, sells not at the highest bid, but at this
#  multiple of it. 
tradeMultiplier = 1.01


################################################################################
[Sell]

# If you want to sell your coins ASAP after mining, enable an exchange here.
# This will automatically sell flagged coins for BTC ONLY.

# BTC-e
enableBTCE = False
# You'll need to configure your API key, secret, and a nonce in "key.sample".
# Rename this file to "key".

# VirCurEx
enableVircurex = False
vircurexUsername = VCEUSERNAME
vircurexSecret = APISECRET

# Cryptsy
enableCryptsy = True
cryptsyPublicKey =
cryptsyPrivateKey =

# Enable the coins you want to sell here.
sellAMC = False
sellARG = False
sellBQC = False
sellBTB = False
sellBTE = False
sellCNC = False
sellDBL = False
sellDGC = True
sellELC = False
sellEZC = False
sellFRC = False
sellFRK = False
sellFST = False
sellFTC = False
sellGLD = False
sellHYC = False
sellJKC = False
sellLKY = True
sellLTC = False
sellMEC = True
sellMEM = True
sellMNC = False
sellNBL = False
sellNVC = False
sellPPC = False
sellPWC = False
sellPXC = True
sellRYC = False
sellTRC = False
sellWDC = True
sellYAC = False
mineDVC = False
mineIXC = False
mineNMC = False

I have all of those .bat files in my cgminer folder along with all of the cryptoswitcher items.  I am sure I am missing something simple I just can't figure it out.

If anybody has any ideas It would be greatly welcomed.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: skyhigh2004 on July 02, 2013, 12:04:04 AM
Hey guys I have been trying to get this running for a few hours now and I can't for the life of me figure out what I am missing here.  I keep getting this error message:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd c:\cryptoswitcher

c:\CryptoSwitcher>python cryptoswitcher.py
ERROR: Cannot read source from config file.

c:\CryptoSwitcher>cryptoswitcher.py
ERROR: Cannot read source from config file.

c:\CryptoSwitcher>

I followed the steps in this thread and have everything installed correctly to my knowledge.  Here is my cryptoswitcher.config file:

Code:
# -------------------------------------------------#
# Cryptocurrency mining switcher config file       #
# TipJar (BTC): 1NhathL6LpcgofDnHELSS6Hej6kU9xrVgp #
# Author: area                                     #
# -------------------------------------------------#


################################################################################
[MineCoins]

# Enable the coins you want to mine here.
mineAMC = False
mineARG = False
mineBQC = False
mineBTB = False
mineBTC = False
mineCNC = False
mineDGC = True
mineELC = False
mineEZC = False
mineFRC = False
mineFRK = False
mineFST = False
mineFTC = True
mineHYC = False
mineLKY = True
mineLTC = True
mineMEM = True
mineMNC = False
mineNBL = False
mineNVC = False
minePPC = False
minePXC = True
mineTRC = False
mineWDC = True

# Listed against LTC only (currently unusable by CS)
mineDBL = False
mineGLD = False
mineJKC = False
mineRYC = False

# No data available from sources
mineBTE = False
minePWC = False
mineMEC = False
mineYAC = False

# BTC Merged mining coins. Will be added to Bitcoin profitibilty when enabled.
mineDVC = False
mineIXC = False
mineNMC = False

# Enable to mine vanity addresses.
mineVANITY = False


################################################################################
[Scripts]

# You should have scripts that stop all other forms of mining, set all necesary
#  environment variables, and start mining the appropriate coin.

# Examples included are 'litecoin.sh.sample' and 'bitcoin.sh.sample'.
# Any coins you aren't mining you can just leave blank.
# For Windows you can use bat-files, eg "BTCscript = bitcoin.bat".
AMCscript =
ARGscript =
BQCscript =
BTBscript =
BTCscript = bitcoin.bat
BTEscript =
CNCscript =
DBLscript =
DGCscript = dgc-ftc-skyhighmining.bat
ELCscript =
EZCscript =
FRCscript =
FRKscript =
FSTscript =
FTCscript = ftc-skyhighmining.bat
GLDscript =
HYCscript =
JKCscript =
LKYscript = lcky-ltc-skyhighmining.bat
LTCscript = ltc-skyhighmining.bat
MECscript = mec-ltc-skyhighmining.bat
MEMscript = meme-ftc-skyhighmining.bat
MNCscript =
NBLscript =
NVCscript =
PPCscript =
PWCscript =
PXCscript = phnx-ltc-skyhighmining.bat
RYCscript =
TRCscript =
WDCscript = wdc-ftc-skyhighmining.bat
YACscript =

VANITYscript =


################################################################################
[Fees]

# Set specific fees for every coin (in percent).
# The fee simply adds to the profitability before calculating the most profitable coin.
# Negative values are also allowed, they increase the profitability.
feeAMC = 0
feeARG = 0
feeBQC = 0
feeBTB = 0
feeBTC = 1.5
feeBTE = 0
feeCNC = 0
feeDBL = 0
feeDGC = 15
feeELC = 0
feeEZC = 0
feeFRC = 0
feeFRK = 0
feeFST = 0
feeFTC = 5
feeGLD = 0
feeHYC = 0
feeJKC = 0
feeLKY = 5
feeLTC = 5
feeMEC = 5
feeMEM = 5
feeMNC = 0
feeNBL = 0
feeNVC = 0
feePPC = 0
feePWC = 0
feePXC = 5
feeRYC = 0
feeTRC = 0
feeWDC = 15
feeYAC = 0


################################################################################
[Data-Source]

# Source list for determining mining profitability.
# The first entry in the source list has the highest priority and is used first.
# If the site is down or a certain coin is not found the next source is used.
# Available sources: cryptoswitcher, coinotron, coinchoose, dustcoin
source=coinchoose, coinotron, dustcoin, cryptoswitcher

# If using CryptoSwitcher as a source, list markets to source prices from.
# Difficulty is acquired from coinchoose and cryptocoinexplorer.
# Available sources: btce, bter, vircurex, cryptsy
source_cryptoswitcher=cryptsy, btce, bter, vircurex

# Hashrates used in calculations when using CryptoSwitcher as a source.
# Measured in hashes per second. Can be acquired by testmining with cgminer.
# sha256 is used by Bitcoin etc. while scrypt is used by Litecoin etc.
hashrate_sha256=5800000
hashrate_scrypt=5800000


################################################################################
[Misc]

# Idle Time (in minutes) between two checks of coin profitability.
idletime = 5

# Gigahash per second you can output doing normal BTC mining.
ghashpersec = 0.7

# Gigakeys per second you can output doing vanity address mining.
gkeypersec = 0.05

# Trade multiplier - if not 1, sells not at the highest bid, but at this
#  multiple of it. 
tradeMultiplier = 1.01


################################################################################
[Sell]

# If you want to sell your coins ASAP after mining, enable an exchange here.
# This will automatically sell flagged coins for BTC ONLY.

# BTC-e
enableBTCE = False
# You'll need to configure your API key, secret, and a nonce in "key.sample".
# Rename this file to "key".

# VirCurEx
enableVircurex = False
vircurexUsername = VCEUSERNAME
vircurexSecret = APISECRET

# Cryptsy
enableCryptsy = True
cryptsyPublicKey =
cryptsyPrivateKey =

# Enable the coins you want to sell here.
sellAMC = False
sellARG = False
sellBQC = False
sellBTB = False
sellBTE = False
sellCNC = False
sellDBL = False
sellDGC = True
sellELC = False
sellEZC = False
sellFRC = False
sellFRK = False
sellFST = False
sellFTC = False
sellGLD = False
sellHYC = False
sellJKC = False
sellLKY = True
sellLTC = False
sellMEC = True
sellMEM = True
sellMNC = False
sellNBL = False
sellNVC = False
sellPPC = False
sellPWC = False
sellPXC = True
sellRYC = False
sellTRC = False
sellWDC = True
sellYAC = False
mineDVC = False
mineIXC = False
mineNMC = False

I have all of those .bat files in my cgminer folder along with all of the cryptoswitcher items.  I am sure I am missing something simple I just can't figure it out.

If anybody has any ideas It would be greatly welcomed.

I hate to bump my own post but this has my head spinning.  I have tried to google and research this issue with no answer anywhere that I can find.  I would  really love to get this working to try out the program.  Again any and all advice is welcome.  Thanks again in advance.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: heartofalion on July 02, 2013, 02:39:56 AM
Hey guys I have been trying to get this running for a few hours now and I can't for the life of me figure out what I am missing here.  I keep getting this error message:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd c:\cryptoswitcher

c:\CryptoSwitcher>python cryptoswitcher.py
ERROR: Cannot read source from config file.

c:\CryptoSwitcher>cryptoswitcher.py
ERROR: Cannot read source from config file.

c:\CryptoSwitcher>

I followed the steps in this thread and have everything installed correctly to my knowledge.  Here is my cryptoswitcher.config file:

Code:
# -------------------------------------------------#
# Cryptocurrency mining switcher config file       #
# TipJar (BTC): 1NhathL6LpcgofDnHELSS6Hej6kU9xrVgp #
# Author: area                                     #
# -------------------------------------------------#


################################################################################
[MineCoins]

# Enable the coins you want to mine here.
mineAMC = False
mineARG = False
mineBQC = False
mineBTB = False
mineBTC = False
mineCNC = False
mineDGC = True
mineELC = False
mineEZC = False
mineFRC = False
mineFRK = False
mineFST = False
mineFTC = True
mineHYC = False
mineLKY = True
mineLTC = True
mineMEM = True
mineMNC = False
mineNBL = False
mineNVC = False
minePPC = False
minePXC = True
mineTRC = False
mineWDC = True

# Listed against LTC only (currently unusable by CS)
mineDBL = False
mineGLD = False
mineJKC = False
mineRYC = False

# No data available from sources
mineBTE = False
minePWC = False
mineMEC = False
mineYAC = False

# BTC Merged mining coins. Will be added to Bitcoin profitibilty when enabled.
mineDVC = False
mineIXC = False
mineNMC = False

# Enable to mine vanity addresses.
mineVANITY = False


################################################################################
[Scripts]

# You should have scripts that stop all other forms of mining, set all necesary
#  environment variables, and start mining the appropriate coin.

# Examples included are 'litecoin.sh.sample' and 'bitcoin.sh.sample'.
# Any coins you aren't mining you can just leave blank.
# For Windows you can use bat-files, eg "BTCscript = bitcoin.bat".
AMCscript =
ARGscript =
BQCscript =
BTBscript =
BTCscript = bitcoin.bat
BTEscript =
CNCscript =
DBLscript =
DGCscript = dgc-ftc-skyhighmining.bat
ELCscript =
EZCscript =
FRCscript =
FRKscript =
FSTscript =
FTCscript = ftc-skyhighmining.bat
GLDscript =
HYCscript =
JKCscript =
LKYscript = lcky-ltc-skyhighmining.bat
LTCscript = ltc-skyhighmining.bat
MECscript = mec-ltc-skyhighmining.bat
MEMscript = meme-ftc-skyhighmining.bat
MNCscript =
NBLscript =
NVCscript =
PPCscript =
PWCscript =
PXCscript = phnx-ltc-skyhighmining.bat
RYCscript =
TRCscript =
WDCscript = wdc-ftc-skyhighmining.bat
YACscript =

VANITYscript =


################################################################################
[Fees]

# Set specific fees for every coin (in percent).
# The fee simply adds to the profitability before calculating the most profitable coin.
# Negative values are also allowed, they increase the profitability.
feeAMC = 0
feeARG = 0
feeBQC = 0
feeBTB = 0
feeBTC = 1.5
feeBTE = 0
feeCNC = 0
feeDBL = 0
feeDGC = 15
feeELC = 0
feeEZC = 0
feeFRC = 0
feeFRK = 0
feeFST = 0
feeFTC = 5
feeGLD = 0
feeHYC = 0
feeJKC = 0
feeLKY = 5
feeLTC = 5
feeMEC = 5
feeMEM = 5
feeMNC = 0
feeNBL = 0
feeNVC = 0
feePPC = 0
feePWC = 0
feePXC = 5
feeRYC = 0
feeTRC = 0
feeWDC = 15
feeYAC = 0


################################################################################
[Data-Source]

# Source list for determining mining profitability.
# The first entry in the source list has the highest priority and is used first.
# If the site is down or a certain coin is not found the next source is used.
# Available sources: cryptoswitcher, coinotron, coinchoose, dustcoin
source=coinchoose, coinotron, dustcoin, cryptoswitcher

# If using CryptoSwitcher as a source, list markets to source prices from.
# Difficulty is acquired from coinchoose and cryptocoinexplorer.
# Available sources: btce, bter, vircurex, cryptsy
source_cryptoswitcher=cryptsy, btce, bter, vircurex

# Hashrates used in calculations when using CryptoSwitcher as a source.
# Measured in hashes per second. Can be acquired by testmining with cgminer.
# sha256 is used by Bitcoin etc. while scrypt is used by Litecoin etc.
hashrate_sha256=5800000
hashrate_scrypt=5800000


################################################################################
[Misc]

# Idle Time (in minutes) between two checks of coin profitability.
idletime = 5

# Gigahash per second you can output doing normal BTC mining.
ghashpersec = 0.7

# Gigakeys per second you can output doing vanity address mining.
gkeypersec = 0.05

# Trade multiplier - if not 1, sells not at the highest bid, but at this
#  multiple of it.  
tradeMultiplier = 1.01


################################################################################
[Sell]

# If you want to sell your coins ASAP after mining, enable an exchange here.
# This will automatically sell flagged coins for BTC ONLY.

# BTC-e
enableBTCE = False
# You'll need to configure your API key, secret, and a nonce in "key.sample".
# Rename this file to "key".

# VirCurEx
enableVircurex = False
vircurexUsername = VCEUSERNAME
vircurexSecret = APISECRET

# Cryptsy
enableCryptsy = True
cryptsyPublicKey =
cryptsyPrivateKey =

# Enable the coins you want to sell here.
sellAMC = False
sellARG = False
sellBQC = False
sellBTB = False
sellBTE = False
sellCNC = False
sellDBL = False
sellDGC = True
sellELC = False
sellEZC = False
sellFRC = False
sellFRK = False
sellFST = False
sellFTC = False
sellGLD = False
sellHYC = False
sellJKC = False
sellLKY = True
sellLTC = False
sellMEC = True
sellMEM = True
sellMNC = False
sellNBL = False
sellNVC = False
sellPPC = False
sellPWC = False
sellPXC = True
sellRYC = False
sellTRC = False
sellWDC = True
sellYAC = False
mineDVC = False
mineIXC = False
mineNMC = False

I have all of those .bat files in my cgminer folder along with all of the cryptoswitcher items.  I am sure I am missing something simple I just can't figure it out.

If anybody has any ideas It would be greatly welcomed.

I hate to bump my own post but this has my head spinning.  I have tried to google and research this issue with no answer anywhere that I can find.  I would  really love to get this working to try out the program.  Again any and all advice is welcome.  Thanks again in advance.

stupid question but you have the .conf file in the same directory as the .py file right? Also make sure the extension is .conf and not .config


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: skyhigh2004 on July 02, 2013, 03:41:18 AM
Hey guys I have been trying to get this running for a few hours now and I can't for the life of me figure out what I am missing here.  I keep getting this error message:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd c:\cryptoswitcher

c:\CryptoSwitcher>python cryptoswitcher.py
ERROR: Cannot read source from config file.

c:\CryptoSwitcher>cryptoswitcher.py
ERROR: Cannot read source from config file.

c:\CryptoSwitcher>

I followed the steps in this thread and have everything installed correctly to my knowledge.  Here is my cryptoswitcher.config file:

Code:
# -------------------------------------------------#
# Cryptocurrency mining switcher config file       #
# TipJar (BTC): 1NhathL6LpcgofDnHELSS6Hej6kU9xrVgp #
# Author: area                                     #
# -------------------------------------------------#


################################################################################
[MineCoins]

# Enable the coins you want to mine here.
mineAMC = False
mineARG = False
mineBQC = False
mineBTB = False
mineBTC = False
mineCNC = False
mineDGC = True
mineELC = False
mineEZC = False
mineFRC = False
mineFRK = False
mineFST = False
mineFTC = True
mineHYC = False
mineLKY = True
mineLTC = True
mineMEM = True
mineMNC = False
mineNBL = False
mineNVC = False
minePPC = False
minePXC = True
mineTRC = False
mineWDC = True

# Listed against LTC only (currently unusable by CS)
mineDBL = False
mineGLD = False
mineJKC = False
mineRYC = False

# No data available from sources
mineBTE = False
minePWC = False
mineMEC = False
mineYAC = False

# BTC Merged mining coins. Will be added to Bitcoin profitibilty when enabled.
mineDVC = False
mineIXC = False
mineNMC = False

# Enable to mine vanity addresses.
mineVANITY = False


################################################################################
[Scripts]

# You should have scripts that stop all other forms of mining, set all necesary
#  environment variables, and start mining the appropriate coin.

# Examples included are 'litecoin.sh.sample' and 'bitcoin.sh.sample'.
# Any coins you aren't mining you can just leave blank.
# For Windows you can use bat-files, eg "BTCscript = bitcoin.bat".
AMCscript =
ARGscript =
BQCscript =
BTBscript =
BTCscript = bitcoin.bat
BTEscript =
CNCscript =
DBLscript =
DGCscript = dgc-ftc-skyhighmining.bat
ELCscript =
EZCscript =
FRCscript =
FRKscript =
FSTscript =
FTCscript = ftc-skyhighmining.bat
GLDscript =
HYCscript =
JKCscript =
LKYscript = lcky-ltc-skyhighmining.bat
LTCscript = ltc-skyhighmining.bat
MECscript = mec-ltc-skyhighmining.bat
MEMscript = meme-ftc-skyhighmining.bat
MNCscript =
NBLscript =
NVCscript =
PPCscript =
PWCscript =
PXCscript = phnx-ltc-skyhighmining.bat
RYCscript =
TRCscript =
WDCscript = wdc-ftc-skyhighmining.bat
YACscript =

VANITYscript =


################################################################################
[Fees]

# Set specific fees for every coin (in percent).
# The fee simply adds to the profitability before calculating the most profitable coin.
# Negative values are also allowed, they increase the profitability.
feeAMC = 0
feeARG = 0
feeBQC = 0
feeBTB = 0
feeBTC = 1.5
feeBTE = 0
feeCNC = 0
feeDBL = 0
feeDGC = 15
feeELC = 0
feeEZC = 0
feeFRC = 0
feeFRK = 0
feeFST = 0
feeFTC = 5
feeGLD = 0
feeHYC = 0
feeJKC = 0
feeLKY = 5
feeLTC = 5
feeMEC = 5
feeMEM = 5
feeMNC = 0
feeNBL = 0
feeNVC = 0
feePPC = 0
feePWC = 0
feePXC = 5
feeRYC = 0
feeTRC = 0
feeWDC = 15
feeYAC = 0


################################################################################
[Data-Source]

# Source list for determining mining profitability.
# The first entry in the source list has the highest priority and is used first.
# If the site is down or a certain coin is not found the next source is used.
# Available sources: cryptoswitcher, coinotron, coinchoose, dustcoin
source=coinchoose, coinotron, dustcoin, cryptoswitcher

# If using CryptoSwitcher as a source, list markets to source prices from.
# Difficulty is acquired from coinchoose and cryptocoinexplorer.
# Available sources: btce, bter, vircurex, cryptsy
source_cryptoswitcher=cryptsy, btce, bter, vircurex

# Hashrates used in calculations when using CryptoSwitcher as a source.
# Measured in hashes per second. Can be acquired by testmining with cgminer.
# sha256 is used by Bitcoin etc. while scrypt is used by Litecoin etc.
hashrate_sha256=5800000
hashrate_scrypt=5800000


################################################################################
[Misc]

# Idle Time (in minutes) between two checks of coin profitability.
idletime = 5

# Gigahash per second you can output doing normal BTC mining.
ghashpersec = 0.7

# Gigakeys per second you can output doing vanity address mining.
gkeypersec = 0.05

# Trade multiplier - if not 1, sells not at the highest bid, but at this
#  multiple of it.  
tradeMultiplier = 1.01


################################################################################
[Sell]

# If you want to sell your coins ASAP after mining, enable an exchange here.
# This will automatically sell flagged coins for BTC ONLY.

# BTC-e
enableBTCE = False
# You'll need to configure your API key, secret, and a nonce in "key.sample".
# Rename this file to "key".

# VirCurEx
enableVircurex = False
vircurexUsername = VCEUSERNAME
vircurexSecret = APISECRET

# Cryptsy
enableCryptsy = True
cryptsyPublicKey =
cryptsyPrivateKey =

# Enable the coins you want to sell here.
sellAMC = False
sellARG = False
sellBQC = False
sellBTB = False
sellBTE = False
sellCNC = False
sellDBL = False
sellDGC = True
sellELC = False
sellEZC = False
sellFRC = False
sellFRK = False
sellFST = False
sellFTC = False
sellGLD = False
sellHYC = False
sellJKC = False
sellLKY = True
sellLTC = False
sellMEC = True
sellMEM = True
sellMNC = False
sellNBL = False
sellNVC = False
sellPPC = False
sellPWC = False
sellPXC = True
sellRYC = False
sellTRC = False
sellWDC = True
sellYAC = False
mineDVC = False
mineIXC = False
mineNMC = False

I have all of those .bat files in my cgminer folder along with all of the cryptoswitcher items.  I am sure I am missing something simple I just can't figure it out.

If anybody has any ideas It would be greatly welcomed.

I hate to bump my own post but this has my head spinning.  I have tried to google and research this issue with no answer anywhere that I can find.  I would  really love to get this working to try out the program.  Again any and all advice is welcome.  Thanks again in advance.

stupid question but you have the .conf file in the same directory as the .py file right? Also make sure the extension is .conf and not .config

Yep and yep.  Still no dice.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on July 02, 2013, 04:06:12 PM
Hey guys I have been trying to get this running for a few hours now and I can't for the life of me figure out what I am missing here.  I keep getting this error message:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

What version of Windows is this...Windows 8?  Windows 7 SP1 is 6.1.7601.

Quote
C:\WINDOWS\system32>cd c:\cryptoswitcher

I had a bunch of problems migrating from WinXP to Win7 with the way Win7 screws with file permissions.  I've never used Win8, but I wouldn't be surprised to find it's broken in the same way.  Directories created in the root directory are created with permissions for nobody.  Try this:

1) Open an Explorer window to C:\. Create a new directory.
2) Open a Cygwin (http://www.cygwin.com/) shell prompt. Type this:
Code:
cd /cygdrive/c/ && ls -l | grep foo

Permissions should look something like "drwxr-xr-x+" if it had been properly created.  Instead, you'll probably see "d---------+", which means nobody can access it (or files within it).  Check permissions on the files in your CryptoSwitcher directory...I wouldn't be surprised if
Code:
ls -l /cygdrive/c/cryptoswitcher
reveals that none of the files are readable. When CryptoSwitcher then tries to load its config file, it's told it can't, which is why you're getting that error.

I'd recommend running CryptoSwitcher (and your miner) from "C:\Program Files (x86)" (or "C:\Program Files" on a 32-bit system).  Open a Cygwin administrator prompt (find the Cygwin Terminal shortcut in the start menu, right-click it, and click "Run as administrator") and use this to move it and (hopefully) fix permissions to something useful:

Code:
cd c:
mv cryptoswitcher Program\ Files\ \(x86\)/CryptoSwitcher
chmod 755 Program\ Files\ \(x86\)/CryptoSwitcher
chmod 644 Program\ Files\ \(x86\)/CryptoSwitcher/*



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: skyhigh2004 on July 03, 2013, 03:09:59 AM
It is windows 8, upgraded from 7.  It was like you guessed, the permissions were not readable.  I did all the steps that you listed and it did move the file but I am still getting the same error.  I have been trying to modify that line of text you had me try to show the permissions of the cryptoswitcher folder to check if the permissions were changed when it was moved but I can't get it right.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: coinstopper on July 03, 2013, 04:27:33 AM
stupid question but you have the .conf file in the same directory as the .py file right? Also make sure the extension is .conf and not .config

I thought the extension was .config, not .conf.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: skyhigh2004 on July 03, 2013, 05:42:38 AM
Hey guys I have been trying to get this running for a few hours now and I can't for the life of me figure out what I am missing here.  I keep getting this error message:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

What version of Windows is this...Windows 8?  Windows 7 SP1 is 6.1.7601.

Quote
C:\WINDOWS\system32>cd c:\cryptoswitcher

I had a bunch of problems migrating from WinXP to Win7 with the way Win7 screws with file permissions.  I've never used Win8, but I wouldn't be surprised to find it's broken in the same way.  Directories created in the root directory are created with permissions for nobody.  Try this:

1) Open an Explorer window to C:\. Create a new directory.
2) Open a Cygwin (http://www.cygwin.com/) shell prompt. Type this:
Code:
cd /cygdrive/c/ && ls -l | grep foo

Permissions should look something like "drwxr-xr-x+" if it had been properly created.  Instead, you'll probably see "d---------+", which means nobody can access it (or files within it).  Check permissions on the files in your CryptoSwitcher directory...I wouldn't be surprised if
Code:
ls -l /cygdrive/c/cryptoswitcher
reveals that none of the files are readable. When CryptoSwitcher then tries to load its config file, it's told it can't, which is why you're getting that error.

I'd recommend running CryptoSwitcher (and your miner) from "C:\Program Files (x86)" (or "C:\Program Files" on a 32-bit system).  Open a Cygwin administrator prompt (find the Cygwin Terminal shortcut in the start menu, right-click it, and click "Run as administrator") and use this to move it and (hopefully) fix permissions to something useful:

Code:
cd c:
mv cryptoswitcher Program\ Files\ \(x86\)/CryptoSwitcher
chmod 755 Program\ Files\ \(x86\)/CryptoSwitcher
chmod 644 Program\ Files\ \(x86\)/CryptoSwitcher/*



After I tried your steps and it still didnt work on my windows 8 machine I decided to start from scratch on a fresh windows 7 install on another machine.  All went great until I got to the part of starting cryptoswitcher and guess what... I got the same error.  Now i really have no idea what's going on since it should not be permission issues since I am using a fresh install of windows 7 and it comes up with the exact same error.  I am basically giving up on the hope that I will be able to get this to work.  It does seem like an awesome idea but it looks like i'll be sticking to just switching all my miners over manually  :'(


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: kenshin23 on July 04, 2013, 05:01:10 AM
It seems Cryptsy is moving some coins to secondary exchage (I imagine that is coin/LTC) so that would mean CS wouldn't support them, right?

If so, here are some of the coins they're listing, to give a heads up:

    DBL/LTC
    DVC/LTC
    EZC/LTC
    GLD/LTC
    JKC/LTC
    MEM/LTC
    RYC/LTC

Here's the message that appears when I try to exchange, let's say, MEM:

MemeCoin market will be moving from Primary to Secondary. For the next few days, both markets will be open, then MEM/BTC market will close


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: skyhigh2004 on July 06, 2013, 03:39:59 PM
Well I just gave up getting this to work entirely as it was never really designed for windows in the first place.  If you are on windows and are still looking for a profitability switching program MultiMiner from https://bitcointalk.org/index.php?topic=248173.0 works flawlessly with a few less options and only takes about 5 mins to setup on windows. 


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: leopard2 on July 07, 2013, 12:24:10 AM
This is way too much trouble

I can't understand why there are so many pools, and compare sites, why is there not a pool that simply collects SHA256 and Scrypt cycles, and does all the magic in the background, and pays you in a destination crypto?  ???


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: juhakall on July 07, 2013, 03:42:49 AM
This is way too much trouble

I can't understand why there are so many pools, and compare sites, why is there not a pool that simply collects SHA256 and Scrypt cycles, and does all the magic in the background, and pays you in a destination crypto?  ???

There is a pool that always tries to mine the most profitable coin. https://www.multipool.in. That being said, you could also use CryptoSwitcher to setup a similar port forwarding service yourself, and pick only the coins that you want to mine. There's nothing forcing you to touch the miners when a coin change is triggered in CryptoSwitcher, you could just as well change a port forward to point to a different pool or coin daemon, and always keep your miners pointed to the port that's being forwarded. Just like multipool is doing it.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: educatedwarrior on July 14, 2013, 03:08:47 PM
Anybody working on an API for Coins-E?    This exchange allows you to trade most of the Cryptocurrencies for Litecoin instead of Bitcoin.     


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on July 22, 2013, 11:05:08 AM
Users of CryptoSwitcher will likely be interested in MiddleCoin, which has just started: https://bitcointalk.org/index.php?topic=259649


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Gorets on July 27, 2013, 04:11:51 PM
Few days not work CryptoSwitcher with Cryptsy API, its problem with CryptoSwitcher or  Cryptsy? (get coin rates)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: BitOmni on July 28, 2013, 04:19:40 PM
May need to try this out


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on July 29, 2013, 05:42:51 AM
Few days not work CryptoSwitcher with Cryptsy API, its problem with CryptoSwitcher or  Cryptsy? (get coin rates)

It's been working for me. Cryptsy had some DDoS problems a few days ago that could crash CryptoSwitcher, but I committed some changes to PyCryptsy to make it more resilient. You might want to make sure you're using the latest code.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Gorets on July 29, 2013, 02:52:14 PM
I have last version, if i use source cryptoswitcher/cryptsy i have:
<<< Round 1 >>>
time: 2013-07-29 17:51:28
getting data... done                                                           
comparing profitabilty...
------------------------------------
     PPCoin:   0  (fee:  0, src: --)
  Doubloons:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
     Bitbar:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
   Bytecoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    Bitcoin: 100  (fee:  0, src: --)                                                                                                                                                                                                                                         
   Argentum:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
 Phenixcoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    Mincoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
   Freicoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    BBQCoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
     Franko:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    Elacoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
  RoyalCoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
Feathercoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    CHNCoin:   0  (fee:  0, src: --)
  Luckycoin:   0  (fee:  0, src: --)
     Nibble:   0  (fee:  0, src: --)
     YaCoin:   0  (fee:  0, src: --)
DigitalCoin:   0  (fee:  0, src: --)
   Megacoin:   0  (fee:  0, src: --)
   Memecoin:   0  (fee:  0, src: --)
AmericanCoin:   0  (fee:  0, src: --)
  Worldcoin:   0  (fee:  0, src: --)
   NovaCoin:   0  (fee:  0, src: --)
  Powercoin:   0  (fee:  0, src: --)
   Junkcoin:   0  (fee:  0, src: --)
  Hypercoin:   0  (fee:  0, src: --)
  Bottlecap:   0  (fee:  0, src: --)
    GLDCoin:   0  (fee:  0, src: --)
    Devcoin:   0  (fee:  0, src: --)
   Litecoin:   0  (fee:  0, src: --)
   Fastcoin:   0  (fee:  0, src: --)
     IXCoin:   0  (fee:  0, src: --)
   NameCoin:   0  (fee:  0, src: --)
------------------------------------
=> Best: 100, mining Bitcoin

few days ago worked normal.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on July 29, 2013, 04:15:48 PM
Cryptsy changes the URL for their API.  I wonder if that needs to change.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on July 31, 2013, 05:29:26 AM
I have last version, if i use source cryptoswitcher/cryptsy i have:

I see...I've been using coinchoose as the data source. Cryptsy changed its public API URL, and it's also necessary to filter out *->LTC pairings from the returned data.  I've made the appropriate changes and put them up on GitHub.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: digeros on August 06, 2013, 03:23:25 AM
I have last version, if i use source cryptoswitcher/cryptsy i have:
<<< Round 1 >>>
time: 2013-07-29 17:51:28
getting data... done                                                           
comparing profitabilty...
------------------------------------
     PPCoin:   0  (fee:  0, src: --)
  Doubloons:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
     Bitbar:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
   Bytecoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    Bitcoin: 100  (fee:  0, src: --)                                                                                                                                                                                                                                         
   Argentum:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
 Phenixcoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    Mincoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
   Freicoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    BBQCoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
     Franko:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    Elacoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
  RoyalCoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
Feathercoin:   0  (fee:  0, src: --)                                                                                                                                                                                                                                         
    CHNCoin:   0  (fee:  0, src: --)
  Luckycoin:   0  (fee:  0, src: --)
     Nibble:   0  (fee:  0, src: --)
     YaCoin:   0  (fee:  0, src: --)
DigitalCoin:   0  (fee:  0, src: --)
   Megacoin:   0  (fee:  0, src: --)
   Memecoin:   0  (fee:  0, src: --)
AmericanCoin:   0  (fee:  0, src: --)
  Worldcoin:   0  (fee:  0, src: --)
   NovaCoin:   0  (fee:  0, src: --)
  Powercoin:   0  (fee:  0, src: --)
   Junkcoin:   0  (fee:  0, src: --)
  Hypercoin:   0  (fee:  0, src: --)
  Bottlecap:   0  (fee:  0, src: --)
    GLDCoin:   0  (fee:  0, src: --)
    Devcoin:   0  (fee:  0, src: --)
   Litecoin:   0  (fee:  0, src: --)
   Fastcoin:   0  (fee:  0, src: --)
     IXCoin:   0  (fee:  0, src: --)
   NameCoin:   0  (fee:  0, src: --)
------------------------------------
=> Best: 100, mining Bitcoin

few days ago worked normal.

THis looks like a great tool but can I configure it to only mine the Coins I am interested in (ie. Bitcoin vs. Bitbar vs. NameCoin vs AnonCoin vs PhilosopherStones (once on an exchange))


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: SebastianJu on August 26, 2013, 09:09:20 PM
Is there a precompiled version so i dont have to crawl through all this linux things? Or maybe a tutorial how to build? With dependencies alone i wont get a result.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on August 27, 2013, 12:33:56 AM
Is there a precompiled version so i dont have to crawl through all this linux things? Or maybe a tutorial how to build? With dependencies alone i wont get a result.

CryptoSwitcher itself is written in Python; there's nothing to compile.  A short while back, I had it running on Windows and (IIRC) didn't have to compile anything to get its dependencies set up either.  Just make sure you're using Python 2.7, not 3.x.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: SebastianJu on August 27, 2013, 12:03:58 PM
Is there a precompiled version so i dont have to crawl through all this linux things? Or maybe a tutorial how to build? With dependencies alone i wont get a result.

CryptoSwitcher itself is written in Python; there's nothing to compile.  A short while back, I had it running on Windows and (IIRC) didn't have to compile anything to get its dependencies set up either.  Just make sure you're using Python 2.7, not 3.x.

Thanks.

Is cryptoswitcher still rewarding for ASIC-User? I see a big list of scrypt coins but only one coint better than bitcoin and this coin lost half of its advantage the last day. So would it be worth the effort for me yet? I now mine at bitparking.com and get 2% more in total because of merged mining.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: area on August 27, 2013, 12:53:05 PM
To be honest, most users will see the same return with a much lower effort to set up by using middlecoin.com.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: SebastianJu on August 27, 2013, 02:17:37 PM
To be honest, most users will see the same return with a much lower effort to set up by using middlecoin.com.

Is middlecoin for ASIC-User too? I have read that multipool and middlecoin thought about it but when i read on their websites i only see scrypt mining.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: cyclops on August 27, 2013, 02:28:58 PM
Ill test it out, seems interesting.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: juve4v on August 27, 2013, 02:31:36 PM
Scrypt mining only for middlecoin, but I bet we will see a lot of new sha256 coins  in the next months ;)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on August 27, 2013, 02:39:47 PM
To be honest, most users will see the same return with a much lower effort to set up by using middlecoin.com.

I think Middlecoin (and Multipool) have their place, but the nice thing about CrytpoSwitcher is you can alter the code to mine the second / third most profitable and not be subject to the market / depth risk associated with mining the top coin.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: juve4v on August 27, 2013, 03:06:08 PM
To be honest, most users will see the same return with a much lower effort to set up by using middlecoin.com.

I think Middlecoin (and Multipool) have their place, but the nice thing about CrytpoSwitcher is you can alter the code to mine the second / third most profitable and not be subject to the market / depth risk associated with mining the top coin.

Have you tried cgwatcher ?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: sal002 on August 27, 2013, 03:13:32 PM
To be honest, most users will see the same return with a much lower effort to set up by using middlecoin.com.

I think Middlecoin (and Multipool) have their place, but the nice thing about CrytpoSwitcher is you can alter the code to mine the second / third most profitable and not be subject to the market / depth risk associated with mining the top coin.

Have you tried cgwatcher ?

Isn't that for Windows?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: juve4v on August 27, 2013, 03:15:27 PM
Does it matter the color of money to you ?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: SebastianJu on August 27, 2013, 05:31:33 PM
So there is no pool for sha256 yet? Only possibility would be using cryptoswitcher. But is it rewarding at all for sha256?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on August 28, 2013, 03:19:26 PM
So there is no pool for sha256 yet? Only possibility would be using cryptoswitcher. But is it rewarding at all for sha256?

Freicoin and Zetacoin have blipped above Bitcoin recently, sometimes by a considerable margin.  I have a couple of Jalapeños mining through CryptoSwitcher.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: SebastianJu on August 28, 2013, 06:45:45 PM
So there is no pool for sha256 yet? Only possibility would be using cryptoswitcher. But is it rewarding at all for sha256?

Freicoin and Zetacoin have blipped above Bitcoin recently, sometimes by a considerable margin.  I have a couple of Jalapeños mining through CryptoSwitcher.

I watched zetacoin too... but i saw it lost its better position in hours up to the level of bitcoin mining. Thats why im wondering if its worth the effort...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on August 29, 2013, 04:32:36 AM
Is cryptoswitcher still rewarding for ASIC-User? I see a big list of scrypt coins but only one coint better than bitcoin and this coin lost half of its advantage the last day. So would it be worth the effort for me yet? I now mine at bitparking.com and get 2% more in total because of merged mining.

I've only had my Jalapeños on it since this morning, but it's already reporting a median ~150% return for the Zetacoin mining it's done.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: SebastianJu on August 30, 2013, 10:29:35 PM
Is cryptoswitcher still rewarding for ASIC-User? I see a big list of scrypt coins but only one coint better than bitcoin and this coin lost half of its advantage the last day. So would it be worth the effort for me yet? I now mine at bitparking.com and get 2% more in total because of merged mining.

I've only had my Jalapeños on it since this morning, but it's already reporting a median ~150% return for the Zetacoin mining it's done.

Hm. I tried mining zetacoins the last 24 hours too. http://www.alloscomp.com/bitcoin/calculator told me with mining bitcoins i should have made 0.34BTC. I received 28953 Zetacoins. Even at 0.000008BTC exchange price this would translate to 0.23BTC only. So i dont see anywhere near the 150% that zetacoin often stands at dustcoin.

The pool states nearly the hashrate cgminer states. And only 0.6% invalid. But cgminer shows me 13% Rejected shares. Now what to trust? I mean even when the pool counts rejected shares too it would mean i effectively mine with less hashpower than normal since the calculations on coinchoose are based on clean hashing without errors.

Im not sure whats wrong but i think cryptoswitcher and its depending websites make an error by not including a factor of some kind

Im back at bitcoin mining for the moment.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: marcetin on September 05, 2013, 01:17:12 AM
Great tool area :)

This could be useful to use with it  Crypto-currency directory (http://com-http.us/)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: marcetin on September 09, 2013, 05:19:39 PM
I am testing this tool on Centos, it start ok, .sh of best profitable coin start, but it wont switch automaticly to best profitable coin.
I have set idletime = 3 and watching but it did not change coin anyhow.
Where am I wrong?

edit

I was wrong on many steps :)

First my centos did not have nc and screen and .sh script did not start well.
Second cgminer API was configured to port 80, because I use Anubis to watch my rigs.
At the end I figure out to make switcher start cgminer in other, new window instead of screen command, so I made this start script:
Code:
#!/bin/bash
echo "{\"command\":\"quit\"}" | nc 127.0.0.1 80
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
export DISPLAY=:0
cd /cg
gnome-terminal -e "./cgminer -c /conf/ftc.conf"

At last CryptoSwitcher work for me now on one rig.
I will install it on the second rig and try to write down everything that it is done so I can post it here if some one have similar problems.

Cheers! :)

edit again :)
It was working but not good at all, sometimes it switch good sometimes it start another instance of cgminer without shutdown one that is running and than everything for some reason stop.
Also I did not like fact that every time on switch GPU's are turned off and than turned on, so I come out with solution that now works perfect for me.
I made just one instance of cgminer with just one config file, in which are pools for all coins, because I mine just scrypt based coins it works, settings are the same.
In .sh that switcher start I put just this:
Code:
echo "switchpool|1" | nc 127.0.0.1 80
where number in "switchpool|1" represent ID of pool in cgminer configuration.
So now it mining and switching good, even without stoping GPU's!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: dddbtc on September 16, 2013, 05:38:21 AM
http://i.cubeupload.com/ZTzopQ.png

I'm an avalon ASIC owner (recieved my 20chip miner very late) so I thought I'd give cryptoswitcher a try. Got the clock speed set nice 'n high too.  Will post my results.  SebastianJu, I would change my data source to coinchoose rather than dustcoin.  I have found that dustcoin's numbers to be off *somehow* too.  Can't quite put my finger on it though.  It will be interesting to see how coinchoose stacks up against an ASIC.  Your choice of pools can have a pretty big effect as well.

Would be nice to see tigercoin/butterflycoin support.  I'll mine anything if its mathmatically calculated, has quick confirms, and can be auto-sold at cryptsy for btc.  Can anyone edit the github?  I should see how my python skills are and edit github.

My hashrate will get much higher than it would mining btc briefly every few minutes.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: RicRock on September 16, 2013, 05:54:27 AM
I made just one instance of cgminer with just one config file, in which are pools for all coins, because I mine just scrypt based coins it works, settings are the same.
In .sh that switcher start I put just this:
Code:
echo "switchpool|1" | nc 127.0.0.1 80
where number in "switchpool|1" represent ID of pool in cgminer configuration.
So now it mining and switching good, even without stoping GPU's!

That's a brilliant idea, Thanks!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: RicRock on September 16, 2013, 05:06:27 PM

So looking at the script.

If I have 2 exchanges enabled... it will attempt to sell the balance of my current coin on them both.

Obv doesn't complete if I have no balance



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: MasterX on September 18, 2013, 03:31:09 PM
For anyone who's interested.

I've added some coins and included batch file samples the for coins i use.
I have also modified the batch file for windows, makes it easier to implement on existing installs.
Take a look at the bitcoin example to see what i mean --> https://github.com/MasterX1582/CryptoSwitcher/blob/master/bitcoin.bat.sample

The coins i have added are Asiccoin, ButterflyCoin and TigerCoin.

Have fun mining with it!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: mattle74 on September 22, 2013, 01:08:43 AM

It was working but not good at all, sometimes it switch good sometimes it start another instance of cgminer without shutdown one that is running and than everything for some reason stop.
Also I did not like fact that every time on switch GPU's are turned off and than turned on, so I come out with solution that now works perfect for me.
I made just one instance of cgminer with just one config file, in which are pools for all coins, because I mine just scrypt based coins it works, settings are the same.
In .sh that switcher start I put just this:
Code:
echo "switchpool|1" | nc 127.0.0.1 80
where number in "switchpool|1" represent ID of pool in cgminer configuration.
So now it mining and switching good, even without stoping GPU's!

I got CryptoSwitcher up and running on Linux great last night. It's really awesome with your suggestion to just load all of your pools in the config file and then just have each script run the switchpool command through cgminer's API. Right now I only have 1 Linux box and my main miner runs on Windows 7. I use CGWatcher to profit switch but I hate that it has to close and reopen a cgminer instance each time. I personally think it leads to instability. I got CryptoSwitcher running on Windows, but I can't get the same switchpool command to work. I downloaded a copy of netcat, but when I run the command, I get this error:

STATUS=E,When=1379746858,Code=14,Msg=Invalid command,Description=cgminer 3.2.1|

I have --api-listen, --api-port and --api-allow set in the cgminer config file. netcat is obviously talking to cgminer since it's getting an error response from it. Any suggestions?

Thanks to everyone!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: MasterX on September 22, 2013, 05:49:21 AM

It was working but not good at all, sometimes it switch good sometimes it start another instance of cgminer without shutdown one that is running and than everything for some reason stop.
Also I did not like fact that every time on switch GPU's are turned off and than turned on, so I come out with solution that now works perfect for me.
I made just one instance of cgminer with just one config file, in which are pools for all coins, because I mine just scrypt based coins it works, settings are the same.
In .sh that switcher start I put just this:
Code:
echo "switchpool|1" | nc 127.0.0.1 80
where number in "switchpool|1" represent ID of pool in cgminer configuration.
So now it mining and switching good, even without stoping GPU's!

I got CryptoSwitcher up and running on Linux great last night. It's really awesome with your suggestion to just load all of your pools in the config file and then just have each script run the switchpool command through cgminer's API. Right now I only have 1 Linux box and my main miner runs on Windows 7. I use CGWatcher to profit switch but I hate that it has to close and reopen a cgminer instance each time. I personally think it leads to instability. I got CryptoSwitcher running on Windows, but I can't get the same switchpool command to work. I downloaded a copy of netcat, but when I run the command, I get this error:

STATUS=E,When=1379746858,Code=14,Msg=Invalid command,Description=cgminer 3.2.1|

I have --api-listen, --api-port and --api-allow set in the cgminer config file. netcat is obviously talking to cgminer since it's getting an error response from it. Any suggestions?

Thanks to everyone!
I personally dont have any of the problems mentioned above. Once i had 2 cgminers running, but then i changed some stuff and now everything is running great, i have 7 block erupters running on a linux host and 2 block erupters on a windows host; Both of them running fine,
I even noticed a small increase of income, but i guess thats what its supposed to do...??
But, again, i'm not using any gpu or cpu anymore so i can not speak for basic hardware.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on October 07, 2013, 09:57:16 PM
A couple of days or so ago, I merged some pull requests that had been sitting around a while.  I also included a PHP script that uses the cgminer API to switch pools.  Others have posted about using just one cgminer.conf with every pool and issuing a switchpool call.  My script takes a pool URL, miner name, and password, adds them to the current list of pools, and (optionally) removes all of the other pools.  In your pool-switching shell script, you then call my script once for each pool you want to use for a coin, with the "clear" parameter included on the first call. This allows you to have multiple pools configured for a coin as a backup.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Temuujin on October 25, 2013, 10:35:57 PM
Hi. Noob here.
I downloaded this program 2 weeks ago, played with it, and set it up to mine the various SHA-256 coins in the list.
But within those two weeks, coins have disappeared (like BFC), and new coins have popped up (OSC and the new UNO to name a few).

Could someone please help me understand how make this program look at CoinWarz site and the CoinEx.pw site, first, before looking at the other exchanges already in this program?
Also, how do I implement new coins? For instance OSC and the new UNO coins are only listed on the COINEX exchange (and coinwarz site) and I want to use them with the CryptoSwitcher program.

Do I use these in the code?
https://coinex.pw/api/v1/trade_pairs
https://coinex.pw/api/v1/ticker

Thank you for your help.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: nov on December 18, 2013, 06:45:18 PM
Looks like nice idea!

It could be interesting if somebody could add this functionality to minepeon raspberry pi mining distro.
https://bitcointalk.org/index.php?topic=137934.0;topicseen


Title: What are your real life experiences of mining coin pool switching?
Post by: nov on December 21, 2013, 04:41:31 PM
Do you think auto switching of the coin mining pool method is more profitable or is it just a theory?
And real values are different? Like frequent change of exchange rate, long time to get full hash rate efficiency in just switched pool, other problems, etc.?
Delay caused in transferring of the coins to exchange, etc.? Could that finally cause lower earnings finally?

What are your experiences?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: AnhBen on December 25, 2013, 08:58:03 PM
What is CryptoSwitcher?
You've heard about these altcoins, and none have them have taken your fancy; you think they're all clones and destined to failure. You think BTC is the one true way, and are still mining it. The altcoins aren't useless to you. Many of them are more profitable to mine short-term than BTC if you just sell them at the market price.

How can I used it?
The source is available at https://github.com/area/CryptoSwitcher. Clone it, and then edit the cryptoswitcher.config.sample file as it instructs in the comments. If you wish to use BTC-E, you will need to edit the 'key.sample' file to contain your API key, and move it to 'key'. The README included should be a bit more comprehensive than the instructions here. If you already have scripts to start and stop mining, then setup should be easy for you.

How does it work?
The actual maths is done by the websites:

http://dustcoin.com/mining (http://dustcoin.com/mining)
http://coinchoose.com (http://coinchoose.com)
http://fizzisist.com (http://fizzisist.com) (Vanity address mining only - down at the moment?)

This is just a wrapper to use the above sites to pick the most appropriate mining activity for your hardware, and make sure that it's doing the right thing for you. It's written in Python, and uses scripts (which the end-user must write, in the language of their choice; some samples are included) to stop other miners and launch the appropriate one.

Isn't this a terrible idea?
Maybe. I honestly haven't decided whether coin-hopping is a bad thing long term. The consequences of wide-spread adoption that I can think of are:
  • This would tie the value of all alt-coins to BTC.
  • It would cause massive difficulty spikes as retargets happen, causing mining an alt-coin to become less profitable and hoppers to mine elsewhere. The dedicated miners on that coin are then left with a much higher difficulty than they should have, and struggle to find blocks. We have seen this happen already with TRC, which is still struggling to deal with the aftermath

The closest parallel to this I can think of is pool-hopping. However, pool-hopping eventually brought about good - nearly all hoppable pools eventually moved from proportional payouts to an unhoppable payout scheme (e.g. DGM), and pool hopping died as an art, despite the best efforts of P4Man and others. I feel like the same should happen here; if an alt-coin is unable to convince people of its merits such that it is mined regardless of profitability compared to mining the more accepted BTC - or is unable to deal with the consequences of not doing so - then perhaps it doesn't deserve to succeed.

I think this is probably the most contentious issue with this project, and is probably going to get worse as BTC difficulty continues to rise with the advent of ASICs, and people with outdated hardware look to put it to use. I welcome input on this particular aspect.

Features
  • Support for both Dustcoin and Coinchoose, and all the coins they list (though only one site may be used at a time)
  • Takes merged mining into account if you say its available
  • Will automatically sell coins for BTC on BTC-E and/or Vircurex if you choose.

Todo
  • Vircurex support
  • Use both Dustcoin and Coinchoose at the same time?
  • Use the CGMiner API to switch between coins with the same hashing algorithm in one CGminer instance. If a user were to allow remote API access, then this could in theory be provided as a service, without the user having to run the script themselves.
  • Monitor miners for dead pools.


Looks like this project is abandoned?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: corsaro on December 26, 2013, 10:21:36 AM
BitBar and BBQCoin added to Cryptoswitcher. SolidCoin removed.

Maybe you'd be interested in supporting this site: http://www.coinwarz.com/cryptocurrency (http://www.coinwarz.com/cryptocurrency)

these lines can help you...   I addedd support to coinwarz

cryptoSwitcher.py:

(replace YOUR_COINWARZ_API_KEY with your api key)

Code:
  
from bs4 import BeautifulSoup
import urllib2
import time
import subprocess
import numpy as np
import sys
# Ugly hack so git submodule init is adequate.
sys.path.insert(0, './btce-api/')
import btceapi
sys.path.insert(0, './pyvircurex/')
import vircurex as vircurexapi
sys.path.insert(0, './PyCryptsy/')
from PyCryptsy import PyCryptsy

import ConfigParser

import simplejson
import socket

# -----------
# Hopefully nothing below this needs editing.
# -----------

class Coin:
    def __init__(self, name):
        self.ratio=0 # assume totally unprofitable unless otherwise shown to be the case.
        self.willingToMine = False
        self.miningNow = False
        self.merged = False
        self.willingToSell = False
        self.command = '' # the command that is run when we want to mine this coin.
        self.name = name
        self.cnt = 0
        self.median = 0
        self.m = 0
        self.h = 0
        self.fee = 0
        self.source = '--'
        self.price = 0.0
        self.diff = 9999999999.9 # start off with ridiculously high diff so we dont mine the wrong coin
        self.reward = 0
        self.algo = ""

coins = {}
coins['alf'] =  Coin('AlphaCoin')
coins['bet'] =  Coin('Betacoin')
coins['uno'] =  Coin('Unobtanium')
coins['amc'] =  Coin('AmericanCoin')
coins['anc'] =  Coin('Anoncoin')
coins['arg'] =  Coin('Argentum')
coins['asc'] =  Coin('Asiccoin')
coins['bfc'] =  Coin('ButterflyCoin')
coins['bqc'] =  Coin('BBQCoin')
coins['btb'] =  Coin('Bitbar')
coins['btc'] =  Coin('Bitcoin')
coins['bte'] =  Coin('Bytecoin')
coins['btg'] =  Coin('Bitgem')
coins['cap'] =  Coin('Bottlecap')
coins['cgb'] =  Coin('CryptogenicBullion')
coins['cnc'] =  Coin('CHNCoin')
coins['crc'] =  Coin('Craftcoin')
coins['dbl'] =  Coin('Doubloons')
coins['dgc'] =  Coin('DigitalCoin')
coins['emd'] =  Coin('Emerald')
coins['elc'] =  Coin('Elacoin')
coins['ezc'] =  Coin('EZCoin')
coins['frc'] =  Coin('Freicoin')
coins['frk'] =  Coin('Franko')
coins['fst'] =  Coin('Fastcoin')
coins['ftc'] =  Coin('Feathercoin')
coins['gdc'] =  Coin('Grandcoin')
coins['gld'] =  Coin('GLDCoin')
coins['hbn'] =  Coin('Hobonickel')
coins['hyc'] =  Coin('Hypercoin')
coins['kgc'] =  Coin('Krugercoin')
coins['jkc'] =  Coin('Junkcoin')
coins['lbw'] =  Coin('Lebowski')
coins['lky'] =  Coin('Luckycoin')
coins['ltc'] =  Coin('Litecoin')
coins['mec'] =  Coin('Megacoin')
coins['mem'] =  Coin('Memecoin')
coins['mnc'] =  Coin('Mincoin')
coins['nbl'] =  Coin('Nibble')
coins['nrb'] =  Coin('NoirBits')
coins['nvc'] =  Coin('NovaCoin')
coins['ppc'] =  Coin('PPCoin')
coins['pwc'] =  Coin('Powercoin')
coins['pxc'] =  Coin('Phenixcoin')
coins['ryc'] =  Coin('RoyalCoin')
coins['spt'] =  Coin('Spot')
coins['sbc'] =  Coin('StableCoin')
coins['tgc'] =  Coin('TigerCoin')
coins['trc'] =  Coin('TerraCoin')
coins['wdc'] =  Coin('Worldcoin')
coins['yac'] =  Coin('YaCoin')
coins['zet'] =  Coin('Zetacoin')
# Merged
coins['dvc'] = Coin('Devcoin')
coins['dvc'].merged = True
coins['ixc'] = Coin('IXCoin')
coins['ixc'].merged = True
coins['i0c'] =  Coin('I0Coin')
coins['i0c'].merged = True
coins['nmc'] =  Coin('NameCoin')
coins['nmc'].merged = True
# Kind of an alternate coin...
coins['vanity'] = Coin('Vanity Mining')

# Read in config file
Config = ConfigParser.ConfigParser()
Config.read('./cryptoSwitcher.config')

# Enable the coins you want to mine here.
for key in coins:
    try:
        coins[key].willingToMine = Config.getboolean('MineCoins','mine'+key)
    except:
        continue

# You should have scripts that stop all other forms of mining, set
# your clocks and environment variables appropriately, and start
# mining the appropriate coin. I have these called 'litecoin.sh',
# 'bitcoin.sh' etc., but edit and/or replace these as you see fit.

# Any coins you aren't mining you can just leave blank.
for key in coins:
    try:
        coins[key].command = Config.get('Scripts',key+'script')
    except:
        continue

# read source list
try:
    source = [x.strip() for x in Config.get('Data-Source','source').split(',')]
except:
    try:
        source = [x.strip() for x in Config.get('Misc','source').split(',')]
        print "warning: you are using an old config file structure. please update using the config sample file."
    except:
        sys.exit("ERROR: Cannot read source from config file.")



# read source list
try:
    source_cryptoswitcher = [x.strip() for x in Config.get('Data-Source','source_cryptoswitcher').split(',')]
except:
    source_cryptoswitcher = ''
    print "warning: couldnt read source_cryptoswitcher from config file. Leaving blank."

# read hashrates
try:
    hashrate_sha256 = int(Config.get('Data-Source','hashrate_sha256'))
    hashrate_scrypt = int(Config.get('Data-Source','hashrate_scrypt'))
except:
    hashrate_sha256 = 1000
    hashrate_scrypt = 1
    print "warning: couldnt read hashrates from config file. Setting to 1:1000."

# get idle time between two profitability check cycles
try:
    idletime = int(Config.get('Misc','idletime'))
except:
    idletime = 5
    print "warning: couldnt read idletime from config file. Setting to 5 min."

# get the coinfees
for key in coins:
    try:
        coins[key].fee = float(Config.get('Fees','fee'+key))
    except:
        continue


# And now some information to calculate Vanity Address mining profitability
try:
    gkeypersec = float(Config.get('Misc','gkeypersec')) #Gigakeys per second you can test
    ghashpersec = float(Config.get('Misc','ghashpersec')) #Gigahash per second you can output doing normal BTC mining.
except:
    print "warning: couldnt read gkeypersec and ghashpersec from config file."

# If you want to sell your coins on BTCE ASAP, then there's a bit more setup for you
try:
    enableBTCE = Config.getboolean('Sell','enableBTCE')
    enableVircurex = Config.getboolean('Sell','enableVircurex')
    enableCryptsy = Config.getboolean("Sell", "enableCryptsy")
    vircurexSecret = Config.get('Sell','vircurexSecret')
    vircurexUsername = Config.get('Sell','vircurexUsername')
    cryptsyPubkey = Config.get("Sell", "cryptsyPublicKey")
    cryptsyPrivkey = Config.get("Sell", "cryptsyPrivateKey")
except:
    enableBTCE = False
    enableVircurex = False
    enableCryptsy = False
    print "warning: couldnt read sell information from config file. Disabling auto sell."

# And flag which coins you want to sell as they come in. These coins will only
# sell for BTC, not for USD or any other cryptocoin.
for key in coins:
    try:
        coins[key].willingToSell = Config.getboolean('Sell','sell'+key)
    except:
        continue

#Trade multiplier. i.e. Don't sell for the highest current bid if this is
#larger than 1, but make a new ask at highest_bid * tradeMultiplier.

tradeMultiplier = 1
try:
    tradeMultiplier = float(Config.get('Misc','tradeMultiplier'))
except:
    pass

tradeMultiplierCheck = False
try:
    tradeMultiplierCheck = Config.getboolean ('Misc', 'tradeMultiplierCheck')
except:
    pass

def sellCoinBTCE(coin, tradeapi):
    r = tradeapi.getInfo()
    try:
        balance = getattr(r, 'balance_'+coin)
    except:
        # probably a coin that BTCE doesn't have an exchange for, so just return
        return
    if balance > 0.1:
        # i.e. if we're selling and we have some to sell that's larger than the minimum order...
        asks, bids = btceapi.getDepth(coin + '_btc')
        price = bids[0][0]*tradeMultiplier
        if price > asks[0][0] and tradeMultiplierCheck == True:
            price = asks[0][0] - 0.00000001
        tr = tradeapi.trade(coin + '_btc', 'sell', price, balance)
        # If tradeMultiplier is 1, then this sells at the highest price someone
        # currently has a bid lodged for.  It's possible that this won't
        # totally deplete our reserves, but any unsold immediately will be left
        # on the book, and will probably sell shortly.
        # A higher trade multiplier than 1 will not sell right away, but will
        # leave an order on the book.

def sellCoinVircurex(coin):
    pair = vircurexapi.Pair(coin+'_btc')
    try:
        bid = pair.highest_bid
        ask = pair.lowest_ask
    except:
        # probably a coin that Vircurex doesn't have an exchange for, so just return
        return
    account = vircurexapi.Account(vircurexUsername, vircurexSecret)
    balance = account.balance(coin.upper())
    if balance >= 0.1:
        price = bid * tradeMultiplier
        if price > ask and tradeMultiplierCheck == True:
            price = ask - 0.00000001
        order = account.sell(coin.upper(),balance, 'BTC', price)
        account.release_order(order['orderid'])

def sellCoinCryptsy(coin):
    acct = PyCryptsy(cryptsyPubkey, cryptsyPrivkey)
    bal = acct.GetAvailableBalance(coin)
    price = acct.GetBuyPrice(coin, "BTC")*tradeMultiplier
    sell = acct.GetSellPrice(coin, "BTC")
    if price > sell and tradeMultiplierCheck == True:
        price = sell - 0.00000001
    if price > 0:
        acct.CreateSellOrder(coin, "BTC", bal, price)
    else:
        #Try to get price from a coin/LTC market:
        priceltc = acct.GetBuyPrice(coin, "LTC")*tradeMultiplier
        if priceltc > 0:
            acct.CreateSellOrder(coin, "LTC", bal, priceltc)
    return

if enableBTCE:
    key_file = './key'
    handler = btceapi.KeyHandler(key_file)
    key = handler.keys.keys()[0]
    secret, nonce =  handler.keys[handler.keys.keys()[0]]
    authedAPI = btceapi.TradeAPI(key, secret, nonce)


# create http handler
opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'CryptoSwitcher')]

# disable extended status output (=> coin price and difficulty) by default. only
# enable it, if at least one coins profitability is calculated by cryptoswitcher
extout = False

# main loop
cnt_all = 0
while True:
    # print header
    print "\n\n\n<<< Round %d >>>" % (cnt_all+1)
    print "time:", time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())

    # get data from sources
    prestr = "getting data... "

    for x in source:
        # coinchoose
        if x=='coinchoose' or x=='cryptoswitcher':
            try:
                fullstr = prestr + "coinchoose"
                print fullstr + (79-len(fullstr))*" " + "\r",
                req = urllib2.Request("http://www.coinchoose.com/api.php")
                opener_cc = urllib2.build_opener()
                opener_cc.addheaders = [('User-agent', 'CryptoSwitcher')]
                f = opener_cc.open(req, timeout = 5)
                data_cc = simplejson.load(f)
                #print data_cc
            except:
                pass


        elif x=='coinwarz':
            try:
                fullstr = prestr + "coinwarz"
                print fullstr + (79-len(fullstr))*" " + "\r",
                req = urllib2.Request("http://www.coinwarz.com/v1/api/profitability/?apikey=YOUR_COINWARZ_API_KEY&algo=all")
                opener_cz = urllib2.build_opener()
                opener_cz.addheaders = [('User-agent', 'CryptoSwitcher')]
                f = opener_cz.open(req, timeout = 5)
                data_cz = simplejson.load(f)
                #print data_cc
            except:
                pass


        # dustcoin
        elif x=='dustcoin':
            try:
                fullstr = prestr + "dustcoin"
                print fullstr + (79-len(fullstr))*" " + "\r",
                usock = urllib2.urlopen('http://dustcoin.com/mining', timeout = 5)
                data = usock.read()
                usock.close()
                soup = BeautifulSoup(data)
                table_dustcoin = soup.findAll('tr',{ "class":"coin" })
            except:
                pass

        # coinotron
        elif x=='coinotron':
            try:
                fullstr = prestr + "coinotron"
                print fullstr + (79-len(fullstr))*" " + "\r",
                usock = urllib2.urlopen('https://coinotron.com/coinotron/AccountServlet?action=home', timeout = 5)
                data = usock.read()
                usock.close()
                soup = BeautifulSoup(data)
                table_coinotron = soup.findAll('tr')
            except:
                pass


    for x in source_cryptoswitcher:
        # cryptsy
        if x=='cryptsy':
            try:
                fullstr = prestr + "cryptsy"
                print fullstr + (79-len(fullstr))*" " + "\r",
                req = urllib2.Request("http://pubapi.cryptsy.com/api.php?method=orderdata")
                opener_cyp = urllib2.build_opener()
                opener_cyp.addheaders = [('User-agent', 'CryptoSwitcher')]
                f = opener_cyp.open(req, timeout = 5)
                data_cyp = simplejson.load(f)
            except:
                pass



    # assign data to coins
    # loop through coins
    for abbreviation, c in coins.items():
        # only get profitability for coins which we are interested in.
        # this saves network traffic and running time
        if c.willingToMine==False:
            continue

        success = 0
        # loop trough source list. try first entry first.
        for x in source:
            if x=='coinchoose':
                try:
                    for item in data_cc:
                        if item['symbol'].lower()==abbreviation:
                            print abbreviation
                            coins[item['symbol'].lower()].ratio = float(item['adjustedratio'])
                            coins[item['symbol'].lower()].source = 'cc'
                            success = 1
                            break
                except:
                    print "eccezione********"
                    continue




            elif x=='coinwarz':
                try:
                    ciao = data_cz["Data"]
                    ids = [item['CoinTag'] for item in ciao]
                    ids = [s.encode('utf-8') for s in ids]
                    for item in ciao:
                        if item['CoinTag'].lower()==abbreviation:
                         coins[item['CoinTag'].lower()].ratio = float(item['ProfitRatio'])
                  
                         coins[item['CoinTag'].lower()].source = 'cz'


                    success = 1
                    break
                except:
                    print "eccezione********"
   continue





            elif x=='dustcoin':
                try:
                    i=0
                    for coinrow in table_dustcoin:
                        coinName, profit = coinrow.find('strong',text=True).text, coinrow.find('td',{"id":"profit"+str(i)}).text.replace('%','')
                        # make sure the profit we read is floating value, if not, continue loop and keep old profit value until next check
                        try:
                            profit = float(profit)
                        except:
                            continue
                        # calculate profitabilty
                        if coinName == coins[abbreviation].name:
                            coins[abbreviation].ratio = float(profit)
                            coins[abbreviation].source = 'dc'
                            success = 1
                            break
                        i+=1
                except:
                    continue

            elif x=='coinotron':
                try:
                    i = 0
                    for coinrow in table_coinotron:
                        coinName = coinrow.findNext('td').contents[0]
                        profit = coinrow.findNext('td').findNext('td').findNext('td').findNext('td').findNext('td').findNext('td').findNext('td').findNext('td').contents[0]
                        # when all coins where read, leave loop
                        if i == 5: break
                        i+=1
                        # convert profitability to percent
                        profit = float(profit)*100
                        # calculate profitabilty
                        if coinName.lower()==abbreviation:
                            coins[abbreviation].ratio = float(profit)
                            coins[abbreviation].source = 'ct'
                            success = 1
                            break
                        i+=1
                except:
                    continue

            # lets calulate profitability ourself
            elif x=='cryptoswitcher':
                # get difficulty and block rewards
                # source for difficulty data depends on coin
                try:
                    # if this is the first time we come here, update btc as well.
                    # otherwise we are unable to calculate the profitabilty.
                    fullstr = prestr + "difficulty of " + coins[abbreviation].name
                    print fullstr + (79-len(fullstr))*" " + "\r",
                    if coins['btc'].reward == 0:
                        for item in data_cc:
                            if item['symbol'].lower()=='btc':
                                coins['btc'].diff = float(item['difficulty'])
                                coins['btc'].reward = float(item['reward'])
                                break

                    # get difficulty values from coinchoose by default
                    for item in data_cc:
                        if item['symbol'].lower()==abbreviation:
                            coins[item['symbol'].lower()].diff = float(item['difficulty'])
                            coins[item['symbol'].lower()].reward = float(item['reward'])
                            coins[item['symbol'].lower()].algo = item['algo']
                            break

                    # if we dont have a difficulty source for our coin, continue loop and get profitabilty from
                    # other sources
                    if item['symbol'].lower()!=abbreviation:
                        continue

                    # for trc: use a different source for difficulty
                    if abbreviation == 'trc':
                        req = urllib2.Request("http://cryptocoinexplorer.com:3750/chain/Terracoin/q/getdifficulty")
                        f = opener.open(req, timeout = 5)
                        coins['trc'].diff = simplejson.load(f)

                    # for btc: we dont need to calculate
                    if abbreviation=='btc':
                        coins['btc'].ratio=100.0
                        coins['btc'].source = '--'
                        coins['btc'].algo = "SHA-256"
                        coins['btc'].price = 1.0
                        success = 1
                        break

                except:
                    continue


                # calculate highest buy value
                # use only data sources defined in source_cryptoswitcher
                coins[abbreviation].price = 0.0
                for y in source_cryptoswitcher:

                    # if coin profitability couldnt be processed manually in the
                    # last round, then they are probably not traded on the chosen
                    # markets. so the coin is removed from manual processing.
                    if coins[abbreviation].source != '--' and coins[abbreviation].source != 'cs':
                        continue

                    # btc-e
                    if y=='btce':
                        try:
                            fullstr = prestr + "price of " + coins[abbreviation].name + " at BTC-E"
                            print fullstr + (79-len(fullstr))*" " + "\r",
                            req = urllib2.Request("https://btc-e.com/api/2/" + abbreviation + "_btc/ticker")
                            f = opener.open(req, timeout = 5)
                            output = simplejson.load(f)
                            if coins[abbreviation].price < float(output['ticker']['sell']):
                                coins[abbreviation].price = float(output['ticker']['sell'])
                        except:
                            continue

                    # bter
                    elif y=='bter':
                        try:
                            fullstr = prestr + "price of " + coins[abbreviation].name + " at Bter"
                            print fullstr + (79-len(fullstr))*" " + "\r",
                            req = urllib2.Request("https://bter.com/api/1/ticker/" + abbreviation + "_btc")
                            f = opener.open(req, timeout = 5)
                            output = simplejson.load(f)
                            if coins[abbreviation].price < float(output['buy']):
                                coins[abbreviation].price = float(output['buy'])
                        except:
                            continue

                    # vircurex
                    elif y=='vircurex':
                        try:
                            fullstr = prestr + "price of " + coins[abbreviation].name + " at Vircurex"
                            print fullstr + (79-len(fullstr))*" " + "\r",
                            req = urllib2.Request("https://vircurex.com/api/get_highest_bid.json?base=" + abbreviation + "&alt=btc")
                            f = opener.open(req, timeout = 5)
                            output = simplejson.load(f)
                            if coins[abbreviation].price < float(output['value']):
                                coins[abbreviation].price = float(output['value'])
                        except:
                            continue

                    # cryptsy
                    elif y=='cryptsy':
                        try:
                            fullstr = prestr + "price of " + coins[abbreviation].name + " at Cryptsy"
                            print fullstr + (79-len(fullstr))*" " + "\r",
                            for item in data_cyp['return']:
                                if item.lower()==abbreviation:
                                    if data_cyp['return'][item]['secondarycode']=='BTC':
                                        if coins[abbreviation].price < float(data_cyp['return'][item]['buyorders'][0]['price']):
                                            coins[abbreviation].price = float(data_cyp['return'][item]['buyorders'][0]['price'])
                                    success = 1
                                    break
                        except:
                            continue

                # calculate profitability
                if coins[abbreviation].price!=0.0:
                    try:
                        if coins[abbreviation].algo == 'scrypt':
                            coins[abbreviation].ratio = (coins[abbreviation].reward/coins[abbreviation].diff)/(coins['btc'].reward/coins['btc'].diff)*coins[abbreviation].price*100/(hashrate_sha256/hashrate_scrypt)
                        else:
                            coins[abbreviation].ratio = (coins[abbreviation].reward/coins[abbreviation].diff)/(coins['btc'].reward/coins['btc'].diff)*coins[abbreviation].price*100
                        coins[abbreviation].source = 'cs'
                        success = 1

                        # at least one coins profitability was calculated by cryptoswitcher
                        # => enable extended status output
                        extout = True
                        break
                    except:
                        continue

            if success==1:
                break


    # Now work out how profitable btc mining really is, if we're doing any merged mining
    if coins['nmc'].willingToMine:
        coins['btc'].ratio +=coins['nmc'].ratio
    if coins['dvc'].willingToMine:
        coins['btc'].ratio +=coins['dvc'].ratio
    if coins['ixc'].willingToMine:
        coins['btc'].ratio +=coins['ixc'].ratio

    fullstr = prestr + "done"
    print fullstr + (79-len(fullstr))*" " + "\r"


    # Now get data for vanity mining
    if coins['vanity'].willingToMine:
        vanityDataValid = True
        try:
            usock = urllib2.urlopen('http://www.fizzisist.com/mining-value/api/bitcoin-value',timeout=1)
            btcperghash = usock.read()
            usock.close()
            btcperghash = float(btcperghash)
        except (urllib2.URLError, ValueError, socket.timeout) as  e:
            print "There was an error: ,", e
            vanityDataValid = False

        try:
            usock = urllib2.urlopen('http://www.fizzisist.com/mining-value/api/vanitypool-value',timeout=1)
            btcpergkey = usock.read()
            btcpergkey = float(btcpergkey)
            usock.close()
        except (urllib2.URLError, ValueError, socket.timeout) as  e:
            print "There was an error: ,", e
            vanityDataValid = False

        if vanityDataValid:
            # Now put vanity mining in terms of BTC mining.
            vanitybtcsec = gkeypersec * btcpergkey
            miningbtcsec = ghashpersec * btcperghash
            vanityprof = vanitybtcsec / miningbtcsec * 100
            coins['vanity'].ratio = vanityprof
            # print 'Vanity Mining', vanityprof

    # Now find the best profit coin
    bestcoin = 'btc'
    bestprof = 0
    print "comparing profitabilty..."
    print "-"*36
    for abbreviation, c in coins.items():
        if c.willingToMine:
            print "%11s: %3d  (fee: %2d, src: %s)" % (coins[abbreviation].name, c.ratio, coins[abbreviation].fee, coins[abbreviation].source),
            if extout == True:
                if coins[abbreviation].source == "cs" or abbreviation == "btc":
                    print "(pr: %.5f, di[%s]: %.2f)" % (coins[abbreviation].price, coins[abbreviation].algo, coins[abbreviation].diff),
                else:
                    # if diff is valid print it
                    if coins[abbreviation].reward != 0:
                        print "(pr:  -NA-  , di[%s]: %.2f)" % (coins[abbreviation].algo, coins[abbreviation].diff),
                    else:
                        print "(pr:  -NA-  , di[%s]:  -NA-  )" % (coins[abbreviation].algo),
            print ""

        if c.ratio-coins[abbreviation].fee > bestprof and c.willingToMine:
            bestcoin = abbreviation
            bestprof=c.ratio-coins[abbreviation].fee
    print "-"*36
    print "=> Best: %d, mining %s" % (bestprof, coins[bestcoin].name)
    coins[bestcoin].median = ((coins[bestcoin].median * coins[bestcoin].cnt) + coins[bestcoin].ratio-coins[bestcoin].fee) / (coins[bestcoin].cnt+1)
    coins[bestcoin].cnt = coins[bestcoin].cnt+1


    if coins[bestcoin].miningNow == False:
        # i.e. if we're not already mining the best coin
        print '=> Switching to %s (running %s)' % (coins[bestcoin].name, coins[bestcoin].command)
        for abbreviation, c in coins.items():
            c.miningNow = False
        coins[bestcoin].miningNow = True
        subprocess.Popen(coins[bestcoin].command)

    # Sell some coins if that's what we're into
    for abbreviation, c in coins.items():
        if c.willingToSell and (c.miningNow or c.merged) and enableBTCE:
            # i.e. if we're willing to sell it AND it's still worth more than BTC -
            # with pool payout delays and wild exchange swings, while it might be
            # profitable to have mined it, we didn't sell it quickly enough. This
            # keeps hold of the coin until you've made a decision.
            sellCoinBTCE(abbreviation, authedAPI)
        # elif c.willingToSell and c.miningNow and enableVircurex:
        if c.willingToSell and enableVircurex and (c.miningNow or c.merged):
            sellCoinVircurex(abbreviation)
        if c.willingToSell and enableCryptsy and (c.miningNow or c.merged):
            sellCoinCryptsy(abbreviation)

    # ...and now save the keyfile in case the script is aborted.
    if enableBTCE:
        handler.setNextNonce(key,time.time()) #Thanks, jsorchik
        handler.save(key_file)

    # create status output strings
    sname = "#        "
    smedian = "# Median:"
    stime = "# Time:  "
    median_all = 0
    cnt_all = 0
    for abbreviation, c in coins.items():
        if c.willingToMine and (not c.merged):
            coins[abbreviation].h, coins[abbreviation].m = divmod(coins[abbreviation].cnt*idletime, 60)
            if coins[abbreviation].h < 10:
                sname += "%5s  " % (abbreviation.upper())
                smedian += "%5d |" % (coins[abbreviation].median)
                stime += "%2d:%02d |" % (coins[abbreviation].h, coins[abbreviation].m)
            elif coins[abbreviation].h < 100:
                sname += "%6s  " % (abbreviation.upper())
                smedian += "%6d |" % (coins[abbreviation].median)
                stime += "%3d:%02d |" % (coins[abbreviation].h, coins[abbreviation].m)
            else:
                sname += "%7s  " % (abbreviation.upper())
                smedian += "%7d |" % (coins[abbreviation].median)
                stime += "%4d:%02d |" % (coins[abbreviation].h, coins[abbreviation].m)
            if coins[abbreviation].cnt > 0:
                median_all = ((median_all * cnt_all) + (coins[abbreviation].median*coins[abbreviation].cnt)) / (cnt_all+coins[abbreviation].cnt)
                cnt_all += coins[abbreviation].cnt

    # remove last chars
    sname = sname[:-2]
    smedian = smedian[:-2]
    stime = stime[:-2]

    smedian_all = '# Total Median:%5d' % (median_all)
    stime_all = '# Total Time:%4d:%02d' % (divmod(cnt_all*idletime, 60))

#    # fill strings to screen width and add "#" to the end
#    sname = "%s%s%s" % (sname, " "*(79-len(sname)), "#")
#    smedian = "%s%s%s" % (smedian, " "*(79-len(smedian)), "#")
#    stime = "%s%s%s" % (stime, " "*(79-len(stime)), "#")
#    smedian_all = "%s%s%s" % (smedian_all, " "*(79-len(smedian_all)), "#")
#    stime_all = "%s%s%s" % (stime_all, " "*(79-len(stime_all)), "#")

    # output status strings
#    print "\n", "#"*80+sname+smedian+stime+smedian_all+stime_all+"#"*80
    print "\n", sname
    print smedian
    print stime
    print smedian_all
    print stime_all, "\n"

    # sleep
    print 'Going to sleep...'
    i=0
    while i<idletime*60:
        print "Seconds remaining:", (idletime*60-i), " ", "\r",
        time.sleep(1)
        i+=1




cryptoSwitcher.config

Code:


# -------------------------------------------------#
# Cryptocurrency mining switcher config file       #
# TipJar (BTC): 1NhathL6LpcgofDnHELSS6Hej6kU9xrVgp #
# Author: area                                     #
# -------------------------------------------------#


################################################################################
[MineCoins]

# Enable the coins you want to mine here.
mineALF = False
mineAMC = False
mineANC = False
mineARG = False
mineASC = False
mineBFC = False
mineBQC = False
mineBET = True
mineBTB = False
mineBTC = False
mineBTE = False
mineBTG = False
mineCAP = False
mineCGB = False
mineCNC = False
mineCRC = False
mineDGC = False
mineDEM = True
mineEMD = False
mineELC = False
mineEZC = False
mineFRC = False
mineFRK = False
mineFST = False
mineFTC = False
mineGDC = False
mineHBN = False
mineHYC = False
mineKGC = False
mineLBW = False
mineLKY = False
mineLTC = False
mineMEM = False
mineMNC = False
mineNBL = False
mineNRB = False
mineNVC = False
minePPC = False
minePXC = False
mineSPT = False
mineSBC = False
mineTGC = True
mineTRC = False
mineWDC = False
mineZET = False
mineUNO = True

# Listed against LTC only (currently unusable by CS)
mineDBL = False
mineGLD = False
mineJKC = False
mineRYC = False

# No data available from sources
minePWC = False
mineMEC = False
mineYAC = False

# BTC Merged mining coins. Will be added to Bitcoin profitibilty when enabled.
mineDVC = True
mineIXC = True
mineI0C = False
mineNMC = True

# Enable to mine vanity addresses.
mineVANITY = False


################################################################################
[Scripts]

# You should have scripts that stop all other forms of mining, set all necesary
#  environment variables, and start mining the appropriate coin.

# Examples included are 'litecoin.sh.sample' and 'bitcoin.sh.sample'.
# Any coins you aren't mining you can just leave blank.
# For Windows you can use bat-files, eg "BTCscript = bitcoin.bat".
ALFscript =
AMCscript =
ANCscript =
ARGscript =
ASCscript =
BETscript = ./betacoin.sh
BFCscript =
BQCscript =
BTBscript =
BTCscript = ./bitcoin.sh
BTEscript =
BTGscript =
CAPscript =
CGBscript =
CNCscript =
CRCscript =
DBLscript =
DGCscript =
DEMscript = ./dem.sh
EMDscript =
ELCscript =
EZCscript =
FRCscript =
FRKscript =
FSTscript =
FTCscript =
GDCscript =
GLDscript =
HBNscript =
HYCscript =
KGCscript =
JKCscript =
LBWscript =
LKYscript =
LTCscript = ./litecoin.sh
MECscript =
MEMscript =
MNCscript =
NBLscript =
NRBscript =
NVCscript =
PPCscript =
PWCscript =
PXCscript =
RYCscript =
SPTscript =
SBCscript =
TGCscript = ./tigercoin.sh
TRCscript =
WDCscript =
YACscript =
ZETscript =
UNOscript = ./uno.sh

VANITYscript =

################################################################################
[Fees]

# Set specific fees for every coin (in percent).
# The fee simply adds to the profitability before calculating the most profitable coin.
# Negative values are also allowed, they increase the profitability.
feeALF = 0
feeAMC = 0
feeANC = 0
feeARG = 0
feeASC = 0
feeBET = 0
feeBFC = 0
feeBQC = 0
feeBTB = 0
feeBTC = 1.5
feeBTE = 0
feeBTG = 0
feeCAP = 0
feeCGB = 0
feeCNC = 0
feeCRC = 0
feeDBL = 0
feeDEM = 0
feeDGC = 0
feeEMD = 0
feeELC = 0
feeEZC = 0
feeFRC = 0
feeFRK = 0
feeFST = 0
feeFTC = 0
feeGDC = 0
feeGLD = 0
feeHBN = 0
feeHYC = 0
feeKGC = 0
feeJKC = 0
feeLBW = 0
feeLKY = 0
feeLTC = 2
feeMEC = 0
feeMEM = 0
feeMNC = 0
feeNBL = 0
feeNRB = 0
feeNVC = 0
feePPC = 0
feePWC = 0
feePXC = 0
feeRYC = 0
feeSPT = 0
feeSBC = 0
feeTGC = 0
feeTRC = 0
feeWDC = 0
feeYAC = 0
feeZET = 0
feeUNO = 0

################################################################################
[Data-Source]

# Source list for determining mining profitability.
# The first entry in the source list has the highest priority and is used first.
# If the site is down or a certain coin is not found the next source is used.
# Available sources: cryptoswitcher, coinotron, coinchoose, dustcoin
source=coinwarz, coinotron, coinchoose, dustcoin
#source=coinwarz

# If using CryptoSwitcher as a source, list markets to source prices from.
# Difficulty is acquired from coinchoose and cryptocoinexplorer.
# Available sources: btce, bter, vircurex, cryptsy
source_cryptoswitcher=btce, bter, vircurex, cryptsy

# Hashrates used in calculations when using CryptoSwitcher as a source.
# Measured in hashes per second. Can be acquired by testmining with cgminer.
# sha256 is used by Bitcoin etc. while scrypt is used by Litecoin etc.
hashrate_sha256=1350000
hashrate_scrypt=1450


################################################################################
[Misc]

# Idle Time (in minutes) between two checks of coin profitability.
idletime = 5

# Gigahash per second you can output doing normal BTC mining.
ghashpersec = 0.7

# Gigakeys per second you can output doing vanity address mining.
gkeypersec = 0.05

# Trade multiplier - if not 1, sells not at the highest bid, but at this
#  multiple of it.  
tradeMultiplier = 1.01

# make sure our sell order is the lowest if tradeMultiplier > 1
tradeMultiplierCheck = False

################################################################################
[Sell]

# If you want to sell your coins ASAP after mining, enable an exchange here.
# This will automatically sell flagged coins for BTC ONLY.

# BTC-e
enableBTCE = False
# You'll need to configure your API key, secret, and a nonce in "key.sample".
# Rename this file to "key".

# VirCurEx
enableVircurex = False
vircurexUsername = VCEUSERNAME
vircurexSecret = APISECRET

# Cryptsy
enableCryptsy = False
cryptsyPublicKey = YOUR_CRYPTSY_API_PUBLIC_KEY
cryptsyPrivateKey = YOUR_CRYPTSY_API_PRIVATE_KEY

# Enable the coins you want to sell here.
sellALF = False
sellAMC = False
sellANC = False
sellARG = False
sellASC = False
sellBET = False
sellBFC = False
sellBQC = False
sellBTB = False
sellBTE = False
sellBTG = False
sellCAP = False
sellCGB = False
sellCNC = False
sellCRC = False
sellDBL = False
sellDGC = False
sellEMD = False
sellELC = False
sellEZC = False
sellFRC = False
sellFRK = False
sellFST = False
sellFTC = False
sellGDC = False
sellGLD = False
sellHBN = False
sellHYC = False
sellKGC = False
sellJKC = False
sellLBW = False
sellLKY = False
sellLTC = False
sellMEC = False
sellMEM = False
sellMNC = False
sellNBL = False
sellNRB = False
sellNVC = False
sellPPC = False
sellPWC = False
sellPXC = False
sellRYC = False
sellSPT = False
sellSBC = False
sellTGC = False
sellTRC = False
sellWDC = False
sellYAC = False
sellUNO = False
sellZET = False


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: corsaro on December 26, 2013, 10:43:51 AM
...  following my precedent message, where I released the implementation of coinwarz to the excellent cryptoSwitcher python script....

remember too that you can generate your coinwarz api key from here http://www.coinwarz.com/v1/api/documentation

  • free api: it is limited to just 25 queries per day, and for a maximum of 1,000 calls (useful if you made a call every 1 hour, you will have api key working for 1 month)
  • usd 20: a total of 300 calls per day, and for a maximum of 50,000 calls (useful if you made a call every 5 minutes, you will have api key working for 6 months)
  • usd 50: a total of 1500 calls per day, and for a maximum of 250,000 calls (useful if you made a call every 5 minutes, you will have api key working for more then 2 years)



happy "most profitable" mining ;)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Florak on December 30, 2013, 10:32:56 AM
Hi, looks nice. how many times a day the script switch coins ? do you experience higher profitability ?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: nov on December 30, 2013, 11:57:17 AM
Which pools do you use for SHA-256 ASICs with crypto switcher?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: corsaro on December 30, 2013, 03:35:10 PM
Hi, looks nice. how many times a day the script switch coins ? do you experience higher profitability ?

actually I am using coinwarz as profit calculator, and cryptoSwitcher as switching script, checking as per default, every 5 minutes.
Yes, using cryptoswitcher I am noting a 30-40% higher profitability respect to exclusive BTC mining

I am mining SHA-256 coins


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: corsaro on December 30, 2013, 03:37:59 PM
Which pools do you use for SHA-256 ASICs with crypto switcher?

eligius                  for   btc
p2pool.org            for   uno, tgc, bet, bte, xjo
multipool.us          for   trc, zet, frc
dem.ispace.co.uk   for   dem


using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).

Anyway, I had this night a problem on one of my sha-256 devices, so for some hours the whole system mined at 50% capacity...  so probably profitabiliy should be higher then 130...   anyway, more accurate statistics will come in the following days...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: nov on December 30, 2013, 06:13:54 PM
Thanks. Are those pools PPS types?

Does coinwarz support SHA-256 coins? I see mostly crypt type of coins on coinwarz web page.

Do you use auto sell feature of crypto switcher or auto sell in cryptsy?

Which pools do you use for SHA-256 ASICs with crypto switcher?

eligius                  for   btc
p2pool.org            for   uno, tgc, bet, bte, xjo
multipool.us          for   trc, zet, frc
dem.ispace.co.uk   for   dem


using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).

Anyway, I had this night a problem on one of my sha-256 devices, so for some hours the whole system mined at 50% capacity...  so probably profitabiliy should be higher then 130...   anyway, more accurate statistics will come in the following days...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: corsaro on December 30, 2013, 06:51:51 PM
Thanks. Are those pools PPS types?

Does coinwarz support SHA-256 coins? I see mostly crypt type of coins on coinwarz web page.

Do you use auto sell feature of crypto switcher or auto sell in cryptsy?

Which pools do you use for SHA-256 ASICs with crypto switcher?

eligius                  for   btc
p2pool.org            for   uno, tgc, bet, bte, xjo
multipool.us          for   trc, zet, frc
dem.ispace.co.uk   for   dem


using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).

Anyway, I had this night a problem on one of my sha-256 devices, so for some hours the whole system mined at 50% capacity...  so probably profitabiliy should be higher then 130...   anyway, more accurate statistics will come in the following days...

yes, for sure...  coinwarz support main sha-256 coins...
where possible I prefer pps or rbpps. Anyway, on large pools, like p2pool it does not mean it is pplns, due to the fact block are found every few minutes...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: nov on December 30, 2013, 06:56:17 PM
Where do you get addresses for alt coins mining, please?

Cryptsy as I know does not recommend to use their addresses for mining.

Thanks. Are those pools PPS types?

Does coinwarz support SHA-256 coins? I see mostly crypt type of coins on coinwarz web page.

Do you use auto sell feature of crypto switcher or auto sell in cryptsy?

Which pools do you use for SHA-256 ASICs with crypto switcher?

eligius                  for   btc
p2pool.org            for   uno, tgc, bet, bte, xjo
multipool.us          for   trc, zet, frc
dem.ispace.co.uk   for   dem


using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).

Anyway, I had this night a problem on one of my sha-256 devices, so for some hours the whole system mined at 50% capacity...  so probably profitabiliy should be higher then 130...   anyway, more accurate statistics will come in the following days...

where possible I prefer pps or rbpps. Anyway, on large pools, like p2pool it does not mean it is pplns, due to the fact block are found every few minutes...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: K1773R on December 30, 2013, 07:52:41 PM
Which pools do you use for SHA-256 ASICs with crypto switcher?

eligius                  for   btc
p2pool.org            for   uno, tgc, bet, bte, xjo
multipool.us          for   trc, zet, frc
dem.ispace.co.uk   for   dem


using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).

Anyway, I had this night a problem on one of my sha-256 devices, so for some hours the whole system mined at 50% capacity...  so probably profitabiliy should be higher then 130...   anyway, more accurate statistics will come in the following days...
shame on u supporting the p2pool.org scam... run your own node


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: nov on December 30, 2013, 08:01:20 PM
Could you explain, please?

Which pools do you use for SHA-256 ASICs with crypto switcher?

eligius                  for   btc
p2pool.org            for   uno, tgc, bet, bte, xjo
multipool.us          for   trc, zet, frc
dem.ispace.co.uk   for   dem


using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).

Anyway, I had this night a problem on one of my sha-256 devices, so for some hours the whole system mined at 50% capacity...  so probably profitabiliy should be higher then 130...   anyway, more accurate statistics will come in the following days...
shame on u supporting the p2pool.org scam... run your own node


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: corsaro on December 30, 2013, 09:40:22 PM
Where do you get addresses for alt coins mining, please?

Cryptsy as I know does not recommend to use their addresses for mining.

Thanks. Are those pools PPS types?

Does coinwarz support SHA-256 coins? I see mostly crypt type of coins on coinwarz web page.

Do you use auto sell feature of crypto switcher or auto sell in cryptsy?

Which pools do you use for SHA-256 ASICs with crypto switcher?

eligius                  for   btc
p2pool.org            for   uno, tgc, bet, bte, xjo
multipool.us          for   trc, zet, frc
dem.ispace.co.uk   for   dem


using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).

Anyway, I had this night a problem on one of my sha-256 devices, so for some hours the whole system mined at 50% capacity...  so probably profitabiliy should be higher then 130...   anyway, more accurate statistics will come in the following days...

where possible I prefer pps or rbpps. Anyway, on large pools, like p2pool it does not mean it is pplns, due to the fact block are found every few minutes...

for p2pool.org you have to use a "personal wallet" address. Just download the official wallet client for each cryptocurrency you want to mine at p2pool... you can download them at respective official currency web site...

UNO https://bitcointalk.org/index.php?topic=313126.0
TGC https://bitcointalk.org/index.php?topic=289312.0
BET https://bitcointalk.org/index.php?topic=321266.0
BTE http://bytecoin.biz/
XJO https://bitcointalk.org/index.php?topic=299308.0

  sorry, but most part of them offer only "window$" executables wallet clients.... in this case, if you have a linux or mac, just setup a virtualbox machine to correctly run them..

running p2pool.org you will receive mined coins directly into your personal wallet... on some cases you have to wait some hours before money starts incoming into your personal wallet..   yes, do not use exchange address (like cryptsy.com or coinex.pw ones) to mine at p2pool

to exchange altcoins you can use cryptsy, coinex.pw, coins-e.com, btc-e.com, bter, vircurex...

You can fully automate the altcoin exchange, enabling automatic api exchange feature on CryptoSwitcher script


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jilixi on December 31, 2013, 12:05:23 PM
So getting the Dependencies, could someone post a package of all of them, running BAMT and having a hard time getting this right.

Cheers :)


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Jilixi on December 31, 2013, 06:13:52 PM
Anyone that could help out? a short guide would also be awesome. Project like this cant go unnoticed, cant think of anything better when you have something as good as BAMT


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: K1773R on December 31, 2013, 08:37:28 PM
using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).
this stupidity makes me so sad! you are aware that compiling from git is easier than always downloading winblows binaries? if you have linux, fking use it and dont go back to the stone-age obsolete shit...


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: corsaro on January 01, 2014, 08:43:32 AM
using all them, with coinwarz as profit calculator, cryptoswitcher as switching script and cryptsy as exchenger, I reached around 130 as profitabiliy in the last 2 days (respect to exclusive btc mining).

in the last 48 hours of "stable running" of my sha-256 devices on ubuntu, mining sha-256 altcoins, I confirm you I reached a value of "155" for mining profitability (respect to standard value of "100" we assigned as reference to exclusive bitcoin mining)

- cryptoswitcher script, running on ubuntu, with added coinwarz support, see https://bitcointalk.org/index.php?topic=172121.msg4149631#msg4149631
- cgminer 3.8.4 for ubuntu 64bit patched for technobit hexa2 device https://bitcointalk.org/index.php?topic=355323.msg3913578#msg3913578
- coinwarz api as profit calculator, see https://bitcointalk.org/index.php?topic=172121.msg4149631#msg4149631
- cryptsy as exclusive exchanger (I enabled automatic exchange on cryptoswitcher script)
- sha-256 alcoins mined: uno, btc, trc, tgc, fcc, bet, bte, tek, frc, xjo, dem, zet
- cryptoswitcher time: 5 min (default)



Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: FishStiks on January 05, 2014, 12:06:29 PM
corsaro,

is there perhaps a way to mine the 2nd or 3rd most profitable coin instead of the 1st in the code?  It would even be better if it were an option in cryptoSwitcher.config. ;)

Thanks


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: kweenirang on January 12, 2014, 08:03:11 AM
so cryptoswitcher is like multipool but locally? What advantages does that have


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: MiMiMiner on January 12, 2014, 10:41:42 PM
Hello!

I am about to start using this great software. But one thing I don't understand. So I have to find a good pool for every currency. Got it. But, where do I have to send the payouts to? Since this software is managing the trading as well...

Thanks!


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: MiMiMiner on January 13, 2014, 04:10:48 PM
Nodboy here? :(


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: lifestyleopt on January 13, 2014, 05:12:22 PM
I used this tool a while back and it had a setting for you to "auto sell" the coin when it reaches the exchange.  This feature worked good at cryptsy but not 100% with btc-e.

If I were to use this tool today, I would have the mined coins sent to cryptsy (which they may frown upon) and use their "Autosell coinxxx" feature.

I have moved from this software to using mining pools that do the switching and selling for you.  Here is a list of those types of pools that I have found.
https://delicious.com/miningcoins/mining-pool-multiple-coins


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: pastet89 on January 25, 2014, 09:16:02 AM
Hi,

I just downloaded it. However as I can see some currencies are missing, and I want to ask is there any way they to be added?
For example, currently all curencies which are more profitable over Bitcoin are not available in the config file.

And also where do you input your wallets addresses to mine to?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: pastet89 on January 25, 2014, 11:55:42 AM
 
Hello!

I am about to start using this great software. But one thing I don't understand. So I have to find a good pool for every currency. Got it. But, where do I have to send the payouts to? Since this software is managing the trading as well...

Thanks!
I think as far as you insert your cryptsy API you get all deposited there and finally the sold BTCs there. Then you have to withdraw from there.
However what I do not understand is how do I set this up on Linux and where to insert the wallets the script is supposed to deposit from.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: RicRock on January 25, 2014, 05:20:36 PM
 
However what I do not understand is how do I set this up on Linux and where to insert the wallets the script is supposed to deposit from.

Sounds like you might want to spend sometime getting basic mining setup.

This script really has nothing to do with your wallets for various coins.

It will auto-trade on various exchanges, but you don't enter wallet addresses in this script.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: pastet89 on January 25, 2014, 06:59:14 PM
 
However what I do not understand is how do I set this up on Linux and where to insert the wallets the script is supposed to deposit from.

Sounds like you might want to spend sometime getting basic mining setup.

This script really has nothing to do with your wallets for various coins.

It will auto-trade on various exchanges, but you don't enter wallet addresses in this script.

OK, so where does the script take my coins from so it can trade with them?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: pastet89 on January 25, 2014, 07:08:01 PM
The money must appear in some way on Cryptsy, right?
So only one possibility I see for this without enetring wallet addresses in script, is to enter criptsy's deposit wallet addresses directly in the pools and mine to them. But this is forbidden.
So... ?  ???


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: RicRock on January 25, 2014, 08:00:09 PM
The money must appear in some way on Cryptsy, right?
So only one possibility I see for this without enetring wallet addresses in script, is to enter criptsy's deposit wallet addresses directly in the pools and mine to them. But this is forbidden.
So... ?  ???

Mining at a "normal" pool, you are able to use a cryptsy address for payout


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: pastet89 on January 26, 2014, 07:01:22 AM
No, that's the point, it is forbidden as funds come from address 0, you need to forward them at least once trough another address. So how is this supposed to happen?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: RicRock on January 27, 2014, 04:59:01 PM
No, that's the point, it is forbidden as funds come from address 0, you need to forward them at least once trough another address. So how is this supposed to happen?

Not sure what you mean.

As long as you are not mining at a P2Pool, you can use a cryptsy address.

I've been doing it for quite some time.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Helium3 on February 03, 2014, 11:58:15 PM
Ola all.

I got CryptoSwitcher running over the weekend on a test machine. Is there a simple way to add Dogecoin (which seems the most profitable atm)?

He3


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on February 04, 2014, 09:32:12 PM
I got CryptoSwitcher running over the weekend on a test machine. Is there a simple way to add Dogecoin (which seems the most profitable atm)?

It's been a while since I've touched the code, but there are (IIRC) three places that you'd need to edit to add a coin.  It should be fairly obvious, as each is a block of mostly-similar statements that describe the coins that are already supported.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: tfbpa on February 09, 2014, 05:03:58 AM
A couple of days or so ago, I merged some pull requests that had been sitting around a while.  I also included a PHP script that uses the cgminer API to switch pools.  Others have posted about using just one cgminer.conf with every pool and issuing a switchpool call.  My script takes a pool URL, miner name, and password, adds them to the current list of pools, and (optionally) removes all of the other pools.  In your pool-switching shell script, you then call my script once for each pool you want to use for a coin, with the "clear" parameter included on the first call. This allows you to have multiple pools configured for a coin as a backup.

Thanks for the script, much appreciated.

At the moment the regular setup is working, but I would like to make sure cgminer doesn't need to restart when switching pools by using the above method, but unfortunately I don't understand what exactly needs to be done.

I am guessing that the PHP script is https://github.com/area/CryptoSwitcher/blob/master/switchpool.php but I still don't understand what exactly needs to be done.

- Where to specify all pool urls's and miner name/password?
- How to call this script with "clear" parameter included on the first call in the pool-switching shell script?
- I am guessing that I have to remove line 4 and 5 from pool-switching shell script https://github.com/area/CryptoSwitcher/blob/master/litecoin.sh.sample in order to make sure cgminer isn't restarted every time. Is that correct?

Any help is appreciated, thanks.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Wayne187 on March 12, 2014, 03:00:30 AM
veeeeery nice tool  ;D thank you very much indeed!

After hours of configuration it works very well.
But can somebody tell me how to add more sites like coinchoose?

I've tried the last hours to code it by myself but all was only worst of time.

API:
http://sancrypto.info/api/json/15/

Code:
# sancrypto
        if x=='sancrypto':
            try:
                fullstr = prestr + "sancrypto"
                print fullstr + (79-len(fullstr))*" " + "\r",
                req = urllib2.Request("http://sancrypto.info/api/json/15/")
                opener_sc = urllib2.build_opener()
                opener_sc.addheaders = [('User-agent', 'CryptoSwitcher')]
                f = opener_sc.open(req, timeout = 5)
                data_sc = simplejson.load(f)
            except:
                pass

Code:
            if x=='sancrypto':
                try:
                    for item in data_sc:
                        if item['symbol'].lower()==abbreviation:
                            coins[item['symbol'].lower()].ratio = float(item['ratio'])
                            coins[item['symbol'].lower()].source = 'sc'
   success = 1
   break
                except:
print "ERROR"
continue

I dont know what the problem is. So, if anyone could - please help ;)


EDIT:
Got it, thanks anyway. I did it by myself with a detour. python export now the json into a txt file, add a few thinks like "CoinTag" and it works very well.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: Sanasol on March 25, 2014, 09:09:29 PM
veeeeery nice tool  ;D thank you very much indeed!

After hours of configuration it works very well.
But can somebody tell me how to add more sites like coinchoose?

I've tried the last hours to code it by myself but all was only worst of time.

API:
http://sancrypto.info/api/json/15/

Code:
# sancrypto
        if x=='sancrypto':
            try:
                fullstr = prestr + "sancrypto"
                print fullstr + (79-len(fullstr))*" " + "\r",
                req = urllib2.Request("http://sancrypto.info/api/json/15/")
                opener_sc = urllib2.build_opener()
                opener_sc.addheaders = [('User-agent', 'CryptoSwitcher')]
                f = opener_sc.open(req, timeout = 5)
                data_sc = simplejson.load(f)
            except:
                pass

Code:
            if x=='sancrypto':
                try:
                    for item in data_sc:
                        if item['symbol'].lower()==abbreviation:
                            coins[item['symbol'].lower()].ratio = float(item['ratio'])
                            coins[item['symbol'].lower()].source = 'sc'
   success = 1
   break
                except:
print "ERROR"
continue

I dont know what the problem is. So, if anyone could - please help ;)


EDIT:
Got it, thanks anyway. I did it by myself with a detour. python export now the json into a txt file, add a few thinks like "CoinTag" and it works very well.

what about sharing result? :P


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: jmlindn on March 29, 2014, 10:37:54 AM
Looks neat, will try whenever I get home.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: _Crash_ on March 31, 2014, 04:55:24 PM
I tried but it says the config file' syntax is old or outdated then immediately closes.


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: salfter on April 01, 2014, 10:39:21 PM
I am guessing that the PHP script is https://github.com/area/CryptoSwitcher/blob/master/switchpool.php but I still don't understand what exactly needs to be done.

- Where to specify all pool urls's and miner name/password?
- How to call this script with "clear" parameter included on the first call in the pool-switching shell script?
- I am guessing that I have to remove line 4 and 5 from pool-switching shell script https://github.com/area/CryptoSwitcher/blob/master/litecoin.sh.sample in order to make sure cgminer isn't restarted every time. Is that correct?

Everything is passed in as arguments.  Here's what I'm using to switch over to Bitgem mining...write this to bitgem.sh:

Code:
#!/bin/bash
source miners.sh
for i in $miners
do
  php switchpool.php stratum+tcp://bitgem.dyndns.org:3333 salfter.${i} x clear ${i} 4029
done

miners.sh just declares a variable with the hosts to be switched:

Code:
#!/bin/bash
miners="miner2"

Going back to switchpool.php, the arguments passed to it are as follows:

  • pool URL
  • pool worker name
  • pool password
  • "clear" (to remove all other pools from the current config) or "" (to not do that, if you're using multiple pools for a coin)
  • cgminer/bfgminer hostname
  • cgminer/bfgminer RPC port number


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: mhkso2 on April 14, 2014, 02:10:19 PM
so cryptoswitcher is like multipool but locally? What advantages does that have
Report to moderator 


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: nocroom on September 13, 2014, 04:20:14 AM
any self hosted php/mysql script auto switcher i can use?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: geometric_series on September 14, 2014, 06:08:13 PM
Can it mine coins that are not listed on exchange?


Title: Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
Post by: lakala on September 27, 2014, 11:06:19 PM
Cryptsy changes the URL for their API.  I wonder if that needs to change.