Title: Is there a general way to get difficulty from any coin? Post by: Sultanen on December 23, 2013, 01:12:28 AM Is there a way to get the difficulty from any coin even if there isn't a blockchain site like http://blockchain.info/ (they have an API)? I need to access it programmatically and i want to have it from the source so ripping it from a site that already lists them all isn't an option.
Title: Re: Is there a general way to get difficulty from any coin? Post by: BlueDragon747 on December 23, 2013, 01:25:46 AM get it from the wallet via json rpc
https://blockchain.info/api/json_rpc_api (https://blockchain.info/api/json_rpc_api) https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) Hope that helps ;D Title: Re: Is there a general way to get difficulty from any coin? Post by: Vivisector999 on December 23, 2013, 01:27:57 AM Open your wallet, open the console and type getdifficulty. That will give your the current difficulty.
Title: Re: Is there a general way to get difficulty from any coin? Post by: BlueDragon747 on December 23, 2013, 01:29:34 AM Open your wallet, open the console and type getdifficulty. That will give your the current difficulty. OP wanted to access via code not manual ;) Title: Re: Is there a general way to get difficulty from any coin? Post by: Sultanen on December 23, 2013, 02:09:52 AM get it from the wallet via json rpc Thanks for your input!https://blockchain.info/api/json_rpc_api (https://blockchain.info/api/json_rpc_api) https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) Hope that helps ;D If i get that right i need to have the qt wallet installed on the webserver in order to use that api on it. That is not an option for me unfortunatley. You can use it on an online wallet aswell but all new coins don't have an online wallet. There isn't any way to get the information directly from a node or something? Title: Re: Is there a general way to get difficulty from any coin? Post by: BlueDragon747 on December 23, 2013, 02:37:01 AM get it from the wallet via json rpc Thanks for your input!https://blockchain.info/api/json_rpc_api (https://blockchain.info/api/json_rpc_api) https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) Hope that helps ;D If i get that right i need to have the qt wallet installed on the webserver in order to use that api on it. That is not an option for me unfortunatley. You can use it on an online wallet aswell but all new coins don't have an online wallet. on a headless linux webserver I would use the bitcoind and use something like this in a script: ./bitcoind -rpcconnect=YourIpOrDomainName -rpcport=YourPort -rpcuser=YourWalletUserName -rpcpassword=YourPassword getinfo an online wallet is not much more than a php front end to the wallet daemon ;) Code:
if you can't get it direct from the wallet then you must get it from another website but you don't want to do this? btw you can do this to a wallet on another server if you wanted as long as you setup the wallet conf right Title: Re: Is there a general way to get difficulty from any coin? Post by: Sultanen on December 23, 2013, 02:44:58 AM get it from the wallet via json rpc Thanks for your input!https://blockchain.info/api/json_rpc_api (https://blockchain.info/api/json_rpc_api) https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) Hope that helps ;D If i get that right i need to have the qt wallet installed on the webserver in order to use that api on it. That is not an option for me unfortunatley. You can use it on an online wallet aswell but all new coins don't have an online wallet. on a headless linux webserver I would use the bitcoind and use something like: ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo an online wallet is not much more than a php front end to the wallet daemon ;) if you can get it direct from the wallet then you must get it from another website but you don't want to do this? Title: Re: Is there a general way to get difficulty from any coin? Post by: BlueDragon747 on December 23, 2013, 02:48:41 AM get it from the wallet via json rpc Thanks for your input!https://blockchain.info/api/json_rpc_api (https://blockchain.info/api/json_rpc_api) https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) Hope that helps ;D If i get that right i need to have the qt wallet installed on the webserver in order to use that api on it. That is not an option for me unfortunatley. You can use it on an online wallet aswell but all new coins don't have an online wallet. on a headless linux webserver I would use the bitcoind and use something like: ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo an online wallet is not much more than a php front end to the wallet daemon ;) if you can get it direct from the wallet then you must get it from another website but you don't want to do this? yes the network recalculates the difficulty every so many blocks, for Blakecoin it every 20 blocks so when you find that 20'th block it recalculates the difficulty and broadcasts it on the network a network node is a wallet ;) Title: Re: Is there a general way to get difficulty from any coin? Post by: Sultanen on December 23, 2013, 03:03:50 AM get it from the wallet via json rpc Thanks for your input!https://blockchain.info/api/json_rpc_api (https://blockchain.info/api/json_rpc_api) https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) Hope that helps ;D If i get that right i need to have the qt wallet installed on the webserver in order to use that api on it. That is not an option for me unfortunatley. You can use it on an online wallet aswell but all new coins don't have an online wallet. on a headless linux webserver I would use the bitcoind and use something like: ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo an online wallet is not much more than a php front end to the wallet daemon ;) if you can get it direct from the wallet then you must get it from another website but you don't want to do this? yes the network recalculates the difficulty every so many blocks, for Blakecoin it every 20 blocks so when you find that 20'th block it recalculates the difficulty and broadcasts it on the network a network node is a wallet ;) Title: Re: Is there a general way to get difficulty from any coin? Post by: BlueDragon747 on December 23, 2013, 03:05:32 AM get it from the wallet via json rpc Thanks for your input!https://blockchain.info/api/json_rpc_api (https://blockchain.info/api/json_rpc_api) https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) Hope that helps ;D If i get that right i need to have the qt wallet installed on the webserver in order to use that api on it. That is not an option for me unfortunatley. You can use it on an online wallet aswell but all new coins don't have an online wallet. on a headless linux webserver I would use the bitcoind and use something like: ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo an online wallet is not much more than a php front end to the wallet daemon ;) if you can get it direct from the wallet then you must get it from another website but you don't want to do this? yes the network recalculates the difficulty every so many blocks, for Blakecoin it every 20 blocks so when you find that 20'th block it recalculates the difficulty and broadcasts it on the network a network node is a wallet ;) cgminer gets it from the pool which has a wallet connected and when solo mining its get it from the wallet direct Edit: using the info from a pool would be the same as getting the info from another website, in the end you need a node in the network to receive the broadcasts to tell you what the current difficulty is ;) Title: Re: Is there a general way to get difficulty from any coin? Post by: Sultanen on December 23, 2013, 03:12:11 AM get it from the wallet via json rpc Thanks for your input!https://blockchain.info/api/json_rpc_api (https://blockchain.info/api/json_rpc_api) https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) Hope that helps ;D If i get that right i need to have the qt wallet installed on the webserver in order to use that api on it. That is not an option for me unfortunatley. You can use it on an online wallet aswell but all new coins don't have an online wallet. on a headless linux webserver I would use the bitcoind and use something like: ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo an online wallet is not much more than a php front end to the wallet daemon ;) if you can get it direct from the wallet then you must get it from another website but you don't want to do this? yes the network recalculates the difficulty every so many blocks, for Blakecoin it every 20 blocks so when you find that 20'th block it recalculates the difficulty and broadcasts it on the network a network node is a wallet ;) cgminer gets it from the pool which has a wallet connected and when solo mining its get it from the wallet direct Title: Re: Is there a general way to get difficulty from any coin? Post by: Eliavres on December 23, 2013, 03:13:21 AM IF my assumption is correct you want to make a tool to sort all coins by difficulty..not exactly an easy feat. You would need a back end from which to retrieve that stat for each currency, my best guess would be the pools, pick out the most popular ones for each coin.
Title: Re: Is there a general way to get difficulty from any coin? Post by: BlueDragon747 on December 23, 2013, 03:19:06 AM it might be best to think along the lines of getting the data from easiest source for a particular coin rather than all the same would save overhead at least :D
Best of luck with your project 8) Title: Re: Is there a general way to get difficulty from any coin? Post by: Sultanen on December 23, 2013, 10:32:04 AM You guys might be right, but relying on a single online source aint gonna cut it, but using multiple backup sources might be an alternative i guess =)
|