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
POST /v1/swap
Content-Type: application/json
x-api-key: YOUR_API_KEYBody
| Field | Type | Required | Description |
|---|---|---|---|
transaction | string | Yes | Base64-encoded signed VersionedTransaction |
quoteId | string | Yes | Quote ID from /v1/swap/build response (30s TTL) |
Example
{
"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
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
{
"signature": "5Kx9abcdef...3nF",
"status": "submitted",
"quoteId": "q_42_1712000000000",
"jito": false,
"rpc": true,
"submittedAt": 1712000000000
}Response Fields
| Field | Type | Description |
|---|---|---|
signature | string | Base58 transaction signature |
status | string | Always "submitted" on success |
quoteId | string | Echo of the quote ID used |
jito | boolean | Whether the response includes a synchronous Jito acknowledgement. This may be false when no synchronous acknowledgement is returned. |
rpc | boolean | Whether the submit path returned a local RPC-side signature |
submittedAt | number | UNIX 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
| Status | Description |
|---|---|
400 | Invalid transaction or not signed, or invalid X-Senders value |
401 | Missing or invalid API key |
404 | Quote not found (expired or already used) |
410 | Quote expired (30s TTL) |
429 | Rate limit exceeded |
502 | Submission 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
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
- Transaction is deserialized and verified
quoteIdis checked (exists, not expired, not already used)- Transaction is fan-out submitted through Venum's configured landing channels.
- Signature returned immediately
- Quote is consumed (cannot be reused)
Rate Limit
| Tier | Limit |
|---|---|
| free | 2 / min |
| starter | 15 / min |
| pro | 60 / min |
