Pages:
Author

Topic: [ANN] CryptoSwitcher - Automatically mine the best coin. - page 6. (Read 95410 times)

newbie
Activity: 11
Merit: 0
After Cryptsy DDoS i´m getting this error

Traceback (most recent call last):
  File "C:\Mineria\CryptoSwitcher\cryptoSwitcher.py", line 600, in
    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?
full member
Activity: 177
Merit: 100
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.
legendary
Activity: 954
Merit: 1000
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.
newbie
Activity: 19
Merit: 0
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?
full member
Activity: 177
Merit: 100
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.
newbie
Activity: 26
Merit: 0
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
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
Quick note on updating: to make sure PyCryptsy gets updated, you might need to do this:

Code:
cd CryptoSwitcher && git pull && git submodule update
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
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.
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
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 >
    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.
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
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 ...
full member
Activity: 221
Merit: 100
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 >
    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
full member
Activity: 221
Merit: 100
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.
newbie
Activity: 19
Merit: 0
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!
newbie
Activity: 11
Merit: 0
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
newbie
Activity: 19
Merit: 0
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.
full member
Activity: 182
Merit: 100
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.  Grin
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?
full member
Activity: 230
Merit: 100

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.
sr. member
Activity: 319
Merit: 250
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
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.
sr. member
Activity: 319
Merit: 250

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