Do you want it?
Exchange name is beatcoin.pl
Looks pretty neat. I think it'd great.
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.
def test_get_emissions(self):
# unittests already imported
import json
import requests
import datetime
# switch endpoint
testnet = True
# template SPARQL query returning the block height of the next minted
# block after {timestamp}
querytmpl = \
'''?query=PREFIX+ccy%3A+%3Chttp%3A%2F%2Fpurl.org%2Fnet%2F''' \
'''bel-epa%2Fccy%23%3E%0ASELECT+%3Fheight+%3Fdt%0AWHERE+%''' \
'''7B%0A++%3Fblock+ccy%3Aheight+%3Fheight+.%0A++%3Fblock+''' \
'''ccy%3Atime+%3Fdt.+%0A++FILTER(%3Fdt+%3C+{timestamp})%0''' \
'''A%7D%0AORDER+BY+DESC(%3Fdt)+LIMIT+1'''
url = '''http://localhost:3030/{}/sparql'''.format(
'slmtchain' if testnet else 'slmchain')
# Initialise the starting date
ptr = psz = datetime.date(year=2017, month=4, day=15) if testnet \
else datetime.date(year=2014, month=5, day=28)
# Create a day incrementer
nextday = datetime.timedelta(days=1)
# Save results in comma-separated format
with open('/tmp/{}-emissions.csv'.format(
'testnet' if testnet else 'mainnet'), 'w') as fp:
# create day range to drive iteration
for day in range(0, (datetime.date.today() - psz).days):
# Blurt progress
if day % 100 == 0:
print(day)
# Increment the date pointer by one day
ptr += nextday
# Create timestamp from date pointer
ts = int(datetime.datetime.strptime(
'{}-{}-{}T00:00:00.000Z'.format(
ptr.year, ptr.month, ptr.day),
'%Y-%m-%dT%H:%M:%S.%fZ').timestamp())
# Execute the SPARQL query
res = requests.get(url + querytmpl.format(
timestamp=ts)
).content.decode('utf-8')
# Marshal and persist the results for the given day
resd = json.loads(res)
height = resd['results']['bindings'][0]['height']['value']
bdate = resd['results']['bindings'][0]['dt']['value']
datum = '''"{t}",{h},{d}\n'''.format(t=ptr, h=height, d=bdate)
fp.write(datum)
fp.close()