Composable Instructions
Venum's key differentiator: you get an unsigned transaction you can inspect and modify before signing, not an auto-submitted opaque blob.
The Problem with Jupiter
Jupiter API returns a fully serialized, opaque transaction. You can't:
- Add your own fee instruction
- Compose with a CPI (cross-program invocation)
- Bundle with other instructions in the same transaction
- Modify the compute budget
- Add a memo or custom program call
You either use their blob as-is, or you don't use it at all.
Venum's Approach
The /v1/swap/build endpoint returns an unsigned VersionedTransaction that you can deserialize, inspect, and extend before signing:
javascript
// Build the transaction — returns base64-encoded unsigned TX
const { transaction } = await fetch('https://api.venum.dev/v1/swap/build', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'x-api-key': API_KEY },
body: JSON.stringify({
inputMint: 'SOL',
outputMint: 'USDC',
amount: '1000000000',
userPublicKey: wallet.publicKey.toString(),
}),
}).then(r => r.json());
// Deserialize, modify, sign, submit
const tx = VersionedTransaction.deserialize(Buffer.from(transaction, 'base64'));
tx.sign([wallet]);
const { signature } = await fetch('https://api.venum.dev/v1/send', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'x-api-key': API_KEY },
body: JSON.stringify({ transaction: Buffer.from(tx.serialize()).toString('base64') }),
}).then(r => r.json());Use Cases
- Telegram bots — Add your own fee instruction to every swap
- dApps — Compose swap with your protocol's CPI
- Wallets — Bundle swap with account creation / closing
- Trading bots — Combine swap with Jito tip instruction
- Aggregators — Multi-hop through different DEXes in one TX
