# Swap with nested array of routes

`POST /swap`

Tags: `nestedArrays`

The `routes` property is an array of arrays of `Step` objects.
The Schema tab should render the type as `Step[][]` (or `object[][]`
for inline objects), not `array[]`.

## Request body (required)

### Content type: `application/json`

Schema: `object`

SwapData

- `slippage_bps` (integer)
  Slippage in basis points for the overall route
- `routes` (object[][])
  Array of possible routes (each route is a sequence of steps)
  - `routes[][].pool_address` (string)
  - `routes[][].token_in` (string)
  - `routes[][].token_out` (string)

## Responses

### 200

Echoes the request payload.

#### Content type: `application/json`

Schema: `object`

SwapData

- `slippage_bps` (integer)
  Slippage in basis points for the overall route
- `routes` (object[][])
  Array of possible routes (each route is a sequence of steps)
  - `routes[][].pool_address` (string)
  - `routes[][].token_in` (string)
  - `routes[][].token_out` (string)
