Skip to main content

Using Helius Sender with the Jupiter Swap API

Helius Sender is a low-latency Solana transaction sending service that sends your transactions across all pathways (Helius, Jito, Harmonic, Rakurai, etc.), maximizing inclusion speed and landing rate. Jupiter’s Swap API allows you to find the most price-efficient route for your swaps and creates a ready-to-use transaction for you. Combining these two tools enables traders to seize trading opportunities before the competition and increase the chance that the swap will succeed.
Sender is publicly available — no plan is required.

How it works

  1. Get a Jupiter quote for a trading pair
  2. Use it to create a swap transaction with Jupiter’s Swap API
  3. Modify it for Sender compatibility
  4. Broadcast it through Helius Sender for maximum success rate

Requirements

  • Node.js ≥ 20 (tested with v20.9.0)
  • TypeScript ≥ 5
  • A Helius account (free or paid) for RPC access
  • A Solana wallet with sufficient SOL for transaction fees and tips
Install dependencies globally: npm i -g typescript

Implementation

1

Set up the environment

Set "types": ["node"] in your tsconfig.jsonSet "type": "module" in package.json
2

Create the Jupiter Swap Client

Create a file named jupiter-swap-sender.ts with the following code:
3

Configuration

Replace the hardcoded API key and private key with your credentials. Set the right parameters for your swap: token addresses, amount, slippage. Choose the Sender endpoint that’s closest to your server.
4

Run the Application

Execute the script to perform a Jupiter swap via Helius Sender:

Sample output

Example transaction