Queries
Create Query
This API allows for anyone to create a query. The owner of the query will be under the context of the API key.
POST
To access Query endpoints, a Plus plan or higher is required.
Headers
API Key for the service
Query Parameters
API Key for the service, alternative to using the HTTP header X-DUNE-API-KEY.
Body
application/json
Name of the query.
Example:
"erc20 balances (user address) API"
Description of the query.
Example:
"Example Blockchain Query"
Example:
[
{
"key": "address",
"value": "0x2ae8c972fb2e6c00dded8986e2dc672ed190da06",
"type": "text"
},
{
"key": "blocknumber",
"value": "0",
"type": "number"
},
{
"key": "chain",
"value": "ethereum",
"type": "enum",
"enumOptions": [
"ethereum",
"polygon",
"optimism",
"arbitrum",
"avalanche_c",
"gnosis",
"bnb"
]
}
]
The SQL query text.
Example:
"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}"
Indicates if the query is private.
Example:
false
Response
200
application/json
OK
Example:
1616880
Was this page helpful?