k256.xyz
WSWebSocketRESTREST
v1REST/HTTP
/

Endpoints

120

Swap Operations

Limit Orders

Pools

Priority Fees

Prices

K1

Accounts

Wallet APIs

Platform Categories

Read-only

App Categories

CRUD

Leader Schedule

Discovery

Analytics MCP

Analytics

Analytics Builder

K2 Analytics

K1 Analytics

Leader Schedule Analytics

Registry Analytics

TX Router Analytics

System

v1 APIgateway.k256.xyz
GET
https://gateway.k256.xyz/k2/quote

Required

Input token mint address

Output token mint address

Amount in smallest unit (lamports for SOL)

Click Send to try this endpoint

GET

/k2/quote

Get a swap quote with optimal routing

/docs/rest/contracts/get-k2-quote

Get Swap Quote

Returns the optimal swap route between two tokens. The K256 routing engine evaluates all available liquidity across supported DEXes to find the best price.

Authentication

Requires a valid API key via X-API-Key header.

Request Format

  • Canonical: GET /k2/quote with URL query parameters
  • Also accepted: POST /k2/quote with JSON body (gateway convenience alias)
  • Key Parameters

  • inputMint / outputMint — SPL token mint addresses (required)
  • amount — Amount in smallest unit (lamports for SOL, required)
  • slippageBps — Slippage tolerance in basis points (default: 50 = 0.5%)
  • swapMode — ExactIn (default) or ExactOut
  • K256 Extensions

  • stream — Enable streaming quotes for real-time updates
  • maxHops — Maximum routing hops (1–4)
  • maxRouteSplits — Maximum parallel route splits
  • forceAlgorithm — Force a specific routing algorithm
  • algorithmMode — Algorithm selection mode
  • auctionAlgorithms — Algorithms for auction mode
  • auctionTimeoutMs — Timeout for auction-based routing
  • Notes

  • The returned quoteResponse object should be passed directly to /k2/swap
  • Route plan shows the exact path through AMMs with amounts and fees
  • Platform fee is applied when configured in your app settings