Skip to main content
POST
getBlockhashForAccounts
curl --request POST \
  --url https://devnet-router.magicblock.app/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockhashForAccounts",
  "params": [
    [
      "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
      "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
    ]
  ]
}
'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockhash": "9tJWqpCLuFZ8PWQZJaYqydTXzhTCNmrtGraG2wyZXrP7",
    "lastValidBlockHeight": 399468682
  }
}

Body

application/json
jsonrpc
enum<string>
default:2.0
required
Available options:
2.0
id
integer
default:1
required
method
enum<string>
default:getBlockhashForAccounts
required
Available options:
getBlockhashForAccounts
params
string[][]
required

Single account-address array argument

Required array length: 1 element

Array of account addresses (max 100)

Required array length: 1 - 100 elements

Response

200 - application/json

Successful response

jsonrpc
enum<string>
default:2.0
Available options:
2.0
id
result
object
error
object