Solana Samples

Solana nodes accept HTTP requests using the JSON-RPC 2.0 specification.

getBlockHeight

Returns the current block height of the node

Request

curl https://solana-mainnet-rpc.allthatnode.com/'YOUR-API-KEY' \
--request POST \
--header "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1, "method":"getBlockHeight"}'

Response

{"jsonrpc":"2.0","result":127475622,"id":1}

Last updated