> ## Documentation Index
> Fetch the complete documentation index at: https://docs.relay.link/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Swap Sources

> This API returns all the available swap sources that can be either included or excluded for routing.



## OpenAPI

````yaml get /swap-sources
openapi: 3.0.3
info:
  title: Cross-chain solver
  version: 1.0.0
servers:
  - url: https://api.relay.link
    description: Mainnet API
  - url: https://api.testnets.relay.link
    description: Testnet API
security: []
paths:
  /swap-sources:
    get:
      parameters:
        - schema:
            type: number
          in: query
          name: chainId
          required: false
          description: Chain ID to get swap sources for
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sources:
                    type: array
                    description: An array of swap sources
                    items:
                      type: string
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Descriptive error message

````