This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const query = ` | |
query{ | |
bitcoin{ | |
blocks{ | |
count | |
} | |
} | |
} | |
`; | |
const url = "https://graphql.bitquery.io/"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import requests | |
def run_query(query): # A simple function to use requests.post to make the API call. | |
headers = {'X-API-KEY': 'YOUR API KEY'} | |
request = requests.post('https://graphql.bitquery.io/', | |
json={'query': query}, headers=headers) | |
if request.status_code == 200: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
ethereum { | |
smartContractCalls(options: {desc: "block.height", limit: 10}, smartContractMethod: {is: "Contract Creation"}, smartContractType: {is: Token}) { | |
block { | |
height | |
timestamp { | |
time | |
} | |
} | |
smartContract { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
ethereum { | |
smartContractEvents(options: {desc: "block.height", limit: 10}, | |
smartContractEvent: {is: "FlashLoan"}, | |
smartContractAddress: | |
{is: "0x398eC7346DcD622eDc5ae82352F02bE94C62d119"}) { | |
block { | |
height | |
timestamp { | |
iso8601 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
ethereum { | |
address(address: {is: "0x7bc3a77b1b8daa4bf4b38c710119b932c5b27925"}) { | |
balances { | |
currency { | |
symbol | |
} | |
value | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
ethereum { | |
transfers(options: {asc: "block.timestamp.time", limit: 2}, amount: {gt: 0}, receiver: {is: "0x7bc3a77b1b8daa4bf4b38c710119b932c5b27925"}) { | |
block { | |
timestamp { | |
time(format: "%Y-%m-%d %H:%M:%S") | |
} | |
height | |
} | |
address: sender { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
ethereum { | |
address(address: {is: "0x930ed81ad809603baf727117385d01f04354612e"}) { | |
annotation | |
address | |
smartContract { | |
contractType | |
currency { | |
symbol | |
name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
ethereum { | |
arguments(smartContractAddress: {is: "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f"}, smartContractEvent: {is: "PairCreated"}, options: {desc: "block.height", limit: 3}) { | |
block { | |
height | |
} | |
argument { | |
name | |
} | |
reference { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bitqyery Widget- Bitcoin Transactions over <time></time></title> | |
<link rel="stylesheet" media="all" href="https://cdn.jsdelivr.net/gh/bitquery/widgets@v1.3.5/dist/assets/css/widgets.css"> | |
<script src="https://cdn.jsdelivr.net/gh/bitquery/widgets@v1.3.5/dist/widgets.js"></script> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query ($network: EthereumNetwork!, $token: String!, $limit: Int!, | |
$from: ISO8601DateTime, $till: ISO8601DateTime, $amount: Float!) { | |
ethereum(network: $network) { | |
transfers(options: {desc: "block.timestamp.time", limit: $limit}, | |
amount: {gt: $amount}, time: {since: $from, till: $till}, | |
currency: {is: $token}) { | |
block { | |
timestamp { | |
time(format: "%Y-%m-%d %H:%M:%S") | |
} |