Skip to content

Instantly share code, notes, and snippets.

@m0nochr0me
Created August 13, 2021 04:35
Show Gist options
  • Save m0nochr0me/a06b949d05541941c46e3a843c08461b to your computer and use it in GitHub Desktop.
Save m0nochr0me/a06b949d05541941c46e3a843c08461b to your computer and use it in GitHub Desktop.
Slushpool API Request
import json
import http.client
TOKEN = 'yourAccessToken'
c = http.client.HTTPSConnection('slushpool.com', 443)
c.request('GET', '/stats/json/btc/', headers={'SlushPool-Auth-Token': TOKEN})
r = c.getresponse()
w = r.readline()
j = json.loads(w)
print(w)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment