BotTx|Documentation

Advanced

Libraries & Integration

BoltTx is a simple REST API — use any HTTP client in any language. No SDK required, no build step, no lock-in.

Why no SDK?

Our API has three fields: the signed transaction and two simple options. Wrapping that in an SDK adds a dependency with no real benefit — you get better reliability, smaller bundle size, and no version lock by using your language's native HTTP client.

JavaScript / TypeScript

Native fetch

Works in Node.js 18+, Deno, Bun, and all modern browsers. No dependencies required.

// Using the native fetch API (no SDK needed)
const res = await fetch("https://bolttx.io/v1/send", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    transaction: signedTxBase64,
    options: {
      skip_preflight: true,
      max_retries: 3,
      anti_mev: true,
    },
  }),
});

const { signature, slot } = await res.json();
console.log("Signature:", signature);

Python

requests

Using the standard requests library. Works with any Python 3.7+ environment.

import requests

res = requests.post(
    "https://bolttx.io/v1/send",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "transaction": signed_tx_base64,
        "options": {
            "skip_preflight": True,
            "max_retries": 3,
            "anti_mev": True,
        },
    },
)

data = res.json()
print(f"Signature: {data['signature']}")

Rust

reqwest

Production-ready async HTTP client with Tokio. Add reqwest to your Cargo.toml.

use reqwest::Client;
use serde_json::json;

let client = Client::new();
let res = client
    .post("https://bolttx.io/v1/send")
    .bearer_auth("YOUR_API_KEY")
    .json(&json!({
        "transaction": signed_tx_base64,
        "options": {
            "skip_preflight": true,
            "max_retries": 3,
            "anti_mev": true,
        },
    }))
    .send()
    .await?
    .json::<serde_json::Value>()
    .await?;

println!("Signature: {}", res["signature"]);

Go

net/http

Standard library only. No external dependencies.

package main

import (
    "bytes"
    "encoding/json"
    "io"
    "net/http"
)

payload, _ := json.Marshal(map[string]interface{}{
    "transaction": signedTxBase64,
    "options": map[string]interface{}{
        "skip_preflight": true,
        "max_retries":    3,
        "anti_mev":       true,
    },
})

req, _ := http.NewRequest("POST", "https://bolttx.io/v1/send", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")

resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()

body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))

Solana client libraries

Already using a Solana client (like @solana/web3.js, solana-pyor solana-client)? You can point them directly at BoltTx's RPC proxy endpoint for drop-in integration — no code changes required.

// @solana/web3.js — just swap the URL
const connection = new Connection(
  "https://bolttx.io/?api-key=YOUR_API_KEY"
);
await connection.sendRawTransaction(signedTx.serialize());