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.
#!/bin/bash
#my rigs
x11rignum=(your rig #)
x13rignum=(your rig #)
x15rignum=(your rig #)
nist5rignum=(your rig #)
API_KEY=(enter your own API #)
#need marketprice algo, manually hardcode for now
x11marketprice=(enter your price)
x13marketprice=(enter your price)
x15marketprice=(enter your price)
x11highprice=1
x13highprice=1
x15highprice=1
priceincreased=false
while true; do
###################check all rig rent status#####################
#get information from betarigs then store locally to a txt file
curl https://www.betarigs.com/api/v1/rig/$x11rignum > x11info.txt
sleep 1
curl https://www.betarigs.com/api/v1/rig/$x13rignum > x13info.txt
sleep 1
curl https://www.betarigs.com/api/v1/rig/$x15rignum > x15info.txt
sleep 1
#curl https://www.betarigs.com/api/v1/rig/$nist5rignum > nist5info.txt
#sleep 1
#output is true or false
x11statavail=$(cat x11info.txt | jq '.status.available')
x13statavail=$(cat x13info.txt | jq '.status.available')
x15statavail=$(cat x15info.txt | jq '.status.available')
#nist5statavail=$(cat nist5info.txt | jq '.status.available')
#output are: Available, In Progress, Waiting payment, Offline, etc
x11statlabel=$(cat x11info.txt | jq '.status.label')
x13statlabel=$(cat x13info.txt | jq '.status.label')
x15statlabel=$(cat x15info.txt | jq '.status.label')
#nist5statlabel=$(cat nist5info.txt | jq '.status.label')
##remove "" otherwise string comparison won't work
#x11statlabel=${x11statlabel:1:-1}
#x13statlabel=${x13statlabel:1:-1}
#x15statlabel=${x15statlabel:1:-1}
##nist5statlabel=${nist5statlabel:1:-1}
##default not rented
x11rented=false
x13rented=false
x15rented=false
if [ $x11statavail == false ]; then
x11rented=true
fi
if [ $x13statavail == false ]; then
x13rented=true
fi
if [ $x15statavail == false ]; then
x15rented=true
fi
rentinprogress=false
if [ $x11rented == true ] || [ $x13rented == true ] || [ $x15rented == true ]; then
rentinprogress=true
fi
################### change high price to market price if rental has completed #####################
string1='{"price":{"per_speed_unit":{"value":'
string2=',"unit":"BTC/Mh/day"}}}'
#if rig is not rented
if [ $rentinprogress == false ]; then
if [ $priceincreased == false ]; then
##readback and store all rig currentprice, I can manually change price online
x11currprice=$(cat x11info.txt | jq '.price.per_speed_unit.value')
x13currprice=$(cat x13info.txt | jq '.price.per_speed_unit.value')
x15currprice=$(cat x15info.txt | jq '.price.per_speed_unit.value')
#nist5currprice=$(cat nist5info.txt | jq '.price.per_speed_unit.value')
else #if priceincreased=true means rent period just finished
##set all to marketprice for now
x11currprice=$x11marketprice
x13currprice=$x13marketprice
x15currprice=$x15marketprice
#nist5currprice=$nist5marketprice
jsonstring=$string1$x11currprice$string2
curl -X PUT -H "X-Api-Key: "$API_KEY -H "Content-Type: application/json" -d $jsonstring https://www.betarigs.com/api/v1/rig/$x11rignum
sleep 1
jsonstring=$string1$x13currprice$string2
curl -X PUT -H "X-Api-Key: "$API_KEY -H "Content-Type: application/json" -d $jsonstring https://www.betarigs.com/api/v1/rig/$x13rignum
sleep 1
jsonstring=$string1$x15currprice$string2
curl -X PUT -H "X-Api-Key: "$API_KEY -H "Content-Type: application/json" -d $jsonstring https://www.betarigs.com/api/v1/rig/$x15rignum
sleep 1
#jsonstring=$string1$nist5currprice$string2
#curl -X PUT -H "X-Api-Key: "$API_KEY -H "Content-Type: application/json" -d $jsonstring https://www.betarigs.com/api/v1/rig/$nist5rignum
sleep 1
priceincreased=false
fi
else #if rent is in progress or waiting for payment
################### set price to high if rental started #####################
echo "rent in progress"
if [ $priceincreased == false ]; then
echo "increase non rented price now"
#set highprice to rigs not rented
if [ $x11rented == false ]; then
echo "set x11 price"
x11currprice=$x11highprice
jsonstring=$string1$x11currprice$string2
curl -X PUT -H "X-Api-Key: "$API_KEY -H "Content-Type: application/json" -d $jsonstring https://www.betarigs.com/api/v1/rig/$x11rignum
sleep 1
fi
if [ $x13rented == false ]; then
x13currprice=$x13highprice
jsonstring=$string1$x13currprice$string2
curl -X PUT -H "X-Api-Key: "$API_KEY -H "Content-Type: application/json" -d $jsonstring https://www.betarigs.com/api/v1/rig/$x13rignum
sleep 1
fi
if [ $x15rented == false ]; then
x15currprice=$x15highprice
jsonstring=$string1$x15currprice$string2
curl -X PUT -H "X-Api-Key: "$API_KEY -H "Content-Type: application/json" -d $jsonstring https://www.betarigs.com/api/v1/rig/$x15rignum
sleep 1
fi
priceincreased=true
fi
fi
sleep 60
done