Skip to content

POST /v1/swap

Submit a signed transaction through Venum's landing fan-out.

Venum does not add a platform swap fee on /v1/swap. Any swap costs still come from the underlying venue and Solana network execution.

/v1/swap is the submission step for a transaction previously built by POST /v1/swap/build. Venum validates the quoteId, checks that the transaction is signed, then fans the signed payload out through the currently configured landing channels.

Request

/v1/swap accepts either JSON or raw signed transaction bytes.

JSON mode

http
POST /v1/swap
Content-Type: application/json
x-api-key: YOUR_API_KEY

Body

FieldTypeRequiredDescription
transactionstringYesBase64-encoded signed VersionedTransaction
quoteIdstringYesQuote ID from /v1/swap/build response (30s TTL)

Example

json
{
  "transaction": "AQAAAAABAAEDhQ...base64...==",
  "quoteId": "q_42_1712000000000"
}

signedTransaction is also accepted as a backward-compatible alias, but transaction is the preferred field name in public examples.

Binary mode

http
POST /v1/swap
Content-Type: application/octet-stream
x-api-key: YOUR_API_KEY
x-quote-id: q_42_1712000000000

<raw signed transaction bytes>

Use binary mode if you want to avoid base64 and JSON encoding on the client. x-quote-id is required in this mode.

Response

200 OK

json
{
  "signature": "5Kx9abcdef...3nF",
  "status": "submitted",
  "quoteId": "q_42_1712000000000",
  "jito": false,
  "rpc": true,
  "submittedAt": 1712000000000
}

Response Fields

FieldTypeDescription
signaturestringBase58 transaction signature
statusstringAlways "submitted" on success
quoteIdstringEcho of the quote ID used
jitobooleanWhether the response includes a synchronous Jito acknowledgement. This may be false when no synchronous acknowledgement is returned.
rpcbooleanWhether the submit path returned a local RPC-side signature
submittedAtnumberUNIX millisecond timestamp at which submission completed

WARNING

status: "submitted" means Venum accepted the signed transaction and started fan-out through its landing channels. It does not guarantee on-chain confirmation. Track post-submit state via GET /v1/stream/tx (events=landed,processed) or poll GET /v1/tx/:signature.

Errors

StatusDescription
400Invalid transaction or not signed, or invalid X-Senders value
401Missing or invalid API key
404Quote not found (expired or already used)
410Quote expired (30s TTL)
429Rate limit exceeded
502Submission setup failed before fan-out started

X-Senders — channel filter

/v1/swap accepts the same X-Senders header as /v1/send. Use it to restrict the landing fan-out to a specific subset of channels — e.g. X-Senders: tpu for private send (direct-to-leader), or X-Senders: -rpc to skip the RPC layer while keeping the other channels. See the send-transaction docs for the full channel list and syntax.

Need atomic multi-tx execution?

/v1/swap submits a single signed swap transaction. If your flow requires multiple transactions to commit atomically (e.g. a tip + the swap, or a setup tx + swap + cleanup), use /v1/bundle instead — it routes 1–5 signed transactions through Jito's block engine as an all-or-nothing bundle.

Binary Example

ts
const tx = VersionedTransaction.deserialize(unsignedBytes)
const signed = await wallet.signTransaction(tx)

const { signature } = await fetch('https://api.venum.dev/v1/swap', {
  method: 'POST',
  headers: {
    'content-type': 'application/octet-stream',
    'x-api-key': API_KEY,
    'x-quote-id': quoteId,
  },
  body: signed.serialize(),
}).then((r) => r.json())

Submission Flow

  1. Transaction is deserialized and verified
  2. quoteId is checked (exists, not expired, not already used)
  3. Transaction is fan-out submitted through Venum's configured landing channels.
  4. Signature returned immediately
  5. Quote is consumed (cannot be reused)

Rate Limit

TierLimit
free2 / min
starter15 / min
pro60 / min