curl --request POST \
--url https://devnet-router.magicblock.app/getBlockhashForAccounts \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlockhashForAccounts",
"params": [
[
"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
]
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockhash": "example_blockhash",
"lastValidBlockHeight": 123456789
}
}
Get blockhash for multiple account addresses.
curl --request POST \
--url https://devnet-router.magicblock.app/getBlockhashForAccounts \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlockhashForAccounts",
"params": [
[
"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
]
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockhash": "example_blockhash",
"lastValidBlockHeight": 123456789
}
}
Successful response
The response is of type object
.
Was this page helpful?