Skip to content

Instantly share code, notes, and snippets.

@xmrstickers
Last active March 24, 2023 07:27
Show Gist options
  • Save xmrstickers/58ac89759cb2e32ff7e2200b0ad976ed to your computer and use it in GitHub Desktop.
Save xmrstickers/58ac89759cb2e32ff7e2200b0ad976ed to your computer and use it in GitHub Desktop.
crude watch-list for cheap cybercitizens and desired NFT numbers
import requests
import json
import time
url = "https://skyharbor-server.net/api/sales?status=active&orderCol=nerg_sale_value&order=asc&limit=1000&collection=cybercitizens"
watchlist = [0,1,2,3,4,5,6,7,777,888] # replace with your own "numbers" you would like to watch
#TODO expand watch_list to include desired attributes
max_price = 50 #how much ergo would you pay for one of these things, max?
loop = True #change to "True" if you would like it to scan continuously
delay = 30 #delay between scans - do not make this too low
show_non_watchlist = False #shows all items underneath your max_price - change to false if you only want to see watchlist items
def scan():
response = requests.get(url)
data = response.json()
for item in data:
price = float(item['nerg_sale_value']) / 1000000000
nft_number = int(item['nft_name'].split("#")[-1])
if price <= max_price:
if nft_number in watchlist:
print(f"Item: {item['nft_name']}, Price: {price} ERG [WATCHLISTED]")
elif show_non_watchlist:
print(f"Item: {item['nft_name']}, Price: {price} ERG")
scan()
while(loop):
print("Looping...")
time.sleep(delay)
scan()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment