QUIC SDK

Objective

This SDK is designed to make it easy to submit transactions to bloXroute Trader API over QUIC protocol using the Rust programming language.

Using QUIC to submit transactions provides several advantages:

  • Reduced serialization overhead from sending raw bytes

  • Improved handling of head-of-line blocking through independent stream multiplexing

  • Faster connection setup times

circle-info

Although our official QUIC submission SDK is built in Rust, customers can use any programming language to submit transactions over QUIC, provided they adhere to the same connection and submission protocol.

Requirements

Unlike HTTP/WebSocket/gRPC, QUIC authenticates using mTLS, which requires passing a certificate on connection establishment. These credentials are easily downloadable within your bloXroute portal.

  1. Visit the bloXroute portal and log in at https://portal.bloxroute.com/loginarrow-up-right

  2. Navigate to the Account Tab

  3. Under the Setup Instructions panel, click the hyperlink to "Download the artifacts", which include your certificate and secret hash.

Support

Trader API supports QUIC submission across three QUIC paradigms:

  • Bidirectional streams (with response)

  • Unidirectional streams (no response)

  • Datagram (no response)

We recommend starting with bidirectional streams when testing your initial setup, as they provide responses to help verify that connections and submissions are working correctly. Once propagation is confirmed, you can switch to unidirectional streams or QUIC datagrams to achieve lower overhead and reduced latency.

circle-info

QUIC transaction submission is currently supported only on regional endpoints and is not yet available on the global edge endpoint. Support for the global edge endpoint is coming soon.

Usage

Once you have downloaded your credentials (certificate and key file), you can initialize our SDK client by passing the file paths to these credentials. The initialized client should be re-used for all transaction submissions, and has keep-alive configurations managed for you to ensure a long-lived healthy connection.

To submit a transaction, pass the raw signed transaction bytes (not base64) to any of the supported submission methods — one stream/datagram per transaction.

Datagram:

Unidirectional stream:

Bidirectional stream:

The repository also includes a runable example.

Last updated