Sending transactions
Build and sign transactions locally, then send serialized bytes using sendTransaction. RPC needs the signed transaction, never your signing key.
Choose a route
Regular RPC handles reads and standard submission. SWQoS provides stake-weighted delivery when enabled for your service:
| Region | SWQoS endpoint |
|---|---|
| New York | https://swqos.ny.shreds.xyz |
| Frankfurt | https://swqos.fra.shreds.xyz |
| Amsterdam | https://swqos.ams.shreds.xyz |
SWQoS affects delivery to the leader; priority fees affect scheduling. Neither guarantees inclusion. Use regular RPC for reads and confirmation checks.
Submit signed bytes
Replace BASE64_SIGNED_TRANSACTION with bytes signed by your application. This request submits a transaction to mainnet.
curl --silent --show-error "https://swqos.ny.shreds.xyz/?api-key=$SHREDS_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"sendTransaction","params":["BASE64_SIGNED_TRANSACTION",{"encoding":"base64"}]}'
For standard submission, change the endpoint to https://rpc.ny.shreds.xyz. Keep the ?api-key=... query parameter when changing endpoints.
Confirm the outcome
A returned signature acknowledges submission, not execution. Query getSignatureStatuses on regular RPC or use WebSocket signatureSubscribe at the required commitment. Check the transaction error as well as confirmation status.
Manage retries
Fetch a fresh blockhash before signing and retain its lastValidBlockHeight. Track confirmation and expiry together. A timeout leaves the outcome unknown; check the signature before deciding to replace the transaction.
Rebroadcasting identical signed bytes preserves the signature. Signing against a new blockhash creates another transaction, so reconcile the earlier attempt before replacing it. Bound client retries and confirm your service's submission limits and retry behavior before depending on node rebroadcasting.