← Articles
Sanctum API: LST metadata, token swap, stake deposit and withdraw logo
solana

Sanctum API: LST metadata, token swap, stake deposit and withdraw

· JUN 30, 2026 ·Updated SEP 28, 2026
Read
Share

Host sanctum-api.ironforge.network. apiKey required. No /swap/quote.

devrels.xyz/a/120

Sanctum is Solana liquid staking infrastructure. The developer REST surface is Sanctum API, OpenAPI 3.0.0, version 1.0.0. Prod server https://sanctum-api.ironforge.network. X @sanctumso. Every route takes apiKey as a required query param.

Live paths are metadata, APY, then order plus execute. GET /swap/quote, /swap/depositSol/order, and /swap/withdrawSol/order are not on the current spec. Token LST swaps go through /swap/token/*. Gateway at gateway.sanctum.so is still a separate JSON-RPC delivery product.

Metadata and APY

bash
BASE=https://sanctum-api.ironforge.network

GET $BASE/lsts?apiKey=YOUR_KEY
# 200: { data: [ LstWithStats + slug ] }

GET $BASE/lsts/{mintOrSymbol}?apiKey=YOUR_KEY

GET $BASE/validators/apy?apiKey=YOUR_KEY
# map of validator APY records

GET $BASE/lsts/{mintOrSymbol}/apys?apiKey=YOUR_KEY&limit=

Token swap: order then execute

GET /swap/token/order returns unsigned tx plus quote. Required query: apiKey, inp, out, amt. Optional: mode (ExactIn default, ExactOut), signer, inpAcc, outAcc, slippageBps, swapSrc. Sources default Inf, SanctumRouter, Jup. ExactOut is ignored if input is a stake account. Some sources do not support ExactOut.

Response fields: inp, out, mode, tx, swapSrcData, inpAmt, outAmt. Then POST /swap/token/execute?apiKey= with JSON signedTx (base64) and the orderResponse you just got.

bash
GET https://sanctum-api.ironforge.network/swap/token/order \
  ?apiKey=YOUR_KEY \
  &inp=<mint or vote pubkey> \
  &out=<mint or vote / stake program> \
  &amt=<lamports> \
  &mode=ExactIn \
  &signer=<wallet> \
  &slippageBps=50 \
  &swapSrc=Inf,SanctumRouter,Jup

POST https://sanctum-api.ironforge.network/swap/token/execute?apiKey=YOUR_KEY
Content-Type: application/json
{ "signedTx": "<base64>", "orderResponse": { ... } }

Stake deposit and withdraw

Deposit stake: GET /swap/depositStake/order then POST /swap/depositStake/execute. Order needs apiKey, out, inpAcc. Optional mode, signer, outAcc.

Withdraw stake: GET /swap/withdrawStake/order then POST /swap/withdrawStake/execute. Order needs apiKey, inp, amt. Optional out, mode, signer, inpAcc, bridgeStakeSeed, deactivate (Y or N).

Errors on the spec: 400 BAD_REQUEST, 401 UNAUTHORIZED, 403 forbidden. Do not put the key in git.

The LST registry

Canonical list still lives at github.com/igneous-labs/sanctum-lst-list as sanctum-lst-list.toml. The API also serves the live set via GET /lsts.

Sanctum Gateway: transaction delivery

Sanctum Gateway is a separate product from the LST API. It is a JSON-RPC endpoint that takes your signed or unsigned transaction and routes it through multiple delivery channels simultaneously to maximise the chance of landing. It does not replace your wallet or connection. It sits in front of the normal sendTransaction call.

The two JSON-RPC methods are buildGatewayTransaction and sendTransaction. The flow is:

  1. Build your transaction, serialize it to base64 (unsigned or partially signed).
  2. Call buildGatewayTransaction. Gateway wraps it with optimised priority fees and tip accounts.
  3. Sign the returned transaction locally with your private key.
  4. Call sendTransaction. Gateway routes it through all configured delivery methods.
typescript
const GATEWAY_URL = `https://gateway.sanctum.so/rpc?cluster=mainnet-beta&apiKey=${API_KEY}`;

async function sendViaGateway(connection: Connection, tx: Transaction, wallet: Keypair) {
  tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash;
  tx.feePayer = wallet.publicKey;
  const unsignedBase64 = tx.serialize({ requireAllSignatures: false }).toString("base64");

  const buildRes = await fetch(GATEWAY_URL, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      jsonrpc: "2.0",
      id: 1,
      method: "buildGatewayTransaction",
      params: [unsignedBase64, { encoding: "base64" }],
    }),
  }).then(r => r.json());

  const optimizedTx = Transaction.from(Buffer.from(buildRes.result, "base64"));
  optimizedTx.sign(wallet);
  const signedBase64 = optimizedTx.serialize().toString("base64");

  const sendRes = await fetch(GATEWAY_URL, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      jsonrpc: "2.0",
      id: 2,
      method: "sendTransaction",
      params: [signedBase64, { encoding: "base64" }],
    }),
  }).then(r => r.json());

  return sendRes.result;
}

The delivery channels Gateway routes through simultaneously:

  • Traditional RPCs - standard Solana RPC endpoints
  • SWQoS RPCs - stake-weighted quality of service connections
  • Jito bundles - MEV-protected submission through Jito block engine
  • Triton Cascade - Triton's multi-path sender
  • Paladin - validator-direct submission
  • Helius Sender, Nozomi, Astralane - specialist transaction relay services

If your transaction lands via an RPC path rather than the Jito bundle path, Gateway refunds the Jito tip. You pay only for the path that actually worked.

Project configuration and observability

Gateway has a dashboard at gateway.sanctum.so where you configure delivery methods, manage API keys per environment (mainnet/devnet), and view per-project transaction analytics: success rate, confirmation latency, which delivery channel landed each transaction.

On-chain programs

For deeper integration, Sanctum's on-chain programs are maintained by igneous-labs. The S Controller Program manages the multi-LST AMM (the Curve of LSTs) that holds hundreds of LSTs and enables capital-efficient LST-LST swaps. The Router Program handles staking and unstaking routing. The INF 1.5 repository is the current Infinity pool implementation.

bash
# Key repos under github.com/igneous-labs
sanctum-router-sdk     # Rust + TypeScript Router Program SDK
sanctum-lst-list       # Canonical LST registry (TOML)
sanctum-solana-utils   # Shared Solana utilities
sol-val-calc           # SOL value calculator SDK and programs
inf-1.5                # Infinity pool v1.5 (active)
S                      # S Controller Program (archived, see inf-1.5)

Keep reading

Get new articles in your inbox

Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.

solanadeveloper-toolsapiliquid-stakinglsttransactionsdefi

DevRels · June 30, 2026

Sanctum API: LST metadata, token swap, stake deposit and withdraw | devrels.xyz