Pages:
Author

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

full member
Activity: 177
Merit: 100
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.
full member
Activity: 221
Merit: 100
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.
full member
Activity: 177
Merit: 100
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.
full member
Activity: 221
Merit: 100
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.
full member
Activity: 221
Merit: 100
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.   
full member
Activity: 177
Merit: 100
Worldcoin added.
full member
Activity: 177
Merit: 100
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.
sr. member
Activity: 658
Merit: 250
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.
sr. member
Activity: 319
Merit: 250
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.
legendary
Activity: 1118
Merit: 1004
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.
sr. member
Activity: 319
Merit: 250
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

sr. member
Activity: 269
Merit: 250
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: '\r\n502 Bad Gateway\r\n\r\n

502 Bad Gatewa
y

\r\n
cloudflare-nginx
\r\n\r\n\r\n'
Traceback (most recent call last):
  File "cryptoSwitcher.py", line 324, in
    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
sr. member
Activity: 252
Merit: 250
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.
full member
Activity: 177
Merit: 100
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.
sr. member
Activity: 319
Merit: 250
I pulled the latest master.zip from https://github.com/area/CryptoSwitcher and it is the same cryptoSwitcher.py file I'm currently using.
sr. member
Activity: 252
Merit: 250
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.
sr. member
Activity: 319
Merit: 250
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?
full member
Activity: 177
Merit: 100
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.
sr. member
Activity: 269
Merit: 250

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
    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

sr. member
Activity: 269
Merit: 250

5 You need to install Numpy from the appropiate executable found only here : 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
    import numpy as np
  File "C:\Python27\lib\site-packages\numpy\__init__.py", line 171, in
    import random
  File "C:\Python27\lib\site-packages\numpy\random\__init__.py", line 99, in
    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.
Pages:
Jump to: