---
title: "List swap routes"
method: GET
path: "/v0/share-classes/swap-routes"
tags: ["Swap orders"]
---

# List swap routes

`GET /v0/share-classes/swap-routes`

## Request

- Base URL: `https://distributor-api.spiko.io`
- URL: `https://distributor-api.spiko.io/v0/share-classes/swap-routes`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/spiko/apis/spiko-distributor-api/docs/v0/share-classes/swap-routes/get.ts> (a function with typed inputs; its response is checked against the schema)

**Returns every share class pair you have access to that supports a swap.**

- Both share classes of a returned pair are ones you can access, and the pair is one Spiko can currently convert. Use this to decide what to present: a pair absent from the list is a swap you should not offer.
- Pass `fromShareClassId` to get only the routes leaving one share class.
- A pair listed here is one [POST /v0/swap-orders/](#tag/Swap-orders/operation/swapOrders.createSwapOrder) accepts. The converse does not hold: that endpoint gates on convertibility and on the target account holding an active line, not on your access to the share classes, which is gated when the line is added. A pair absent here only for access reasons may therefore still be accepted.
- Whether a pair is swappable depends only on the two share classes, so this response is safe to cache per distributor. It says nothing about a particular investor: balance, an active account line on the destination account, and the investor's own fund access are checked when the order is placed.

## Query parameters

- `fromShareClassId` string, uuid: a Universally Unique Identifier

## Response `200`

Success

- SwapRouteDistributorApi[]
  - `fromShareClassId` string, uuid, required: a Universally Unique Identifier
  - `toShareClassId` string, uuid, required: a Universally Unique Identifier

## Other responses

- `400`: The request did not match the expected schema
- `401`: Authentication failed. Two bodies are possible: the schema below when the API rejects the credentials, and `{ "error": { "code", "status", "request", "message" } }` when the API gateway rejects them first. Only the former carries a `_tag`.
- `403`: Forbidden
- `503`: The investor is undergoing a scheduled upgrade, access is temporarily paused to ensure data safety.

---

[API](https://skmtc.dev/spiko/apis/spiko-distributor-api.md) - [All operations](https://skmtc.dev/spiko/apis/spiko-distributor-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spiko/apis/spiko-distributor-api/revisions/ad85137fd00b?raw)
