StarredSSOL––JJUP––JJitoSOL––BBonk––WWIF––

API

Beta

The HTTP endpoints behind Rings Swap. They return JSON. None of them signs or holds funds.

Overview

Base URL: the site you are on (for example https://your-domain/api). No API key. Amounts are integers in the token's smallest unit (lamports for SOL). Mints are base58 addresses.

Preview API: endpoints and fields may change. Market data (prices, quotes, token metadata) comes from public Solana market sources and is cached for a few seconds. Please keep usage fair.

GET /api/priceLive

USD price and 24 h change for up to 50 tokens.

QueryTypeDescription
idsstringComma-separated mint addresses (max 50)
Request
curl "/api/price?ids=So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
Response 200
{
  "So11111111111111111111111111111111111111112": { "usdPrice": 71.39, "change24h": 2.29 },
  "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": { "usdPrice": 0.9996, "change24h": -0.02 }
}

GET /api/quoteLive

A market quote for selling an exact amount. Read only: no transaction is built.

QueryTypeDescription
instringMint you sell
outstringMint you buy
amountinteger stringAmount you sell, in the smallest unit
slippageBpsintegerMax slippage in basis points (1 to 5000, default 50)
Request
curl "/api/quote?in=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&out=So11111111111111111111111111111111111111112&amount=250000000&slippageBps=50"
Response 200
{
  "inAmount": "250000000",
  "outAmount": "3497900000",
  "minOut": "3480410000",
  "priceImpactPct": 0.001,
  "hops": 1
}

GET /api/tokensLive

Token search and metadata. Use one of the three forms.

QueryDescription
q=bonkSearch by name, symbol or mint
mints=a,bMetadata for these mints
list=trendingTrending tokens over 24 h
Response 200 (one item)
[{
  "mint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
  "symbol": "Bonk", "name": "Bonk", "decimals": 5, "icon": "https://…", "verified": true,
  "usdPrice": 0.00000208, "change24h": 2.72, "mcap": 1840000000, "volume24h": 21000000
}]

GET /api/balancesLive

The public mainnet balances of a wallet: SOL plus every token account (both token programs) with a non-zero balance.

QueryTypeDescription
ownerstringWallet address
Response 200
{
  "sol": 12480000000,
  "tokens": [{ "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "250000000", "decimals": 6 }]
}

POST /api/swap/buildLive

Builds an unsigned normal swap for a wallet to sign: a fresh quote, a compute limit from the route's simulation, a priority fee from current demand and a fast-landing tip. The server never signs. Limited to 20 requests per minute per IP.

FieldTypeDescription
instringMint you sell
outstringMint you buy
amountinteger stringAmount you sell, in the smallest unit
slippageBpsintegerMax slippage in basis points
userstringThe wallet that signs and pays
Response 200
{
  "tx": "<base64 v0 transaction, unsigned>",
  "lastValidBlockHeight": 312345678,
  "quote": { "inAmount": "250000000", "outAmount": "3497900000", "minOut": "3480410000", "priceImpactPct": 0.001, "route": ["…"] },
  "fees": { "baseLamports": 5000, "priorityLamports": 18000, "tipLamports": 200000, "platformBps": 0 }
}

Sign tx with the wallet, then post the signed transaction to /api/swap/send and poll the status endpoint.

POST /api/swap/sendLive

Relays a transaction the wallet has already signed to Helius Sender, which routes it to validators and Jito at once. It cannot change the transaction (that would break the signature). Re-send the same bytes every 2 s until it is confirmed or its blockhash expires.

Request body
{ "tx": "<base64 signed transaction>" }
Response 200
{ "signature": "5VERv8…" }

GET /api/swap/statusLive

QueryDescription
sigTransaction signature
lastValidBlockHeightFrom the build response, to detect expiry
Response 200
{ "status": "pending" | "confirmed" | "finalized" | "failed" | "expired" }

WaitlistLive

The private swap waitlist. Stores the wallet address and when it joined, nothing else.

RequestResponse
GET /api/waitlist{ "count": 1234 }
GET /api/waitlist?address=…{ "count": 1234, "position": 87 | null }
POST /api/waitlist { "address": "…" }{ "count": 1235, "position": 1235, "isNew": true }

Private swap APIAfter the audit

These endpoints are planned and do not exist yet. They are listed so integrators can see the intended shape; it may change before launch.

EndpointPurpose
POST /api/private/depositBuild a deposit from a public to a private balance (you sign it)
POST /api/private/swapBuild a private swap (you sign it)
POST /api/private/withdrawBuild a withdrawal back to your public balance
GET /api/private/status?sig=Status of a private transaction by signature

What will not exist

No endpoint will ever take a private key, a seed phrase or custody of funds. Transactions are built on the server and signed by your wallet.

Errors

StatusMeaning
400A parameter is missing or invalid (bad mint, amount or owner)
422The swap would fail if sent (for example, a balance is too low)
429Too many requests; wait a moment
502The upstream market data or RPC did not answer; retry
Error body
{ "error": "bad request" }