ambolt

All endpoints

Guide for bots and agents

Five calls take a program from "which token?" to a transaction it signs itself. The swap calls are free; token search, facts and prices are pay-per-call over x402. Nothing is custodial and nothing here is a recommendation.

StepEndpointPer call
Find a token by name, symbol or addresssolana-token-search$0.003
Read its on-chain facts (authorities, supply, top holders)solana-token-facts$0.01
Current USD price for up to 50 mintssolana-token-price$0.003
Quote a swap (route, impact, fee)GET /api/swap/quotefree
Get an unsigned transaction for your walletPOST /api/swap/buildfree

How it fits together

  1. Search returns mint addresses with decimals and a verified flag. Use the mint address, not the symbol: many tokens share names.
  2. Facts tell you whether the issuer can still mint or freeze, how concentrated holdings are and how liquid the token is. They are numbers, not a verdict; your program decides what to do with them.
  3. A quote shows the expected output, the minimum after slippage, price impact, route and the fee, which is already included.
  4. The transaction call returns a base64 versioned transaction that is not signed. Your program checks it, signs it with its own key and submits it with sendTransaction to any Solana RPC node, or posts it to https://ambolt.dev/api/swap/execute with the requestId.

Paying from code

Each call returns 402 with the price. An x402 client pays in USDC (Base or Solana) and retries. Example with the official client (illustrative; keep the key in an environment variable and use a wallet with a small balance):

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(process.env.PAYER_KEY)) }],
});
const API = "https://api.ambolt.dev/v1";
const found = await (await pay(`${API}/solana-token-search?query=bonk&limit=3`)).json();
const mint = found.tokens[0].mint;
const facts = await (await pay(`${API}/solana-token-facts?mint=${mint}`)).json();
// decide with your own rules, then:
const q = new URLSearchParams({ inputMint: "So11111111111111111111111111111111111111112", outputMint: mint,
  amount: "10000000", taker: process.env.SOLANA_PUBKEY });
const swap = await (await pay(`${API}/solana-swap-transaction?${q}`)).json();
// swap.transaction is unsigned: deserialize, sign with your Solana key, send with your own RPC.

Good to know