It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
import urllib
import decimal
import json
class JSONRPCException(Exception):
def __init__(self, rpcError):
Exception.__init__(self)
self.error = rpcError
class ServiceProxy(object):
def __init__(self, serviceURL, serviceName=None):
self.__serviceURL = serviceURL
self.__serviceName = serviceName
def __getattr__(self, name):
if self.__serviceName != None:
name = "%s.%s" % (self.__serviceName, name)
return ServiceProxy(self.__serviceURL, name)
def __call__(self, *args):
postdata = json.dumps({"method": self.__serviceName, 'params': args, 'id':'jsonrpc'})
respdata = urllib.urlopen(self.__serviceURL, postdata).read()
resp = json.loads(respdata, parse_float=decimal.Decimal)
if resp['error'] != None:
raise JSONRPCException(resp['error'])
else:
return resp['result']
import authproxy
import pprint
BITCOINRPC = 'http://myusername:[email protected]:8332/'
pp = pprint.PrettyPrinter(indent=4)
bitcoin = authproxy.AuthServiceProxy(BITCOINRPC)
data = bitcoin.getwork() # call bitcoin 'getwork' RPC
pp.pprint(data)
data = bitcoin.getinfo() # call bitcoin 'getinfo' RPC
pp.pprint(data)
{ 'balance': Decimal('1.10000000'),
'blocks': 116260,
'connections': 48,
'difficulty': Decimal('68978.89245792'),
'errors': '',
'generate': False,
'genproclimit': 1,
'hashespersec': 0,
'keypoololdest': 1296778330,
'paytxfee': Decimal('0.01000000'),
'proxy': '',
'testnet': False,
'version': 32100}