Send over HTTPS
POST a base64 encoded, already-signed Solana transaction to https://send.swqos.com/v1/transactions. The response is a receipt naming the signature, whether it was a duplicate, what you were charged, and your remaining balance.
The request#
POST https://send.swqos.com/v1/transactions with Content-Type: application/json and your bearer token. Bodies are capped at 8 KiB.
| Field | Type | Meaning |
|---|---|---|
transaction | string, required | Base64 of the serialized signed transaction. Legacy or versioned. At most 1232 bytes before encoding. |
The receipt#
A successful submission returns HTTP 200 and this object.
| Field | Type | Meaning |
|---|---|---|
signature | string | The transaction signature, extracted from the bytes you submitted. It will always match what you signed. |
accepted | boolean | True when the submission was forwarded and acknowledged upstream, or matched a recent duplicate. |
duplicate | boolean | True when this signature was already accepted within the last 90 seconds. Not forwarded again and not charged. |
charged_lamports | integer | What this submission cost. Zero for duplicates. |
balance_remaining_lamports | integer | Your prepaid balance after this submission. |
Anything other than HTTP 200 returns an error object with a code and a message. Every code is documented in errors, along with what causes it and how to fix it.
A complete example#
1const res = await fetch("https://send.swqos.com/v1/transactions", {2 method: "POST",3 headers: {4 Authorization: `Bearer ${process.env.SWQOS_API_KEY}`,5 "Content-Type": "application/json",6 },7 body: JSON.stringify({8 transaction: Buffer.from(tx.serialize()).toString("base64"),9 }),10});1112const { signature, charged_lamports } = await res.json();
Duplicates#
We deduplicate on your account plus the transaction signature for 90 seconds. Resubmitting the same signed bytes inside that window returns accepted: true, duplicate: true and charged_lamports: 0. Nothing is forwarded a second time and you are not charged again.
Racing submissions
If an identical submission is still in flight, the second one returns 409 SUBMISSION_IN_PROGRESS rather than being queued. Wait for the first to return instead of retrying immediately.
Reading the price#
The public default price is available without authentication. It is the global default, not your account’s effective price, so use /v1/account when the distinction matters.
1curl -sS https://send.swqos.com/v1/pricing23# {4# "submission_price_lamports": 200000,5# "billing_event": "accepted_submission",6# "refunded_when_not_landed": false7# }
When to use HTTPS#
HTTPS is the right choice when you are adding swqos.com to an existing service, when your runtime makes raw QUIC awkward, or when a few milliseconds do not decide the outcome. It is a plain JSON POST and it works everywhere.
If latency is the reason you are here, use QUIC instead. Holding one connection open removes a TLS handshake and a TCP round trip from every single send.