Data APIs
Request parsed transaction history, token balances, and asset metadata without maintaining your own indexer.
Everything you need to connect, query, and stream on-chain data through fast and privacy-conscious infrastructure.
Quickstart
Use any HTTP client to call hSOL. This example asks the Solana cluster for its latest processed slot.
Create a key from your hSOL dashboard, then store it in an environment variable. Never expose a production key in browser code.
HSOL_API_KEY=your_secret_keyChoose your language and replace the placeholder with your own key.
curl https://mainnet.hsol.dev \
--header "Authorization: Bearer YOUR_HSOL_KEY" \
--header "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getSlot"
}'A successful request returns a JSON-RPC response with the current slot in the result field.
{
"jsonrpc": "2.0",
"result": 317204811,
"id": 1
}Core concepts
Send your API key as a bearer token with every request. Keep keys on your server and use separate keys for development and production.
Authorization: Bearer YOUR_HSOL_KEYBuild against devnet without spending real assets, then switch the base URL when you are ready for mainnet.
Production applications and live assets.
https://mainnet.hsol.devDevelopment, testing, and integration checks.
https://devnet.hsol.devExplore the stack
Use the same platform as your application grows from simple reads to live event-driven experiences.
Request parsed transaction history, token balances, and asset metadata without maintaining your own indexer.
Subscribe to account, transaction, and slot updates so your interface can react as the chain changes.
Submit signed transactions, track confirmation, and use priority-fee estimates to choose an appropriate fee.
API reference
hSOL uses standard Solana JSON-RPC request and response shapes. All methods below accept POST requests.
getSlotReturn the slot most recently processed by the cluster.
Parameters: Optional commitment configuration
getBlockHeightReturn the current block height of the ledger.
Parameters: Optional commitment configuration
getBalanceReturn an account's lamport balance.
Parameters: Base-58 account address
Design clients to handle temporary load without overwhelming the network or degrading your app's responsiveness.
Pause before retrying and honor any retry guidance returned with the response.
Increase the delay between retries and add jitter to avoid synchronized request bursts.
Treat your infrastructure credentials and your users' data with the same care as your application keys.