Skip to main content

/quickalerts/rest/v1/notifications/backtest REST Method

Backtests a QuickAlerts expression.

Updated on
Oct 3, 2023

/quickalerts/rest/v1/notifications/backtest REST Method

Body Parameters

expression
string<base64>
REQUIRED
Base64 encoded expression.
network
string
REQUIRED
The network for this notification. ENUM: "arbitrum-mainnet", "arbitrum-sepolia", "avalanchec-mainnet", "avalanchec-fuji", "base-mainnet", "base-sepolia", "bera-artio", "blast-mainnet", "blast-sepolia", "bnbchain-mainnet", "bnbchain-testnet", "bitcoin-mainnet", "celo-mainnet", "doge-mainnet", "ethereum-holesky", "ethereum-mainnet", "ethereum-sepolia", "fantom-mainnet", "gnosis-mainnet", "imx-mainnet", "imx-testnet", "nova-mainnet", "optimism-mainnet", "optimism-sepolia", "polygon-mainnet", "polygon-amoy", "scroll-mainnet", "scroll-testnet", "tron-mainnet", "zkevm-mainnet", "zksync-mainnet", "zksync-sepolia"
block_number
number
REQUIRED
The block number to backtest.
backtest_count
number
REQUIRED
The number of blocks to backtest. <=20

Returns

expression_result
object
The results of the backtest. Each result is an array with the following properties:
block_number
number
The block number of the result.
evaluation
boolean
Whether the expression is true or false for the block_number.
network
string
The network this notification was backtested on
matched_hashes
object
An object containing a comma-separated list of transaction hashes that matched the expression for the block_number.
Request
1
curl -X POST \
2
"https://api.quicknode.com/quickalerts/rest/v1/notifications/backtest" \
3
-H "accept: application/json" \
4
-H "Content-Type: application/json" \
5
-H "x-api-key: YOUR_API_KEY" \
6
-d $'{
7
"expression": "dHhfdG8gPT0gJzB4ZDhkQTZCRjI2OTY0YUY5RDdlRWQ5ZTAzRTUzNDE1RDM3YUE5NjA0NSc=",
8
"network": "ethereum-mainnet",
9
"block_number": 12345678,
10
"backtest_count": 10
11
}'
12
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free