# spanDEX Source: https://spandex.sh Kiwi News: https://news.kiwistand.com/stories/spanDEX?index=0x698a215352110c30694369910ac2cf2771cdfedf12a05347c46a81da1fb5aa3e0bb154bb Submitted by tim on 2026-02-09 UTC, 5 upvotes, 1 comment ## Summary spanDEX is a TypeScript library, published as @spandex/core, for fetching swap quotes from multiple decentralized exchange providers. The article is a code snippet showing how getQuote is called with a chain ID, input and output token addresses, an exact-input amount, slippage in basis points, and a strategy option set to bestPrice. The example swaps 1 WETH for USDbC on Base (chain ID 8453), and it throws an error if no provider returns a successful quote. ## Article core import { getQuote } from "@spandex/core"; import { config } from "./config.js"; const quote = await getQuote({ config, swap: { chainId: 8453, inputToken: "0x4200000000000000000000000000000000000006", // WETH outputToken: "0xd9AAEC86B65D86f6A7B5B1b0c42FFA531710b6CA", // USDbC mode: "exactIn", inputAmount: 1_000_000_000_000_000_000n, // 1 WETH slippageBps: 50, swapperAccount: "0x1234567890abcdef1234567890abcdef12345678", }, strategy: "bestPrice", }); if (!quote) { throw new Error("No providers returned a successful quote"); } console.log(quote.provider, quote.simulation.outputAmount); ## Comments **nullradix.eth**: very cool, wish i could do this onchain though.