---
title: "Build an N:N basket into size-safe Solana batches"
method: POST
path: "/svm/multi-swap"
---

# Build an N:N basket into size-safe Solana batches

`POST /svm/multi-swap`

## Request

- Base URL: `https://swap.vurto.cc/v1`
- URL: `https://swap.vurto.cc/v1/svm/multi-swap`
- Auth: none required

No router contract of ours is involved, unlike EVM. The server compiles real versioned messages and adds legs until the next one would exceed 1232 bytes or 64 accounts. executionPlan reports the exact batches and signatures. Each batch is atomic, but multiple batches have partial-execution risk. Resume with the same correlationId, an incremented buildAttempt and only pendingLegIndexes; never repeat confirmed legs.

## Request body

- object
  - `chainId` 'solana-mainnet', required: Solana names its network, it does not number it.
  - `wallet` string: base58 address.
  - `slippageBps` integer: Optional.
  - `correlationId` string, uuid: Optional on the first build; required unchanged when resuming pending legs.
  - `buildAttempt` integer: Monotonic attempt number within correlationId.
  - `pendingLegIndexes` integer[]: Expanded global leg indexes to rebuild. Omit for the first build. Confirmed legs must never be included.
  - `inputLegs` object[], required
    - `tokenIn` string: Mint address, or the symbol of a VERIFIED token. Symbols resolve only against the verified list on purpose: on Solana anyone can mint a token carrying another one's symbol, name and icon, and the mint is the only real identity. CASE-SENSITIVE.
    - `amount` string: Human decimal.
    - `amountIn` string: Raw integer string.
  - `outputLegs` object[], required
    - `tokenOut` string: Mint address, or the symbol of a VERIFIED token. Symbols resolve only against the verified list on purpose: on Solana anyone can mint a token carrying another one's symbol, name and icon, and the mint is the only real identity. CASE-SENSITIVE.
    - `outputPercent` integer: Integer percent of total basket value. Must sum to 100.
    - `receiver` string: Optional per-leg destination.

## Response `200`

A build with correlationId, executionPlan and lotes[]. Each lote has one unsigned transaction, exact legIndexes, serialized bytes, account count, Token-2022 presence and compute consumed.

## Other responses

- `400`: invalid_basket | invalid_percent
- `422`: simulation_failed
- `502`: no_routes | rpc_failed

---

[API](https://skmtc.dev/vurto/apis/vurto-swap-public-api.md) · [All operations](https://skmtc.dev/vurto/apis/vurto-swap-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vurto/apis/vurto-swap-public-api/revisions/423be3a193b5?raw)
