Stream Solana Transactions with gRPC (Bitquery CoreCast)
To stream Solana transactions over gRPC, open a transactions stream on Bitquery CoreCast at corecast.bitquery.io with your Bitquery API token and at least one filter: a program address or a signer. Each message is one transaction with its signature, status, fee, balance changes, logs and IDL-parsed instructions, sent as protobuf.
Overview
Subscribe to live Solana transactions with filtering by program or signer. Each event includes parsed instructions (IDL), balance updates, program logs, and execution status. Data is in protobuf format; use bitquery-corecast-proto to parse it. Yellowstone gRPC sends the same transactions with instruction data as raw bytes for your client to decode; see how CoreCast differs from Yellowstone gRPC.
Configuration
To subscribe to transactions, configure your stream as follows. At least one filter is required.
server:
address: "corecast.bitquery.io"
authorization: "<your_api_token>"
insecure: false
stream:
type: "transactions"
filters:
programs:
- "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P" # Pump.fun
Available Data
The transactions stream provides comprehensive transaction information including:
- Transaction details: Slot, signature, status, fees (in native and USD)
- Account information: Signers, accounts, program IDs
- Balance updates: Pre/post balances for all accounts
- Parsed instructions: IDL-parsed program calls with arguments and logs
- Program execution: Success/failure status and error messages
Sample Data Structure
Here's an example of the data structure you'll receive:
{
"Block": {
"Slot": 370030401
},
"Transaction": {
"Index": 455,
"Signature": "2gyW9NtqCRwsGGWoeJkGGQNPrQfcDT2dBQxUKXXVcC7QQbNBey9DtQLNkCRn7yU5N1H8YcFQESTC6KbQ7n1HyTwj",
"Status": {
"Success": true,
"ErrorMessage": ""
},
"Header": {
...
],
"Accounts": [
...
]
},
"FeeInUsd": 0.00075,
"TotalBalanceUpdates": [
{
"PreBalance": 82844277367,
"PostBalance": 82844272367,
"AccountIndex": 0
},
...
],
"ParsedIdlInstructions": [
{
"Index": 0,
"Depth": 0,
"CallerIndex": -1,
"ExternalSeqNumber": 1,
"InternalSeqNumber": 0,
"Program": {
"Address": "Vote111111111111111111111111111111111111111",
"Parsed": true,
"Name": "vote",
"Method": "TowerSync",
...
},
"Accounts": [
{
"Address": "C616NHpqpaiYpqVAv619QL73vEqKJs1mjsJLtAuCzMX6",
"IsSigner": false,
"IsWritable": true
},
{
"Address": "ETcW7iuVraMKLMJayNCCsr9bLvKrJPDczy1CMVMPmXTc",
"IsSigner": true,
"IsWritable": true
}
],
"Logs": [
"Program Vote111111111111111111111111111111111111111 invoke [1]",
"Program Vote111111111111111111111111111111111111111 success"
],
"Data": ...
}
]
}
}
Key Points
- Named arguments: Each parsed instruction carries its arguments and account names, so you do not decode bytes
- Balance tracking: Balances before and after the transaction for every account it touched
- Logs: Execution logs show each invocation and whether it succeeded
- Whole chain: The stream covers every Solana program, not only DEXs
Filtering Options
The filter options are defined in the request.proto file. You can filter transactions using the following filters:
message SubscribeTransactionsRequest {
AddressFilter program;
AddressFilter signer;
}
Available filters:
- program: Filter by program address (e.g., Vote, Token, System)
- signer: Filter by signer's address
Calls versus account references
A program filter returns a transaction when at least one instruction calls that address, at the top level or as an inner (CPI) instruction. Failed transactions are included. A transaction that only lists the address as an account, without calling it, is not returned. Yellowstone gRPC's account_include filter matches any account a transaction uses. The same address can therefore return more transactions there.
Schema Reference
- Protobuf Schema: parsed_idl_block_message.proto
- Sample Data: solana_transaction.json
Python Installation
For Python development, install the protobuf package:
pip install bitquery-corecast-proto
NPM Package
npm install bitquery-corecast-proto
This package includes all necessary protobuf definitions without requiring manual downloads.
Related
- CoreCast Introduction: Topics and concepts
- DEX Trades gRPC: DEX swap stream
- Authorization: Token setup
Ready to run this in production?
Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.