Query API¶
RESTful API for querying Solana data.
Base URL¶
Authentication¶
Endpoints¶
Get Account¶
Parameters:
| Name | Type | Description |
|---|---|---|
pubkey |
string | Account public key |
encoding |
string | base64, jsonParsed (default) |
Response:
{
"pubkey": "So11111111111111111111111111111111111111112",
"lamports": 1000000000,
"owner": "11111111111111111111111111111111",
"data": { ... },
"executable": false,
"rentEpoch": 123
}
Get Transaction¶
Response:
{
"signature": "5x...",
"slot": 123456789,
"blockTime": 1704067200,
"status": "confirmed",
"fee": 5000,
"instructions": [ ... ]
}
Get Token Accounts¶
Parameters:
| Name | Type | Description |
|---|---|---|
owner |
string | Wallet public key |
mint |
string | Filter by mint (optional) |
Response:
{
"tokens": [
{
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "1000000",
"decimals": 6,
"uiAmount": 1.0
}
]
}
Search Transactions¶
Body:
{
"program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"account": "...",
"startTime": 1704067200,
"endTime": 1704153600,
"limit": 100
}
Performance Options¶
SLA Header¶
If SLA is missed, the query is free (automatic refund).
Priority¶
Rate Limits¶
| Tier | Requests/Second |
|---|---|
| Free | 10 |
| Basic | 100 |
| Pro | 1,000 |
| Enterprise | Unlimited |
Error Codes¶
| Code | Description |
|---|---|
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Not found |
| 429 | Rate limited |
| 500 | Server error |
| 504 | SLA timeout (refunded) |
SDKs¶
# TypeScript
npm install @streamsync/sdk
# Rust
cargo add streamsync-sdk
# Python
pip install streamsync