Skip to main content
Best Practices for Launchpad Trade API
Follow these recommendations to get the fastest execution times from the Launchpad Trade API.

Run from Optimal Regions

Network latency between your server and our API directly impacts your trade execution speed. Running your scripts from a server physically close to our infrastructure reduces round-trip time and gives you faster confirmations. Deploy your trading scripts on servers located in one of our supported regions.
CityCodeStatus
Amsterdamams⭐ Recommended
Frankfurtfra✅ Available
Use a VPS or cloud server (AWS, DigitalOcean, Hetzner) in Amsterdam for optimal performance.

Keep Connections Alive

Maintain persistent SSL/TLS connections between requests. Opening a new connection for each request adds significant latency due to the TLS handshake.
Creating a new HTTPS connection for every request can add 100-300ms of latency each time.
Add this setup code once at the beginning of your script. All subsequent requests will automatically reuse the same connection:
use reqwest::Client;
use std::time::Duration;

// Add this once at the start of your application
lazy_static! {
    static ref CLIENT: Client = Client::builder()
        .pool_idle_timeout(Duration::from_secs(60))
        .pool_max_idle_per_host(10)
        .build()
        .unwrap();
}

// Then use CLIENT for all your requests - connection stays alive automatically
// CLIENT.post("https://api.launchpad.trade/buy")...
Once configured, every request through this client automatically benefits from persistent connections. No extra code needed.

Initialize Your Wallets

Required before the first API trade. Each wallet must be initialized once before its first trading transaction through the API.
Call the /wallets/init endpoint for each wallet you plan to use for trading (buy, sell, bundle, etc.) via the Launchpad Trade API.

Why Initialize?

When you initialize a wallet, Launchpad Trade pre-allocates resources on the Solana network to speed up your transactions. Without initialization, this allocation happens during your first trade, adding significant latency.

Requirements

  • Minimum 0.01 SOL in the wallet
  • This SOL is not consumed by Launchpad Trade. It’s used as a temporary deposit for Solana network operations and returned after completion

How to Initialize

curl -X POST https://api.launchpad.trade/wallets/init \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "wallets": ["WALLET_PRIVATE_KEY_1", "WALLET_PRIVATE_KEY_2"]
  }'
Once initialized, all subsequent trades from that wallet execute at optimal speed.

Region-Specific Initialization

Wallet initialization is region-specific. If you change regions, you must re-initialize your wallets.
Our load balancer automatically routes your requests to the closest, most optimal server. When you initialize a wallet, it’s prepared for that specific region. If you change your server location or IP address:
  1. The load balancer may assign you to a different region
  2. Your wallets won’t be initialized for this new region
  3. Your first transaction will have added latency
To avoid this:
  • Re-initialize your wallets after changing your server location
  • Check your current region using the /health endpoint
// Response from /health shows your assigned region
{
  "status": "success",
  "data": {
    "region": "ams"  // Your current region
  }
}
If you always run from the same server, you only need to initialize once. Re-initialization is only needed when switching locations.

What’s Next?