-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
import requests
import json
url = "https://graphql.bitquery.io"
payload = json.dumps({
"query": "query ($network: BitcoinNetwork!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime) {\n bitcoin(network: $network) {\n blocks(\n options: {desc: \"height\", limit: $limit, offset: $offset}\n date: {since: $from, till: $till}\n ) {\n timestamp {\n time(format: \"%Y-%m-%d %H:%M:%S\")\n }\n height\n difficulty\n transactionCount\n blockSizeBigInt\n }\n }\n}\n",
"variables": "{\n \"limit\": 10,\n \"offset\": 0,\n \"network\": \"bitcoin\",\n \"from\": \"2026-01-22T05:32:46.000Z\",\n \"till\": \"2026-01-22T07:32:46.999Z\",\n \"dateFormat\": \"%Y-%m-%d\"\n}"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer undefined'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)Metadata
Metadata
Assignees
Labels
No labels