Broadcast a signed MultiversX transaction through the Relayer and verify that the Relayer accepted it.
Prerequisites
| Requirement | Value |
|---|
| WebSocket URL | wss://relayer.xoxno.com/ws |
| REST base URL | https://relayer.xoxno.com |
Auth for broadcast | None |
| Transaction | Fully signed MultiversX transaction with signature |
| Topic limit | 64 active topics per WebSocket connection |
broadcast does not sign or fund transactions. Use it only after the user’s wallet or your signer produced a valid transaction signature.
1. Connect
Use any WebSocket client. This example uses websocat.
websocat wss://relayer.xoxno.com/ws
2. Subscribe To Status
If you already know the transaction hash, subscribe before broadcasting:
{
"action": "subscribe",
"requestId": "sub-001",
"topic": "tx-status/<transaction-hash>"
}
Expected acknowledgment:
{
"action": "subscribe",
"requestId": "sub-001",
"status": "ok",
"topic": "tx-status/<transaction-hash>"
}
3. Broadcast
Send a signed transaction over WebSocket:
{
"action": "broadcast",
"requestId": "tx-001",
"tx": {
"nonce": 42,
"value": "0",
"receiver": "erd1...",
"sender": "erd1...",
"gasPrice": 1000000000,
"gasLimit": 50000,
"data": "",
"chainID": "1",
"version": 2,
"signature": "<hex-signature>"
}
}
The JSON above is an example payload. Replace every placeholder with fields from a transaction signed for the current sender nonce.
REST variant:
curl -X POST "https://relayer.xoxno.com/v1/broadcast" \
-H "content-type: application/json" \
-d '{
"transactions": [
{
"nonce": 42,
"value": "0",
"receiver": "erd1...",
"sender": "erd1...",
"gasPrice": 1000000000,
"gasLimit": 50000,
"data": "",
"chainID": "1",
"version": 2,
"signature": "<hex-signature>"
}
]
}'
4. Inspect The Acknowledgment
WebSocket success acknowledgment:
{
"action": "broadcast",
"requestId": "tx-001",
"status": "completed",
"hashes": ["<transaction-hash>"]
}
If status is partial or failed, inspect failed[].reason.
Verify
You have a valid quickstart result when:
- The
broadcast acknowledgment has status: "completed".
hashes[0] is present.
- A
txStatus event arrives for the subscribed hash, or the Gateway returns a status for that hash after finalization.
Common Failure
| Symptom | Cause | Fix |
|---|
invalid signature | Transaction was not signed for the serialized payload. | Rebuild and sign with the wallet or signer. |
nonce too low | Sender nonce changed before broadcast. | Re-read nonce, rebuild, sign, and broadcast again. |
topic limit reached | Connection has 64 active topics. | Unsubscribe unused topics or open another connection. |
| No final status yet | Transaction has been accepted but not finalized. | Keep the status subscription active and apply reconnect logic. |
Next Steps