Sending Transactions
Use this endpoint to send a single transaction faster than the p2p network using the BDN.
REQUEST
Method: blxr_tx
Parameters
Parameter | Description | Instructions & Notes |
---|---|---|
| Raw transactions bytes without | Mandatory. Learn more about constructing the transaction here. |
| Blockchain network name. | Optional. Default: Mainnet Available options are: *Use with Cloud-API when working with BSC. |
| The duration of time (in ms) that your transaction will be delayed before propagation by the BDN as a normal transaction | Available only when using Default: 0 If the value is 0, the transaction will never be propagated by the BDN as a normal transaction. |
| Transaction is sent to the blockchain node for validation, and the Gateway returns any error message received in response. | Available only with Gateway API Optional Default: False |
Cloud-API
The WebSocket endpoint for sending transactions is
wss://api.blxrbdn.com/ws
. All users sending transactions via a WebSocket connection should use this endpoint.See Cloud-API IPs to work directly with IP (
wss://<IP>/ws
)The HTTPS POST endpoint is
https://api.blxrbdn.com
.
Sending transactions via WebSocket instead of HTTPS can lead to a latency improvement of up to 10ms.
Examples
Gateway-API:
Gateway WebSocket endpoint:
ws://127.0.0.1:28333/ws
We assume the WebSocket port
28333
.Please check Authorization Headers examples to reconstruct the header.
Examples
RESPONSE
Result Fields
Result Field | Description |
---|---|
| Transaction hash |
Examples
Example - gRPC
NOTES
All Users
Sending Transactions to the Cloud-API or Gateway-API requires you to register an account on the bloXroute portal. During the registration process, a certificate, private key, and secret hash will be generated for your account. The certificate and key will be used to authenticate your account.
The bloXroute best practice is for users to send transactions to both the Gateway-API and to their blockchain node. You should send transactions in parallel to the Gateway and to your blockchain node as a backup.
Users should not send transactions to the transactions streams WebSocket endpoint
wss://<REGION>.<NETWORK>.blxrbdn.com/ws
(e.g.wss://virginia.eth.blxrbdn.com/ws
) which is for streaming only and doesn't support sending transactions.
Last updated