Send Binary Transaction
Binary transaction submission for lower overhead
Submit a signed Solana transaction as raw binary bytes — no JSON-RPC wrapping, no base64 encoding.
Why Use This?
| sendTransaction (JSON-RPC) | sendRawTransaction (Binary) | |
|---|---|---|
| Request format | JSON body with base64-encoded transaction | Raw transaction bytes |
| Client-side steps | Serialize → base64 encode → wrap in JSON → send | Serialize → send |
| Payload size | ~33% larger (base64 + JSON framing) | Minimal — just the transaction bytes |
| Content-Type | application/json | application/octet-stream |
| Response format | JSON-RPC envelope | Simple JSON |
Request
POST /api/v1/sendRawTransaction
Content-Type: application/octet-stream
api-x-token: YOUR_API_KEY
<raw transaction bytes>The request body is the serialized Solana transaction — the same bytes from transaction.serialize(). No base64 encoding, no JSON wrapping.
Response
{
"success": true,
"signature": "5VERv8NrdMSiGjLEoGKPqmCsR4WxgEfnTAbVnriGjLK..."
}| Field | Type | Description |
|---|---|---|
success | boolean | true if the transaction was accepted |
signature | string | Solana transaction signature |
Error Response
{
"success": false,
"error": "Failed to decode transaction: ..."
}| HTTP Status | Meaning |
|---|---|
400 | Invalid or empty transaction bytes, or missing tip |
401 | Invalid or missing API key |
429 | Rate limit exceeded |
500 | Internal error — retry the request |
Examples
Python
import requests
# tx_bytes = transaction.serialize() from solana-py / solders
tx_bytes = b"..."
response = requests.post(
"http://fra.bolt.raiden.wtf/api/v1/sendRawTransaction",
headers={
"Content-Type": "application/octet-stream",
"api-x-token": "YOUR_API_KEY",
},
data=tx_bytes,
)
result = response.json()
if result["success"]:
print(f"Signature: {result['signature']}")
else:
print(f"Error: {result['error']}")sendRawTransaction is recommended for new integrations. The JSON-RPC sendTransaction endpoint remains fully supported.
Last updated on